diff --git a/.vscode/cspell.json b/.vscode/cspell.json index 6a867c8d4cc9c..73ae7f41a7e75 100644 --- a/.vscode/cspell.json +++ b/.vscode/cspell.json @@ -1327,7 +1327,11 @@ "Guage", "Plex", "Vstsrm", - "Localizable" + "Localizable", + "Dapr", + "TLSAES", + "Unregistering", + "Diffie" ] }, { diff --git a/sdk/websites/Azure.ResourceManager.AppService/Azure.ResourceManager.AppService.sln b/sdk/websites/Azure.ResourceManager.AppService/Azure.ResourceManager.AppService.sln index 3f800167a6bc2..84b4396b58de8 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/Azure.ResourceManager.AppService.sln +++ b/sdk/websites/Azure.ResourceManager.AppService/Azure.ResourceManager.AppService.sln @@ -6,8 +6,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.ResourceManager.AppSe EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.ResourceManager.AppService.Tests", "tests\Azure.ResourceManager.AppService.Tests.csproj", "{738C0769-57F8-439C-8078-54498A030BA0}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.Core.TestFramework", "..\..\core\Azure.Core.TestFramework\src\Azure.Core.TestFramework.csproj", "{DF15D10D-3646-447E-B00B-49506D142322}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.ResourceManager.AppService.Samples", "samples\Azure.ResourceManager.AppService.Samples.csproj", "{C5B419AD-A4F3-45D1-AD7E-6D85595169A8}" EndProject Global @@ -44,18 +42,6 @@ Global {738C0769-57F8-439C-8078-54498A030BA0}.Release|x64.Build.0 = Release|Any CPU {738C0769-57F8-439C-8078-54498A030BA0}.Release|x86.ActiveCfg = Release|Any CPU {738C0769-57F8-439C-8078-54498A030BA0}.Release|x86.Build.0 = Release|Any CPU - {DF15D10D-3646-447E-B00B-49506D142322}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {DF15D10D-3646-447E-B00B-49506D142322}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DF15D10D-3646-447E-B00B-49506D142322}.Debug|x64.ActiveCfg = Debug|Any CPU - {DF15D10D-3646-447E-B00B-49506D142322}.Debug|x64.Build.0 = Debug|Any CPU - {DF15D10D-3646-447E-B00B-49506D142322}.Debug|x86.ActiveCfg = Debug|Any CPU - {DF15D10D-3646-447E-B00B-49506D142322}.Debug|x86.Build.0 = Debug|Any CPU - {DF15D10D-3646-447E-B00B-49506D142322}.Release|Any CPU.ActiveCfg = Release|Any CPU - {DF15D10D-3646-447E-B00B-49506D142322}.Release|Any CPU.Build.0 = Release|Any CPU - {DF15D10D-3646-447E-B00B-49506D142322}.Release|x64.ActiveCfg = Release|Any CPU - {DF15D10D-3646-447E-B00B-49506D142322}.Release|x64.Build.0 = Release|Any CPU - {DF15D10D-3646-447E-B00B-49506D142322}.Release|x86.ActiveCfg = Release|Any CPU - {DF15D10D-3646-447E-B00B-49506D142322}.Release|x86.Build.0 = Release|Any CPU {C5B419AD-A4F3-45D1-AD7E-6D85595169A8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C5B419AD-A4F3-45D1-AD7E-6D85595169A8}.Debug|Any CPU.Build.0 = Debug|Any CPU {C5B419AD-A4F3-45D1-AD7E-6D85595169A8}.Debug|x64.ActiveCfg = Debug|Any CPU diff --git a/sdk/websites/Azure.ResourceManager.AppService/CHANGELOG.md b/sdk/websites/Azure.ResourceManager.AppService/CHANGELOG.md index e952468949010..6bd662ed4bf0c 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/CHANGELOG.md +++ b/sdk/websites/Azure.ResourceManager.AppService/CHANGELOG.md @@ -1,33 +1,35 @@ # Release History -## 1.1.0-beta.6 (Unreleased) +## 1.2.0 (2024-07-19) ### Features Added -### Breaking Changes -- Fix null Id deserialization problem for 'WebSiteResource.GetAllHybridConnectionDataAsync()' and 'WebSiteSlotResource.GetAllHybridConnectionSlotDataAsync()', to use 'WebSiteResource.GetHybridConnectionsAsync()' and 'WebSiteSlotResource.GetHybridConnectionsSlotAsync()' instead. - -### Bugs Fixed +- Added `ArmOperation.Rehydrate` and `ArmOperation.Rehydrate` static methods to rehydrate a long-running operation. +- Upgraded api-version tag from 'package-2021-02' to 'package-2023-12'. Tag detail available at https://github.com/Azure/azure-rest-api-specs/blob/928047803788f7377fa003a26ba2bdc2e0fcccc0/specification/web/resource-manager/readme.md ### Other Changes +- Upgraded Azure.Core from 1.31.0 to 1.41.0 +- Upgraded Azure.ResourceManager from 1.5.0 to 1.12.0 + ## 1.1.0-beta.5 (2024-04-19) ### Features Added -- Enable the new model serialization by using the System.ClientModel, refer this [document](https://aka.ms/azsdk/net/mrw) for more details. +- Enabled the new model serialization by using the System.ClientModel, refer this [document](https://aka.ms/azsdk/net/mrw) for more details. ### Bugs Fixed -- Add `200` to the response code of the `SyncFunctionTriggers` +- Added `200` to the response code of the `SyncFunctionTriggers` - SiteFunctionResource.GetFunctionKeysAsync /SiteSlotFunctionResource.GetFunctionKeysSlotAsync fixed: can not populated with function keys -- Add more enum values for `TriggeredWebJobStatus` +- Added more enum values for `TriggeredWebJobStatus` ## 1.1.0-beta.4 (2023-11-30) ### Features Added -- Enable mocking for extension methods, refer this [document](https://aka.ms/azsdk/net/mocking) for more details. +- Enabled mocking for extension methods, refer this [document](https://aka.ms/azsdk/net/mocking) for more details. + ### Other ChangesGetHybridConnectionsAsync - Upgraded dependent `Azure.ResourceManager` to 1.9.0. @@ -36,7 +38,7 @@ ### Bugs Fixed -- Due to `HealthCheckUri` not being a valid URI, add a new property `HealthCheckUriString` to replace it in order to fix the URI format issue. +- Due to `HealthCheckUri` not being a valid URI, added a new property `HealthCheckUriString` to replace it in order to fix the URI format issue. ## 1.1.0-beta.2 (2023-09-06) @@ -50,7 +52,7 @@ ### Features Added -- Enable the model factory feature for model mocking, more information can be found [here](https://azure.github.io/azure-sdk/dotnet_introduction.html#dotnet-mocking-factory-builder). +- Enabled the model factory feature for model mocking, more information can be found [here](https://azure.github.io/azure-sdk/dotnet_introduction.html#dotnet-mocking-factory-builder). - Added `AppCertificateData.ThumbprintString` to return the hexadecimal string representation of the SHA-1 hash of the certificate. `AppCertificateData.Thumbprint` has been hidden but is still available. - Added `AppServiceVirtualNetworkData.CertThumbprintString` to return the hexadecimal string representation of the SHA-1 hash of the certificate. @@ -303,4 +305,4 @@ This package follows the [new Azure SDK guidelines](https://azure.github.io/azur This package is a Public Preview version, so expect incompatible changes in subsequent releases as we improve the product. To provide feedback, submit an issue in our [Azure SDK for .NET GitHub repo](https://github.com/Azure/azure-sdk-for-net/issues). -> NOTE: For more information about unified authentication, please refer to [Microsoft Azure Identity documentation for .NET](https://docs.microsoft.com//dotnet/api/overview/azure/identity-readme?view=azure-dotnet). +> NOTE: For more information about unified authentication, please refer to [Microsoft Azure Identity documentation for .NET](https://docs.microsoft.com//dotnet/api/overview/azure/identity-readme?view=azure-dotnet). \ No newline at end of file diff --git a/sdk/websites/Azure.ResourceManager.AppService/api/Azure.ResourceManager.AppService.netstandard2.0.cs b/sdk/websites/Azure.ResourceManager.AppService/api/Azure.ResourceManager.AppService.netstandard2.0.cs index bc0d5f96607ba..5c863357616fc 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/api/Azure.ResourceManager.AppService.netstandard2.0.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/api/Azure.ResourceManager.AppService.netstandard2.0.cs @@ -309,6 +309,8 @@ protected AppServiceDomainResource() { } Azure.ResourceManager.AppService.AppServiceDomainData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.Response TransferOut(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> TransferOutAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Update(Azure.ResourceManager.AppService.Models.AppServiceDomainPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.AppService.Models.AppServiceDomainPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } @@ -333,6 +335,7 @@ public partial class AppServiceEnvironmentData : Azure.ResourceManager.Models.Tr { public AppServiceEnvironmentData(Azure.Core.AzureLocation location) { } public System.Collections.Generic.IList ClusterSettings { get { throw null; } } + public Azure.ResourceManager.AppService.CustomDnsSuffixConfigurationData CustomDnsSuffixConfiguration { get { throw null; } set { } } public int? DedicatedHostCount { get { throw null; } set { } } public string DnsSuffix { get { throw null; } set { } } public int? FrontEndScaleFactor { get { throw null; } set { } } @@ -345,8 +348,11 @@ public AppServiceEnvironmentData(Azure.Core.AzureLocation location) { } public int? MaximumNumberOfMachines { get { throw null; } } public int? MultiRoleCount { get { throw null; } } public string MultiSize { get { throw null; } set { } } + public Azure.ResourceManager.AppService.AseV3NetworkingConfigurationData NetworkingConfiguration { get { throw null; } set { } } public Azure.ResourceManager.AppService.Models.ProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.AppService.Models.HostingEnvironmentStatus? Status { get { throw null; } } + public Azure.ResourceManager.AppService.Models.AppServiceEnvironmentUpgradeAvailability? UpgradeAvailability { get { throw null; } } + public Azure.ResourceManager.AppService.Models.AppServiceEnvironmentUpgradePreference? UpgradePreference { get { throw null; } set { } } public System.Collections.Generic.IList UserWhitelistedIPRanges { get { throw null; } } public Azure.ResourceManager.AppService.Models.AppServiceVirtualNetworkProfile VirtualNetwork { get { throw null; } set { } } Azure.ResourceManager.AppService.AppServiceEnvironmentData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -375,6 +381,7 @@ protected AppServiceEnvironmentResource() { } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetCapacities(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetCapacitiesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppService.CustomDnsSuffixConfigurationResource GetCustomDnsSuffixConfiguration() { throw null; } public virtual Azure.Pageable GetDiagnostics(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetDiagnosticsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetDiagnosticsItem(string diagnosticsName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -417,8 +424,12 @@ protected AppServiceEnvironmentResource() { } Azure.ResourceManager.AppService.AppServiceEnvironmentData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.Response TestUpgradeAvailableNotification(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task TestUpgradeAvailableNotificationAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Update(Azure.ResourceManager.AppService.Models.AppServiceEnvironmentPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.AppService.Models.AppServiceEnvironmentPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Upgrade(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task UpgradeAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public static partial class AppServiceExtensions { @@ -476,6 +487,8 @@ public static partial class AppServiceExtensions public static System.Threading.Tasks.Task> GetAppServiceSourceControlAsync(this Azure.ResourceManager.Resources.TenantResource tenantResource, string sourceControlType, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.AppService.AppServiceSourceControlResource GetAppServiceSourceControlResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppService.AppServiceSourceControlCollection GetAppServiceSourceControls(this Azure.ResourceManager.Resources.TenantResource tenantResource) { throw null; } + public static Azure.Pageable GetAseRegions(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetAseRegionsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.AppService.AseV3NetworkingConfigurationResource GetAseV3NetworkingConfigurationResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Pageable GetAvailableStacksOnPremProviders(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.AppService.Models.ProviderOSTypeSelected? osTypeSelected = default(Azure.ResourceManager.AppService.Models.ProviderOSTypeSelected?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.AsyncPageable GetAvailableStacksOnPremProvidersAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.AppService.Models.ProviderOSTypeSelected? osTypeSelected = default(Azure.ResourceManager.AppService.Models.ProviderOSTypeSelected?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -486,6 +499,9 @@ public static partial class AppServiceExtensions public static Azure.ResourceManager.AppService.CertificateOrderDetectorResource GetCertificateOrderDetectorResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Response GetControlCenterSsoRequestDomain(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetControlCenterSsoRequestDomainAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.AppService.CustomDnsSuffixConfigurationResource GetCustomDnsSuffixConfigurationResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Pageable GetCustomHostNameSites(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string hostname = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetCustomHostNameSitesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string hostname = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Response GetDeletedSite(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string deletedSiteId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetDeletedSiteAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string deletedSiteId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.AppService.DeletedSiteResource GetDeletedSiteResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } @@ -501,6 +517,8 @@ public static partial class AppServiceExtensions public static Azure.AsyncPageable GetFunctionAppStacksProvidersAsync(this Azure.ResourceManager.Resources.TenantResource tenantResource, Azure.ResourceManager.AppService.Models.ProviderStackOSType? stackOSType = default(Azure.ResourceManager.AppService.Models.ProviderStackOSType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Pageable GetGeoRegions(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.AppService.Models.AppServiceSkuName? sku = default(Azure.ResourceManager.AppService.Models.AppServiceSkuName?), bool? linuxWorkersEnabled = default(bool?), bool? xenonWorkersEnabled = default(bool?), bool? linuxDynamicWorkersEnabled = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.AsyncPageable GetGeoRegionsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.AppService.Models.AppServiceSkuName? sku = default(Azure.ResourceManager.AppService.Models.AppServiceSkuName?), bool? linuxWorkersEnabled = default(bool?), bool? xenonWorkersEnabled = default(bool?), bool? linuxDynamicWorkersEnabled = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Pageable GetGetUsagesInLocations(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetGetUsagesInLocationsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.AppService.HostingEnvironmentDetectorResource GetHostingEnvironmentDetectorResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppService.HostingEnvironmentMultiRolePoolResource GetHostingEnvironmentMultiRolePoolResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppService.HostingEnvironmentPrivateEndpointConnectionResource GetHostingEnvironmentPrivateEndpointConnectionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } @@ -534,6 +552,7 @@ public static partial class AppServiceExtensions public static Azure.ResourceManager.AppService.SiteBackupResource GetSiteBackupResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppService.SiteConfigAppsettingResource GetSiteConfigAppsettingResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppService.SiteConfigSnapshotResource GetSiteConfigSnapshotResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.AppService.SiteContainerResource GetSiteContainerResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppService.SiteDeploymentResource GetSiteDeploymentResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppService.SiteDetectorResource GetSiteDetectorResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppService.SiteDiagnosticAnalysisResource GetSiteDiagnosticAnalysisResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } @@ -574,18 +593,26 @@ public static partial class AppServiceExtensions public static Azure.ResourceManager.AppService.SiteSlotPrivateEndpointConnectionResource GetSiteSlotPrivateEndpointConnectionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppService.SiteSlotProcessModuleResource GetSiteSlotProcessModuleResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppService.SiteSlotProcessResource GetSiteSlotProcessResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.AppService.SiteSlotSiteContainerResource GetSiteSlotSiteContainerResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppService.SiteSlotVirtualNetworkConnectionGatewayResource GetSiteSlotVirtualNetworkConnectionGatewayResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppService.SiteSlotVirtualNetworkConnectionResource GetSiteSlotVirtualNetworkConnectionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.AppService.SiteSlotWorkflowResource GetSiteSlotWorkflowResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppService.SiteVirtualNetworkConnectionGatewayResource GetSiteVirtualNetworkConnectionGatewayResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppService.SiteVirtualNetworkConnectionResource GetSiteVirtualNetworkConnectionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.AppService.SiteWorkflowResource GetSiteWorkflowResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Response GetSkus(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetSkusAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.AppService.SlotConfigNamesResource GetSlotConfigNamesResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Response GetStaticSite(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetStaticSiteAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.AppService.StaticSiteBasicAuthPropertyResource GetStaticSiteBasicAuthPropertyResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.AppService.StaticSiteBuildDatabaseConnectionResource GetStaticSiteBuildDatabaseConnectionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.AppService.StaticSiteBuildLinkedBackendResource GetStaticSiteBuildLinkedBackendResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppService.StaticSiteBuildResource GetStaticSiteBuildResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppService.StaticSiteBuildUserProvidedFunctionAppResource GetStaticSiteBuildUserProvidedFunctionAppResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppService.StaticSiteCustomDomainOverviewResource GetStaticSiteCustomDomainOverviewResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.AppService.StaticSiteDatabaseConnectionResource GetStaticSiteDatabaseConnectionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.AppService.StaticSiteLinkedBackendResource GetStaticSiteLinkedBackendResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppService.StaticSitePrivateEndpointConnectionResource GetStaticSitePrivateEndpointConnectionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppService.StaticSiteResource GetStaticSiteResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppService.StaticSiteCollection GetStaticSites(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } @@ -596,6 +623,7 @@ public static partial class AppServiceExtensions public static System.Threading.Tasks.Task> GetTopLevelDomainAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.AppService.TopLevelDomainResource GetTopLevelDomainResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppService.TopLevelDomainCollection GetTopLevelDomains(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource) { throw null; } + public static Azure.ResourceManager.AppService.WebAppRequestHistoryResource GetWebAppRequestHistoryResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Pageable GetWebAppStacksByLocation(this Azure.ResourceManager.Resources.TenantResource tenantResource, Azure.Core.AzureLocation location, Azure.ResourceManager.AppService.Models.ProviderStackOSType? stackOSType = default(Azure.ResourceManager.AppService.Models.ProviderStackOSType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.AsyncPageable GetWebAppStacksByLocationAsync(this Azure.ResourceManager.Resources.TenantResource tenantResource, Azure.Core.AzureLocation location, Azure.ResourceManager.AppService.Models.ProviderStackOSType? stackOSType = default(Azure.ResourceManager.AppService.Models.ProviderStackOSType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Pageable GetWebAppStacksProviders(this Azure.ResourceManager.Resources.TenantResource tenantResource, Azure.ResourceManager.AppService.Models.ProviderStackOSType? stackOSType = default(Azure.ResourceManager.AppService.Models.ProviderStackOSType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -635,6 +663,13 @@ public static partial class AppServiceExtensions public static Azure.ResourceManager.AppService.WebSiteTriggeredWebJobHistoryResource GetWebSiteTriggeredWebJobHistoryResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppService.WebSiteTriggeredwebJobResource GetWebSiteTriggeredwebJobResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppService.WebSiteWebJobResource GetWebSiteWebJobResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.AppService.WorkflowRunActionRepetitionResource GetWorkflowRunActionRepetitionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.AppService.WorkflowRunActionResource GetWorkflowRunActionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.AppService.WorkflowRunActionScopeRepetitionResource GetWorkflowRunActionScopeRepetitionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.AppService.WorkflowRunResource GetWorkflowRunResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.AppService.WorkflowTriggerHistoryResource GetWorkflowTriggerHistoryResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.AppService.WorkflowTriggerResource GetWorkflowTriggerResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.AppService.WorkflowVersionResource GetWorkflowVersionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Response PreviewStaticSiteWorkflow(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, Azure.ResourceManager.AppService.Models.StaticSitesWorkflowPreviewContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> PreviewStaticSiteWorkflowAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, Azure.ResourceManager.AppService.Models.StaticSitesWorkflowPreviewContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Response ResetAllRecommendationFilters(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -693,6 +728,7 @@ public AppServicePlanData(Azure.Core.AzureLocation location) { } public int? MaximumElasticWorkerCount { get { throw null; } set { } } public int? MaximumNumberOfWorkers { get { throw null; } } public int? NumberOfSites { get { throw null; } } + public int? NumberOfWorkers { get { throw null; } } public Azure.ResourceManager.AppService.Models.ProvisioningState? ProvisioningState { get { throw null; } } public string ResourceGroup { get { throw null; } } public Azure.ResourceManager.AppService.Models.AppServiceSkuDescription Sku { get { throw null; } set { } } @@ -949,7 +985,10 @@ public partial class AseV3NetworkingConfigurationData : Azure.ResourceManager.Mo public AseV3NetworkingConfigurationData() { } public bool? AllowNewPrivateEndpointConnections { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList ExternalInboundIPAddresses { get { throw null; } } + public string InboundIPAddressOverride { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList InternalInboundIPAddresses { get { throw null; } } + public bool? IsFtpEnabled { get { throw null; } set { } } + public bool? IsRemoteDebugEnabled { get { throw null; } set { } } public string Kind { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList LinuxOutboundIPAddresses { get { throw null; } } public System.Collections.Generic.IReadOnlyList WindowsOutboundIPAddresses { get { throw null; } } @@ -1037,6 +1076,40 @@ public CsmPublishingCredentialsPoliciesEntityData() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class CustomDnsSuffixConfigurationData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CustomDnsSuffixConfigurationData() { } + public System.Uri CertificateUri { get { throw null; } set { } } + public string DnsSuffix { get { throw null; } set { } } + public string KeyVaultReferenceIdentity { get { throw null; } set { } } + public string Kind { get { throw null; } set { } } + public string ProvisioningDetails { get { throw null; } } + public Azure.ResourceManager.AppService.Models.CustomDnsSuffixProvisioningState? ProvisioningState { get { throw null; } } + Azure.ResourceManager.AppService.CustomDnsSuffixConfigurationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.CustomDnsSuffixConfigurationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CustomDnsSuffixConfigurationResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected CustomDnsSuffixConfigurationResource() { } + public virtual Azure.ResourceManager.AppService.CustomDnsSuffixConfigurationData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.CustomDnsSuffixConfigurationData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.CustomDnsSuffixConfigurationData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.AppService.CustomDnsSuffixConfigurationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.CustomDnsSuffixConfigurationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class DeletedSiteCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected DeletedSiteCollection() { } @@ -1242,8 +1315,12 @@ protected HostingEnvironmentMultiRolePoolResource() { } public partial class HostingEnvironmentPrivateEndpointConnectionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected HostingEnvironmentPrivateEndpointConnectionCollection() { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string privateEndpointConnectionName, Azure.ResourceManager.AppService.Models.PrivateLinkConnectionApprovalRequestInfo info, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string privateEndpointConnectionName, Azure.ResourceManager.AppService.Models.PrivateLinkConnectionApprovalRequestInfo info, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string privateEndpointConnectionName, Azure.ResourceManager.AppService.RemotePrivateEndpointConnectionARMResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string privateEndpointConnectionName, Azure.ResourceManager.AppService.Models.PrivateLinkConnectionApprovalRequestInfo info, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string privateEndpointConnectionName, Azure.ResourceManager.AppService.RemotePrivateEndpointConnectionARMResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Exists(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> ExistsAsync(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -1272,8 +1349,12 @@ protected HostingEnvironmentPrivateEndpointConnectionResource() { } Azure.ResourceManager.AppService.RemotePrivateEndpointConnectionARMResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.Models.PrivateLinkConnectionApprovalRequestInfo info, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.Models.PrivateLinkConnectionApprovalRequestInfo info, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.Models.PrivateLinkConnectionApprovalRequestInfo info, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.RemotePrivateEndpointConnectionARMResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.Models.PrivateLinkConnectionApprovalRequestInfo info, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.RemotePrivateEndpointConnectionARMResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class HostingEnvironmentRecommendationCollection : Azure.ResourceManager.ArmCollection { @@ -1437,8 +1518,10 @@ public KubeEnvironmentData(Azure.Core.AzureLocation location) { } public Azure.Core.ResourceIdentifier AksResourceId { get { throw null; } set { } } public Azure.ResourceManager.AppService.Models.AppLogsConfiguration AppLogsConfiguration { get { throw null; } set { } } public Azure.ResourceManager.AppService.Models.ArcConfiguration ArcConfiguration { get { throw null; } set { } } + public Azure.ResourceManager.AppService.Models.ContainerAppsConfiguration ContainerAppsConfiguration { get { throw null; } set { } } public string DefaultDomain { get { throw null; } } public string DeploymentErrors { get { throw null; } } + public string EnvironmentType { get { throw null; } set { } } public Azure.ResourceManager.Resources.Models.ExtendedLocation ExtendedLocation { get { throw null; } set { } } public bool? IsInternalLoadBalancerEnabled { get { throw null; } set { } } public string Kind { get { throw null; } set { } } @@ -1908,12 +1991,14 @@ public SiteConfigData() { } public Azure.ResourceManager.AppService.Models.AppServiceCorsSettings Cors { get { throw null; } set { } } public System.Collections.Generic.IList DefaultDocuments { get { throw null; } set { } } public string DocumentRoot { get { throw null; } set { } } + public int? ElasticWebAppScaleLimit { get { throw null; } set { } } public System.Collections.Generic.IList ExperimentsRampUpRules { get { throw null; } } public Azure.ResourceManager.AppService.Models.AppServiceFtpsState? FtpsState { get { throw null; } set { } } public int? FunctionAppScaleLimit { get { throw null; } set { } } public System.Collections.Generic.IList HandlerMappings { get { throw null; } set { } } public string HealthCheckPath { get { throw null; } set { } } public System.Collections.Generic.IList IPSecurityRestrictions { get { throw null; } set { } } + public Azure.ResourceManager.AppService.Models.SiteDefaultAction? IPSecurityRestrictionsDefaultAction { get { throw null; } set { } } public bool? IsAlwaysOn { get { throw null; } set { } } public bool? IsAutoHealEnabled { get { throw null; } set { } } public bool? IsDetailedErrorLoggingEnabled { get { throw null; } set { } } @@ -1937,7 +2022,9 @@ public SiteConfigData() { } public Azure.ResourceManager.AppService.Models.SiteMachineKey MachineKey { get { throw null; } } public Azure.ResourceManager.AppService.Models.ManagedPipelineMode? ManagedPipelineMode { get { throw null; } set { } } public int? ManagedServiceIdentityId { get { throw null; } set { } } + public System.Collections.Generic.IList Metadata { get { throw null; } set { } } public int? MinimumElasticInstanceCount { get { throw null; } set { } } + public Azure.ResourceManager.AppService.Models.AppServiceTlsCipherSuite? MinTlsCipherSuite { get { throw null; } set { } } public Azure.ResourceManager.AppService.Models.AppServiceSupportedTlsVersion? MinTlsVersion { get { throw null; } set { } } public string NetFrameworkVersion { get { throw null; } set { } } public string NodeVersion { get { throw null; } set { } } @@ -1952,6 +2039,7 @@ public SiteConfigData() { } public string RemoteDebuggingVersion { get { throw null; } set { } } public System.DateTimeOffset? RequestTracingExpirationOn { get { throw null; } set { } } public System.Collections.Generic.IList ScmIPSecurityRestrictions { get { throw null; } set { } } + public Azure.ResourceManager.AppService.Models.SiteDefaultAction? ScmIPSecurityRestrictionsDefaultAction { get { throw null; } set { } } public Azure.ResourceManager.AppService.Models.AppServiceSupportedTlsVersion? ScmMinTlsVersion { get { throw null; } set { } } public Azure.ResourceManager.AppService.Models.ScmType? ScmType { get { throw null; } set { } } public string TracingOptions { get { throw null; } set { } } @@ -1996,6 +2084,64 @@ protected SiteConfigSnapshotResource() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class SiteContainerCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected SiteContainerCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string containerName, Azure.ResourceManager.AppService.SiteContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string containerName, Azure.ResourceManager.AppService.SiteContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string containerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string containerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string containerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string containerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string containerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string containerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class SiteContainerData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SiteContainerData() { } + public Azure.ResourceManager.AppService.Models.SiteContainerAuthType? AuthType { get { throw null; } set { } } + public System.DateTimeOffset? CreatedOn { get { throw null; } } + public System.Collections.Generic.IList EnvironmentVariables { get { throw null; } } + public string Image { get { throw null; } set { } } + public bool? IsMain { get { throw null; } set { } } + public string Kind { get { throw null; } set { } } + public System.DateTimeOffset? LastModifiedOn { get { throw null; } } + public string PasswordSecret { get { throw null; } set { } } + public string StartUpCommand { get { throw null; } set { } } + public string TargetPort { get { throw null; } set { } } + public string UserManagedIdentityClientId { get { throw null; } set { } } + public string UserName { get { throw null; } set { } } + public System.Collections.Generic.IList VolumeMounts { get { throw null; } } + Azure.ResourceManager.AppService.SiteContainerData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.SiteContainerData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SiteContainerResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected SiteContainerResource() { } + public virtual Azure.ResourceManager.AppService.SiteContainerData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name, string containerName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.AppService.SiteContainerData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.SiteContainerData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.SiteContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.SiteContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public partial class SiteDeploymentCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected SiteDeploymentCollection() { } @@ -2520,8 +2666,12 @@ protected SiteNetworkConfigResource() { } public partial class SitePrivateEndpointConnectionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected SitePrivateEndpointConnectionCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string privateEndpointConnectionName, Azure.ResourceManager.AppService.Models.PrivateLinkConnectionApprovalRequestInfo info, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string privateEndpointConnectionName, Azure.ResourceManager.AppService.Models.PrivateLinkConnectionApprovalRequestInfo info, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string privateEndpointConnectionName, Azure.ResourceManager.AppService.Models.PrivateLinkConnectionApprovalRequestInfo info, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string privateEndpointConnectionName, Azure.ResourceManager.AppService.RemotePrivateEndpointConnectionARMResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string privateEndpointConnectionName, Azure.ResourceManager.AppService.Models.PrivateLinkConnectionApprovalRequestInfo info, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string privateEndpointConnectionName, Azure.ResourceManager.AppService.RemotePrivateEndpointConnectionARMResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Exists(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> ExistsAsync(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -2550,8 +2700,12 @@ protected SitePrivateEndpointConnectionResource() { } Azure.ResourceManager.AppService.RemotePrivateEndpointConnectionARMResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.Models.PrivateLinkConnectionApprovalRequestInfo info, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.Models.PrivateLinkConnectionApprovalRequestInfo info, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.Models.PrivateLinkConnectionApprovalRequestInfo info, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.RemotePrivateEndpointConnectionARMResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.Models.PrivateLinkConnectionApprovalRequestInfo info, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.RemotePrivateEndpointConnectionARMResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class SiteProcessCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { @@ -3228,8 +3382,12 @@ protected SiteSlotNetworkConfigResource() { } public partial class SiteSlotPrivateEndpointConnectionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected SiteSlotPrivateEndpointConnectionCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string privateEndpointConnectionName, Azure.ResourceManager.AppService.Models.PrivateLinkConnectionApprovalRequestInfo info, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string privateEndpointConnectionName, Azure.ResourceManager.AppService.Models.PrivateLinkConnectionApprovalRequestInfo info, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string privateEndpointConnectionName, Azure.ResourceManager.AppService.Models.PrivateLinkConnectionApprovalRequestInfo info, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string privateEndpointConnectionName, Azure.ResourceManager.AppService.RemotePrivateEndpointConnectionARMResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string privateEndpointConnectionName, Azure.ResourceManager.AppService.Models.PrivateLinkConnectionApprovalRequestInfo info, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string privateEndpointConnectionName, Azure.ResourceManager.AppService.RemotePrivateEndpointConnectionARMResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Exists(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> ExistsAsync(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -3258,8 +3416,12 @@ protected SiteSlotPrivateEndpointConnectionResource() { } Azure.ResourceManager.AppService.RemotePrivateEndpointConnectionARMResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.Models.PrivateLinkConnectionApprovalRequestInfo info, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.Models.PrivateLinkConnectionApprovalRequestInfo info, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.Models.PrivateLinkConnectionApprovalRequestInfo info, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.RemotePrivateEndpointConnectionARMResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.Models.PrivateLinkConnectionApprovalRequestInfo info, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.RemotePrivateEndpointConnectionARMResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class SiteSlotProcessCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { @@ -3330,6 +3492,42 @@ protected SiteSlotProcessResource() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class SiteSlotSiteContainerCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected SiteSlotSiteContainerCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string containerName, Azure.ResourceManager.AppService.SiteContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string containerName, Azure.ResourceManager.AppService.SiteContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string containerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string containerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string containerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string containerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string containerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string containerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class SiteSlotSiteContainerResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected SiteSlotSiteContainerResource() { } + public virtual Azure.ResourceManager.AppService.SiteContainerData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name, string slot, string containerName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.AppService.SiteContainerData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.SiteContainerData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.SiteContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.SiteContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public partial class SiteSlotVirtualNetworkConnectionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected SiteSlotVirtualNetworkConnectionCollection() { } @@ -3398,6 +3596,36 @@ protected SiteSlotVirtualNetworkConnectionResource() { } public virtual Azure.Response Update(Azure.ResourceManager.AppService.AppServiceVirtualNetworkData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.AppService.AppServiceVirtualNetworkData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } + public partial class SiteSlotWorkflowCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected SiteSlotWorkflowCollection() { } + public virtual Azure.Response Exists(string workflowName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string workflowName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string workflowName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string workflowName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string workflowName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string workflowName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class SiteSlotWorkflowResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected SiteSlotWorkflowResource() { } + public virtual Azure.ResourceManager.AppService.WorkflowEnvelopeData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name, string slot, string workflowName) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.AppService.WorkflowEnvelopeData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.WorkflowEnvelopeData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class SiteSourceControlData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public SiteSourceControlData() { } @@ -3483,6 +3711,36 @@ protected SiteVirtualNetworkConnectionResource() { } public virtual Azure.Response Update(Azure.ResourceManager.AppService.AppServiceVirtualNetworkData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.AppService.AppServiceVirtualNetworkData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } + public partial class SiteWorkflowCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected SiteWorkflowCollection() { } + public virtual Azure.Response Exists(string workflowName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string workflowName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string workflowName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string workflowName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string workflowName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string workflowName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class SiteWorkflowResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected SiteWorkflowResource() { } + public virtual Azure.ResourceManager.AppService.WorkflowEnvelopeData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name, string workflowName) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.AppService.WorkflowEnvelopeData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.WorkflowEnvelopeData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class SlotConfigNamesResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public static readonly Azure.Core.ResourceType ResourceType; @@ -3513,6 +3771,55 @@ public SlotConfigNamesResourceData() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class StaticSiteBasicAuthPropertyCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected StaticSiteBasicAuthPropertyCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.Models.StaticSiteBasicAuthName basicAuthName, Azure.ResourceManager.AppService.StaticSiteBasicAuthPropertyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.Models.StaticSiteBasicAuthName basicAuthName, Azure.ResourceManager.AppService.StaticSiteBasicAuthPropertyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(Azure.ResourceManager.AppService.Models.StaticSiteBasicAuthName basicAuthName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(Azure.ResourceManager.AppService.Models.StaticSiteBasicAuthName basicAuthName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(Azure.ResourceManager.AppService.Models.StaticSiteBasicAuthName basicAuthName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(Azure.ResourceManager.AppService.Models.StaticSiteBasicAuthName basicAuthName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(Azure.ResourceManager.AppService.Models.StaticSiteBasicAuthName basicAuthName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(Azure.ResourceManager.AppService.Models.StaticSiteBasicAuthName basicAuthName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class StaticSiteBasicAuthPropertyData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public StaticSiteBasicAuthPropertyData() { } + public string ApplicableEnvironmentsMode { get { throw null; } set { } } + public System.Collections.Generic.IList Environments { get { throw null; } } + public string Kind { get { throw null; } set { } } + public string Password { get { throw null; } set { } } + public string SecretState { get { throw null; } } + public System.Uri SecretUri { get { throw null; } set { } } + Azure.ResourceManager.AppService.StaticSiteBasicAuthPropertyData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.StaticSiteBasicAuthPropertyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class StaticSiteBasicAuthPropertyResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected StaticSiteBasicAuthPropertyResource() { } + public virtual Azure.ResourceManager.AppService.StaticSiteBasicAuthPropertyData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name, Azure.ResourceManager.AppService.Models.StaticSiteBasicAuthName basicAuthName) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.AppService.StaticSiteBasicAuthPropertyData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.StaticSiteBasicAuthPropertyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.StaticSiteBasicAuthPropertyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.StaticSiteBasicAuthPropertyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public partial class StaticSiteBuildCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected StaticSiteBuildCollection() { } @@ -3533,9 +3840,11 @@ public partial class StaticSiteBuildData : Azure.ResourceManager.Models.Resource public StaticSiteBuildData() { } public string BuildId { get { throw null; } } public System.DateTimeOffset? CreatedOn { get { throw null; } } + public System.Collections.Generic.IReadOnlyList DatabaseConnections { get { throw null; } } public string Hostname { get { throw null; } } public string Kind { get { throw null; } set { } } public System.DateTimeOffset? LastUpdatedOn { get { throw null; } } + public System.Collections.Generic.IReadOnlyList LinkedBackends { get { throw null; } } public string PullRequestTitle { get { throw null; } } public string SourceBranch { get { throw null; } } public Azure.ResourceManager.AppService.Models.StaticSiteBuildStatus? Status { get { throw null; } } @@ -3546,6 +3855,82 @@ public StaticSiteBuildData() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class StaticSiteBuildDatabaseConnectionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected StaticSiteBuildDatabaseConnectionCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string databaseConnectionName, Azure.ResourceManager.AppService.StaticSiteDatabaseConnectionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string databaseConnectionName, Azure.ResourceManager.AppService.StaticSiteDatabaseConnectionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string databaseConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string databaseConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string databaseConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string databaseConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string databaseConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string databaseConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class StaticSiteBuildDatabaseConnectionResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected StaticSiteBuildDatabaseConnectionResource() { } + public virtual Azure.ResourceManager.AppService.StaticSiteDatabaseConnectionData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name, string environmentName, string databaseConnectionName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetBuildDatabaseConnectionWithDetails(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetBuildDatabaseConnectionWithDetailsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.AppService.StaticSiteDatabaseConnectionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.StaticSiteDatabaseConnectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.Response Update(Azure.ResourceManager.AppService.Models.StaticSiteDatabaseConnectionPatchContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.AppService.Models.StaticSiteDatabaseConnectionPatchContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class StaticSiteBuildLinkedBackendCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected StaticSiteBuildLinkedBackendCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string linkedBackendName, Azure.ResourceManager.AppService.StaticSiteLinkedBackendData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string linkedBackendName, Azure.ResourceManager.AppService.StaticSiteLinkedBackendData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string linkedBackendName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string linkedBackendName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string linkedBackendName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string linkedBackendName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string linkedBackendName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string linkedBackendName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class StaticSiteBuildLinkedBackendResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected StaticSiteBuildLinkedBackendResource() { } + public virtual Azure.ResourceManager.AppService.StaticSiteLinkedBackendData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name, string environmentName, string linkedBackendName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, bool? isCleaningAuthConfig = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, bool? isCleaningAuthConfig = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.AppService.StaticSiteLinkedBackendData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.StaticSiteLinkedBackendData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.StaticSiteLinkedBackendData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.StaticSiteLinkedBackendData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation ValidateBackendForBuild(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.StaticSiteLinkedBackendData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task ValidateBackendForBuildAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.StaticSiteLinkedBackendData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public partial class StaticSiteBuildResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public static readonly Azure.Core.ResourceType ResourceType; @@ -3563,12 +3948,20 @@ protected StaticSiteBuildResource() { } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetBuildDatabaseConnectionsWithDetails(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetBuildDatabaseConnectionsWithDetailsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetFunctionAppSettings(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetFunctionAppSettingsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetFunctions(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetFunctionsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetStaticSiteBuildAppSettings(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetStaticSiteBuildAppSettingsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetStaticSiteBuildDatabaseConnection(string databaseConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetStaticSiteBuildDatabaseConnectionAsync(string databaseConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppService.StaticSiteBuildDatabaseConnectionCollection GetStaticSiteBuildDatabaseConnections() { throw null; } + public virtual Azure.Response GetStaticSiteBuildLinkedBackend(string linkedBackendName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetStaticSiteBuildLinkedBackendAsync(string linkedBackendName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppService.StaticSiteBuildLinkedBackendCollection GetStaticSiteBuildLinkedBackends() { throw null; } public virtual Azure.Response GetStaticSiteBuildUserProvidedFunctionApp(string functionAppName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetStaticSiteBuildUserProvidedFunctionAppAsync(string functionAppName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.AppService.StaticSiteBuildUserProvidedFunctionAppCollection GetStaticSiteBuildUserProvidedFunctionApps() { throw null; } @@ -3692,12 +4085,16 @@ public StaticSiteData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.AppService.Models.StaticSiteBuildProperties BuildProperties { get { throw null; } set { } } public string ContentDistributionEndpoint { get { throw null; } } public System.Collections.Generic.IReadOnlyList CustomDomains { get { throw null; } } + public System.Collections.Generic.IReadOnlyList DatabaseConnections { get { throw null; } } public string DefaultHostname { get { throw null; } } + public Azure.ResourceManager.AppService.Models.EnterpriseGradeCdnStatus? EnterpriseGradeCdnStatus { get { throw null; } set { } } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public string KeyVaultReferenceIdentity { get { throw null; } } public string Kind { get { throw null; } set { } } + public System.Collections.Generic.IReadOnlyList LinkedBackends { get { throw null; } } public System.Collections.Generic.IReadOnlyList PrivateEndpointConnections { get { throw null; } } - public string Provider { get { throw null; } } + public string Provider { get { throw null; } set { } } + public string PublicNetworkAccess { get { throw null; } set { } } public string RepositoryToken { get { throw null; } set { } } public System.Uri RepositoryUri { get { throw null; } set { } } public Azure.ResourceManager.AppService.Models.AppServiceSkuDescription Sku { get { throw null; } set { } } @@ -3710,11 +4107,120 @@ public StaticSiteData(Azure.Core.AzureLocation location) { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class StaticSiteDatabaseConnectionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected StaticSiteDatabaseConnectionCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string databaseConnectionName, Azure.ResourceManager.AppService.StaticSiteDatabaseConnectionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string databaseConnectionName, Azure.ResourceManager.AppService.StaticSiteDatabaseConnectionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string databaseConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string databaseConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string databaseConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string databaseConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string databaseConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string databaseConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class StaticSiteDatabaseConnectionData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public StaticSiteDatabaseConnectionData() { } + public System.Collections.Generic.IReadOnlyList ConfigurationFiles { get { throw null; } } + public string ConnectionIdentity { get { throw null; } set { } } + public string ConnectionString { get { throw null; } set { } } + public string Kind { get { throw null; } set { } } + public string Region { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } + Azure.ResourceManager.AppService.StaticSiteDatabaseConnectionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.StaticSiteDatabaseConnectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class StaticSiteDatabaseConnectionResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected StaticSiteDatabaseConnectionResource() { } + public virtual Azure.ResourceManager.AppService.StaticSiteDatabaseConnectionData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name, string databaseConnectionName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetDatabaseConnectionWithDetails(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDatabaseConnectionWithDetailsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.AppService.StaticSiteDatabaseConnectionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.StaticSiteDatabaseConnectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.Response Update(Azure.ResourceManager.AppService.Models.StaticSiteDatabaseConnectionPatchContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.AppService.Models.StaticSiteDatabaseConnectionPatchContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class StaticSiteLinkedBackendCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected StaticSiteLinkedBackendCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string linkedBackendName, Azure.ResourceManager.AppService.StaticSiteLinkedBackendData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string linkedBackendName, Azure.ResourceManager.AppService.StaticSiteLinkedBackendData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string linkedBackendName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string linkedBackendName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string linkedBackendName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string linkedBackendName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string linkedBackendName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string linkedBackendName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class StaticSiteLinkedBackendData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public StaticSiteLinkedBackendData() { } + public Azure.Core.ResourceIdentifier BackendResourceId { get { throw null; } set { } } + public System.DateTimeOffset? CreatedOn { get { throw null; } } + public string Kind { get { throw null; } set { } } + public string ProvisioningState { get { throw null; } } + public string Region { get { throw null; } set { } } + Azure.ResourceManager.AppService.StaticSiteLinkedBackendData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.StaticSiteLinkedBackendData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class StaticSiteLinkedBackendResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected StaticSiteLinkedBackendResource() { } + public virtual Azure.ResourceManager.AppService.StaticSiteLinkedBackendData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name, string linkedBackendName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, bool? isCleaningAuthConfig = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, bool? isCleaningAuthConfig = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.AppService.StaticSiteLinkedBackendData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.StaticSiteLinkedBackendData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.StaticSiteLinkedBackendData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.StaticSiteLinkedBackendData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation ValidateBackend(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.StaticSiteLinkedBackendData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task ValidateBackendAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.StaticSiteLinkedBackendData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public partial class StaticSitePrivateEndpointConnectionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected StaticSitePrivateEndpointConnectionCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string privateEndpointConnectionName, Azure.ResourceManager.AppService.Models.PrivateLinkConnectionApprovalRequestInfo info, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string privateEndpointConnectionName, Azure.ResourceManager.AppService.Models.PrivateLinkConnectionApprovalRequestInfo info, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string privateEndpointConnectionName, Azure.ResourceManager.AppService.Models.PrivateLinkConnectionApprovalRequestInfo info, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string privateEndpointConnectionName, Azure.ResourceManager.AppService.RemotePrivateEndpointConnectionARMResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string privateEndpointConnectionName, Azure.ResourceManager.AppService.Models.PrivateLinkConnectionApprovalRequestInfo info, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string privateEndpointConnectionName, Azure.ResourceManager.AppService.RemotePrivateEndpointConnectionARMResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Exists(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> ExistsAsync(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -3743,8 +4249,12 @@ protected StaticSitePrivateEndpointConnectionResource() { } Azure.ResourceManager.AppService.RemotePrivateEndpointConnectionARMResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.Models.PrivateLinkConnectionApprovalRequestInfo info, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.Models.PrivateLinkConnectionApprovalRequestInfo info, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.Models.PrivateLinkConnectionApprovalRequestInfo info, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.RemotePrivateEndpointConnectionARMResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.Models.PrivateLinkConnectionApprovalRequestInfo info, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.RemotePrivateEndpointConnectionARMResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class StaticSiteResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { @@ -3773,18 +4283,29 @@ protected StaticSiteResource() { } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetConfiguredRoles(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetConfiguredRolesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetDatabaseConnectionsWithDetails(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetDatabaseConnectionsWithDetailsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetFunctionAppSettings(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetFunctionAppSettingsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetPrivateLinkResources(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetPrivateLinkResourcesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppService.StaticSiteBasicAuthPropertyCollection GetStaticSiteBasicAuthProperties() { throw null; } + public virtual Azure.Response GetStaticSiteBasicAuthProperty(Azure.ResourceManager.AppService.Models.StaticSiteBasicAuthName basicAuthName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetStaticSiteBasicAuthPropertyAsync(Azure.ResourceManager.AppService.Models.StaticSiteBasicAuthName basicAuthName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetStaticSiteBuild(string environmentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetStaticSiteBuildAsync(string environmentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.AppService.StaticSiteBuildCollection GetStaticSiteBuilds() { throw null; } public virtual Azure.Response GetStaticSiteCustomDomainOverview(string domainName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetStaticSiteCustomDomainOverviewAsync(string domainName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.AppService.StaticSiteCustomDomainOverviewCollection GetStaticSiteCustomDomainOverviews() { throw null; } + public virtual Azure.Response GetStaticSiteDatabaseConnection(string databaseConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetStaticSiteDatabaseConnectionAsync(string databaseConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppService.StaticSiteDatabaseConnectionCollection GetStaticSiteDatabaseConnections() { throw null; } public virtual Azure.Pageable GetStaticSiteFunctions(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetStaticSiteFunctionsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetStaticSiteLinkedBackend(string linkedBackendName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetStaticSiteLinkedBackendAsync(string linkedBackendName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppService.StaticSiteLinkedBackendCollection GetStaticSiteLinkedBackends() { throw null; } public virtual Azure.Response GetStaticSitePrivateEndpointConnection(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetStaticSitePrivateEndpointConnectionAsync(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.AppService.StaticSitePrivateEndpointConnectionCollection GetStaticSitePrivateEndpointConnections() { throw null; } @@ -3928,9 +4449,11 @@ public TriggeredWebJobData() { } public string Error { get { throw null; } set { } } public System.Uri ExtraInfoUri { get { throw null; } set { } } public System.Uri HistoryUri { get { throw null; } set { } } + public bool? IsStorageAccountRequired { get { throw null; } set { } } public bool? IsUsingSdk { get { throw null; } set { } } public string Kind { get { throw null; } set { } } public Azure.ResourceManager.AppService.Models.TriggeredJobRun LatestRun { get { throw null; } set { } } + public string PublicNetworkAccess { get { throw null; } set { } } public string RunCommand { get { throw null; } set { } } public System.Uri SchedulerLogsUri { get { throw null; } set { } } public System.Collections.Generic.IDictionary Settings { get { throw null; } } @@ -3985,6 +4508,46 @@ public WebAppDeploymentData() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class WebAppRequestHistoryCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected WebAppRequestHistoryCollection() { } + public virtual Azure.Response Exists(string requestHistoryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string requestHistoryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string requestHistoryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string requestHistoryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string requestHistoryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string requestHistoryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class WebAppRequestHistoryData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WebAppRequestHistoryData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.AppService.Models.WebAppRequestHistoryProperties Properties { get { throw null; } set { } } + Azure.ResourceManager.AppService.WebAppRequestHistoryData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.WebAppRequestHistoryData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WebAppRequestHistoryResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected WebAppRequestHistoryResource() { } + public virtual Azure.ResourceManager.AppService.WebAppRequestHistoryData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, string repetitionName, string requestHistoryName) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.AppService.WebAppRequestHistoryData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.WebAppRequestHistoryData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class WebJobData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public WebJobData() { } @@ -4131,9 +4694,12 @@ public WebSiteData(Azure.Core.AzureLocation location) { } public int? ContainerSize { get { throw null; } set { } } public string CustomDomainVerificationId { get { throw null; } set { } } public int? DailyMemoryTimeQuota { get { throw null; } set { } } + public Azure.ResourceManager.AppService.Models.AppDaprConfig DaprConfig { get { throw null; } set { } } public string DefaultHostName { get { throw null; } } + public Azure.ResourceManager.AppService.Models.SiteDnsConfig DnsConfiguration { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList EnabledHostNames { get { throw null; } } public Azure.ResourceManager.Resources.Models.ExtendedLocation ExtendedLocation { get { throw null; } set { } } + public Azure.ResourceManager.AppService.Models.FunctionAppConfig FunctionAppConfig { get { throw null; } set { } } public Azure.ResourceManager.AppService.Models.HostingEnvironmentProfile HostingEnvironmentProfile { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList HostNames { get { throw null; } } public System.Collections.Generic.IList HostNameSslStates { get { throw null; } } @@ -4149,15 +4715,22 @@ public WebSiteData(Azure.Core.AzureLocation location) { } public bool? IsReserved { get { throw null; } set { } } public bool? IsScmSiteAlsoStopped { get { throw null; } set { } } public bool? IsStorageAccountRequired { get { throw null; } set { } } + public bool? IsVnetBackupRestoreEnabled { get { throw null; } set { } } + public bool? IsVnetContentShareEnabled { get { throw null; } set { } } + public bool? IsVnetImagePullEnabled { get { throw null; } set { } } + public bool? IsVnetRouteAllEnabled { get { throw null; } set { } } public bool? IsXenon { get { throw null; } set { } } public string KeyVaultReferenceIdentity { get { throw null; } set { } } public string Kind { get { throw null; } set { } } public System.DateTimeOffset? LastModifiedTimeUtc { get { throw null; } } + public string ManagedEnvironmentId { get { throw null; } set { } } public int? MaxNumberOfWorkers { get { throw null; } } public string OutboundIPAddresses { get { throw null; } } public string PossibleOutboundIPAddresses { get { throw null; } } + public string PublicNetworkAccess { get { throw null; } set { } } public Azure.ResourceManager.AppService.Models.RedundancyMode? RedundancyMode { get { throw null; } set { } } public string RepositorySiteName { get { throw null; } } + public Azure.ResourceManager.AppService.Models.FunctionAppResourceConfig ResourceConfig { get { throw null; } set { } } public string ResourceGroup { get { throw null; } } public Azure.ResourceManager.AppService.Models.SiteConfigProperties SiteConfig { get { throw null; } set { } } public Azure.ResourceManager.AppService.Models.SlotSwapStatus SlotSwapStatus { get { throw null; } } @@ -4167,6 +4740,7 @@ public WebSiteData(Azure.Core.AzureLocation location) { } public System.Collections.Generic.IReadOnlyList TrafficManagerHostNames { get { throw null; } } public Azure.ResourceManager.AppService.Models.AppServiceUsageState? UsageState { get { throw null; } } public Azure.Core.ResourceIdentifier VirtualNetworkSubnetId { get { throw null; } set { } } + public string WorkloadProfileName { get { throw null; } set { } } Azure.ResourceManager.AppService.WebSiteData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.AppService.WebSiteData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4336,6 +4910,8 @@ protected WebSiteResource() { } public virtual System.Threading.Tasks.Task ApplySlotConfigToProductionAsync(Azure.ResourceManager.AppService.Models.CsmSlotEntity slotSwapEntity, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Backup(Azure.ResourceManager.AppService.Models.WebAppBackupInfo info, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> BackupAsync(Azure.ResourceManager.AppService.Models.WebAppBackupInfo info, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response CreateOneDeployOperation(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOneDeployOperationAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response CreateOrUpdateHostSecret(string keyType, string keyName, Azure.ResourceManager.AppService.Models.WebAppKeyInfo info, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> CreateOrUpdateHostSecretAsync(string keyType, string keyName, Azure.ResourceManager.AppService.Models.WebAppKeyInfo info, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name) { throw null; } @@ -4345,6 +4921,8 @@ protected WebSiteResource() { } public virtual System.Threading.Tasks.Task DeleteBackupConfigurationAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response DeleteHostSecret(string keyType, string keyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteHostSecretAsync(string keyType, string keyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response DeployWorkflowArtifacts(Azure.ResourceManager.AppService.Models.WorkflowArtifacts workflowArtifacts = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeployWorkflowArtifactsAsync(Azure.ResourceManager.AppService.Models.WorkflowArtifacts workflowArtifacts = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response DisableAllForWebAppRecommendation(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DisableAllForWebAppRecommendationAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response DiscoverBackup(Azure.ResourceManager.AppService.Models.RestoreRequestInfo info, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -4373,6 +4951,8 @@ protected WebSiteResource() { } public virtual System.Threading.Tasks.Task> GetAuthSettingsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetAuthSettingsV2(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAuthSettingsV2Async(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetAuthSettingsV2WithoutSecrets(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAuthSettingsV2WithoutSecretsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetAzureStorageAccounts(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAzureStorageAccountsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetBackupConfiguration(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -4404,10 +4984,16 @@ protected WebSiteResource() { } public virtual Azure.AsyncPageable GetNetworkTracesAsync(string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetNetworkTracesV2(string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetNetworkTracesV2Async(string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetOneDeployStatus(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetOneDeployStatusAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetPerfMonCounters(string filter = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetPerfMonCountersAsync(string filter = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetPrivateLinkResources(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetPrivateLinkResourcesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation GetProductionSiteDeploymentStatus(Azure.WaitUntil waitUntil, string deploymentStatusId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetProductionSiteDeploymentStatusAsync(Azure.WaitUntil waitUntil, string deploymentStatusId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetProductionSiteDeploymentStatuses(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetProductionSiteDeploymentStatusesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation GetPublishingCredentials(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetPublishingCredentialsAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetPublishingProfileXmlWithSecrets(Azure.ResourceManager.AppService.Models.CsmPublishingProfile publishingProfileOptions, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -4421,6 +5007,9 @@ protected WebSiteResource() { } public virtual Azure.Response GetSiteConfigAppsetting(string appSettingKey, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetSiteConfigAppsettingAsync(string appSettingKey, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.AppService.SiteConfigAppsettingCollection GetSiteConfigAppsettings() { throw null; } + public virtual Azure.Response GetSiteContainer(string containerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetSiteContainerAsync(string containerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppService.SiteContainerCollection GetSiteContainers() { throw null; } public virtual Azure.Response GetSiteDeployment(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetSiteDeploymentAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.AppService.SiteDeploymentCollection GetSiteDeployments() { throw null; } @@ -4466,6 +5055,9 @@ protected WebSiteResource() { } public virtual Azure.Response GetSiteVirtualNetworkConnection(string vnetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetSiteVirtualNetworkConnectionAsync(string vnetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.AppService.SiteVirtualNetworkConnectionCollection GetSiteVirtualNetworkConnections() { throw null; } + public virtual Azure.Response GetSiteWorkflow(string workflowName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetSiteWorkflowAsync(string workflowName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppService.SiteWorkflowCollection GetSiteWorkflows() { throw null; } public virtual Azure.ResourceManager.AppService.SlotConfigNamesResource GetSlotConfigNamesResource() { throw null; } public virtual Azure.Pageable GetSlotDifferencesFromProduction(Azure.ResourceManager.AppService.Models.CsmSlotEntity slotSwapEntity, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetSlotDifferencesFromProductionAsync(Azure.ResourceManager.AppService.Models.CsmSlotEntity slotSwapEntity, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -4513,12 +5105,25 @@ protected WebSiteResource() { } public virtual Azure.Response GetWebSiteWebJob(string webJobName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetWebSiteWebJobAsync(string webJobName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.AppService.WebSiteWebJobCollection GetWebSiteWebJobs() { throw null; } + public virtual Azure.Response GetWorkflowRun(string workflowName, string runName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetWorkflowRunAsync(string workflowName, string runName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppService.WorkflowRunCollection GetWorkflowRuns(string workflowName) { throw null; } + public virtual Azure.Response GetWorkflowsConnections(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetWorkflowsConnectionsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetWorkflowTrigger(string workflowName, string triggerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetWorkflowTriggerAsync(string workflowName, string triggerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppService.WorkflowTriggerCollection GetWorkflowTriggers(string workflowName) { throw null; } + public virtual Azure.Response GetWorkflowVersion(string workflowName, string versionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetWorkflowVersionAsync(string workflowName, string versionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppService.WorkflowVersionCollection GetWorkflowVersions(string workflowName) { throw null; } public virtual Azure.Response IsCloneable(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> IsCloneableAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation MigrateMySql(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.Models.MigrateMySqlContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> MigrateMySqlAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.Models.MigrateMySqlContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation MigrateStorage(Azure.WaitUntil waitUntil, string subscriptionName, Azure.ResourceManager.AppService.Models.StorageMigrationContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> MigrateStorageAsync(Azure.WaitUntil waitUntil, string subscriptionName, Azure.ResourceManager.AppService.Models.StorageMigrationContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response RegenerateAccessKeyWorkflow(string workflowName, Azure.ResourceManager.AppService.Models.WorkflowRegenerateActionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task RegenerateAccessKeyWorkflowAsync(string workflowName, Azure.ResourceManager.AppService.Models.WorkflowRegenerateActionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response ResetAllFiltersForWebAppRecommendation(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task ResetAllFiltersForWebAppRecommendationAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response ResetProductionSlotConfig(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -4576,6 +5181,8 @@ protected WebSiteResource() { } public virtual System.Threading.Tasks.Task> UpdateMetadataAsync(Azure.ResourceManager.AppService.Models.AppServiceConfigurationDictionary metadata, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response UpdateSitePushSettings(Azure.ResourceManager.AppService.Models.WebAppPushSettings pushSettings, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateSitePushSettingsAsync(Azure.ResourceManager.AppService.Models.WebAppPushSettings pushSettings, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response ValidateWorkflow(string workflowName, Azure.ResourceManager.AppService.Models.WorkflowData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task ValidateWorkflowAsync(string workflowName, Azure.ResourceManager.AppService.Models.WorkflowData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class WebSiteResourceHealthMetadataResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { @@ -4918,6 +5525,8 @@ protected WebSiteSlotResource() { } public virtual System.Threading.Tasks.Task DeleteBackupConfigurationSlotAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response DeleteHostSecretSlot(string keyType, string keyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteHostSecretSlotAsync(string keyType, string keyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response DeployWorkflowArtifactsSlot(Azure.ResourceManager.AppService.Models.WorkflowArtifacts workflowArtifacts = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeployWorkflowArtifactsSlotAsync(Azure.ResourceManager.AppService.Models.WorkflowArtifacts workflowArtifacts = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response DiscoverBackupSlot(Azure.ResourceManager.AppService.Models.RestoreRequestInfo info, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> DiscoverBackupSlotAsync(Azure.ResourceManager.AppService.Models.RestoreRequestInfo info, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GenerateNewSitePublishingPasswordSlot(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -4944,6 +5553,8 @@ protected WebSiteSlotResource() { } public virtual System.Threading.Tasks.Task> GetAuthSettingsSlotAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetAuthSettingsV2Slot(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAuthSettingsV2SlotAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetAuthSettingsV2WithoutSecretsSlot(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAuthSettingsV2WithoutSecretsSlotAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetAzureStorageAccountsSlot(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAzureStorageAccountsSlotAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetBackupConfigurationSlot(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -5021,11 +5632,21 @@ protected WebSiteSlotResource() { } public virtual Azure.Response GetSiteSlotProcess(string processId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetSiteSlotProcessAsync(string processId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.AppService.SiteSlotProcessCollection GetSiteSlotProcesses() { throw null; } + public virtual Azure.Response GetSiteSlotSiteContainer(string containerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetSiteSlotSiteContainerAsync(string containerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppService.SiteSlotSiteContainerCollection GetSiteSlotSiteContainers() { throw null; } public virtual Azure.Response GetSiteSlotVirtualNetworkConnection(string vnetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetSiteSlotVirtualNetworkConnectionAsync(string vnetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.AppService.SiteSlotVirtualNetworkConnectionCollection GetSiteSlotVirtualNetworkConnections() { throw null; } + public virtual Azure.Response GetSiteSlotWorkflow(string workflowName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetSiteSlotWorkflowAsync(string workflowName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppService.SiteSlotWorkflowCollection GetSiteSlotWorkflows() { throw null; } public virtual Azure.Pageable GetSlotDifferencesSlot(Azure.ResourceManager.AppService.Models.CsmSlotEntity slotSwapEntity, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetSlotDifferencesSlotAsync(Azure.ResourceManager.AppService.Models.CsmSlotEntity slotSwapEntity, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetSlotSiteDeploymentStatusesSlot(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetSlotSiteDeploymentStatusesSlotAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation GetSlotSiteDeploymentStatusSlot(Azure.WaitUntil waitUntil, string deploymentStatusId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetSlotSiteDeploymentStatusSlotAsync(Azure.WaitUntil waitUntil, string deploymentStatusId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetSlotSnapshots(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetSlotSnapshotsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetSlotSnapshotsFromDRSecondary(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -5073,6 +5694,8 @@ protected WebSiteSlotResource() { } public virtual Azure.Response GetWebSiteTriggeredwebJob(string webJobName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetWebSiteTriggeredwebJobAsync(string webJobName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.AppService.WebSiteTriggeredwebJobCollection GetWebSiteTriggeredwebJobs() { throw null; } + public virtual Azure.Response GetWorkflowsConnectionsSlot(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetWorkflowsConnectionsSlotAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response IsCloneableSlot(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> IsCloneableSlotAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response ResetSlotConfigurationSlot(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -5391,6 +6014,382 @@ protected WebSiteWebJobResource() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class WorkflowEnvelopeData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal WorkflowEnvelopeData() { } + public string Kind { get { throw null; } } + public Azure.Core.AzureLocation? Location { get { throw null; } } + public Azure.ResourceManager.AppService.Models.WorkflowEnvelopeProperties Properties { get { throw null; } } + Azure.ResourceManager.AppService.WorkflowEnvelopeData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.WorkflowEnvelopeData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WorkflowRunActionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected WorkflowRunActionCollection() { } + public virtual Azure.Response Exists(string actionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string actionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string actionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(int? top = default(int?), string filter = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(int? top = default(int?), string filter = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string actionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string actionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string actionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class WorkflowRunActionData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal WorkflowRunActionData() { } + public string Code { get { throw null; } } + public Azure.ResourceManager.AppService.Models.WebAppRunActionCorrelation Correlation { get { throw null; } } + public System.DateTimeOffset? EndOn { get { throw null; } } + public System.BinaryData Error { get { throw null; } } + public Azure.ResourceManager.AppService.Models.WebAppContentLink InputsLink { get { throw null; } } + public Azure.ResourceManager.AppService.Models.WebAppContentLink OutputsLink { get { throw null; } } + public System.Collections.Generic.IReadOnlyList RetryHistory { get { throw null; } } + public System.DateTimeOffset? StartOn { get { throw null; } } + public Azure.ResourceManager.AppService.Models.WorkflowStatus? Status { get { throw null; } } + public System.BinaryData TrackedProperties { get { throw null; } } + public string TrackingId { get { throw null; } } + Azure.ResourceManager.AppService.WorkflowRunActionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.WorkflowRunActionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WorkflowRunActionRepetitionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected WorkflowRunActionRepetitionCollection() { } + public virtual Azure.Response Exists(string repetitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string repetitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string repetitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string repetitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string repetitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string repetitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class WorkflowRunActionRepetitionDefinitionData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WorkflowRunActionRepetitionDefinitionData(Azure.Core.AzureLocation location) { } + public string Code { get { throw null; } set { } } + public Azure.ResourceManager.AppService.Models.WebAppRunActionCorrelation Correlation { get { throw null; } set { } } + public System.DateTimeOffset? EndOn { get { throw null; } set { } } + public System.BinaryData Error { get { throw null; } set { } } + public System.BinaryData Inputs { get { throw null; } } + public Azure.ResourceManager.AppService.Models.WebAppContentLink InputsLink { get { throw null; } } + public int? IterationCount { get { throw null; } set { } } + public System.BinaryData Outputs { get { throw null; } } + public Azure.ResourceManager.AppService.Models.WebAppContentLink OutputsLink { get { throw null; } } + public System.Collections.Generic.IList RepetitionIndexes { get { throw null; } } + public System.Collections.Generic.IList RetryHistory { get { throw null; } } + public System.DateTimeOffset? StartOn { get { throw null; } set { } } + public Azure.ResourceManager.AppService.Models.WorkflowStatus? Status { get { throw null; } set { } } + public System.BinaryData TrackedProperties { get { throw null; } } + public string TrackingId { get { throw null; } } + Azure.ResourceManager.AppService.WorkflowRunActionRepetitionDefinitionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.WorkflowRunActionRepetitionDefinitionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WorkflowRunActionRepetitionResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected WorkflowRunActionRepetitionResource() { } + public virtual Azure.ResourceManager.AppService.WorkflowRunActionRepetitionDefinitionData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, string repetitionName) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetExpressionTraces(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetExpressionTracesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppService.WebAppRequestHistoryCollection GetWebAppRequestHistories() { throw null; } + public virtual Azure.Response GetWebAppRequestHistory(string requestHistoryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetWebAppRequestHistoryAsync(string requestHistoryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.AppService.WorkflowRunActionRepetitionDefinitionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.WorkflowRunActionRepetitionDefinitionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WorkflowRunActionResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected WorkflowRunActionResource() { } + public virtual Azure.ResourceManager.AppService.WorkflowRunActionData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetExpressionTraces(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetExpressionTracesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetWorkflowRunActionRepetition(string repetitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetWorkflowRunActionRepetitionAsync(string repetitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppService.WorkflowRunActionRepetitionCollection GetWorkflowRunActionRepetitions() { throw null; } + public virtual Azure.Response GetWorkflowRunActionScopeRepetition(string repetitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetWorkflowRunActionScopeRepetitionAsync(string repetitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppService.WorkflowRunActionScopeRepetitionCollection GetWorkflowRunActionScopeRepetitions() { throw null; } + Azure.ResourceManager.AppService.WorkflowRunActionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.WorkflowRunActionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WorkflowRunActionScopeRepetitionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected WorkflowRunActionScopeRepetitionCollection() { } + public virtual Azure.Response Exists(string repetitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string repetitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string repetitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string repetitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string repetitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string repetitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class WorkflowRunActionScopeRepetitionResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected WorkflowRunActionScopeRepetitionResource() { } + public virtual Azure.ResourceManager.AppService.WorkflowRunActionRepetitionDefinitionData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, string repetitionName) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.AppService.WorkflowRunActionRepetitionDefinitionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.WorkflowRunActionRepetitionDefinitionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WorkflowRunCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected WorkflowRunCollection() { } + public virtual Azure.Response Exists(string runName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string runName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string runName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(int? top = default(int?), string filter = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(int? top = default(int?), string filter = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string runName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string runName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string runName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class WorkflowRunData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal WorkflowRunData() { } + public string Code { get { throw null; } } + public string CorrelationClientTrackingId { get { throw null; } } + public string CorrelationId { get { throw null; } } + public System.DateTimeOffset? EndOn { get { throw null; } } + public System.BinaryData Error { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Outputs { get { throw null; } } + public Azure.ResourceManager.AppService.Models.WorkflowRunTrigger Response { get { throw null; } } + public System.DateTimeOffset? StartOn { get { throw null; } } + public Azure.ResourceManager.AppService.Models.WorkflowStatus? Status { get { throw null; } } + public Azure.ResourceManager.AppService.Models.WorkflowRunTrigger Trigger { get { throw null; } } + public System.DateTimeOffset? WaitEndOn { get { throw null; } } + public Azure.ResourceManager.AppService.Models.WorkflowResourceReference Workflow { get { throw null; } } + Azure.ResourceManager.AppService.WorkflowRunData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.WorkflowRunData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WorkflowRunResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected WorkflowRunResource() { } + public virtual Azure.ResourceManager.AppService.WorkflowRunData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.Response Cancel(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task CancelAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetWorkflowRunAction(string actionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetWorkflowRunActionAsync(string actionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppService.WorkflowRunActionCollection GetWorkflowRunActions() { throw null; } + Azure.ResourceManager.AppService.WorkflowRunData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.WorkflowRunData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WorkflowTriggerCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected WorkflowTriggerCollection() { } + public virtual Azure.Response Exists(string triggerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string triggerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string triggerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(int? top = default(int?), string filter = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(int? top = default(int?), string filter = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string triggerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string triggerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string triggerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class WorkflowTriggerData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal WorkflowTriggerData() { } + public System.DateTimeOffset? ChangedOn { get { throw null; } } + public System.DateTimeOffset? CreatedOn { get { throw null; } } + public System.DateTimeOffset? LastExecutionOn { get { throw null; } } + public System.DateTimeOffset? NextExecutionOn { get { throw null; } } + public Azure.ResourceManager.AppService.Models.WorkflowTriggerProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.AppService.Models.WorkflowTriggerRecurrence Recurrence { get { throw null; } } + public Azure.ResourceManager.AppService.Models.WorkflowState? State { get { throw null; } } + public Azure.ResourceManager.AppService.Models.WorkflowStatus? Status { get { throw null; } } + public Azure.ResourceManager.AppService.Models.WorkflowResourceReference Workflow { get { throw null; } } + Azure.ResourceManager.AppService.WorkflowTriggerData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.WorkflowTriggerData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WorkflowTriggerHistoryCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected WorkflowTriggerHistoryCollection() { } + public virtual Azure.Response Exists(string historyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string historyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string historyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(int? top = default(int?), string filter = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(int? top = default(int?), string filter = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string historyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string historyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string historyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class WorkflowTriggerHistoryData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal WorkflowTriggerHistoryData() { } + public string Code { get { throw null; } } + public string CorrelationClientTrackingId { get { throw null; } } + public System.DateTimeOffset? EndOn { get { throw null; } } + public System.BinaryData Error { get { throw null; } } + public Azure.ResourceManager.AppService.Models.WebAppContentLink InputsLink { get { throw null; } } + public bool? IsFired { get { throw null; } } + public Azure.ResourceManager.AppService.Models.WebAppContentLink OutputsLink { get { throw null; } } + public Azure.ResourceManager.AppService.Models.WorkflowResourceReference Run { get { throw null; } } + public System.DateTimeOffset? ScheduledOn { get { throw null; } } + public System.DateTimeOffset? StartOn { get { throw null; } } + public Azure.ResourceManager.AppService.Models.WorkflowStatus? Status { get { throw null; } } + public string TrackingId { get { throw null; } } + Azure.ResourceManager.AppService.WorkflowTriggerHistoryData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.WorkflowTriggerHistoryData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WorkflowTriggerHistoryResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected WorkflowTriggerHistoryResource() { } + public virtual Azure.ResourceManager.AppService.WorkflowTriggerHistoryData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name, string workflowName, string triggerName, string historyName) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Resubmit(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task ResubmitAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.AppService.WorkflowTriggerHistoryData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.WorkflowTriggerHistoryData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WorkflowTriggerResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected WorkflowTriggerResource() { } + public virtual Azure.ResourceManager.AppService.WorkflowTriggerData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name, string workflowName, string triggerName) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetCallbackUrl(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetCallbackUrlAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetSchemaJson(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetSchemaJsonAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppService.WorkflowTriggerHistoryCollection GetWorkflowTriggerHistories() { throw null; } + public virtual Azure.Response GetWorkflowTriggerHistory(string historyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetWorkflowTriggerHistoryAsync(string historyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Run(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task RunAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.AppService.WorkflowTriggerData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.WorkflowTriggerData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WorkflowVersionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected WorkflowVersionCollection() { } + public virtual Azure.Response Exists(string versionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string versionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string versionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string versionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string versionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string versionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class WorkflowVersionData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WorkflowVersionData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.AppService.Models.FlowAccessControlConfiguration AccessControl { get { throw null; } set { } } + public string AccessEndpoint { get { throw null; } } + public System.DateTimeOffset? ChangedOn { get { throw null; } } + public System.DateTimeOffset? CreatedOn { get { throw null; } } + public System.BinaryData Definition { get { throw null; } set { } } + public Azure.ResourceManager.AppService.Models.FlowEndpointsConfiguration EndpointsConfiguration { get { throw null; } set { } } + public Azure.ResourceManager.AppService.Models.WorkflowResourceReference IntegrationAccount { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Parameters { get { throw null; } } + public Azure.ResourceManager.AppService.Models.WorkflowProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.AppService.Models.WorkflowSku Sku { get { throw null; } } + public Azure.ResourceManager.AppService.Models.WorkflowState? State { get { throw null; } set { } } + public string Version { get { throw null; } } + Azure.ResourceManager.AppService.WorkflowVersionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.WorkflowVersionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WorkflowVersionResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected WorkflowVersionResource() { } + public virtual Azure.ResourceManager.AppService.WorkflowVersionData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name, string workflowName, string versionId) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.AppService.WorkflowVersionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.WorkflowVersionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } } namespace Azure.ResourceManager.AppService.Mocking { @@ -5409,6 +6408,7 @@ protected MockableAppServiceArmClient() { } public virtual Azure.ResourceManager.AppService.AppServiceSourceControlResource GetAppServiceSourceControlResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.AppService.AseV3NetworkingConfigurationResource GetAseV3NetworkingConfigurationResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.AppService.CertificateOrderDetectorResource GetCertificateOrderDetectorResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.AppService.CustomDnsSuffixConfigurationResource GetCustomDnsSuffixConfigurationResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.AppService.DeletedSiteResource GetDeletedSiteResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.AppService.DomainOwnershipIdentifierResource GetDomainOwnershipIdentifierResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.AppService.HostingEnvironmentDetectorResource GetHostingEnvironmentDetectorResource(Azure.Core.ResourceIdentifier id) { throw null; } @@ -5428,6 +6428,7 @@ protected MockableAppServiceArmClient() { } public virtual Azure.ResourceManager.AppService.SiteBackupResource GetSiteBackupResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.AppService.SiteConfigAppsettingResource GetSiteConfigAppsettingResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.AppService.SiteConfigSnapshotResource GetSiteConfigSnapshotResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.AppService.SiteContainerResource GetSiteContainerResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.AppService.SiteDeploymentResource GetSiteDeploymentResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.AppService.SiteDetectorResource GetSiteDetectorResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.AppService.SiteDiagnosticAnalysisResource GetSiteDiagnosticAnalysisResource(Azure.Core.ResourceIdentifier id) { throw null; } @@ -5468,18 +6469,27 @@ protected MockableAppServiceArmClient() { } public virtual Azure.ResourceManager.AppService.SiteSlotPrivateEndpointConnectionResource GetSiteSlotPrivateEndpointConnectionResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.AppService.SiteSlotProcessModuleResource GetSiteSlotProcessModuleResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.AppService.SiteSlotProcessResource GetSiteSlotProcessResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.AppService.SiteSlotSiteContainerResource GetSiteSlotSiteContainerResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.AppService.SiteSlotVirtualNetworkConnectionGatewayResource GetSiteSlotVirtualNetworkConnectionGatewayResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.AppService.SiteSlotVirtualNetworkConnectionResource GetSiteSlotVirtualNetworkConnectionResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.AppService.SiteSlotWorkflowResource GetSiteSlotWorkflowResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.AppService.SiteVirtualNetworkConnectionGatewayResource GetSiteVirtualNetworkConnectionGatewayResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.AppService.SiteVirtualNetworkConnectionResource GetSiteVirtualNetworkConnectionResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.AppService.SiteWorkflowResource GetSiteWorkflowResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.AppService.SlotConfigNamesResource GetSlotConfigNamesResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.AppService.StaticSiteBasicAuthPropertyResource GetStaticSiteBasicAuthPropertyResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.AppService.StaticSiteBuildDatabaseConnectionResource GetStaticSiteBuildDatabaseConnectionResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.AppService.StaticSiteBuildLinkedBackendResource GetStaticSiteBuildLinkedBackendResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.AppService.StaticSiteBuildResource GetStaticSiteBuildResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.AppService.StaticSiteBuildUserProvidedFunctionAppResource GetStaticSiteBuildUserProvidedFunctionAppResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.AppService.StaticSiteCustomDomainOverviewResource GetStaticSiteCustomDomainOverviewResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.AppService.StaticSiteDatabaseConnectionResource GetStaticSiteDatabaseConnectionResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.AppService.StaticSiteLinkedBackendResource GetStaticSiteLinkedBackendResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.AppService.StaticSitePrivateEndpointConnectionResource GetStaticSitePrivateEndpointConnectionResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.AppService.StaticSiteResource GetStaticSiteResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.AppService.StaticSiteUserProvidedFunctionAppResource GetStaticSiteUserProvidedFunctionAppResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.AppService.TopLevelDomainResource GetTopLevelDomainResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.AppService.WebAppRequestHistoryResource GetWebAppRequestHistoryResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.AppService.WebSiteConfigConnectionStringResource GetWebSiteConfigConnectionStringResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.AppService.WebSiteConfigResource GetWebSiteConfigResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.AppService.WebSiteContinuousWebJobResource GetWebSiteContinuousWebJobResource(Azure.Core.ResourceIdentifier id) { throw null; } @@ -5510,6 +6520,13 @@ protected MockableAppServiceArmClient() { } public virtual Azure.ResourceManager.AppService.WebSiteTriggeredWebJobHistoryResource GetWebSiteTriggeredWebJobHistoryResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.AppService.WebSiteTriggeredwebJobResource GetWebSiteTriggeredwebJobResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.AppService.WebSiteWebJobResource GetWebSiteWebJobResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.AppService.WorkflowRunActionRepetitionResource GetWorkflowRunActionRepetitionResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.AppService.WorkflowRunActionResource GetWorkflowRunActionResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.AppService.WorkflowRunActionScopeRepetitionResource GetWorkflowRunActionScopeRepetitionResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.AppService.WorkflowRunResource GetWorkflowRunResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.AppService.WorkflowTriggerHistoryResource GetWorkflowTriggerHistoryResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.AppService.WorkflowTriggerResource GetWorkflowTriggerResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.AppService.WorkflowVersionResource GetWorkflowVersionResource(Azure.Core.ResourceIdentifier id) { throw null; } } public partial class MockableAppServiceResourceGroupResource : Azure.ResourceManager.ArmResource { @@ -5570,12 +6587,16 @@ protected MockableAppServiceSubscriptionResource() { } public virtual Azure.AsyncPageable GetAppServiceEnvironmentsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetAppServicePlans(bool? detailed = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetAppServicePlansAsync(bool? detailed = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAseRegions(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAseRegionsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetAvailableStacksOnPremProviders(Azure.ResourceManager.AppService.Models.ProviderOSTypeSelected? osTypeSelected = default(Azure.ResourceManager.AppService.Models.ProviderOSTypeSelected?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetAvailableStacksOnPremProvidersAsync(Azure.ResourceManager.AppService.Models.ProviderOSTypeSelected? osTypeSelected = default(Azure.ResourceManager.AppService.Models.ProviderOSTypeSelected?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetBillingMeters(string billingLocation = null, string osType = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetBillingMetersAsync(string billingLocation = null, string osType = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetControlCenterSsoRequestDomain(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetControlCenterSsoRequestDomainAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetCustomHostNameSites(string hostname = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetCustomHostNameSitesAsync(string hostname = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetDeletedSite(string deletedSiteId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetDeletedSiteAsync(string deletedSiteId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.AppService.DeletedSiteCollection GetDeletedSites() { throw null; } @@ -5585,6 +6606,8 @@ protected MockableAppServiceSubscriptionResource() { } public virtual System.Threading.Tasks.Task> GetDeletedWebAppByLocationDeletedWebAppAsync(Azure.Core.AzureLocation location, string deletedSiteId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetGeoRegions(Azure.ResourceManager.AppService.Models.AppServiceSkuName? sku = default(Azure.ResourceManager.AppService.Models.AppServiceSkuName?), bool? linuxWorkersEnabled = default(bool?), bool? xenonWorkersEnabled = default(bool?), bool? linuxDynamicWorkersEnabled = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetGeoRegionsAsync(Azure.ResourceManager.AppService.Models.AppServiceSkuName? sku = default(Azure.ResourceManager.AppService.Models.AppServiceSkuName?), bool? linuxWorkersEnabled = default(bool?), bool? xenonWorkersEnabled = default(bool?), bool? linuxDynamicWorkersEnabled = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetGetUsagesInLocations(Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetGetUsagesInLocationsAsync(Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetKubeEnvironments(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetKubeEnvironmentsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetPremierAddOnOffers(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -5697,6 +6720,42 @@ public AppCertificatePatch() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class AppDaprConfig : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AppDaprConfig() { } + public string AppId { get { throw null; } set { } } + public int? AppPort { get { throw null; } set { } } + public int? HttpMaxRequestSize { get { throw null; } set { } } + public int? HttpReadBufferSize { get { throw null; } set { } } + public bool? IsApiLoggingEnabled { get { throw null; } set { } } + public bool? IsEnabled { get { throw null; } set { } } + public Azure.ResourceManager.AppService.Models.AppDaprLogLevel? LogLevel { get { throw null; } set { } } + Azure.ResourceManager.AppService.Models.AppDaprConfig System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.AppDaprConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AppDaprLogLevel : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AppDaprLogLevel(string value) { throw null; } + public static Azure.ResourceManager.AppService.Models.AppDaprLogLevel Debug { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.AppDaprLogLevel Error { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.AppDaprLogLevel Info { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.AppDaprLogLevel Warn { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppService.Models.AppDaprLogLevel other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.AppService.Models.AppDaprLogLevel left, Azure.ResourceManager.AppService.Models.AppDaprLogLevel right) { throw null; } + public static implicit operator Azure.ResourceManager.AppService.Models.AppDaprLogLevel (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppService.Models.AppDaprLogLevel left, Azure.ResourceManager.AppService.Models.AppDaprLogLevel right) { throw null; } + public override string ToString() { throw null; } + } public partial class AppInsightsWebAppStackSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal AppInsightsWebAppStackSettings() { } @@ -5875,6 +6934,22 @@ internal AppServiceArmPlan() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class AppServiceAseRegion : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AppServiceAseRegion() { } + public System.Collections.Generic.IList AvailableOS { get { throw null; } } + public System.Collections.Generic.IList AvailableSku { get { throw null; } } + public string DisplayName { get { throw null; } } + public bool? IsDedicatedHostEnabled { get { throw null; } } + public bool? IsStandard { get { throw null; } } + public bool? IsZoneRedundantEnabled { get { throw null; } } + public string Kind { get { throw null; } set { } } + Azure.ResourceManager.AppService.Models.AppServiceAseRegion System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.AppServiceAseRegion System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class AppServiceBillingMeter : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public AppServiceBillingMeter() { } @@ -5940,6 +7015,7 @@ public partial class AppServiceCertificateEmail : Azure.ResourceManager.Models.R { public AppServiceCertificateEmail() { } public string EmailId { get { throw null; } set { } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public string Kind { get { throw null; } set { } } public System.DateTimeOffset? TimeStamp { get { throw null; } set { } } Azure.ResourceManager.AppService.Models.AppServiceCertificateEmail System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6205,6 +7281,7 @@ public partial class AppServiceEnvironmentPatch : Azure.ResourceManager.Models.R { public AppServiceEnvironmentPatch() { } public System.Collections.Generic.IList ClusterSettings { get { throw null; } } + public Azure.ResourceManager.AppService.CustomDnsSuffixConfigurationData CustomDnsSuffixConfiguration { get { throw null; } set { } } public int? DedicatedHostCount { get { throw null; } set { } } public string DnsSuffix { get { throw null; } set { } } public int? FrontEndScaleFactor { get { throw null; } set { } } @@ -6217,8 +7294,11 @@ public AppServiceEnvironmentPatch() { } public int? MaximumNumberOfMachines { get { throw null; } } public int? MultiRoleCount { get { throw null; } } public string MultiSize { get { throw null; } set { } } + public Azure.ResourceManager.AppService.AseV3NetworkingConfigurationData NetworkingConfiguration { get { throw null; } set { } } public Azure.ResourceManager.AppService.Models.ProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.AppService.Models.HostingEnvironmentStatus? Status { get { throw null; } } + public Azure.ResourceManager.AppService.Models.AppServiceEnvironmentUpgradeAvailability? UpgradeAvailability { get { throw null; } } + public Azure.ResourceManager.AppService.Models.AppServiceEnvironmentUpgradePreference? UpgradePreference { get { throw null; } set { } } public System.Collections.Generic.IList UserWhitelistedIPRanges { get { throw null; } } public Azure.ResourceManager.AppService.Models.AppServiceVirtualNetworkProfile VirtualNetwork { get { throw null; } set { } } Azure.ResourceManager.AppService.Models.AppServiceEnvironmentPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6231,6 +7311,7 @@ public partial class AppServiceEnvironmentProperties : System.ClientModel.Primit { public AppServiceEnvironmentProperties(Azure.ResourceManager.AppService.Models.AppServiceVirtualNetworkProfile virtualNetwork) { } public System.Collections.Generic.IList ClusterSettings { get { throw null; } } + public Azure.ResourceManager.AppService.CustomDnsSuffixConfigurationData CustomDnsSuffixConfiguration { get { throw null; } set { } } public int? DedicatedHostCount { get { throw null; } set { } } public string DnsSuffix { get { throw null; } set { } } public int? FrontEndScaleFactor { get { throw null; } set { } } @@ -6242,8 +7323,11 @@ public AppServiceEnvironmentProperties(Azure.ResourceManager.AppService.Models.A public int? MaximumNumberOfMachines { get { throw null; } } public int? MultiRoleCount { get { throw null; } } public string MultiSize { get { throw null; } set { } } + public Azure.ResourceManager.AppService.AseV3NetworkingConfigurationData NetworkingConfiguration { get { throw null; } set { } } public Azure.ResourceManager.AppService.Models.ProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.AppService.Models.HostingEnvironmentStatus? Status { get { throw null; } } + public Azure.ResourceManager.AppService.Models.AppServiceEnvironmentUpgradeAvailability? UpgradeAvailability { get { throw null; } } + public Azure.ResourceManager.AppService.Models.AppServiceEnvironmentUpgradePreference? UpgradePreference { get { throw null; } set { } } public System.Collections.Generic.IList UserWhitelistedIPRanges { get { throw null; } } public Azure.ResourceManager.AppService.Models.AppServiceVirtualNetworkProfile VirtualNetwork { get { throw null; } set { } } Azure.ResourceManager.AppService.Models.AppServiceEnvironmentProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6252,6 +7336,44 @@ public AppServiceEnvironmentProperties(Azure.ResourceManager.AppService.Models.A string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AppServiceEnvironmentUpgradeAvailability : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AppServiceEnvironmentUpgradeAvailability(string value) { throw null; } + public static Azure.ResourceManager.AppService.Models.AppServiceEnvironmentUpgradeAvailability None { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.AppServiceEnvironmentUpgradeAvailability Ready { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppService.Models.AppServiceEnvironmentUpgradeAvailability other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.AppService.Models.AppServiceEnvironmentUpgradeAvailability left, Azure.ResourceManager.AppService.Models.AppServiceEnvironmentUpgradeAvailability right) { throw null; } + public static implicit operator Azure.ResourceManager.AppService.Models.AppServiceEnvironmentUpgradeAvailability (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppService.Models.AppServiceEnvironmentUpgradeAvailability left, Azure.ResourceManager.AppService.Models.AppServiceEnvironmentUpgradeAvailability right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AppServiceEnvironmentUpgradePreference : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AppServiceEnvironmentUpgradePreference(string value) { throw null; } + public static Azure.ResourceManager.AppService.Models.AppServiceEnvironmentUpgradePreference Early { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.AppServiceEnvironmentUpgradePreference Late { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.AppServiceEnvironmentUpgradePreference Manual { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.AppServiceEnvironmentUpgradePreference None { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppService.Models.AppServiceEnvironmentUpgradePreference other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.AppService.Models.AppServiceEnvironmentUpgradePreference left, Azure.ResourceManager.AppService.Models.AppServiceEnvironmentUpgradePreference right) { throw null; } + public static implicit operator Azure.ResourceManager.AppService.Models.AppServiceEnvironmentUpgradePreference (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppService.Models.AppServiceEnvironmentUpgradePreference left, Azure.ResourceManager.AppService.Models.AppServiceEnvironmentUpgradePreference right) { throw null; } + public override string ToString() { throw null; } + } public partial class AppServiceFacebookProvider : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public AppServiceFacebookProvider() { } @@ -6439,6 +7561,24 @@ public AppServiceIPSecurityRestriction() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AppServiceKind : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AppServiceKind(string value) { throw null; } + public static Azure.ResourceManager.AppService.Models.AppServiceKind Stateful { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.AppServiceKind Stateless { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppService.Models.AppServiceKind other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.AppService.Models.AppServiceKind left, Azure.ResourceManager.AppService.Models.AppServiceKind right) { throw null; } + public static implicit operator Azure.ResourceManager.AppService.Models.AppServiceKind (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppService.Models.AppServiceKind left, Azure.ResourceManager.AppService.Models.AppServiceKind right) { throw null; } + public override string ToString() { throw null; } + } public partial class AppServiceNameValuePair : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public AppServiceNameValuePair() { } @@ -6493,6 +7633,7 @@ public AppServicePlanPatch() { } public int? MaximumElasticWorkerCount { get { throw null; } set { } } public int? MaximumNumberOfWorkers { get { throw null; } } public int? NumberOfSites { get { throw null; } } + public int? NumberOfWorkers { get { throw null; } } public Azure.ResourceManager.AppService.Models.ProvisioningState? ProvisioningState { get { throw null; } } public string ResourceGroup { get { throw null; } } public System.DateTimeOffset? SpotExpirationOn { get { throw null; } set { } } @@ -6647,6 +7788,7 @@ public AppServiceSkuDescription() { } public static Azure.ResourceManager.AppService.Models.AppServiceSkuName Dynamic { get { throw null; } } public static Azure.ResourceManager.AppService.Models.AppServiceSkuName ElasticIsolated { get { throw null; } } public static Azure.ResourceManager.AppService.Models.AppServiceSkuName ElasticPremium { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.AppServiceSkuName FlexConsumption { get { throw null; } } public static Azure.ResourceManager.AppService.Models.AppServiceSkuName Free { get { throw null; } } public static Azure.ResourceManager.AppService.Models.AppServiceSkuName Isolated { get { throw null; } } public static Azure.ResourceManager.AppService.Models.AppServiceSkuName IsolatedV2 { get { throw null; } } @@ -6705,6 +7847,7 @@ public AppServiceStorageAccessInfo() { } public string AccessKey { get { throw null; } set { } } public string AccountName { get { throw null; } set { } } public string MountPath { get { throw null; } set { } } + public Azure.ResourceManager.AppService.Models.AppServiceStorageProtocol? Protocol { get { throw null; } set { } } public string ShareName { get { throw null; } set { } } public Azure.ResourceManager.AppService.Models.AppServiceStorageAccountState? State { get { throw null; } } public Azure.ResourceManager.AppService.Models.AppServiceStorageType? StorageType { get { throw null; } set { } } @@ -6721,6 +7864,25 @@ public enum AppServiceStorageAccountState InvalidShare = 2, NotValidated = 3, } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AppServiceStorageProtocol : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AppServiceStorageProtocol(string value) { throw null; } + public static Azure.ResourceManager.AppService.Models.AppServiceStorageProtocol Http { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.AppServiceStorageProtocol Nfs { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.AppServiceStorageProtocol Smb { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppService.Models.AppServiceStorageProtocol other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.AppService.Models.AppServiceStorageProtocol left, Azure.ResourceManager.AppService.Models.AppServiceStorageProtocol right) { throw null; } + public static implicit operator Azure.ResourceManager.AppService.Models.AppServiceStorageProtocol (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppService.Models.AppServiceStorageProtocol left, Azure.ResourceManager.AppService.Models.AppServiceStorageProtocol right) { throw null; } + public override string ToString() { throw null; } + } public enum AppServiceStorageType { AzureFiles = 0, @@ -6732,6 +7894,7 @@ public enum AppServiceStorageType private readonly object _dummy; private readonly int _dummyPrimitive; public AppServiceSupportedTlsVersion(string value) { throw null; } + public static Azure.ResourceManager.AppService.Models.AppServiceSupportedTlsVersion One3 { get { throw null; } } public static Azure.ResourceManager.AppService.Models.AppServiceSupportedTlsVersion Tls1_0 { get { throw null; } } public static Azure.ResourceManager.AppService.Models.AppServiceSupportedTlsVersion Tls1_1 { get { throw null; } } public static Azure.ResourceManager.AppService.Models.AppServiceSupportedTlsVersion Tls1_2 { get { throw null; } } @@ -6762,6 +7925,39 @@ public AppServiceTableStorageApplicationLogsConfig(System.Uri SasUri) { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AppServiceTlsCipherSuite : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AppServiceTlsCipherSuite(string value) { throw null; } + public static Azure.ResourceManager.AppService.Models.AppServiceTlsCipherSuite TlsAes128GcmSha256 { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.AppServiceTlsCipherSuite TlsAes256GcmSha384 { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.AppServiceTlsCipherSuite TlsECDiffieHellmanECDsaWithAes128CbcSha256 { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.AppServiceTlsCipherSuite TlsECDiffieHellmanECDsaWithAes128GcmSha256 { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.AppServiceTlsCipherSuite TlsECDiffieHellmanECDsaWithAes256GcmSha384 { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.AppServiceTlsCipherSuite TlsECDiffieHellmanRsaWithAes128CbcSha { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.AppServiceTlsCipherSuite TlsECDiffieHellmanRsaWithAes128CbcSha256 { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.AppServiceTlsCipherSuite TlsECDiffieHellmanRsaWithAes128GcmSha256 { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.AppServiceTlsCipherSuite TlsECDiffieHellmanRsaWithAes256CbcSha { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.AppServiceTlsCipherSuite TlsECDiffieHellmanRsaWithAes256CbcSha384 { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.AppServiceTlsCipherSuite TlsECDiffieHellmanRsaWithAes256GcmSha384 { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.AppServiceTlsCipherSuite TlsRsaWithAes128CbcSha { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.AppServiceTlsCipherSuite TlsRsaWithAes128CbcSha256 { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.AppServiceTlsCipherSuite TlsRsaWithAes128GcmSha256 { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.AppServiceTlsCipherSuite TlsRsaWithAes256CbcSha { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.AppServiceTlsCipherSuite TlsRsaWithAes256CbcSha256 { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.AppServiceTlsCipherSuite TlsRsaWithAes256GcmSha384 { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppService.Models.AppServiceTlsCipherSuite other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.AppService.Models.AppServiceTlsCipherSuite left, Azure.ResourceManager.AppService.Models.AppServiceTlsCipherSuite right) { throw null; } + public static implicit operator Azure.ResourceManager.AppService.Models.AppServiceTlsCipherSuite (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppService.Models.AppServiceTlsCipherSuite left, Azure.ResourceManager.AppService.Models.AppServiceTlsCipherSuite right) { throw null; } + public override string ToString() { throw null; } + } public partial class AppServiceTokenStore : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public AppServiceTokenStore() { } @@ -6958,10 +8154,11 @@ public static partial class ArmAppServiceModelFactory public static Azure.ResourceManager.AppService.Models.AppInsightsWebAppStackSettings AppInsightsWebAppStackSettings(bool? isSupported = default(bool?), bool? isDefaultOff = default(bool?)) { throw null; } public static Azure.ResourceManager.AppService.Models.ApplicationStackResource ApplicationStackResource(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string stackName = null, string display = null, string dependency = null, System.Collections.Generic.IEnumerable majorVersions = null, System.Collections.Generic.IEnumerable frameworks = null, System.Collections.Generic.IEnumerable isDeprecated = null, string kind = null) { throw null; } public static Azure.ResourceManager.AppService.Models.AppServiceArmPlan AppServiceArmPlan(string name = null, string publisher = null, string product = null, string promotionCode = null, string version = null) { throw null; } + public static Azure.ResourceManager.AppService.Models.AppServiceAseRegion AppServiceAseRegion(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string displayName = null, bool? isStandard = default(bool?), bool? isDedicatedHostEnabled = default(bool?), bool? isZoneRedundantEnabled = default(bool?), System.Collections.Generic.IEnumerable availableSku = null, System.Collections.Generic.IEnumerable availableOS = null, string kind = null) { throw null; } public static Azure.ResourceManager.AppService.Models.AppServiceBillingMeter AppServiceBillingMeter(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Guid? meterId = default(System.Guid?), Azure.Core.AzureLocation? billingLocation = default(Azure.Core.AzureLocation?), string shortName = null, string friendlyName = null, string osType = null, double? multiplier = default(double?), string kind = null) { throw null; } public static Azure.ResourceManager.AppService.AppServiceCertificateData AppServiceCertificateData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.Core.ResourceIdentifier keyVaultId = null, string keyVaultSecretName = null, Azure.ResourceManager.AppService.Models.KeyVaultSecretStatus? provisioningState = default(Azure.ResourceManager.AppService.Models.KeyVaultSecretStatus?), string kind = null) { throw null; } public static Azure.ResourceManager.AppService.Models.AppServiceCertificateDetails AppServiceCertificateDetails(int? version = default(int?), string serialNumber = null, string thumbprintString = null, string subject = null, System.DateTimeOffset? notBefore = default(System.DateTimeOffset?), System.DateTimeOffset? notAfter = default(System.DateTimeOffset?), string signatureAlgorithm = null, string issuer = null, string rawData = null) { throw null; } - public static Azure.ResourceManager.AppService.Models.AppServiceCertificateEmail AppServiceCertificateEmail(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string emailId = null, System.DateTimeOffset? timeStamp = default(System.DateTimeOffset?), string kind = null) { throw null; } + public static Azure.ResourceManager.AppService.Models.AppServiceCertificateEmail AppServiceCertificateEmail(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string emailId = null, System.DateTimeOffset? timeStamp = default(System.DateTimeOffset?)) { throw null; } public static Azure.ResourceManager.AppService.AppServiceCertificateOrderData AppServiceCertificateOrderData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), System.Collections.Generic.IDictionary certificates = null, string distinguishedName = null, string domainVerificationToken = null, int? validityInYears = default(int?), int? keySize = default(int?), Azure.ResourceManager.AppService.Models.CertificateProductType? productType = default(Azure.ResourceManager.AppService.Models.CertificateProductType?), bool? isAutoRenew = default(bool?), Azure.ResourceManager.AppService.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.AppService.Models.ProvisioningState?), Azure.ResourceManager.AppService.Models.CertificateOrderStatus? status = default(Azure.ResourceManager.AppService.Models.CertificateOrderStatus?), Azure.ResourceManager.AppService.Models.AppServiceCertificateDetails signedCertificate = null, string csr = null, Azure.ResourceManager.AppService.Models.AppServiceCertificateDetails intermediate = null, Azure.ResourceManager.AppService.Models.AppServiceCertificateDetails root = null, string serialNumber = null, System.DateTimeOffset? lastCertificateIssuedOn = default(System.DateTimeOffset?), System.DateTimeOffset? expireOn = default(System.DateTimeOffset?), bool? isPrivateKeyExternal = default(bool?), System.Collections.Generic.IEnumerable appServiceCertificateNotRenewableReasons = null, System.DateTimeOffset? nextAutoRenewTimeStamp = default(System.DateTimeOffset?), Azure.ResourceManager.AppService.Models.CertificateOrderContact contact = null, string kind = null) { throw null; } public static Azure.ResourceManager.AppService.Models.AppServiceCertificateOrderPatch AppServiceCertificateOrderPatch(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary certificates = null, string distinguishedName = null, string domainVerificationToken = null, int? validityInYears = default(int?), int? keySize = default(int?), Azure.ResourceManager.AppService.Models.CertificateProductType? productType = default(Azure.ResourceManager.AppService.Models.CertificateProductType?), bool? isAutoRenew = default(bool?), Azure.ResourceManager.AppService.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.AppService.Models.ProvisioningState?), Azure.ResourceManager.AppService.Models.CertificateOrderStatus? status = default(Azure.ResourceManager.AppService.Models.CertificateOrderStatus?), Azure.ResourceManager.AppService.Models.AppServiceCertificateDetails signedCertificate = null, string csr = null, Azure.ResourceManager.AppService.Models.AppServiceCertificateDetails intermediate = null, Azure.ResourceManager.AppService.Models.AppServiceCertificateDetails root = null, string serialNumber = null, System.DateTimeOffset? lastCertificateIssuanceOn = default(System.DateTimeOffset?), System.DateTimeOffset? expireOn = default(System.DateTimeOffset?), bool? isPrivateKeyExternal = default(bool?), System.Collections.Generic.IEnumerable appServiceCertificateNotRenewableReasons = null, System.DateTimeOffset? nextAutoRenewalTimeStamp = default(System.DateTimeOffset?), Azure.ResourceManager.AppService.Models.CertificateOrderContact contact = null, string kind = null) { throw null; } public static Azure.ResourceManager.AppService.Models.AppServiceCertificatePatch AppServiceCertificatePatch(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.Core.ResourceIdentifier keyVaultId = null, string keyVaultSecretName = null, Azure.ResourceManager.AppService.Models.KeyVaultSecretStatus? provisioningState = default(Azure.ResourceManager.AppService.Models.KeyVaultSecretStatus?), string kind = null) { throw null; } @@ -6974,22 +8171,22 @@ public static partial class ArmAppServiceModelFactory public static Azure.ResourceManager.AppService.Models.AppServiceEndpointDependency AppServiceEndpointDependency(string domainName = null, System.Collections.Generic.IEnumerable endpointDetails = null) { throw null; } public static Azure.ResourceManager.AppService.Models.AppServiceEndpointDetail AppServiceEndpointDetail(System.Net.IPAddress ipAddress = null, int? port = default(int?), double? latency = default(double?), bool? isAccessible = default(bool?)) { throw null; } public static Azure.ResourceManager.AppService.Models.AppServiceEnvironmentAddressResult AppServiceEnvironmentAddressResult(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Net.IPAddress serviceIPAddress = null, System.Net.IPAddress internalIPAddress = null, System.Collections.Generic.IEnumerable outboundIPAddresses = null, System.Collections.Generic.IEnumerable virtualIPMappings = null, string kind = null) { throw null; } - public static Azure.ResourceManager.AppService.AppServiceEnvironmentData AppServiceEnvironmentData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.AppService.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.AppService.Models.ProvisioningState?), Azure.ResourceManager.AppService.Models.HostingEnvironmentStatus? status = default(Azure.ResourceManager.AppService.Models.HostingEnvironmentStatus?), Azure.ResourceManager.AppService.Models.AppServiceVirtualNetworkProfile virtualNetwork = null, Azure.ResourceManager.AppService.Models.LoadBalancingMode? internalLoadBalancingMode = default(Azure.ResourceManager.AppService.Models.LoadBalancingMode?), string multiSize = null, int? multiRoleCount = default(int?), int? ipSslAddressCount = default(int?), string dnsSuffix = null, int? maximumNumberOfMachines = default(int?), int? frontEndScaleFactor = default(int?), bool? isSuspended = default(bool?), System.Collections.Generic.IEnumerable clusterSettings = null, System.Collections.Generic.IEnumerable userWhitelistedIPRanges = null, bool? hasLinuxWorkers = default(bool?), int? dedicatedHostCount = default(int?), bool? isZoneRedundant = default(bool?), string kind = null) { throw null; } - public static Azure.ResourceManager.AppService.Models.AppServiceEnvironmentPatch AppServiceEnvironmentPatch(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.AppService.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.AppService.Models.ProvisioningState?), Azure.ResourceManager.AppService.Models.HostingEnvironmentStatus? status = default(Azure.ResourceManager.AppService.Models.HostingEnvironmentStatus?), Azure.ResourceManager.AppService.Models.AppServiceVirtualNetworkProfile virtualNetwork = null, Azure.ResourceManager.AppService.Models.LoadBalancingMode? internalLoadBalancingMode = default(Azure.ResourceManager.AppService.Models.LoadBalancingMode?), string multiSize = null, int? multiRoleCount = default(int?), int? ipSslAddressCount = default(int?), string dnsSuffix = null, int? maximumNumberOfMachines = default(int?), int? frontEndScaleFactor = default(int?), bool? isSuspended = default(bool?), System.Collections.Generic.IEnumerable clusterSettings = null, System.Collections.Generic.IEnumerable userWhitelistedIPRanges = null, bool? hasLinuxWorkers = default(bool?), int? dedicatedHostCount = default(int?), bool? isZoneRedundant = default(bool?), string kind = null) { throw null; } - public static Azure.ResourceManager.AppService.Models.AppServiceEnvironmentProperties AppServiceEnvironmentProperties(Azure.ResourceManager.AppService.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.AppService.Models.ProvisioningState?), Azure.ResourceManager.AppService.Models.HostingEnvironmentStatus? status = default(Azure.ResourceManager.AppService.Models.HostingEnvironmentStatus?), Azure.ResourceManager.AppService.Models.AppServiceVirtualNetworkProfile virtualNetwork = null, Azure.ResourceManager.AppService.Models.LoadBalancingMode? internalLoadBalancingMode = default(Azure.ResourceManager.AppService.Models.LoadBalancingMode?), string multiSize = null, int? multiRoleCount = default(int?), int? ipSslAddressCount = default(int?), string dnsSuffix = null, int? maximumNumberOfMachines = default(int?), int? frontEndScaleFactor = default(int?), bool? isSuspended = default(bool?), System.Collections.Generic.IEnumerable clusterSettings = null, System.Collections.Generic.IEnumerable userWhitelistedIPRanges = null, bool? hasLinuxWorkers = default(bool?), int? dedicatedHostCount = default(int?), bool? isZoneRedundant = default(bool?)) { throw null; } + public static Azure.ResourceManager.AppService.AppServiceEnvironmentData AppServiceEnvironmentData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.AppService.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.AppService.Models.ProvisioningState?), Azure.ResourceManager.AppService.Models.HostingEnvironmentStatus? status = default(Azure.ResourceManager.AppService.Models.HostingEnvironmentStatus?), Azure.ResourceManager.AppService.Models.AppServiceVirtualNetworkProfile virtualNetwork = null, Azure.ResourceManager.AppService.Models.LoadBalancingMode? internalLoadBalancingMode = default(Azure.ResourceManager.AppService.Models.LoadBalancingMode?), string multiSize = null, int? multiRoleCount = default(int?), int? ipSslAddressCount = default(int?), string dnsSuffix = null, int? maximumNumberOfMachines = default(int?), int? frontEndScaleFactor = default(int?), bool? isSuspended = default(bool?), System.Collections.Generic.IEnumerable clusterSettings = null, System.Collections.Generic.IEnumerable userWhitelistedIPRanges = null, bool? hasLinuxWorkers = default(bool?), Azure.ResourceManager.AppService.Models.AppServiceEnvironmentUpgradePreference? upgradePreference = default(Azure.ResourceManager.AppService.Models.AppServiceEnvironmentUpgradePreference?), int? dedicatedHostCount = default(int?), bool? isZoneRedundant = default(bool?), Azure.ResourceManager.AppService.CustomDnsSuffixConfigurationData customDnsSuffixConfiguration = null, Azure.ResourceManager.AppService.AseV3NetworkingConfigurationData networkingConfiguration = null, Azure.ResourceManager.AppService.Models.AppServiceEnvironmentUpgradeAvailability? upgradeAvailability = default(Azure.ResourceManager.AppService.Models.AppServiceEnvironmentUpgradeAvailability?), string kind = null) { throw null; } + public static Azure.ResourceManager.AppService.Models.AppServiceEnvironmentPatch AppServiceEnvironmentPatch(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.AppService.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.AppService.Models.ProvisioningState?), Azure.ResourceManager.AppService.Models.HostingEnvironmentStatus? status = default(Azure.ResourceManager.AppService.Models.HostingEnvironmentStatus?), Azure.ResourceManager.AppService.Models.AppServiceVirtualNetworkProfile virtualNetwork = null, Azure.ResourceManager.AppService.Models.LoadBalancingMode? internalLoadBalancingMode = default(Azure.ResourceManager.AppService.Models.LoadBalancingMode?), string multiSize = null, int? multiRoleCount = default(int?), int? ipSslAddressCount = default(int?), string dnsSuffix = null, int? maximumNumberOfMachines = default(int?), int? frontEndScaleFactor = default(int?), bool? isSuspended = default(bool?), System.Collections.Generic.IEnumerable clusterSettings = null, System.Collections.Generic.IEnumerable userWhitelistedIPRanges = null, bool? hasLinuxWorkers = default(bool?), Azure.ResourceManager.AppService.Models.AppServiceEnvironmentUpgradePreference? upgradePreference = default(Azure.ResourceManager.AppService.Models.AppServiceEnvironmentUpgradePreference?), int? dedicatedHostCount = default(int?), bool? isZoneRedundant = default(bool?), Azure.ResourceManager.AppService.CustomDnsSuffixConfigurationData customDnsSuffixConfiguration = null, Azure.ResourceManager.AppService.AseV3NetworkingConfigurationData networkingConfiguration = null, Azure.ResourceManager.AppService.Models.AppServiceEnvironmentUpgradeAvailability? upgradeAvailability = default(Azure.ResourceManager.AppService.Models.AppServiceEnvironmentUpgradeAvailability?), string kind = null) { throw null; } + public static Azure.ResourceManager.AppService.Models.AppServiceEnvironmentProperties AppServiceEnvironmentProperties(Azure.ResourceManager.AppService.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.AppService.Models.ProvisioningState?), Azure.ResourceManager.AppService.Models.HostingEnvironmentStatus? status = default(Azure.ResourceManager.AppService.Models.HostingEnvironmentStatus?), Azure.ResourceManager.AppService.Models.AppServiceVirtualNetworkProfile virtualNetwork = null, Azure.ResourceManager.AppService.Models.LoadBalancingMode? internalLoadBalancingMode = default(Azure.ResourceManager.AppService.Models.LoadBalancingMode?), string multiSize = null, int? multiRoleCount = default(int?), int? ipSslAddressCount = default(int?), string dnsSuffix = null, int? maximumNumberOfMachines = default(int?), int? frontEndScaleFactor = default(int?), bool? isSuspended = default(bool?), System.Collections.Generic.IEnumerable clusterSettings = null, System.Collections.Generic.IEnumerable userWhitelistedIPRanges = null, bool? hasLinuxWorkers = default(bool?), Azure.ResourceManager.AppService.Models.AppServiceEnvironmentUpgradePreference? upgradePreference = default(Azure.ResourceManager.AppService.Models.AppServiceEnvironmentUpgradePreference?), int? dedicatedHostCount = default(int?), bool? isZoneRedundant = default(bool?), Azure.ResourceManager.AppService.CustomDnsSuffixConfigurationData customDnsSuffixConfiguration = null, Azure.ResourceManager.AppService.AseV3NetworkingConfigurationData networkingConfiguration = null, Azure.ResourceManager.AppService.Models.AppServiceEnvironmentUpgradeAvailability? upgradeAvailability = default(Azure.ResourceManager.AppService.Models.AppServiceEnvironmentUpgradeAvailability?)) { throw null; } public static Azure.ResourceManager.AppService.Models.AppServiceGeoRegion AppServiceGeoRegion(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string description = null, string displayName = null, string orgDomain = null, string kind = null) { throw null; } public static Azure.ResourceManager.AppService.Models.AppServiceHostName AppServiceHostName(string name = null, System.Collections.Generic.IEnumerable siteNames = null, string azureResourceName = null, Azure.ResourceManager.AppService.Models.AppServiceResourceType? azureResourceType = default(Azure.ResourceManager.AppService.Models.AppServiceResourceType?), Azure.ResourceManager.AppService.Models.CustomHostNameDnsRecordType? customHostNameDnsRecordType = default(Azure.ResourceManager.AppService.Models.CustomHostNameDnsRecordType?), Azure.ResourceManager.AppService.Models.AppServiceHostNameType? hostNameType = default(Azure.ResourceManager.AppService.Models.AppServiceHostNameType?)) { throw null; } public static Azure.ResourceManager.AppService.AppServiceIdentifierData AppServiceIdentifierData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string value = null, string kind = null) { throw null; } public static Azure.ResourceManager.AppService.Models.AppServiceOperation AppServiceOperation(string id = null, string name = null, Azure.ResourceManager.AppService.Models.AppServiceOperationStatus? status = default(Azure.ResourceManager.AppService.Models.AppServiceOperationStatus?), System.Collections.Generic.IEnumerable errors = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? modifiedOn = default(System.DateTimeOffset?), System.DateTimeOffset? expireOn = default(System.DateTimeOffset?), System.Guid? geoMasterOperationId = default(System.Guid?)) { throw null; } - public static Azure.ResourceManager.AppService.AppServicePlanData AppServicePlanData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.AppService.Models.AppServiceSkuDescription sku = null, Azure.ResourceManager.Resources.Models.ExtendedLocation extendedLocation = null, string workerTierName = null, Azure.ResourceManager.AppService.Models.AppServicePlanStatus? status = default(Azure.ResourceManager.AppService.Models.AppServicePlanStatus?), string subscription = null, Azure.ResourceManager.AppService.Models.HostingEnvironmentProfile hostingEnvironmentProfile = null, int? maximumNumberOfWorkers = default(int?), string geoRegion = null, bool? isPerSiteScaling = default(bool?), bool? isElasticScaleEnabled = default(bool?), int? maximumElasticWorkerCount = default(int?), int? numberOfSites = default(int?), bool? isSpot = default(bool?), System.DateTimeOffset? spotExpireOn = default(System.DateTimeOffset?), System.DateTimeOffset? freeOfferExpireOn = default(System.DateTimeOffset?), string resourceGroup = null, bool? isReserved = default(bool?), bool? isXenon = default(bool?), bool? isHyperV = default(bool?), int? targetWorkerCount = default(int?), int? targetWorkerSizeId = default(int?), Azure.ResourceManager.AppService.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.AppService.Models.ProvisioningState?), Azure.ResourceManager.AppService.Models.KubeEnvironmentProfile kubeEnvironmentProfile = null, bool? isZoneRedundant = default(bool?), string kind = null) { throw null; } - public static Azure.ResourceManager.AppService.Models.AppServicePlanPatch AppServicePlanPatch(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string workerTierName = null, Azure.ResourceManager.AppService.Models.AppServicePlanStatus? status = default(Azure.ResourceManager.AppService.Models.AppServicePlanStatus?), string subscription = null, Azure.ResourceManager.AppService.Models.HostingEnvironmentProfile hostingEnvironmentProfile = null, int? maximumNumberOfWorkers = default(int?), string geoRegion = null, bool? isPerSiteScaling = default(bool?), bool? isElasticScaleEnabled = default(bool?), int? maximumElasticWorkerCount = default(int?), int? numberOfSites = default(int?), bool? isSpot = default(bool?), System.DateTimeOffset? spotExpirationOn = default(System.DateTimeOffset?), System.DateTimeOffset? freeOfferExpirationOn = default(System.DateTimeOffset?), string resourceGroup = null, bool? isReserved = default(bool?), bool? isXenon = default(bool?), bool? isHyperV = default(bool?), int? targetWorkerCount = default(int?), int? targetWorkerSizeId = default(int?), Azure.ResourceManager.AppService.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.AppService.Models.ProvisioningState?), Azure.ResourceManager.AppService.Models.KubeEnvironmentProfile kubeEnvironmentProfile = null, bool? isZoneRedundant = default(bool?), string kind = null) { throw null; } + public static Azure.ResourceManager.AppService.AppServicePlanData AppServicePlanData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.AppService.Models.AppServiceSkuDescription sku = null, Azure.ResourceManager.Resources.Models.ExtendedLocation extendedLocation = null, string workerTierName = null, Azure.ResourceManager.AppService.Models.AppServicePlanStatus? status = default(Azure.ResourceManager.AppService.Models.AppServicePlanStatus?), string subscription = null, Azure.ResourceManager.AppService.Models.HostingEnvironmentProfile hostingEnvironmentProfile = null, int? maximumNumberOfWorkers = default(int?), int? numberOfWorkers = default(int?), string geoRegion = null, bool? isPerSiteScaling = default(bool?), bool? isElasticScaleEnabled = default(bool?), int? maximumElasticWorkerCount = default(int?), int? numberOfSites = default(int?), bool? isSpot = default(bool?), System.DateTimeOffset? spotExpireOn = default(System.DateTimeOffset?), System.DateTimeOffset? freeOfferExpireOn = default(System.DateTimeOffset?), string resourceGroup = null, bool? isReserved = default(bool?), bool? isXenon = default(bool?), bool? isHyperV = default(bool?), int? targetWorkerCount = default(int?), int? targetWorkerSizeId = default(int?), Azure.ResourceManager.AppService.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.AppService.Models.ProvisioningState?), Azure.ResourceManager.AppService.Models.KubeEnvironmentProfile kubeEnvironmentProfile = null, bool? isZoneRedundant = default(bool?), string kind = null) { throw null; } + public static Azure.ResourceManager.AppService.Models.AppServicePlanPatch AppServicePlanPatch(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string workerTierName = null, Azure.ResourceManager.AppService.Models.AppServicePlanStatus? status = default(Azure.ResourceManager.AppService.Models.AppServicePlanStatus?), string subscription = null, Azure.ResourceManager.AppService.Models.HostingEnvironmentProfile hostingEnvironmentProfile = null, int? maximumNumberOfWorkers = default(int?), int? numberOfWorkers = default(int?), string geoRegion = null, bool? isPerSiteScaling = default(bool?), bool? isElasticScaleEnabled = default(bool?), int? maximumElasticWorkerCount = default(int?), int? numberOfSites = default(int?), bool? isSpot = default(bool?), System.DateTimeOffset? spotExpirationOn = default(System.DateTimeOffset?), System.DateTimeOffset? freeOfferExpirationOn = default(System.DateTimeOffset?), string resourceGroup = null, bool? isReserved = default(bool?), bool? isXenon = default(bool?), bool? isHyperV = default(bool?), int? targetWorkerCount = default(int?), int? targetWorkerSizeId = default(int?), Azure.ResourceManager.AppService.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.AppService.Models.ProvisioningState?), Azure.ResourceManager.AppService.Models.KubeEnvironmentProfile kubeEnvironmentProfile = null, bool? isZoneRedundant = default(bool?), string kind = null) { throw null; } public static Azure.ResourceManager.AppService.Models.AppServicePoolSkuInfo AppServicePoolSkuInfo(Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), Azure.ResourceManager.AppService.Models.AppServiceSkuDescription sku = null, Azure.ResourceManager.AppService.Models.AppServiceSkuCapacity capacity = null) { throw null; } public static Azure.ResourceManager.AppService.Models.AppServicePrivateLinkResourceData AppServicePrivateLinkResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.AppService.Models.AppServicePrivateLinkResourceProperties properties = null) { throw null; } public static Azure.ResourceManager.AppService.Models.AppServicePrivateLinkResourceProperties AppServicePrivateLinkResourceProperties(string groupId = null, System.Collections.Generic.IEnumerable requiredMembers = null, System.Collections.Generic.IEnumerable requiredZoneNames = null) { throw null; } public static Azure.ResourceManager.AppService.Models.AppServiceRecommendation AppServiceRecommendation(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.Guid? recommendationId = default(System.Guid?), Azure.Core.ResourceIdentifier resourceId = null, Azure.ResourceManager.AppService.Models.ResourceScopeType? resourceScope = default(Azure.ResourceManager.AppService.Models.ResourceScopeType?), string ruleName = null, string displayName = null, string message = null, Azure.ResourceManager.AppService.Models.NotificationLevel? level = default(Azure.ResourceManager.AppService.Models.NotificationLevel?), Azure.ResourceManager.AppService.Models.RecommendationChannel? channels = default(Azure.ResourceManager.AppService.Models.RecommendationChannel?), System.Collections.Generic.IEnumerable categoryTags = null, string actionName = null, int? enabled = default(int?), System.Collections.Generic.IEnumerable states = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), System.DateTimeOffset? nextNotificationOn = default(System.DateTimeOffset?), System.DateTimeOffset? notificationExpirationOn = default(System.DateTimeOffset?), System.DateTimeOffset? notifiedOn = default(System.DateTimeOffset?), double? score = default(double?), bool? isDynamic = default(bool?), string extensionName = null, string bladeName = null, string forwardLink = null, string kind = null) { throw null; } public static Azure.ResourceManager.AppService.Models.AppServiceSkuResult AppServiceSkuResult(Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), System.Collections.Generic.IEnumerable skus = null) { throw null; } public static Azure.ResourceManager.AppService.AppServiceSourceControlData AppServiceSourceControlData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string token = null, string tokenSecret = null, string refreshToken = null, System.DateTimeOffset? expireOn = default(System.DateTimeOffset?), string kind = null) { throw null; } - public static Azure.ResourceManager.AppService.Models.AppServiceStorageAccessInfo AppServiceStorageAccessInfo(Azure.ResourceManager.AppService.Models.AppServiceStorageType? storageType = default(Azure.ResourceManager.AppService.Models.AppServiceStorageType?), string accountName = null, string shareName = null, string accessKey = null, string mountPath = null, Azure.ResourceManager.AppService.Models.AppServiceStorageAccountState? state = default(Azure.ResourceManager.AppService.Models.AppServiceStorageAccountState?)) { throw null; } + public static Azure.ResourceManager.AppService.Models.AppServiceStorageAccessInfo AppServiceStorageAccessInfo(Azure.ResourceManager.AppService.Models.AppServiceStorageType? storageType = default(Azure.ResourceManager.AppService.Models.AppServiceStorageType?), string accountName = null, string shareName = null, string accessKey = null, string mountPath = null, Azure.ResourceManager.AppService.Models.AppServiceStorageAccountState? state = default(Azure.ResourceManager.AppService.Models.AppServiceStorageAccountState?), Azure.ResourceManager.AppService.Models.AppServiceStorageProtocol? protocol = default(Azure.ResourceManager.AppService.Models.AppServiceStorageProtocol?)) { throw null; } public static Azure.ResourceManager.AppService.Models.AppServiceUsage AppServiceUsage(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string displayName = null, string resourceName = null, string unit = null, long? currentValue = default(long?), long? limit = default(long?), System.DateTimeOffset? nextResetOn = default(System.DateTimeOffset?), Azure.ResourceManager.AppService.Models.ComputeModeOption? computeMode = default(Azure.ResourceManager.AppService.Models.ComputeModeOption?), string siteMode = null, string kind = null) { throw null; } public static Azure.ResourceManager.AppService.Models.AppServiceValidateContent AppServiceValidateContent(string name = null, Azure.ResourceManager.AppService.Models.ValidateResourceType validateResourceType = default(Azure.ResourceManager.AppService.Models.ValidateResourceType), Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.Core.ResourceIdentifier serverFarmId = null, string skuName = null, bool? needLinuxWorkers = default(bool?), bool? isSpot = default(bool?), int? capacity = default(int?), string hostingEnvironment = null, bool? isXenon = default(bool?), System.Uri containerRegistryBaseUri = null, string containerRegistryUsername = null, string containerRegistryPassword = null, string containerImageRepository = null, string containerImageTag = null, string containerImagePlatform = null, Azure.ResourceManager.AppService.Models.AppServiceEnvironmentProperties appServiceEnvironment = null) { throw null; } public static Azure.ResourceManager.AppService.Models.AppServiceValidateResult AppServiceValidateResult(string status = null, Azure.ResourceManager.AppService.Models.ValidateResponseError error = null) { throw null; } @@ -7001,17 +8198,20 @@ public static partial class ArmAppServiceModelFactory public static Azure.ResourceManager.AppService.Models.AppServiceVirtualNetworkValidationContent AppServiceVirtualNetworkValidationContent(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string vnetResourceGroup = null, string vnetName = null, string vnetSubnetName = null, Azure.Core.ResourceIdentifier subnetResourceId = null, string kind = null) { throw null; } public static Azure.ResourceManager.AppService.AppServiceWorkerPoolData AppServiceWorkerPoolData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.AppService.Models.AppServiceSkuDescription sku = null, int? workerSizeId = default(int?), Azure.ResourceManager.AppService.Models.ComputeModeOption? computeMode = default(Azure.ResourceManager.AppService.Models.ComputeModeOption?), string workerSize = null, int? workerCount = default(int?), System.Collections.Generic.IEnumerable instanceNames = null, string kind = null) { throw null; } public static Azure.ResourceManager.AppService.Models.AppSnapshot AppSnapshot(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string time = null, string kind = null) { throw null; } - public static Azure.ResourceManager.AppService.AseV3NetworkingConfigurationData AseV3NetworkingConfigurationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IEnumerable windowsOutboundIPAddresses = null, System.Collections.Generic.IEnumerable linuxOutboundIPAddresses = null, System.Collections.Generic.IEnumerable externalInboundIPAddresses = null, System.Collections.Generic.IEnumerable internalInboundIPAddresses = null, bool? allowNewPrivateEndpointConnections = default(bool?), string kind = null) { throw null; } + public static Azure.ResourceManager.AppService.AseV3NetworkingConfigurationData AseV3NetworkingConfigurationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IEnumerable windowsOutboundIPAddresses = null, System.Collections.Generic.IEnumerable linuxOutboundIPAddresses = null, System.Collections.Generic.IEnumerable externalInboundIPAddresses = null, System.Collections.Generic.IEnumerable internalInboundIPAddresses = null, bool? allowNewPrivateEndpointConnections = default(bool?), bool? isFtpEnabled = default(bool?), bool? isRemoteDebugEnabled = default(bool?), string inboundIPAddressOverride = null, string kind = null) { throw null; } public static Azure.ResourceManager.AppService.Models.AzureStoragePropertyDictionary AzureStoragePropertyDictionary(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary properties = null, string kind = null) { throw null; } - public static Azure.ResourceManager.AppService.Models.CertificateOrderAction CertificateOrderAction(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.AppService.Models.CertificateOrderActionType? actionType = default(Azure.ResourceManager.AppService.Models.CertificateOrderActionType?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), string kind = null) { throw null; } + public static Azure.ResourceManager.AppService.Models.CertificateOrderAction CertificateOrderAction(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.AppService.Models.CertificateOrderActionType? actionType = default(Azure.ResourceManager.AppService.Models.CertificateOrderActionType?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?)) { throw null; } public static Azure.ResourceManager.AppService.Models.CertificateOrderContact CertificateOrderContact(string email = null, string nameFirst = null, string nameLast = null, string phone = null) { throw null; } public static Azure.ResourceManager.AppService.Models.ConnectionStringDictionary ConnectionStringDictionary(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary properties = null, string kind = null) { throw null; } public static Azure.ResourceManager.AppService.ContinuousWebJobData ContinuousWebJobData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.AppService.Models.ContinuousWebJobStatus? status = default(Azure.ResourceManager.AppService.Models.ContinuousWebJobStatus?), string detailedStatus = null, System.Uri logUri = null, string runCommand = null, System.Uri uri = null, System.Uri extraInfoUri = null, Azure.ResourceManager.AppService.Models.WebJobType? webJobType = default(Azure.ResourceManager.AppService.Models.WebJobType?), string error = null, bool? isUsingSdk = default(bool?), System.Collections.Generic.IDictionary settings = null, string kind = null) { throw null; } + public static Azure.ResourceManager.AppService.Models.CsmDeploymentStatus CsmDeploymentStatus(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string deploymentId = null, Azure.ResourceManager.AppService.Models.DeploymentBuildStatus? status = default(Azure.ResourceManager.AppService.Models.DeploymentBuildStatus?), int? numberOfInstancesInProgress = default(int?), int? numberOfInstancesSuccessful = default(int?), int? numberOfInstancesFailed = default(int?), System.Collections.Generic.IEnumerable failedInstancesLogs = null, System.Collections.Generic.IEnumerable errors = null, string kind = null) { throw null; } public static Azure.ResourceManager.AppService.Models.CsmOperationDescription CsmOperationDescription(string name = null, bool? isDataAction = default(bool?), Azure.ResourceManager.AppService.Models.CsmOperationDisplay display = null, string origin = null, Azure.ResourceManager.AppService.Models.ServiceSpecification csmOperationDescriptionServiceSpecification = null) { throw null; } public static Azure.ResourceManager.AppService.Models.CsmOperationDisplay CsmOperationDisplay(string provider = null, string resource = null, string operation = null, string description = null) { throw null; } public static Azure.ResourceManager.AppService.CsmPublishingCredentialsPoliciesEntityData CsmPublishingCredentialsPoliciesEntityData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, bool? allow = default(bool?), string kind = null) { throw null; } public static Azure.ResourceManager.AppService.Models.CsmUsageQuota CsmUsageQuota(string unit = null, System.DateTimeOffset? nextResetOn = default(System.DateTimeOffset?), long? currentValue = default(long?), long? limit = default(long?), Azure.ResourceManager.AppService.Models.LocalizableString name = null) { throw null; } + public static Azure.ResourceManager.AppService.CustomDnsSuffixConfigurationData CustomDnsSuffixConfigurationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.AppService.Models.CustomDnsSuffixProvisioningState? provisioningState = default(Azure.ResourceManager.AppService.Models.CustomDnsSuffixProvisioningState?), string provisioningDetails = null, string dnsSuffix = null, System.Uri certificateUri = null, string keyVaultReferenceIdentity = null, string kind = null) { throw null; } public static Azure.ResourceManager.AppService.Models.CustomHostnameAnalysisResult CustomHostnameAnalysisResult(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, bool? isHostnameAlreadyVerified = default(bool?), Azure.ResourceManager.AppService.Models.DnsVerificationTestResult? customDomainVerificationTest = default(Azure.ResourceManager.AppService.Models.DnsVerificationTestResult?), Azure.ResponseError customDomainVerificationFailureInfo = null, bool? hasConflictOnScaleUnit = default(bool?), bool? hasConflictAcrossSubscription = default(bool?), string conflictingAppResourceId = null, System.Collections.Generic.IEnumerable cNameRecords = null, System.Collections.Generic.IEnumerable txtRecords = null, System.Collections.Generic.IEnumerable aRecords = null, System.Collections.Generic.IEnumerable alternateCNameRecords = null, System.Collections.Generic.IEnumerable alternateTxtRecords = null, string kind = null) { throw null; } + public static Azure.ResourceManager.AppService.Models.CustomHostnameSites CustomHostnameSites(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string customHostname = null, string region = null, System.Collections.Generic.IEnumerable siteResourceIds = null, string kind = null) { throw null; } public static Azure.ResourceManager.AppService.Models.DataProviderKeyValuePair DataProviderKeyValuePair(string key = null, System.BinaryData value = null) { throw null; } public static Azure.ResourceManager.AppService.Models.DataProviderMetadata DataProviderMetadata(string providerName = null, System.Collections.Generic.IEnumerable propertyBag = null) { throw null; } public static Azure.ResourceManager.AppService.Models.DeletedAppRestoreContent DeletedAppRestoreContent(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.Core.ResourceIdentifier deletedSiteId = null, bool? recoverConfiguration = default(bool?), string snapshotTime = null, bool? useDRSecondary = default(bool?), string kind = null) { throw null; } @@ -7044,8 +8244,8 @@ public static partial class ArmAppServiceModelFactory public static Azure.ResourceManager.AppService.Models.HybridConnectionKey HybridConnectionKey(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string sendKeyName = null, string sendKeyValue = null, string kind = null) { throw null; } public static Azure.ResourceManager.AppService.HybridConnectionLimitData HybridConnectionLimitData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, int? current = default(int?), int? maximum = default(int?), string kind = null) { throw null; } public static Azure.ResourceManager.AppService.Models.InboundEnvironmentEndpoint InboundEnvironmentEndpoint(string description = null, System.Collections.Generic.IEnumerable endpoints = null, System.Collections.Generic.IEnumerable ports = null) { throw null; } - public static Azure.ResourceManager.AppService.KubeEnvironmentData KubeEnvironmentData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Resources.Models.ExtendedLocation extendedLocation = null, Azure.ResourceManager.AppService.Models.KubeEnvironmentProvisioningState? provisioningState = default(Azure.ResourceManager.AppService.Models.KubeEnvironmentProvisioningState?), string deploymentErrors = null, bool? isInternalLoadBalancerEnabled = default(bool?), string defaultDomain = null, string staticIP = null, Azure.ResourceManager.AppService.Models.ArcConfiguration arcConfiguration = null, Azure.ResourceManager.AppService.Models.AppLogsConfiguration appLogsConfiguration = null, Azure.Core.ResourceIdentifier aksResourceId = null, string kind = null) { throw null; } - public static Azure.ResourceManager.AppService.Models.KubeEnvironmentPatch KubeEnvironmentPatch(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.AppService.Models.KubeEnvironmentProvisioningState? provisioningState = default(Azure.ResourceManager.AppService.Models.KubeEnvironmentProvisioningState?), string deploymentErrors = null, bool? isInternalLoadBalancerEnabled = default(bool?), string defaultDomain = null, string staticIP = null, Azure.ResourceManager.AppService.Models.ArcConfiguration arcConfiguration = null, Azure.ResourceManager.AppService.Models.AppLogsConfiguration appLogsConfiguration = null, Azure.Core.ResourceIdentifier aksResourceId = null, string kind = null) { throw null; } + public static Azure.ResourceManager.AppService.KubeEnvironmentData KubeEnvironmentData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Resources.Models.ExtendedLocation extendedLocation = null, Azure.ResourceManager.AppService.Models.KubeEnvironmentProvisioningState? provisioningState = default(Azure.ResourceManager.AppService.Models.KubeEnvironmentProvisioningState?), string deploymentErrors = null, bool? isInternalLoadBalancerEnabled = default(bool?), string defaultDomain = null, string staticIP = null, string environmentType = null, Azure.ResourceManager.AppService.Models.ArcConfiguration arcConfiguration = null, Azure.ResourceManager.AppService.Models.AppLogsConfiguration appLogsConfiguration = null, Azure.ResourceManager.AppService.Models.ContainerAppsConfiguration containerAppsConfiguration = null, Azure.Core.ResourceIdentifier aksResourceId = null, string kind = null) { throw null; } + public static Azure.ResourceManager.AppService.Models.KubeEnvironmentPatch KubeEnvironmentPatch(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.AppService.Models.KubeEnvironmentProvisioningState? provisioningState = default(Azure.ResourceManager.AppService.Models.KubeEnvironmentProvisioningState?), string deploymentErrors = null, bool? isInternalLoadBalancerEnabled = default(bool?), string defaultDomain = null, string staticIP = null, Azure.ResourceManager.AppService.Models.ArcConfiguration arcConfiguration = null, Azure.ResourceManager.AppService.Models.AppLogsConfiguration appLogsConfiguration = null, Azure.ResourceManager.AppService.Models.ContainerAppsConfiguration containerAppsConfiguration = null, Azure.Core.ResourceIdentifier aksResourceId = null, string kind = null) { throw null; } public static Azure.ResourceManager.AppService.Models.KubeEnvironmentProfile KubeEnvironmentProfile(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?)) { throw null; } public static Azure.ResourceManager.AppService.Models.LinuxJavaContainerSettings LinuxJavaContainerSettings(string java11Runtime = null, string java8Runtime = null, bool? isPreview = default(bool?), bool? isDeprecated = default(bool?), bool? isHidden = default(bool?), System.DateTimeOffset? endOfLifeOn = default(System.DateTimeOffset?), bool? isAutoUpdate = default(bool?), bool? isEarlyAccess = default(bool?)) { throw null; } public static Azure.ResourceManager.AppService.Models.LocalizableString LocalizableString(string value = null, string localizedValue = null) { throw null; } @@ -7072,6 +8272,7 @@ public static partial class ArmAppServiceModelFactory public static Azure.ResourceManager.AppService.PublicCertificateData PublicCertificateData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, byte[] blob = null, Azure.ResourceManager.AppService.Models.PublicCertificateLocation? publicCertificateLocation = default(Azure.ResourceManager.AppService.Models.PublicCertificateLocation?), string thumbprintString = null, string kind = null) { throw null; } public static Azure.ResourceManager.AppService.PublishingUserData PublishingUserData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string publishingUserName = null, string publishingPassword = null, string publishingPasswordHash = null, string publishingPasswordHashSalt = null, System.Uri scmUri = null, string kind = null) { throw null; } public static Azure.ResourceManager.AppService.RecommendationRuleData RecommendationRuleData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string recommendationName = null, string displayName = null, string message = null, System.Guid? recommendationId = default(System.Guid?), string description = null, string actionName = null, Azure.ResourceManager.AppService.Models.NotificationLevel? level = default(Azure.ResourceManager.AppService.Models.NotificationLevel?), Azure.ResourceManager.AppService.Models.RecommendationChannel? channels = default(Azure.ResourceManager.AppService.Models.RecommendationChannel?), System.Collections.Generic.IEnumerable categoryTags = null, bool? isDynamic = default(bool?), string extensionName = null, string bladeName = null, string forwardLink = null, string kind = null) { throw null; } + public static Azure.ResourceManager.AppService.Models.RecurrenceScheduleOccurrence RecurrenceScheduleOccurrence(Azure.ResourceManager.AppService.Models.WebAppDayOfWeek? day = default(Azure.ResourceManager.AppService.Models.WebAppDayOfWeek?), int? occurrence = default(int?)) { throw null; } public static Azure.ResourceManager.AppService.Models.ReissueCertificateOrderContent ReissueCertificateOrderContent(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, int? keySize = default(int?), int? delayExistingRevokeInHours = default(int?), string csr = null, bool? isPrivateKeyExternal = default(bool?), string kind = null) { throw null; } public static Azure.ResourceManager.AppService.RelayServiceConnectionEntityData RelayServiceConnectionEntityData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string entityName = null, string entityConnectionString = null, string resourceConnectionString = null, string hostname = null, int? port = default(int?), System.Uri biztalkUri = null, string kind = null) { throw null; } public static Azure.ResourceManager.AppService.Models.RemotePrivateEndpointConnection RemotePrivateEndpointConnection(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string provisioningState = null, Azure.Core.ResourceIdentifier privateEndpointId = null, Azure.ResourceManager.AppService.Models.PrivateLinkConnectionState privateLinkServiceConnectionState = null, System.Collections.Generic.IEnumerable ipAddresses = null, string kind = null) { throw null; } @@ -7081,7 +8282,7 @@ public static partial class ArmAppServiceModelFactory public static Azure.ResourceManager.AppService.Models.ResourceMetricAvailability ResourceMetricAvailability(string timeGrain = null, string retention = null) { throw null; } public static Azure.ResourceManager.AppService.Models.ResourceMetricDefinition ResourceMetricDefinition(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string unit = null, string primaryAggregationType = null, System.Collections.Generic.IEnumerable metricAvailabilities = null, System.Uri resourceUri = null, System.Collections.Generic.IReadOnlyDictionary properties = null, string kind = null) { throw null; } public static Azure.ResourceManager.AppService.Models.ResourceNameAvailability ResourceNameAvailability(bool? isNameAvailable = default(bool?), Azure.ResourceManager.AppService.Models.InAvailabilityReasonType? reason = default(Azure.ResourceManager.AppService.Models.InAvailabilityReasonType?), string message = null) { throw null; } - public static Azure.ResourceManager.AppService.Models.ResourceNameAvailabilityContent ResourceNameAvailabilityContent(string name = null, Azure.ResourceManager.AppService.Models.CheckNameResourceType resourceType = default(Azure.ResourceManager.AppService.Models.CheckNameResourceType), bool? isFqdn = default(bool?)) { throw null; } + public static Azure.ResourceManager.AppService.Models.ResourceNameAvailabilityContent ResourceNameAvailabilityContent(string name = null, Azure.ResourceManager.AppService.Models.CheckNameResourceType resourceType = default(Azure.ResourceManager.AppService.Models.CheckNameResourceType), bool? isFqdn = default(bool?), string environmentId = null) { throw null; } public static Azure.ResourceManager.AppService.Models.ResponseMessageEnvelopeRemotePrivateEndpointConnection ResponseMessageEnvelopeRemotePrivateEndpointConnection(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), System.Collections.Generic.IReadOnlyDictionary tags = null, Azure.ResourceManager.AppService.Models.AppServiceArmPlan plan = null, Azure.ResourceManager.AppService.Models.RemotePrivateEndpointConnection properties = null, Azure.ResourceManager.AppService.Models.AppServiceSkuDescription sku = null, string status = null, Azure.ResponseError error = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, System.Collections.Generic.IEnumerable zones = null) { throw null; } public static Azure.ResourceManager.AppService.Models.RestoreRequestInfo RestoreRequestInfo(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Uri storageAccountUri = null, string blobName = null, bool? canOverwrite = default(bool?), string siteName = null, System.Collections.Generic.IEnumerable databases = null, bool? ignoreConflictingHostNames = default(bool?), bool? ignoreDatabases = default(bool?), string appServicePlan = null, Azure.ResourceManager.AppService.Models.BackupRestoreOperationType? operationType = default(Azure.ResourceManager.AppService.Models.BackupRestoreOperationType?), bool? adjustConnectionStrings = default(bool?), string hostingEnvironment = null, string kind = null) { throw null; } public static Azure.ResourceManager.AppService.Models.ServiceSpecification ServiceSpecification(System.Collections.Generic.IEnumerable metricSpecifications = null, System.Collections.Generic.IEnumerable logSpecifications = null) { throw null; } @@ -7089,14 +8290,16 @@ public static partial class ArmAppServiceModelFactory public static Azure.ResourceManager.AppService.Models.SiteAuthSettingsV2 SiteAuthSettingsV2(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.AppService.Models.AuthPlatform platform = null, Azure.ResourceManager.AppService.Models.GlobalValidation globalValidation = null, Azure.ResourceManager.AppService.Models.AppServiceIdentityProviders identityProviders = null, Azure.ResourceManager.AppService.Models.WebAppLoginInfo login = null, Azure.ResourceManager.AppService.Models.AppServiceHttpSettings httpSettings = null, string kind = null) { throw null; } public static Azure.ResourceManager.AppService.Models.SiteCloneability SiteCloneability(Azure.ResourceManager.AppService.Models.CloneAbilityResult? result = default(Azure.ResourceManager.AppService.Models.CloneAbilityResult?), System.Collections.Generic.IEnumerable blockingFeatures = null, System.Collections.Generic.IEnumerable unsupportedFeatures = null, System.Collections.Generic.IEnumerable blockingCharacteristics = null) { throw null; } public static Azure.ResourceManager.AppService.Models.SiteCloneabilityCriterion SiteCloneabilityCriterion(string name = null, string description = null) { throw null; } - public static Azure.ResourceManager.AppService.SiteConfigData SiteConfigData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, int? numberOfWorkers = default(int?), System.Collections.Generic.IEnumerable defaultDocuments = null, string netFrameworkVersion = null, string phpVersion = null, string pythonVersion = null, string nodeVersion = null, string powerShellVersion = null, string linuxFxVersion = null, string windowsFxVersion = null, bool? isRequestTracingEnabled = default(bool?), System.DateTimeOffset? requestTracingExpirationOn = default(System.DateTimeOffset?), bool? isRemoteDebuggingEnabled = default(bool?), string remoteDebuggingVersion = null, bool? isHttpLoggingEnabled = default(bool?), bool? useManagedIdentityCreds = default(bool?), string acrUserManagedIdentityId = null, int? logsDirectorySizeLimit = default(int?), bool? isDetailedErrorLoggingEnabled = default(bool?), string publishingUsername = null, System.Collections.Generic.IEnumerable appSettings = null, System.Collections.Generic.IEnumerable connectionStrings = null, Azure.ResourceManager.AppService.Models.SiteMachineKey machineKey = null, System.Collections.Generic.IEnumerable handlerMappings = null, string documentRoot = null, Azure.ResourceManager.AppService.Models.ScmType? scmType = default(Azure.ResourceManager.AppService.Models.ScmType?), bool? use32BitWorkerProcess = default(bool?), bool? isWebSocketsEnabled = default(bool?), bool? isAlwaysOn = default(bool?), string javaVersion = null, string javaContainer = null, string javaContainerVersion = null, string appCommandLine = null, Azure.ResourceManager.AppService.Models.ManagedPipelineMode? managedPipelineMode = default(Azure.ResourceManager.AppService.Models.ManagedPipelineMode?), System.Collections.Generic.IEnumerable virtualApplications = null, Azure.ResourceManager.AppService.Models.SiteLoadBalancing? loadBalancing = default(Azure.ResourceManager.AppService.Models.SiteLoadBalancing?), System.Collections.Generic.IEnumerable experimentsRampUpRules = null, Azure.ResourceManager.AppService.Models.SiteLimits limits = null, bool? isAutoHealEnabled = default(bool?), Azure.ResourceManager.AppService.Models.AutoHealRules autoHealRules = null, string tracingOptions = null, string vnetName = null, bool? isVnetRouteAllEnabled = default(bool?), int? vnetPrivatePortsCount = default(int?), Azure.ResourceManager.AppService.Models.AppServiceCorsSettings cors = null, Azure.ResourceManager.AppService.Models.WebAppPushSettings push = null, System.Uri apiDefinitionUri = null, string apiManagementConfigId = null, string autoSwapSlotName = null, bool? isLocalMySqlEnabled = default(bool?), int? managedServiceIdentityId = default(int?), int? xManagedServiceIdentityId = default(int?), string keyVaultReferenceIdentity = null, System.Collections.Generic.IEnumerable ipSecurityRestrictions = null, System.Collections.Generic.IEnumerable scmIPSecurityRestrictions = null, bool? allowIPSecurityRestrictionsForScmToUseMain = default(bool?), bool? isHttp20Enabled = default(bool?), Azure.ResourceManager.AppService.Models.AppServiceSupportedTlsVersion? minTlsVersion = default(Azure.ResourceManager.AppService.Models.AppServiceSupportedTlsVersion?), Azure.ResourceManager.AppService.Models.AppServiceSupportedTlsVersion? scmMinTlsVersion = default(Azure.ResourceManager.AppService.Models.AppServiceSupportedTlsVersion?), Azure.ResourceManager.AppService.Models.AppServiceFtpsState? ftpsState = default(Azure.ResourceManager.AppService.Models.AppServiceFtpsState?), int? preWarmedInstanceCount = default(int?), int? functionAppScaleLimit = default(int?), string healthCheckPath = null, bool? isFunctionsRuntimeScaleMonitoringEnabled = default(bool?), string websiteTimeZone = null, int? minimumElasticInstanceCount = default(int?), System.Collections.Generic.IDictionary azureStorageAccounts = null, string publicNetworkAccess = null, string kind = null) { throw null; } - public static Azure.ResourceManager.AppService.Models.SiteConfigProperties SiteConfigProperties(int? numberOfWorkers = default(int?), System.Collections.Generic.IEnumerable defaultDocuments = null, string netFrameworkVersion = null, string phpVersion = null, string pythonVersion = null, string nodeVersion = null, string powerShellVersion = null, string linuxFxVersion = null, string windowsFxVersion = null, bool? isRequestTracingEnabled = default(bool?), System.DateTimeOffset? requestTracingExpirationOn = default(System.DateTimeOffset?), bool? isRemoteDebuggingEnabled = default(bool?), string remoteDebuggingVersion = null, bool? isHttpLoggingEnabled = default(bool?), bool? useManagedIdentityCreds = default(bool?), string acrUserManagedIdentityId = null, int? logsDirectorySizeLimit = default(int?), bool? isDetailedErrorLoggingEnabled = default(bool?), string publishingUsername = null, System.Collections.Generic.IEnumerable appSettings = null, System.Collections.Generic.IEnumerable connectionStrings = null, Azure.ResourceManager.AppService.Models.SiteMachineKey machineKey = null, System.Collections.Generic.IEnumerable handlerMappings = null, string documentRoot = null, Azure.ResourceManager.AppService.Models.ScmType? scmType = default(Azure.ResourceManager.AppService.Models.ScmType?), bool? use32BitWorkerProcess = default(bool?), bool? isWebSocketsEnabled = default(bool?), bool? isAlwaysOn = default(bool?), string javaVersion = null, string javaContainer = null, string javaContainerVersion = null, string appCommandLine = null, Azure.ResourceManager.AppService.Models.ManagedPipelineMode? managedPipelineMode = default(Azure.ResourceManager.AppService.Models.ManagedPipelineMode?), System.Collections.Generic.IEnumerable virtualApplications = null, Azure.ResourceManager.AppService.Models.SiteLoadBalancing? loadBalancing = default(Azure.ResourceManager.AppService.Models.SiteLoadBalancing?), System.Collections.Generic.IEnumerable experimentsRampUpRules = null, Azure.ResourceManager.AppService.Models.SiteLimits limits = null, bool? isAutoHealEnabled = default(bool?), Azure.ResourceManager.AppService.Models.AutoHealRules autoHealRules = null, string tracingOptions = null, string vnetName = null, bool? isVnetRouteAllEnabled = default(bool?), int? vnetPrivatePortsCount = default(int?), Azure.ResourceManager.AppService.Models.AppServiceCorsSettings cors = null, Azure.ResourceManager.AppService.Models.WebAppPushSettings push = null, System.Uri apiDefinitionUri = null, string apiManagementConfigId = null, string autoSwapSlotName = null, bool? isLocalMySqlEnabled = default(bool?), int? managedServiceIdentityId = default(int?), int? xManagedServiceIdentityId = default(int?), string keyVaultReferenceIdentity = null, System.Collections.Generic.IEnumerable ipSecurityRestrictions = null, System.Collections.Generic.IEnumerable scmIPSecurityRestrictions = null, bool? allowIPSecurityRestrictionsForScmToUseMain = default(bool?), bool? isHttp20Enabled = default(bool?), Azure.ResourceManager.AppService.Models.AppServiceSupportedTlsVersion? minTlsVersion = default(Azure.ResourceManager.AppService.Models.AppServiceSupportedTlsVersion?), Azure.ResourceManager.AppService.Models.AppServiceSupportedTlsVersion? scmMinTlsVersion = default(Azure.ResourceManager.AppService.Models.AppServiceSupportedTlsVersion?), Azure.ResourceManager.AppService.Models.AppServiceFtpsState? ftpsState = default(Azure.ResourceManager.AppService.Models.AppServiceFtpsState?), int? preWarmedInstanceCount = default(int?), int? functionAppScaleLimit = default(int?), string healthCheckPath = null, bool? isFunctionsRuntimeScaleMonitoringEnabled = default(bool?), string websiteTimeZone = null, int? minimumElasticInstanceCount = default(int?), System.Collections.Generic.IDictionary azureStorageAccounts = null, string publicNetworkAccess = null) { throw null; } + public static Azure.ResourceManager.AppService.SiteConfigData SiteConfigData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, int? numberOfWorkers = default(int?), System.Collections.Generic.IEnumerable defaultDocuments = null, string netFrameworkVersion = null, string phpVersion = null, string pythonVersion = null, string nodeVersion = null, string powerShellVersion = null, string linuxFxVersion = null, string windowsFxVersion = null, bool? isRequestTracingEnabled = default(bool?), System.DateTimeOffset? requestTracingExpirationOn = default(System.DateTimeOffset?), bool? isRemoteDebuggingEnabled = default(bool?), string remoteDebuggingVersion = null, bool? isHttpLoggingEnabled = default(bool?), bool? useManagedIdentityCreds = default(bool?), string acrUserManagedIdentityId = null, int? logsDirectorySizeLimit = default(int?), bool? isDetailedErrorLoggingEnabled = default(bool?), string publishingUsername = null, System.Collections.Generic.IEnumerable appSettings = null, System.Collections.Generic.IEnumerable metadata = null, System.Collections.Generic.IEnumerable connectionStrings = null, Azure.ResourceManager.AppService.Models.SiteMachineKey machineKey = null, System.Collections.Generic.IEnumerable handlerMappings = null, string documentRoot = null, Azure.ResourceManager.AppService.Models.ScmType? scmType = default(Azure.ResourceManager.AppService.Models.ScmType?), bool? use32BitWorkerProcess = default(bool?), bool? isWebSocketsEnabled = default(bool?), bool? isAlwaysOn = default(bool?), string javaVersion = null, string javaContainer = null, string javaContainerVersion = null, string appCommandLine = null, Azure.ResourceManager.AppService.Models.ManagedPipelineMode? managedPipelineMode = default(Azure.ResourceManager.AppService.Models.ManagedPipelineMode?), System.Collections.Generic.IEnumerable virtualApplications = null, Azure.ResourceManager.AppService.Models.SiteLoadBalancing? loadBalancing = default(Azure.ResourceManager.AppService.Models.SiteLoadBalancing?), System.Collections.Generic.IEnumerable experimentsRampUpRules = null, Azure.ResourceManager.AppService.Models.SiteLimits limits = null, bool? isAutoHealEnabled = default(bool?), Azure.ResourceManager.AppService.Models.AutoHealRules autoHealRules = null, string tracingOptions = null, string vnetName = null, bool? isVnetRouteAllEnabled = default(bool?), int? vnetPrivatePortsCount = default(int?), Azure.ResourceManager.AppService.Models.AppServiceCorsSettings cors = null, Azure.ResourceManager.AppService.Models.WebAppPushSettings push = null, System.Uri apiDefinitionUri = null, string apiManagementConfigId = null, string autoSwapSlotName = null, bool? isLocalMySqlEnabled = default(bool?), int? managedServiceIdentityId = default(int?), int? xManagedServiceIdentityId = default(int?), string keyVaultReferenceIdentity = null, System.Collections.Generic.IEnumerable ipSecurityRestrictions = null, Azure.ResourceManager.AppService.Models.SiteDefaultAction? ipSecurityRestrictionsDefaultAction = default(Azure.ResourceManager.AppService.Models.SiteDefaultAction?), System.Collections.Generic.IEnumerable scmIPSecurityRestrictions = null, Azure.ResourceManager.AppService.Models.SiteDefaultAction? scmIPSecurityRestrictionsDefaultAction = default(Azure.ResourceManager.AppService.Models.SiteDefaultAction?), bool? allowIPSecurityRestrictionsForScmToUseMain = default(bool?), bool? isHttp20Enabled = default(bool?), Azure.ResourceManager.AppService.Models.AppServiceSupportedTlsVersion? minTlsVersion = default(Azure.ResourceManager.AppService.Models.AppServiceSupportedTlsVersion?), Azure.ResourceManager.AppService.Models.AppServiceTlsCipherSuite? minTlsCipherSuite = default(Azure.ResourceManager.AppService.Models.AppServiceTlsCipherSuite?), Azure.ResourceManager.AppService.Models.AppServiceSupportedTlsVersion? scmMinTlsVersion = default(Azure.ResourceManager.AppService.Models.AppServiceSupportedTlsVersion?), Azure.ResourceManager.AppService.Models.AppServiceFtpsState? ftpsState = default(Azure.ResourceManager.AppService.Models.AppServiceFtpsState?), int? preWarmedInstanceCount = default(int?), int? functionAppScaleLimit = default(int?), int? elasticWebAppScaleLimit = default(int?), string healthCheckPath = null, bool? isFunctionsRuntimeScaleMonitoringEnabled = default(bool?), string websiteTimeZone = null, int? minimumElasticInstanceCount = default(int?), System.Collections.Generic.IDictionary azureStorageAccounts = null, string publicNetworkAccess = null, string kind = null) { throw null; } + public static Azure.ResourceManager.AppService.Models.SiteConfigProperties SiteConfigProperties(int? numberOfWorkers = default(int?), System.Collections.Generic.IEnumerable defaultDocuments = null, string netFrameworkVersion = null, string phpVersion = null, string pythonVersion = null, string nodeVersion = null, string powerShellVersion = null, string linuxFxVersion = null, string windowsFxVersion = null, bool? isRequestTracingEnabled = default(bool?), System.DateTimeOffset? requestTracingExpirationOn = default(System.DateTimeOffset?), bool? isRemoteDebuggingEnabled = default(bool?), string remoteDebuggingVersion = null, bool? isHttpLoggingEnabled = default(bool?), bool? useManagedIdentityCreds = default(bool?), string acrUserManagedIdentityId = null, int? logsDirectorySizeLimit = default(int?), bool? isDetailedErrorLoggingEnabled = default(bool?), string publishingUsername = null, System.Collections.Generic.IEnumerable appSettings = null, System.Collections.Generic.IEnumerable metadata = null, System.Collections.Generic.IEnumerable connectionStrings = null, Azure.ResourceManager.AppService.Models.SiteMachineKey machineKey = null, System.Collections.Generic.IEnumerable handlerMappings = null, string documentRoot = null, Azure.ResourceManager.AppService.Models.ScmType? scmType = default(Azure.ResourceManager.AppService.Models.ScmType?), bool? use32BitWorkerProcess = default(bool?), bool? isWebSocketsEnabled = default(bool?), bool? isAlwaysOn = default(bool?), string javaVersion = null, string javaContainer = null, string javaContainerVersion = null, string appCommandLine = null, Azure.ResourceManager.AppService.Models.ManagedPipelineMode? managedPipelineMode = default(Azure.ResourceManager.AppService.Models.ManagedPipelineMode?), System.Collections.Generic.IEnumerable virtualApplications = null, Azure.ResourceManager.AppService.Models.SiteLoadBalancing? loadBalancing = default(Azure.ResourceManager.AppService.Models.SiteLoadBalancing?), System.Collections.Generic.IEnumerable experimentsRampUpRules = null, Azure.ResourceManager.AppService.Models.SiteLimits limits = null, bool? isAutoHealEnabled = default(bool?), Azure.ResourceManager.AppService.Models.AutoHealRules autoHealRules = null, string tracingOptions = null, string vnetName = null, bool? isVnetRouteAllEnabled = default(bool?), int? vnetPrivatePortsCount = default(int?), Azure.ResourceManager.AppService.Models.AppServiceCorsSettings cors = null, Azure.ResourceManager.AppService.Models.WebAppPushSettings push = null, System.Uri apiDefinitionUri = null, string apiManagementConfigId = null, string autoSwapSlotName = null, bool? isLocalMySqlEnabled = default(bool?), int? managedServiceIdentityId = default(int?), int? xManagedServiceIdentityId = default(int?), string keyVaultReferenceIdentity = null, System.Collections.Generic.IEnumerable ipSecurityRestrictions = null, Azure.ResourceManager.AppService.Models.SiteDefaultAction? ipSecurityRestrictionsDefaultAction = default(Azure.ResourceManager.AppService.Models.SiteDefaultAction?), System.Collections.Generic.IEnumerable scmIPSecurityRestrictions = null, Azure.ResourceManager.AppService.Models.SiteDefaultAction? scmIPSecurityRestrictionsDefaultAction = default(Azure.ResourceManager.AppService.Models.SiteDefaultAction?), bool? allowIPSecurityRestrictionsForScmToUseMain = default(bool?), bool? isHttp20Enabled = default(bool?), Azure.ResourceManager.AppService.Models.AppServiceSupportedTlsVersion? minTlsVersion = default(Azure.ResourceManager.AppService.Models.AppServiceSupportedTlsVersion?), Azure.ResourceManager.AppService.Models.AppServiceTlsCipherSuite? minTlsCipherSuite = default(Azure.ResourceManager.AppService.Models.AppServiceTlsCipherSuite?), Azure.ResourceManager.AppService.Models.AppServiceSupportedTlsVersion? scmMinTlsVersion = default(Azure.ResourceManager.AppService.Models.AppServiceSupportedTlsVersion?), Azure.ResourceManager.AppService.Models.AppServiceFtpsState? ftpsState = default(Azure.ResourceManager.AppService.Models.AppServiceFtpsState?), int? preWarmedInstanceCount = default(int?), int? functionAppScaleLimit = default(int?), int? elasticWebAppScaleLimit = default(int?), string healthCheckPath = null, bool? isFunctionsRuntimeScaleMonitoringEnabled = default(bool?), string websiteTimeZone = null, int? minimumElasticInstanceCount = default(int?), System.Collections.Generic.IDictionary azureStorageAccounts = null, string publicNetworkAccess = null) { throw null; } public static Azure.ResourceManager.AppService.Models.SiteConfigPropertiesDictionary SiteConfigPropertiesDictionary(bool? use32BitWorkerProcess = default(bool?), string linuxFxVersion = null, string javaVersion = null, string powerShellVersion = null) { throw null; } public static Azure.ResourceManager.AppService.Models.SiteConfigurationSnapshotInfo SiteConfigurationSnapshotInfo(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.DateTimeOffset? snapshotTakenOn = default(System.DateTimeOffset?), int? snapshotId = default(int?), string kind = null) { throw null; } + public static Azure.ResourceManager.AppService.SiteContainerData SiteContainerData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string image = null, string targetPort = null, bool? isMain = default(bool?), string startUpCommand = null, Azure.ResourceManager.AppService.Models.SiteContainerAuthType? authType = default(Azure.ResourceManager.AppService.Models.SiteContainerAuthType?), string userName = null, string passwordSecret = null, string userManagedIdentityClientId = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? lastModifiedOn = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable volumeMounts = null, System.Collections.Generic.IEnumerable environmentVariables = null, string kind = null) { throw null; } + public static Azure.ResourceManager.AppService.Models.SiteDnsConfig SiteDnsConfig(System.Collections.Generic.IEnumerable dnsServers = null, string dnsAltServer = null, int? dnsRetryAttemptTimeout = default(int?), int? dnsRetryAttemptCount = default(int?), int? dnsMaxCacheTimeout = default(int?), bool? dnsLegacySortOrder = default(bool?)) { throw null; } public static Azure.ResourceManager.AppService.SiteExtensionInfoData SiteExtensionInfoData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string extensionId = null, string title = null, Azure.ResourceManager.AppService.Models.SiteExtensionType? extensionType = default(Azure.ResourceManager.AppService.Models.SiteExtensionType?), string summary = null, string description = null, string version = null, System.Uri extensionUri = null, System.Uri projectUri = null, System.Uri iconUri = null, System.Uri licenseUri = null, System.Uri feedUri = null, System.Collections.Generic.IEnumerable authors = null, string installerCommandLineParams = null, System.DateTimeOffset? publishedOn = default(System.DateTimeOffset?), int? downloadCount = default(int?), bool? localIsLatestVersion = default(bool?), string localPath = null, System.DateTimeOffset? installedOn = default(System.DateTimeOffset?), string provisioningState = null, string comment = null, string kind = null) { throw null; } public static Azure.ResourceManager.AppService.SiteLogsConfigData SiteLogsConfigData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.AppService.Models.ApplicationLogsConfig applicationLogs = null, Azure.ResourceManager.AppService.Models.AppServiceHttpLogsConfig httpLogs = null, bool? isFailedRequestsTracingEnabled = default(bool?), bool? isDetailedErrorMessagesEnabled = default(bool?), string kind = null) { throw null; } public static Azure.ResourceManager.AppService.Models.SiteMachineKey SiteMachineKey(string validation = null, string validationKey = null, string decryption = null, string decryptionKey = null) { throw null; } - public static Azure.ResourceManager.AppService.Models.SitePatchInfo SitePatchInfo(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, string state = null, System.Collections.Generic.IEnumerable hostNames = null, string repositorySiteName = null, Azure.ResourceManager.AppService.Models.AppServiceUsageState? usageState = default(Azure.ResourceManager.AppService.Models.AppServiceUsageState?), bool? isEnabled = default(bool?), System.Collections.Generic.IEnumerable enabledHostNames = null, Azure.ResourceManager.AppService.Models.WebSiteAvailabilityState? availabilityState = default(Azure.ResourceManager.AppService.Models.WebSiteAvailabilityState?), System.Collections.Generic.IEnumerable hostNameSslStates = null, Azure.Core.ResourceIdentifier serverFarmId = null, bool? isReserved = default(bool?), bool? isXenon = default(bool?), bool? isHyperV = default(bool?), System.DateTimeOffset? lastModifiedOn = default(System.DateTimeOffset?), Azure.ResourceManager.AppService.Models.SiteConfigProperties siteConfig = null, System.Collections.Generic.IEnumerable trafficManagerHostNames = null, bool? isScmSiteAlsoStopped = default(bool?), string targetSwapSlot = null, Azure.ResourceManager.AppService.Models.HostingEnvironmentProfile hostingEnvironmentProfile = null, bool? isClientAffinityEnabled = default(bool?), bool? isClientCertEnabled = default(bool?), Azure.ResourceManager.AppService.Models.ClientCertMode? clientCertMode = default(Azure.ResourceManager.AppService.Models.ClientCertMode?), string clientCertExclusionPaths = null, bool? isHostNameDisabled = default(bool?), string customDomainVerificationId = null, string outboundIPAddresses = null, string possibleOutboundIPAddresses = null, int? containerSize = default(int?), int? dailyMemoryTimeQuota = default(int?), System.DateTimeOffset? suspendOn = default(System.DateTimeOffset?), int? maxNumberOfWorkers = default(int?), Azure.ResourceManager.AppService.Models.CloningInfo cloningInfo = null, string resourceGroup = null, bool? isDefaultContainer = default(bool?), string defaultHostName = null, Azure.ResourceManager.AppService.Models.SlotSwapStatus slotSwapStatus = null, bool? isHttpsOnly = default(bool?), Azure.ResourceManager.AppService.Models.RedundancyMode? redundancyMode = default(Azure.ResourceManager.AppService.Models.RedundancyMode?), System.Guid? inProgressOperationId = default(System.Guid?), bool? isStorageAccountRequired = default(bool?), string keyVaultReferenceIdentity = null, Azure.Core.ResourceIdentifier virtualNetworkSubnetId = null, string kind = null) { throw null; } + public static Azure.ResourceManager.AppService.Models.SitePatchInfo SitePatchInfo(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, string state = null, System.Collections.Generic.IEnumerable hostNames = null, string repositorySiteName = null, Azure.ResourceManager.AppService.Models.AppServiceUsageState? usageState = default(Azure.ResourceManager.AppService.Models.AppServiceUsageState?), bool? isEnabled = default(bool?), System.Collections.Generic.IEnumerable enabledHostNames = null, Azure.ResourceManager.AppService.Models.WebSiteAvailabilityState? availabilityState = default(Azure.ResourceManager.AppService.Models.WebSiteAvailabilityState?), System.Collections.Generic.IEnumerable hostNameSslStates = null, Azure.Core.ResourceIdentifier serverFarmId = null, bool? isReserved = default(bool?), bool? isXenon = default(bool?), bool? isHyperV = default(bool?), System.DateTimeOffset? lastModifiedOn = default(System.DateTimeOffset?), Azure.ResourceManager.AppService.Models.SiteDnsConfig dnsConfiguration = null, Azure.ResourceManager.AppService.Models.SiteConfigProperties siteConfig = null, System.Collections.Generic.IEnumerable trafficManagerHostNames = null, bool? isScmSiteAlsoStopped = default(bool?), string targetSwapSlot = null, Azure.ResourceManager.AppService.Models.HostingEnvironmentProfile hostingEnvironmentProfile = null, bool? isClientAffinityEnabled = default(bool?), bool? isClientCertEnabled = default(bool?), Azure.ResourceManager.AppService.Models.ClientCertMode? clientCertMode = default(Azure.ResourceManager.AppService.Models.ClientCertMode?), string clientCertExclusionPaths = null, bool? isHostNameDisabled = default(bool?), string customDomainVerificationId = null, string outboundIPAddresses = null, string possibleOutboundIPAddresses = null, int? containerSize = default(int?), int? dailyMemoryTimeQuota = default(int?), System.DateTimeOffset? suspendOn = default(System.DateTimeOffset?), int? maxNumberOfWorkers = default(int?), Azure.ResourceManager.AppService.Models.CloningInfo cloningInfo = null, string resourceGroup = null, bool? isDefaultContainer = default(bool?), string defaultHostName = null, Azure.ResourceManager.AppService.Models.SlotSwapStatus slotSwapStatus = null, bool? isHttpsOnly = default(bool?), Azure.ResourceManager.AppService.Models.RedundancyMode? redundancyMode = default(Azure.ResourceManager.AppService.Models.RedundancyMode?), System.Guid? inProgressOperationId = default(System.Guid?), bool? isStorageAccountRequired = default(bool?), string keyVaultReferenceIdentity = null, Azure.Core.ResourceIdentifier virtualNetworkSubnetId = null, string kind = null) { throw null; } public static Azure.ResourceManager.AppService.Models.SitePhpErrorLogFlag SitePhpErrorLogFlag(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string localLogErrors = null, string masterLogErrors = null, string localLogErrorsMaxLength = null, string masterLogErrorsMaxLength = null, string kind = null) { throw null; } public static Azure.ResourceManager.AppService.Models.SiteSeal SiteSeal(string html = null) { throw null; } public static Azure.ResourceManager.AppService.SiteSourceControlData SiteSourceControlData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Uri repoUri = null, string branch = null, bool? isManualIntegration = default(bool?), bool? isGitHubAction = default(bool?), bool? isDeploymentRollbackEnabled = default(bool?), bool? isMercurial = default(bool?), Azure.ResourceManager.AppService.Models.GitHubActionConfiguration gitHubActionConfiguration = null, string kind = null) { throw null; } @@ -7105,12 +8308,18 @@ public static partial class ArmAppServiceModelFactory public static Azure.ResourceManager.AppService.Models.SlotSwapStatus SlotSwapStatus(System.DateTimeOffset? timestampUtc = default(System.DateTimeOffset?), string sourceSlotName = null, string destinationSlotName = null) { throw null; } public static Azure.ResourceManager.AppService.Models.SnapshotRestoreRequest SnapshotRestoreRequest(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string snapshotTime = null, Azure.ResourceManager.AppService.Models.SnapshotRecoverySource recoverySource = null, bool? canOverwrite = default(bool?), bool? recoverConfiguration = default(bool?), bool? ignoreConflictingHostNames = default(bool?), bool? useDRSecondary = default(bool?), string kind = null) { throw null; } public static Azure.ResourceManager.AppService.Models.StampCapacity StampCapacity(string name = null, long? availableCapacity = default(long?), long? totalCapacity = default(long?), string unit = null, Azure.ResourceManager.AppService.Models.ComputeModeOption? computeMode = default(Azure.ResourceManager.AppService.Models.ComputeModeOption?), Azure.ResourceManager.AppService.Models.WorkerSizeOption? workerSize = default(Azure.ResourceManager.AppService.Models.WorkerSizeOption?), int? workerSizeId = default(int?), bool? excludeFromCapacityAllocation = default(bool?), bool? isApplicableForAllComputeModes = default(bool?), string siteMode = null, bool? isLinux = default(bool?)) { throw null; } - public static Azure.ResourceManager.AppService.StaticSiteBuildData StaticSiteBuildData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string buildId = null, string sourceBranch = null, string pullRequestTitle = null, string hostname = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? lastUpdatedOn = default(System.DateTimeOffset?), Azure.ResourceManager.AppService.Models.StaticSiteBuildStatus? status = default(Azure.ResourceManager.AppService.Models.StaticSiteBuildStatus?), System.Collections.Generic.IEnumerable userProvidedFunctionApps = null, string kind = null) { throw null; } + public static Azure.ResourceManager.AppService.StaticSiteBasicAuthPropertyData StaticSiteBasicAuthPropertyData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string password = null, System.Uri secretUri = null, string applicableEnvironmentsMode = null, System.Collections.Generic.IEnumerable environments = null, string secretState = null, string kind = null) { throw null; } + public static Azure.ResourceManager.AppService.StaticSiteBuildData StaticSiteBuildData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string buildId = null, string sourceBranch = null, string pullRequestTitle = null, string hostname = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? lastUpdatedOn = default(System.DateTimeOffset?), Azure.ResourceManager.AppService.Models.StaticSiteBuildStatus? status = default(Azure.ResourceManager.AppService.Models.StaticSiteBuildStatus?), System.Collections.Generic.IEnumerable userProvidedFunctionApps = null, System.Collections.Generic.IEnumerable linkedBackends = null, System.Collections.Generic.IEnumerable databaseConnections = null, string kind = null) { throw null; } public static Azure.ResourceManager.AppService.Models.StaticSiteCustomDomainContent StaticSiteCustomDomainContent(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string validationMethod = null, string kind = null) { throw null; } public static Azure.ResourceManager.AppService.StaticSiteCustomDomainOverviewData StaticSiteCustomDomainOverviewData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string domainName = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), Azure.ResourceManager.AppService.Models.CustomDomainStatus? status = default(Azure.ResourceManager.AppService.Models.CustomDomainStatus?), string validationToken = null, string errorMessage = null, string kind = null) { throw null; } - public static Azure.ResourceManager.AppService.StaticSiteData StaticSiteData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.AppService.Models.AppServiceSkuDescription sku = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, string defaultHostname = null, System.Uri repositoryUri = null, string branch = null, System.Collections.Generic.IEnumerable customDomains = null, string repositoryToken = null, Azure.ResourceManager.AppService.Models.StaticSiteBuildProperties buildProperties = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, Azure.ResourceManager.AppService.Models.StagingEnvironmentPolicy? stagingEnvironmentPolicy = default(Azure.ResourceManager.AppService.Models.StagingEnvironmentPolicy?), bool? allowConfigFileUpdates = default(bool?), Azure.ResourceManager.AppService.Models.StaticSiteTemplate templateProperties = null, string contentDistributionEndpoint = null, string keyVaultReferenceIdentity = null, System.Collections.Generic.IEnumerable userProvidedFunctionApps = null, string provider = null, string kind = null) { throw null; } + public static Azure.ResourceManager.AppService.StaticSiteData StaticSiteData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.AppService.Models.AppServiceSkuDescription sku = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, string defaultHostname = null, System.Uri repositoryUri = null, string branch = null, System.Collections.Generic.IEnumerable customDomains = null, string repositoryToken = null, Azure.ResourceManager.AppService.Models.StaticSiteBuildProperties buildProperties = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, Azure.ResourceManager.AppService.Models.StagingEnvironmentPolicy? stagingEnvironmentPolicy = default(Azure.ResourceManager.AppService.Models.StagingEnvironmentPolicy?), bool? allowConfigFileUpdates = default(bool?), Azure.ResourceManager.AppService.Models.StaticSiteTemplate templateProperties = null, string contentDistributionEndpoint = null, string keyVaultReferenceIdentity = null, System.Collections.Generic.IEnumerable userProvidedFunctionApps = null, System.Collections.Generic.IEnumerable linkedBackends = null, string provider = null, Azure.ResourceManager.AppService.Models.EnterpriseGradeCdnStatus? enterpriseGradeCdnStatus = default(Azure.ResourceManager.AppService.Models.EnterpriseGradeCdnStatus?), string publicNetworkAccess = null, System.Collections.Generic.IEnumerable databaseConnections = null, string kind = null) { throw null; } + public static Azure.ResourceManager.AppService.Models.StaticSiteDatabaseConnectionConfigurationFileOverview StaticSiteDatabaseConnectionConfigurationFileOverview(string fileName = null, string contents = null, string staticSiteDatabaseConnectionConfigurationFileOverviewType = null) { throw null; } + public static Azure.ResourceManager.AppService.StaticSiteDatabaseConnectionData StaticSiteDatabaseConnectionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.Core.ResourceIdentifier resourceId = null, string connectionIdentity = null, string connectionString = null, string region = null, System.Collections.Generic.IEnumerable configurationFiles = null, string kind = null) { throw null; } + public static Azure.ResourceManager.AppService.Models.StaticSiteDatabaseConnectionOverview StaticSiteDatabaseConnectionOverview(Azure.Core.ResourceIdentifier resourceId = null, string connectionIdentity = null, string region = null, System.Collections.Generic.IEnumerable configurationFiles = null, string name = null) { throw null; } public static Azure.ResourceManager.AppService.Models.StaticSiteFunctionOverview StaticSiteFunctionOverview(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string functionName = null, Azure.ResourceManager.AppService.Models.FunctionTriggerType? triggerType = default(Azure.ResourceManager.AppService.Models.FunctionTriggerType?), string kind = null) { throw null; } - public static Azure.ResourceManager.AppService.Models.StaticSitePatch StaticSitePatch(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string defaultHostname = null, System.Uri repositoryUri = null, string branch = null, System.Collections.Generic.IEnumerable customDomains = null, string repositoryToken = null, Azure.ResourceManager.AppService.Models.StaticSiteBuildProperties buildProperties = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, Azure.ResourceManager.AppService.Models.StagingEnvironmentPolicy? stagingEnvironmentPolicy = default(Azure.ResourceManager.AppService.Models.StagingEnvironmentPolicy?), bool? allowConfigFileUpdates = default(bool?), Azure.ResourceManager.AppService.Models.StaticSiteTemplate templateProperties = null, string contentDistributionEndpoint = null, string keyVaultReferenceIdentity = null, System.Collections.Generic.IEnumerable userProvidedFunctionApps = null, string provider = null, string kind = null) { throw null; } + public static Azure.ResourceManager.AppService.StaticSiteLinkedBackendData StaticSiteLinkedBackendData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.Core.ResourceIdentifier backendResourceId = null, string region = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), string provisioningState = null, string kind = null) { throw null; } + public static Azure.ResourceManager.AppService.Models.StaticSiteLinkedBackendInfo StaticSiteLinkedBackendInfo(string backendResourceId = null, string region = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), string provisioningState = null) { throw null; } + public static Azure.ResourceManager.AppService.Models.StaticSitePatch StaticSitePatch(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string defaultHostname = null, System.Uri repositoryUri = null, string branch = null, System.Collections.Generic.IEnumerable customDomains = null, string repositoryToken = null, Azure.ResourceManager.AppService.Models.StaticSiteBuildProperties buildProperties = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, Azure.ResourceManager.AppService.Models.StagingEnvironmentPolicy? stagingEnvironmentPolicy = default(Azure.ResourceManager.AppService.Models.StagingEnvironmentPolicy?), bool? allowConfigFileUpdates = default(bool?), Azure.ResourceManager.AppService.Models.StaticSiteTemplate templateProperties = null, string contentDistributionEndpoint = null, string keyVaultReferenceIdentity = null, System.Collections.Generic.IEnumerable userProvidedFunctionApps = null, System.Collections.Generic.IEnumerable linkedBackends = null, string provider = null, Azure.ResourceManager.AppService.Models.EnterpriseGradeCdnStatus? enterpriseGradeCdnStatus = default(Azure.ResourceManager.AppService.Models.EnterpriseGradeCdnStatus?), string publicNetworkAccess = null, System.Collections.Generic.IEnumerable databaseConnections = null, string kind = null) { throw null; } public static Azure.ResourceManager.AppService.Models.StaticSiteResetContent StaticSiteResetContent(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string repositoryToken = null, bool? shouldUpdateRepository = default(bool?), string kind = null) { throw null; } public static Azure.ResourceManager.AppService.Models.StaticSiteStringList StaticSiteStringList(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IEnumerable properties = null, string kind = null) { throw null; } public static Azure.ResourceManager.AppService.Models.StaticSitesWorkflowPreview StaticSitesWorkflowPreview(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string path = null, string contents = null, string kind = null) { throw null; } @@ -7126,14 +8335,18 @@ public static partial class ArmAppServiceModelFactory public static Azure.ResourceManager.AppService.Models.TldLegalAgreement TldLegalAgreement(string agreementKey = null, string title = null, string content = null, System.Uri uri = null) { throw null; } public static Azure.ResourceManager.AppService.TopLevelDomainData TopLevelDomainData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, bool? isDomainPrivacySupported = default(bool?), string kind = null) { throw null; } public static Azure.ResourceManager.AppService.TriggeredJobHistoryData TriggeredJobHistoryData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IEnumerable runs = null, string kind = null) { throw null; } - public static Azure.ResourceManager.AppService.TriggeredWebJobData TriggeredWebJobData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.AppService.Models.TriggeredJobRun latestRun = null, System.Uri historyUri = null, System.Uri schedulerLogsUri = null, string runCommand = null, System.Uri uri = null, System.Uri extraInfoUri = null, Azure.ResourceManager.AppService.Models.WebJobType? webJobType = default(Azure.ResourceManager.AppService.Models.WebJobType?), string error = null, bool? isUsingSdk = default(bool?), System.Collections.Generic.IDictionary settings = null, string kind = null) { throw null; } + public static Azure.ResourceManager.AppService.TriggeredWebJobData TriggeredWebJobData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.AppService.Models.TriggeredJobRun latestRun = null, System.Uri historyUri = null, System.Uri schedulerLogsUri = null, string runCommand = null, System.Uri uri = null, System.Uri extraInfoUri = null, Azure.ResourceManager.AppService.Models.WebJobType? webJobType = default(Azure.ResourceManager.AppService.Models.WebJobType?), string error = null, bool? isUsingSdk = default(bool?), string publicNetworkAccess = null, bool? isStorageAccountRequired = default(bool?), System.Collections.Generic.IDictionary settings = null, string kind = null) { throw null; } public static Azure.ResourceManager.AppService.Models.ValidateResponseError ValidateResponseError(string code = null, string message = null) { throw null; } public static Azure.ResourceManager.AppService.Models.VirtualNetworkValidationFailureDetails VirtualNetworkValidationFailureDetails(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string message = null, bool? isFailed = default(bool?), System.Collections.Generic.IEnumerable failedTests = null, System.Collections.Generic.IEnumerable warnings = null, string kind = null) { throw null; } public static Azure.ResourceManager.AppService.Models.VirtualNetworkValidationTestFailure VirtualNetworkValidationTestFailure(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string testName = null, string details = null, string kind = null) { throw null; } public static Azure.ResourceManager.AppService.WebAppBackupData WebAppBackupData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, int? backupId = default(int?), System.Uri storageAccountUri = null, string blobName = null, string backupName = null, Azure.ResourceManager.AppService.Models.WebAppBackupStatus? status = default(Azure.ResourceManager.AppService.Models.WebAppBackupStatus?), long? sizeInBytes = default(long?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), string log = null, System.Collections.Generic.IEnumerable databases = null, bool? isScheduled = default(bool?), System.DateTimeOffset? lastRestoreOn = default(System.DateTimeOffset?), System.DateTimeOffset? finishedOn = default(System.DateTimeOffset?), string correlationId = null, long? websiteSizeInBytes = default(long?), string kind = null) { throw null; } public static Azure.ResourceManager.AppService.Models.WebAppBackupInfo WebAppBackupInfo(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string backupName = null, bool? isEnabled = default(bool?), System.Uri storageAccountUri = null, Azure.ResourceManager.AppService.Models.WebAppBackupSchedule backupSchedule = null, System.Collections.Generic.IEnumerable databases = null, string kind = null) { throw null; } public static Azure.ResourceManager.AppService.Models.WebAppBackupSchedule WebAppBackupSchedule(int frequencyInterval = 0, Azure.ResourceManager.AppService.Models.BackupFrequencyUnit frequencyUnit = Azure.ResourceManager.AppService.Models.BackupFrequencyUnit.Day, bool shouldKeepAtLeastOneBackup = false, int retentionPeriodInDays = 0, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? lastExecutedOn = default(System.DateTimeOffset?)) { throw null; } + public static Azure.ResourceManager.AppService.Models.WebAppContentHash WebAppContentHash(string algorithm = null, string value = null) { throw null; } + public static Azure.ResourceManager.AppService.Models.WebAppContentLink WebAppContentLink(System.Uri uri = null, string contentVersion = null, long? contentSize = default(long?), Azure.ResourceManager.AppService.Models.WebAppContentHash contentHash = null, System.BinaryData metadata = null) { throw null; } public static Azure.ResourceManager.AppService.WebAppDeploymentData WebAppDeploymentData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, int? status = default(int?), string message = null, string author = null, string deployer = null, string authorEmail = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), bool? isActive = default(bool?), string details = null, string kind = null) { throw null; } + public static Azure.ResourceManager.AppService.Models.WebAppErrorInfo WebAppErrorInfo(string code = null) { throw null; } + public static Azure.ResourceManager.AppService.Models.WebAppJsonSchema WebAppJsonSchema(string title = null, string content = null) { throw null; } public static Azure.ResourceManager.AppService.Models.WebAppMajorVersion WebAppMajorVersion(string displayText = null, string value = null, System.Collections.Generic.IEnumerable minorVersions = null) { throw null; } public static Azure.ResourceManager.AppService.Models.WebAppMinorVersion WebAppMinorVersion(string displayText = null, string value = null, Azure.ResourceManager.AppService.Models.WebAppRuntimes stackSettings = null) { throw null; } public static Azure.ResourceManager.AppService.Models.WebAppMSDeploy WebAppMSDeploy(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Uri packageUri = null, string connectionString = null, string dbType = null, System.Uri setParametersXmlFileUri = null, System.Collections.Generic.IDictionary setParameters = null, bool? skipAppData = default(bool?), bool? isAppOffline = default(bool?), string kind = null) { throw null; } @@ -7141,14 +8354,36 @@ public static partial class ArmAppServiceModelFactory public static Azure.ResourceManager.AppService.Models.WebAppMSDeployLogEntry WebAppMSDeployLogEntry(System.DateTimeOffset? time = default(System.DateTimeOffset?), Azure.ResourceManager.AppService.Models.WebAppMSDeployLogEntryType? entryType = default(Azure.ResourceManager.AppService.Models.WebAppMSDeployLogEntryType?), string message = null) { throw null; } public static Azure.ResourceManager.AppService.Models.WebAppNetworkTrace WebAppNetworkTrace(string path = null, string status = null, string message = null) { throw null; } public static Azure.ResourceManager.AppService.Models.WebAppPushSettings WebAppPushSettings(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, bool? isPushEnabled = default(bool?), string tagWhitelistJson = null, string tagsRequiringAuth = null, string dynamicTagsJson = null, string kind = null) { throw null; } + public static Azure.ResourceManager.AppService.WebAppRequestHistoryData WebAppRequestHistoryData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.AppService.Models.WebAppRequestHistoryProperties properties = null) { throw null; } public static Azure.ResourceManager.AppService.Models.WebAppRuntimes WebAppRuntimes(Azure.ResourceManager.AppService.Models.WebAppRuntimeSettings linuxRuntimeSettings = null, Azure.ResourceManager.AppService.Models.WebAppRuntimeSettings windowsRuntimeSettings = null, Azure.ResourceManager.AppService.Models.LinuxJavaContainerSettings linuxContainerSettings = null, Azure.ResourceManager.AppService.Models.WindowsJavaContainerSettings windowsContainerSettings = null) { throw null; } public static Azure.ResourceManager.AppService.Models.WebAppRuntimeSettings WebAppRuntimeSettings(string runtimeVersion = null, bool? isRemoteDebuggingSupported = default(bool?), Azure.ResourceManager.AppService.Models.AppInsightsWebAppStackSettings appInsightsSettings = null, Azure.ResourceManager.AppService.Models.GitHubActionWebAppStackSettings gitHubActionSettings = null, bool? isPreview = default(bool?), bool? isDeprecated = default(bool?), bool? isHidden = default(bool?), System.DateTimeOffset? endOfLifeOn = default(System.DateTimeOffset?), bool? isAutoUpdate = default(bool?), bool? isEarlyAccess = default(bool?)) { throw null; } public static Azure.ResourceManager.AppService.Models.WebAppStack WebAppStack(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), string displayText = null, string value = null, System.Collections.Generic.IEnumerable majorVersions = null, Azure.ResourceManager.AppService.Models.StackPreferredOS? preferredOS = default(Azure.ResourceManager.AppService.Models.StackPreferredOS?), string kind = null) { throw null; } public static Azure.ResourceManager.AppService.WebJobData WebJobData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string runCommand = null, System.Uri uri = null, System.Uri extraInfoUri = null, Azure.ResourceManager.AppService.Models.WebJobType? webJobType = default(Azure.ResourceManager.AppService.Models.WebJobType?), string error = null, bool? isUsingSdk = default(bool?), System.Collections.Generic.IDictionary settings = null, string kind = null) { throw null; } public static Azure.ResourceManager.AppService.WebSiteAnalysisDefinitionData WebSiteAnalysisDefinitionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string description = null, string kind = null) { throw null; } - public static Azure.ResourceManager.AppService.WebSiteData WebSiteData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.Resources.Models.ExtendedLocation extendedLocation = null, string state = null, System.Collections.Generic.IEnumerable hostNames = null, string repositorySiteName = null, Azure.ResourceManager.AppService.Models.AppServiceUsageState? usageState = default(Azure.ResourceManager.AppService.Models.AppServiceUsageState?), bool? isEnabled = default(bool?), System.Collections.Generic.IEnumerable enabledHostNames = null, Azure.ResourceManager.AppService.Models.WebSiteAvailabilityState? availabilityState = default(Azure.ResourceManager.AppService.Models.WebSiteAvailabilityState?), System.Collections.Generic.IEnumerable hostNameSslStates = null, Azure.Core.ResourceIdentifier appServicePlanId = null, bool? isReserved = default(bool?), bool? isXenon = default(bool?), bool? isHyperV = default(bool?), System.DateTimeOffset? lastModifiedTimeUtc = default(System.DateTimeOffset?), Azure.ResourceManager.AppService.Models.SiteConfigProperties siteConfig = null, System.Collections.Generic.IEnumerable trafficManagerHostNames = null, bool? isScmSiteAlsoStopped = default(bool?), string targetSwapSlot = null, Azure.ResourceManager.AppService.Models.HostingEnvironmentProfile hostingEnvironmentProfile = null, bool? isClientAffinityEnabled = default(bool?), bool? isClientCertEnabled = default(bool?), Azure.ResourceManager.AppService.Models.ClientCertMode? clientCertMode = default(Azure.ResourceManager.AppService.Models.ClientCertMode?), string clientCertExclusionPaths = null, bool? isHostNameDisabled = default(bool?), string customDomainVerificationId = null, string outboundIPAddresses = null, string possibleOutboundIPAddresses = null, int? containerSize = default(int?), int? dailyMemoryTimeQuota = default(int?), System.DateTimeOffset? suspendOn = default(System.DateTimeOffset?), int? maxNumberOfWorkers = default(int?), Azure.ResourceManager.AppService.Models.CloningInfo cloningInfo = null, string resourceGroup = null, bool? isDefaultContainer = default(bool?), string defaultHostName = null, Azure.ResourceManager.AppService.Models.SlotSwapStatus slotSwapStatus = null, bool? isHttpsOnly = default(bool?), Azure.ResourceManager.AppService.Models.RedundancyMode? redundancyMode = default(Azure.ResourceManager.AppService.Models.RedundancyMode?), System.Guid? inProgressOperationId = default(System.Guid?), bool? isStorageAccountRequired = default(bool?), string keyVaultReferenceIdentity = null, Azure.Core.ResourceIdentifier virtualNetworkSubnetId = null, string kind = null) { throw null; } + public static Azure.ResourceManager.AppService.WebSiteData WebSiteData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.Resources.Models.ExtendedLocation extendedLocation = null, string state = null, System.Collections.Generic.IEnumerable hostNames = null, string repositorySiteName = null, Azure.ResourceManager.AppService.Models.AppServiceUsageState? usageState = default(Azure.ResourceManager.AppService.Models.AppServiceUsageState?), bool? isEnabled = default(bool?), System.Collections.Generic.IEnumerable enabledHostNames = null, Azure.ResourceManager.AppService.Models.WebSiteAvailabilityState? availabilityState = default(Azure.ResourceManager.AppService.Models.WebSiteAvailabilityState?), System.Collections.Generic.IEnumerable hostNameSslStates = null, Azure.Core.ResourceIdentifier appServicePlanId = null, bool? isReserved = default(bool?), bool? isXenon = default(bool?), bool? isHyperV = default(bool?), System.DateTimeOffset? lastModifiedTimeUtc = default(System.DateTimeOffset?), Azure.ResourceManager.AppService.Models.SiteDnsConfig dnsConfiguration = null, bool? isVnetRouteAllEnabled = default(bool?), bool? isVnetImagePullEnabled = default(bool?), bool? isVnetContentShareEnabled = default(bool?), bool? isVnetBackupRestoreEnabled = default(bool?), Azure.ResourceManager.AppService.Models.SiteConfigProperties siteConfig = null, Azure.ResourceManager.AppService.Models.FunctionAppConfig functionAppConfig = null, Azure.ResourceManager.AppService.Models.AppDaprConfig daprConfig = null, string workloadProfileName = null, Azure.ResourceManager.AppService.Models.FunctionAppResourceConfig resourceConfig = null, System.Collections.Generic.IEnumerable trafficManagerHostNames = null, bool? isScmSiteAlsoStopped = default(bool?), string targetSwapSlot = null, Azure.ResourceManager.AppService.Models.HostingEnvironmentProfile hostingEnvironmentProfile = null, bool? isClientAffinityEnabled = default(bool?), bool? isClientCertEnabled = default(bool?), Azure.ResourceManager.AppService.Models.ClientCertMode? clientCertMode = default(Azure.ResourceManager.AppService.Models.ClientCertMode?), string clientCertExclusionPaths = null, bool? isHostNameDisabled = default(bool?), string customDomainVerificationId = null, string outboundIPAddresses = null, string possibleOutboundIPAddresses = null, int? containerSize = default(int?), int? dailyMemoryTimeQuota = default(int?), System.DateTimeOffset? suspendOn = default(System.DateTimeOffset?), int? maxNumberOfWorkers = default(int?), Azure.ResourceManager.AppService.Models.CloningInfo cloningInfo = null, string resourceGroup = null, bool? isDefaultContainer = default(bool?), string defaultHostName = null, Azure.ResourceManager.AppService.Models.SlotSwapStatus slotSwapStatus = null, bool? isHttpsOnly = default(bool?), Azure.ResourceManager.AppService.Models.RedundancyMode? redundancyMode = default(Azure.ResourceManager.AppService.Models.RedundancyMode?), System.Guid? inProgressOperationId = default(System.Guid?), string publicNetworkAccess = null, bool? isStorageAccountRequired = default(bool?), string keyVaultReferenceIdentity = null, Azure.Core.ResourceIdentifier virtualNetworkSubnetId = null, string managedEnvironmentId = null, string kind = null) { throw null; } public static Azure.ResourceManager.AppService.WebSiteInstanceStatusData WebSiteInstanceStatusData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.AppService.Models.SiteRuntimeState? state = default(Azure.ResourceManager.AppService.Models.SiteRuntimeState?), System.Uri statusUri = null, System.Uri detectorUri = null, System.Uri consoleUri = null, string healthCheckUrlString = null, System.Collections.Generic.IDictionary containers = null, string kind = null) { throw null; } public static Azure.ResourceManager.AppService.Models.WindowsJavaContainerSettings WindowsJavaContainerSettings(string javaContainer = null, string javaContainerVersion = null, bool? isPreview = default(bool?), bool? isDeprecated = default(bool?), bool? isHidden = default(bool?), System.DateTimeOffset? endOfLifeOn = default(System.DateTimeOffset?), bool? isAutoUpdate = default(bool?), bool? isEarlyAccess = default(bool?)) { throw null; } + public static Azure.ResourceManager.AppService.Models.WorkflowData WorkflowData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.AppService.Models.WorkflowProvisioningState? provisioningState = default(Azure.ResourceManager.AppService.Models.WorkflowProvisioningState?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? changedOn = default(System.DateTimeOffset?), Azure.ResourceManager.AppService.Models.WorkflowState? state = default(Azure.ResourceManager.AppService.Models.WorkflowState?), string version = null, string accessEndpoint = null, Azure.ResourceManager.AppService.Models.FlowEndpointsConfiguration endpointsConfiguration = null, Azure.ResourceManager.AppService.Models.FlowAccessControlConfiguration accessControl = null, Azure.ResourceManager.AppService.Models.WorkflowSku sku = null, Azure.ResourceManager.AppService.Models.WorkflowResourceReference integrationAccount = null, Azure.ResourceManager.AppService.Models.WorkflowResourceReference integrationServiceEnvironment = null, System.BinaryData definition = null, System.Collections.Generic.IDictionary parameters = null, Azure.ResourceManager.AppService.Models.AppServiceKind? kind = default(Azure.ResourceManager.AppService.Models.AppServiceKind?)) { throw null; } + public static Azure.ResourceManager.AppService.WorkflowEnvelopeData WorkflowEnvelopeData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string kind = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), Azure.ResourceManager.AppService.Models.WorkflowEnvelopeProperties properties = null) { throw null; } + public static Azure.ResourceManager.AppService.Models.WorkflowEnvelopeProperties WorkflowEnvelopeProperties(System.Collections.Generic.IReadOnlyDictionary files = null, Azure.ResourceManager.AppService.Models.WorkflowState? flowState = default(Azure.ResourceManager.AppService.Models.WorkflowState?), Azure.ResourceManager.AppService.Models.WorkflowHealth health = null) { throw null; } + public static Azure.ResourceManager.AppService.Models.WorkflowExpression WorkflowExpression(string text = null, System.BinaryData value = null, System.Collections.Generic.IEnumerable subexpressions = null, Azure.ResourceManager.AppService.Models.WorkflowExpressionResourceErrorInfo error = null) { throw null; } + public static Azure.ResourceManager.AppService.Models.WorkflowExpressionResourceErrorInfo WorkflowExpressionResourceErrorInfo(string code = null, string message = null, System.Collections.Generic.IEnumerable details = null) { throw null; } + public static Azure.ResourceManager.AppService.Models.WorkflowExpressionRoot WorkflowExpressionRoot(string text = null, System.BinaryData value = null, System.Collections.Generic.IEnumerable subexpressions = null, Azure.ResourceManager.AppService.Models.WorkflowExpressionResourceErrorInfo error = null, string path = null) { throw null; } + public static Azure.ResourceManager.AppService.Models.WorkflowHealth WorkflowHealth(Azure.ResourceManager.AppService.Models.WorkflowHealthState state = Azure.ResourceManager.AppService.Models.WorkflowHealthState.Unknown, Azure.ResponseError error = null) { throw null; } + public static Azure.ResourceManager.AppService.Models.WorkflowOutputContent WorkflowOutputContent(Azure.ResourceManager.AppService.Models.WebAppParameterType? webAppParameterType = default(Azure.ResourceManager.AppService.Models.WebAppParameterType?), System.BinaryData value = null, System.BinaryData metadata = null, string description = null, System.BinaryData error = null) { throw null; } + public static Azure.ResourceManager.AppService.Models.WorkflowRecurrenceSchedule WorkflowRecurrenceSchedule(System.Collections.Generic.IEnumerable minutes = null, System.Collections.Generic.IEnumerable hours = null, System.Collections.Generic.IEnumerable weekDays = null, System.Collections.Generic.IEnumerable monthDays = null, System.Collections.Generic.IEnumerable monthlyOccurrences = null) { throw null; } + public static Azure.ResourceManager.AppService.Models.WorkflowResourceReference WorkflowResourceReference(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?)) { throw null; } + public static Azure.ResourceManager.AppService.WorkflowRunActionData WorkflowRunActionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), Azure.ResourceManager.AppService.Models.WorkflowStatus? status = default(Azure.ResourceManager.AppService.Models.WorkflowStatus?), string code = null, System.BinaryData error = null, string trackingId = null, Azure.ResourceManager.AppService.Models.WebAppRunActionCorrelation correlation = null, Azure.ResourceManager.AppService.Models.WebAppContentLink inputsLink = null, Azure.ResourceManager.AppService.Models.WebAppContentLink outputsLink = null, System.BinaryData trackedProperties = null, System.Collections.Generic.IEnumerable retryHistory = null) { throw null; } + public static Azure.ResourceManager.AppService.WorkflowRunActionRepetitionDefinitionData WorkflowRunActionRepetitionDefinitionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), Azure.ResourceManager.AppService.Models.WebAppRunActionCorrelation correlation = null, Azure.ResourceManager.AppService.Models.WorkflowStatus? status = default(Azure.ResourceManager.AppService.Models.WorkflowStatus?), string code = null, System.BinaryData error = null, string trackingId = null, System.BinaryData inputs = null, Azure.ResourceManager.AppService.Models.WebAppContentLink inputsLink = null, System.BinaryData outputs = null, Azure.ResourceManager.AppService.Models.WebAppContentLink outputsLink = null, System.BinaryData trackedProperties = null, System.Collections.Generic.IEnumerable retryHistory = null, int? iterationCount = default(int?), System.Collections.Generic.IEnumerable repetitionIndexes = null) { throw null; } + public static Azure.ResourceManager.AppService.WorkflowRunData WorkflowRunData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.DateTimeOffset? waitEndOn = default(System.DateTimeOffset?), System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), Azure.ResourceManager.AppService.Models.WorkflowStatus? status = default(Azure.ResourceManager.AppService.Models.WorkflowStatus?), string code = null, System.BinaryData error = null, string correlationId = null, string correlationClientTrackingId = null, Azure.ResourceManager.AppService.Models.WorkflowResourceReference workflow = null, Azure.ResourceManager.AppService.Models.WorkflowRunTrigger trigger = null, System.Collections.Generic.IReadOnlyDictionary outputs = null, Azure.ResourceManager.AppService.Models.WorkflowRunTrigger response = null) { throw null; } + public static Azure.ResourceManager.AppService.Models.WorkflowRunTrigger WorkflowRunTrigger(string name = null, System.BinaryData inputs = null, Azure.ResourceManager.AppService.Models.WebAppContentLink inputsLink = null, System.BinaryData outputs = null, Azure.ResourceManager.AppService.Models.WebAppContentLink outputsLink = null, System.DateTimeOffset? scheduledOn = default(System.DateTimeOffset?), System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), string trackingId = null, string correlationClientTrackingId = null, string code = null, Azure.ResourceManager.AppService.Models.WorkflowStatus? status = default(Azure.ResourceManager.AppService.Models.WorkflowStatus?), System.BinaryData error = null, System.BinaryData trackedProperties = null) { throw null; } + public static Azure.ResourceManager.AppService.Models.WorkflowSku WorkflowSku(Azure.ResourceManager.AppService.Models.WorkflowSkuName name = default(Azure.ResourceManager.AppService.Models.WorkflowSkuName), Azure.ResourceManager.AppService.Models.WorkflowResourceReference plan = null) { throw null; } + public static Azure.ResourceManager.AppService.Models.WorkflowTriggerCallbackUri WorkflowTriggerCallbackUri(string value = null, string method = null, string basePath = null, string relativePath = null, System.Collections.Generic.IEnumerable relativePathParameters = null, Azure.ResourceManager.AppService.Models.WorkflowTriggerListCallbackUriQueries queries = null) { throw null; } + public static Azure.ResourceManager.AppService.WorkflowTriggerData WorkflowTriggerData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.AppService.Models.WorkflowTriggerProvisioningState? provisioningState = default(Azure.ResourceManager.AppService.Models.WorkflowTriggerProvisioningState?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? changedOn = default(System.DateTimeOffset?), Azure.ResourceManager.AppService.Models.WorkflowState? state = default(Azure.ResourceManager.AppService.Models.WorkflowState?), Azure.ResourceManager.AppService.Models.WorkflowStatus? status = default(Azure.ResourceManager.AppService.Models.WorkflowStatus?), System.DateTimeOffset? lastExecutionOn = default(System.DateTimeOffset?), System.DateTimeOffset? nextExecutionOn = default(System.DateTimeOffset?), Azure.ResourceManager.AppService.Models.WorkflowTriggerRecurrence recurrence = null, Azure.ResourceManager.AppService.Models.WorkflowResourceReference workflow = null) { throw null; } + public static Azure.ResourceManager.AppService.WorkflowTriggerHistoryData WorkflowTriggerHistoryData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), System.DateTimeOffset? scheduledOn = default(System.DateTimeOffset?), Azure.ResourceManager.AppService.Models.WorkflowStatus? status = default(Azure.ResourceManager.AppService.Models.WorkflowStatus?), string code = null, System.BinaryData error = null, string trackingId = null, string correlationClientTrackingId = null, Azure.ResourceManager.AppService.Models.WebAppContentLink inputsLink = null, Azure.ResourceManager.AppService.Models.WebAppContentLink outputsLink = null, bool? isFired = default(bool?), Azure.ResourceManager.AppService.Models.WorkflowResourceReference run = null) { throw null; } + public static Azure.ResourceManager.AppService.Models.WorkflowTriggerListCallbackUriQueries WorkflowTriggerListCallbackUriQueries(string apiVersion = null, string sasPermission = null, string sasVersion = null, string sasSignature = null, string sasTimestamp = null) { throw null; } + public static Azure.ResourceManager.AppService.Models.WorkflowTriggerRecurrence WorkflowTriggerRecurrence(Azure.ResourceManager.AppService.Models.WorkflowRecurrenceFrequency? frequency = default(Azure.ResourceManager.AppService.Models.WorkflowRecurrenceFrequency?), int? interval = default(int?), string startTime = null, string endTime = null, string timeZone = null, Azure.ResourceManager.AppService.Models.WorkflowRecurrenceSchedule schedule = null) { throw null; } + public static Azure.ResourceManager.AppService.WorkflowVersionData WorkflowVersionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.AppService.Models.WorkflowProvisioningState? provisioningState = default(Azure.ResourceManager.AppService.Models.WorkflowProvisioningState?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? changedOn = default(System.DateTimeOffset?), Azure.ResourceManager.AppService.Models.WorkflowState? state = default(Azure.ResourceManager.AppService.Models.WorkflowState?), string version = null, string accessEndpoint = null, Azure.ResourceManager.AppService.Models.FlowEndpointsConfiguration endpointsConfiguration = null, Azure.ResourceManager.AppService.Models.FlowAccessControlConfiguration accessControl = null, Azure.ResourceManager.AppService.Models.WorkflowSku sku = null, Azure.ResourceManager.AppService.Models.WorkflowResourceReference integrationAccount = null, System.BinaryData definition = null, System.Collections.Generic.IDictionary parameters = null) { throw null; } } public enum ArtifactStorageType { @@ -7260,6 +8495,7 @@ public partial class CertificateOrderAction : Azure.ResourceManager.Models.Resou public CertificateOrderAction() { } public Azure.ResourceManager.AppService.Models.CertificateOrderActionType? ActionType { get { throw null; } } public System.DateTimeOffset? CreatedOn { get { throw null; } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public string Kind { get { throw null; } set { } } Azure.ResourceManager.AppService.Models.CertificateOrderAction System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -7470,6 +8706,21 @@ public ConnStringValueTypePair(string value, Azure.ResourceManager.AppService.Mo string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class ContainerAppsConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ContainerAppsConfiguration() { } + public string AppSubnetResourceId { get { throw null; } set { } } + public string ControlPlaneSubnetResourceId { get { throw null; } set { } } + public string DaprAIInstrumentationKey { get { throw null; } set { } } + public string DockerBridgeCidr { get { throw null; } set { } } + public string PlatformReservedCidr { get { throw null; } set { } } + public string PlatformReservedDnsIP { get { throw null; } set { } } + Azure.ResourceManager.AppService.Models.ContainerAppsConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.ContainerAppsConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ContainerCpuStatistics : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ContainerCpuStatistics() { } @@ -7567,6 +8818,23 @@ public enum CookieExpirationConvention FixedTime = 0, IdentityProviderDerived = 1, } + public partial class CsmDeploymentStatus : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CsmDeploymentStatus() { } + public string DeploymentId { get { throw null; } set { } } + public System.Collections.Generic.IList Errors { get { throw null; } } + public System.Collections.Generic.IList FailedInstancesLogs { get { throw null; } } + public string Kind { get { throw null; } set { } } + public int? NumberOfInstancesFailed { get { throw null; } set { } } + public int? NumberOfInstancesInProgress { get { throw null; } set { } } + public int? NumberOfInstancesSuccessful { get { throw null; } set { } } + public Azure.ResourceManager.AppService.Models.DeploymentBuildStatus? Status { get { throw null; } set { } } + Azure.ResourceManager.AppService.Models.CsmDeploymentStatus System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.CsmDeploymentStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class CsmOperationDescription : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal CsmOperationDescription() { } @@ -7630,6 +8898,13 @@ internal CsmUsageQuota() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public enum CustomDnsSuffixProvisioningState + { + Succeeded = 0, + Failed = 1, + Degraded = 2, + InProgress = 3, + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct CustomDomainStatus : System.IEquatable { @@ -7641,6 +8916,7 @@ internal CsmUsageQuota() { } public static Azure.ResourceManager.AppService.Models.CustomDomainStatus Failed { get { throw null; } } public static Azure.ResourceManager.AppService.Models.CustomDomainStatus Ready { get { throw null; } } public static Azure.ResourceManager.AppService.Models.CustomDomainStatus RetrievingValidationToken { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.CustomDomainStatus Unhealthy { get { throw null; } } public static Azure.ResourceManager.AppService.Models.CustomDomainStatus Validating { get { throw null; } } public bool Equals(Azure.ResourceManager.AppService.Models.CustomDomainStatus other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] @@ -7678,6 +8954,19 @@ public enum CustomHostNameDnsRecordType CName = 0, A = 1, } + public partial class CustomHostnameSites : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CustomHostnameSites() { } + public string CustomHostname { get { throw null; } set { } } + public string Kind { get { throw null; } set { } } + public string Region { get { throw null; } set { } } + public System.Collections.Generic.IList SiteResourceIds { get { throw null; } } + Azure.ResourceManager.AppService.Models.CustomHostnameSites System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.CustomHostnameSites System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class CustomOpenIdConnectProvider : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public CustomOpenIdConnectProvider() { } @@ -7761,6 +9050,35 @@ public DeletedAppRestoreContent() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DeploymentBuildStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DeploymentBuildStatus(string value) { throw null; } + public static Azure.ResourceManager.AppService.Models.DeploymentBuildStatus BuildAborted { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.DeploymentBuildStatus BuildFailed { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.DeploymentBuildStatus BuildInProgress { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.DeploymentBuildStatus BuildPending { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.DeploymentBuildStatus BuildRequestReceived { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.DeploymentBuildStatus BuildSuccessful { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.DeploymentBuildStatus PostBuildRestartRequired { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.DeploymentBuildStatus RuntimeFailed { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.DeploymentBuildStatus RuntimeStarting { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.DeploymentBuildStatus RuntimeSuccessful { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.DeploymentBuildStatus StartPolling { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.DeploymentBuildStatus StartPollingWithRestart { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.DeploymentBuildStatus TimedOut { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppService.Models.DeploymentBuildStatus other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.AppService.Models.DeploymentBuildStatus left, Azure.ResourceManager.AppService.Models.DeploymentBuildStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.AppService.Models.DeploymentBuildStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppService.Models.DeploymentBuildStatus left, Azure.ResourceManager.AppService.Models.DeploymentBuildStatus right) { throw null; } + public override string ToString() { throw null; } + } public partial class DetectorAbnormalTimePeriod : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DetectorAbnormalTimePeriod() { } @@ -8064,6 +9382,26 @@ public DomainRecommendationSearchContent() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct EnterpriseGradeCdnStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public EnterpriseGradeCdnStatus(string value) { throw null; } + public static Azure.ResourceManager.AppService.Models.EnterpriseGradeCdnStatus Disabled { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.EnterpriseGradeCdnStatus Disabling { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.EnterpriseGradeCdnStatus Enabled { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.EnterpriseGradeCdnStatus Enabling { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppService.Models.EnterpriseGradeCdnStatus other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.AppService.Models.EnterpriseGradeCdnStatus left, Azure.ResourceManager.AppService.Models.EnterpriseGradeCdnStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.AppService.Models.EnterpriseGradeCdnStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppService.Models.EnterpriseGradeCdnStatus left, Azure.ResourceManager.AppService.Models.EnterpriseGradeCdnStatus right) { throw null; } + public override string ToString() { throw null; } + } public partial class FileSystemHttpLogsConfig : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public FileSystemHttpLogsConfig() { } @@ -8076,6 +9414,52 @@ public FileSystemHttpLogsConfig() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class FlowAccessControlConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public FlowAccessControlConfiguration() { } + public Azure.ResourceManager.AppService.Models.FlowAccessControlConfigurationPolicy Actions { get { throw null; } set { } } + public Azure.ResourceManager.AppService.Models.FlowAccessControlConfigurationPolicy Contents { get { throw null; } set { } } + public Azure.ResourceManager.AppService.Models.FlowAccessControlConfigurationPolicy Triggers { get { throw null; } set { } } + public Azure.ResourceManager.AppService.Models.FlowAccessControlConfigurationPolicy WorkflowManagement { get { throw null; } set { } } + Azure.ResourceManager.AppService.Models.FlowAccessControlConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.FlowAccessControlConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class FlowAccessControlConfigurationPolicy : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public FlowAccessControlConfigurationPolicy() { } + public System.Collections.Generic.IList AllowedCallerIPAddresses { get { throw null; } } + public System.Collections.Generic.IDictionary OpenAuthenticationPolicyList { get { throw null; } } + Azure.ResourceManager.AppService.Models.FlowAccessControlConfigurationPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.FlowAccessControlConfigurationPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class FlowEndpoints : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public FlowEndpoints() { } + public System.Collections.Generic.IList AccessEndpointIPAddresses { get { throw null; } } + public System.Collections.Generic.IList OutgoingIPAddresses { get { throw null; } } + Azure.ResourceManager.AppService.Models.FlowEndpoints System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.FlowEndpoints System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class FlowEndpointsConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public FlowEndpointsConfiguration() { } + public Azure.ResourceManager.AppService.Models.FlowEndpoints Connector { get { throw null; } set { } } + public Azure.ResourceManager.AppService.Models.FlowEndpoints Workflow { get { throw null; } set { } } + Azure.ResourceManager.AppService.Models.FlowEndpointsConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.FlowEndpointsConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public enum ForwardProxyConvention { NoProxy = 0, @@ -8087,6 +9471,29 @@ public enum FrontEndServiceType NodePort = 0, LoadBalancer = 1, } + public partial class FunctionAppAlwaysReadyConfig : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public FunctionAppAlwaysReadyConfig() { } + public float? InstanceCount { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + Azure.ResourceManager.AppService.Models.FunctionAppAlwaysReadyConfig System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.FunctionAppAlwaysReadyConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class FunctionAppConfig : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public FunctionAppConfig() { } + public Azure.ResourceManager.AppService.Models.FunctionAppStorage DeploymentStorage { get { throw null; } set { } } + public Azure.ResourceManager.AppService.Models.FunctionAppRuntime Runtime { get { throw null; } set { } } + public Azure.ResourceManager.AppService.Models.FunctionAppScaleAndConcurrency ScaleAndConcurrency { get { throw null; } set { } } + Azure.ResourceManager.AppService.Models.FunctionAppConfig System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.FunctionAppConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class FunctionAppHostKeys : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal FunctionAppHostKeys() { } @@ -8123,6 +9530,50 @@ internal FunctionAppMinorVersion() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class FunctionAppResourceConfig : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public FunctionAppResourceConfig() { } + public double? Cpu { get { throw null; } set { } } + public string Memory { get { throw null; } set { } } + Azure.ResourceManager.AppService.Models.FunctionAppResourceConfig System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.FunctionAppResourceConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class FunctionAppRuntime : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public FunctionAppRuntime() { } + public Azure.ResourceManager.AppService.Models.FunctionAppRuntimeName? Name { get { throw null; } set { } } + public string Version { get { throw null; } set { } } + Azure.ResourceManager.AppService.Models.FunctionAppRuntime System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.FunctionAppRuntime System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct FunctionAppRuntimeName : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public FunctionAppRuntimeName(string value) { throw null; } + public static Azure.ResourceManager.AppService.Models.FunctionAppRuntimeName Custom { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.FunctionAppRuntimeName DotnetIsolated { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.FunctionAppRuntimeName Java { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.FunctionAppRuntimeName Node { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.FunctionAppRuntimeName Powershell { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.FunctionAppRuntimeName Python { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppService.Models.FunctionAppRuntimeName other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.AppService.Models.FunctionAppRuntimeName left, Azure.ResourceManager.AppService.Models.FunctionAppRuntimeName right) { throw null; } + public static implicit operator Azure.ResourceManager.AppService.Models.FunctionAppRuntimeName (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppService.Models.FunctionAppRuntimeName left, Azure.ResourceManager.AppService.Models.FunctionAppRuntimeName right) { throw null; } + public override string ToString() { throw null; } + } public partial class FunctionAppRuntimes : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal FunctionAppRuntimes() { } @@ -8157,6 +9608,19 @@ internal FunctionAppRuntimeSettings() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class FunctionAppScaleAndConcurrency : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public FunctionAppScaleAndConcurrency() { } + public System.Collections.Generic.IList AlwaysReady { get { throw null; } } + public float? HttpPerInstanceConcurrency { get { throw null; } set { } } + public float? InstanceMemoryMB { get { throw null; } set { } } + public float? MaximumInstanceCount { get { throw null; } set { } } + Azure.ResourceManager.AppService.Models.FunctionAppScaleAndConcurrency System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.FunctionAppScaleAndConcurrency System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class FunctionAppStack : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public FunctionAppStack() { } @@ -8172,6 +9636,66 @@ public FunctionAppStack() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class FunctionAppStorage : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public FunctionAppStorage() { } + public Azure.ResourceManager.AppService.Models.FunctionAppStorageAuthentication Authentication { get { throw null; } set { } } + public Azure.ResourceManager.AppService.Models.FunctionAppStorageType? StorageType { get { throw null; } set { } } + public System.Uri Value { get { throw null; } set { } } + Azure.ResourceManager.AppService.Models.FunctionAppStorage System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.FunctionAppStorage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct FunctionAppStorageAccountAuthenticationType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public FunctionAppStorageAccountAuthenticationType(string value) { throw null; } + public static Azure.ResourceManager.AppService.Models.FunctionAppStorageAccountAuthenticationType StorageAccountConnectionString { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.FunctionAppStorageAccountAuthenticationType SystemAssignedIdentity { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.FunctionAppStorageAccountAuthenticationType UserAssignedIdentity { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppService.Models.FunctionAppStorageAccountAuthenticationType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.AppService.Models.FunctionAppStorageAccountAuthenticationType left, Azure.ResourceManager.AppService.Models.FunctionAppStorageAccountAuthenticationType right) { throw null; } + public static implicit operator Azure.ResourceManager.AppService.Models.FunctionAppStorageAccountAuthenticationType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppService.Models.FunctionAppStorageAccountAuthenticationType left, Azure.ResourceManager.AppService.Models.FunctionAppStorageAccountAuthenticationType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class FunctionAppStorageAuthentication : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public FunctionAppStorageAuthentication() { } + public Azure.ResourceManager.AppService.Models.FunctionAppStorageAccountAuthenticationType? AuthenticationType { get { throw null; } set { } } + public string StorageAccountConnectionStringName { get { throw null; } set { } } + public string UserAssignedIdentityResourceId { get { throw null; } set { } } + Azure.ResourceManager.AppService.Models.FunctionAppStorageAuthentication System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.FunctionAppStorageAuthentication System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct FunctionAppStorageType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public FunctionAppStorageType(string value) { throw null; } + public static Azure.ResourceManager.AppService.Models.FunctionAppStorageType BlobContainer { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppService.Models.FunctionAppStorageType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.AppService.Models.FunctionAppStorageType left, Azure.ResourceManager.AppService.Models.FunctionAppStorageType right) { throw null; } + public static implicit operator Azure.ResourceManager.AppService.Models.FunctionAppStorageType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppService.Models.FunctionAppStorageType left, Azure.ResourceManager.AppService.Models.FunctionAppStorageType right) { throw null; } + public override string ToString() { throw null; } + } public partial class FunctionSecrets : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal FunctionSecrets() { } @@ -8428,6 +9952,7 @@ public KubeEnvironmentPatch() { } public Azure.Core.ResourceIdentifier AksResourceId { get { throw null; } set { } } public Azure.ResourceManager.AppService.Models.AppLogsConfiguration AppLogsConfiguration { get { throw null; } set { } } public Azure.ResourceManager.AppService.Models.ArcConfiguration ArcConfiguration { get { throw null; } set { } } + public Azure.ResourceManager.AppService.Models.ContainerAppsConfiguration ContainerAppsConfiguration { get { throw null; } set { } } public string DefaultDomain { get { throw null; } } public string DeploymentErrors { get { throw null; } } public bool? IsInternalLoadBalancerEnabled { get { throw null; } set { } } @@ -8648,6 +10173,45 @@ public enum NotificationLevel Information = 2, NonUrgentSuggestion = 3, } + public partial class OpenAuthenticationAccessPolicy : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public OpenAuthenticationAccessPolicy() { } + public System.Collections.Generic.IList Claims { get { throw null; } } + public Azure.ResourceManager.AppService.Models.OpenAuthenticationProviderType? ProviderType { get { throw null; } set { } } + Azure.ResourceManager.AppService.Models.OpenAuthenticationAccessPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.OpenAuthenticationAccessPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class OpenAuthenticationPolicyClaim : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public OpenAuthenticationPolicyClaim() { } + public string Name { get { throw null; } set { } } + public string Value { get { throw null; } set { } } + Azure.ResourceManager.AppService.Models.OpenAuthenticationPolicyClaim System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.OpenAuthenticationPolicyClaim System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct OpenAuthenticationProviderType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public OpenAuthenticationProviderType(string value) { throw null; } + public static Azure.ResourceManager.AppService.Models.OpenAuthenticationProviderType AAD { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppService.Models.OpenAuthenticationProviderType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.AppService.Models.OpenAuthenticationProviderType left, Azure.ResourceManager.AppService.Models.OpenAuthenticationProviderType right) { throw null; } + public static implicit operator Azure.ResourceManager.AppService.Models.OpenAuthenticationProviderType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppService.Models.OpenAuthenticationProviderType left, Azure.ResourceManager.AppService.Models.OpenAuthenticationProviderType right) { throw null; } + public override string ToString() { throw null; } + } public partial class OpenIdConnectClientCredential : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public OpenIdConnectClientCredential() { } @@ -8969,6 +10533,17 @@ public enum RecommendationChannel Webhook = 3, All = 4, } + public partial class RecurrenceScheduleOccurrence : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal RecurrenceScheduleOccurrence() { } + public Azure.ResourceManager.AppService.Models.WebAppDayOfWeek? Day { get { throw null; } } + public int? Occurrence { get { throw null; } } + Azure.ResourceManager.AppService.Models.RecurrenceScheduleOccurrence System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.RecurrenceScheduleOccurrence System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public enum RedundancyMode { None = 0, @@ -9117,6 +10692,7 @@ internal ResourceNameAvailability() { } public partial class ResourceNameAvailabilityContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ResourceNameAvailabilityContent(string name, Azure.ResourceManager.AppService.Models.CheckNameResourceType resourceType) { } + public string EnvironmentId { get { throw null; } set { } } public bool? IsFqdn { get { throw null; } set { } } public string Name { get { throw null; } } public Azure.ResourceManager.AppService.Models.CheckNameResourceType ResourceType { get { throw null; } } @@ -9342,12 +10918,14 @@ public SiteConfigProperties() { } public Azure.ResourceManager.AppService.Models.AppServiceCorsSettings Cors { get { throw null; } set { } } public System.Collections.Generic.IList DefaultDocuments { get { throw null; } set { } } public string DocumentRoot { get { throw null; } set { } } + public int? ElasticWebAppScaleLimit { get { throw null; } set { } } public System.Collections.Generic.IList ExperimentsRampUpRules { get { throw null; } } public Azure.ResourceManager.AppService.Models.AppServiceFtpsState? FtpsState { get { throw null; } set { } } public int? FunctionAppScaleLimit { get { throw null; } set { } } public System.Collections.Generic.IList HandlerMappings { get { throw null; } set { } } public string HealthCheckPath { get { throw null; } set { } } public System.Collections.Generic.IList IPSecurityRestrictions { get { throw null; } set { } } + public Azure.ResourceManager.AppService.Models.SiteDefaultAction? IPSecurityRestrictionsDefaultAction { get { throw null; } set { } } public bool? IsAlwaysOn { get { throw null; } set { } } public bool? IsAutoHealEnabled { get { throw null; } set { } } public bool? IsDetailedErrorLoggingEnabled { get { throw null; } set { } } @@ -9370,7 +10948,9 @@ public SiteConfigProperties() { } public Azure.ResourceManager.AppService.Models.SiteMachineKey MachineKey { get { throw null; } } public Azure.ResourceManager.AppService.Models.ManagedPipelineMode? ManagedPipelineMode { get { throw null; } set { } } public int? ManagedServiceIdentityId { get { throw null; } set { } } + public System.Collections.Generic.IList Metadata { get { throw null; } set { } } public int? MinimumElasticInstanceCount { get { throw null; } set { } } + public Azure.ResourceManager.AppService.Models.AppServiceTlsCipherSuite? MinTlsCipherSuite { get { throw null; } set { } } public Azure.ResourceManager.AppService.Models.AppServiceSupportedTlsVersion? MinTlsVersion { get { throw null; } set { } } public string NetFrameworkVersion { get { throw null; } set { } } public string NodeVersion { get { throw null; } set { } } @@ -9385,6 +10965,7 @@ public SiteConfigProperties() { } public string RemoteDebuggingVersion { get { throw null; } set { } } public System.DateTimeOffset? RequestTracingExpirationOn { get { throw null; } set { } } public System.Collections.Generic.IList ScmIPSecurityRestrictions { get { throw null; } set { } } + public Azure.ResourceManager.AppService.Models.SiteDefaultAction? ScmIPSecurityRestrictionsDefaultAction { get { throw null; } set { } } public Azure.ResourceManager.AppService.Models.AppServiceSupportedTlsVersion? ScmMinTlsVersion { get { throw null; } set { } } public Azure.ResourceManager.AppService.Models.ScmType? ScmType { get { throw null; } set { } } public string TracingOptions { get { throw null; } set { } } @@ -9427,6 +11008,59 @@ public SiteConfigurationSnapshotInfo() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public enum SiteContainerAuthType + { + Anonymous = 0, + UserCredentials = 1, + SystemIdentity = 2, + UserAssigned = 3, + } + public partial class SiteContainerVolumeMount : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SiteContainerVolumeMount(string volumeSubPath, string containerMountPath) { } + public string ContainerMountPath { get { throw null; } set { } } + public string Data { get { throw null; } set { } } + public bool? IsReadOnly { get { throw null; } set { } } + public string VolumeSubPath { get { throw null; } set { } } + Azure.ResourceManager.AppService.Models.SiteContainerVolumeMount System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.SiteContainerVolumeMount System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SiteDefaultAction : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SiteDefaultAction(string value) { throw null; } + public static Azure.ResourceManager.AppService.Models.SiteDefaultAction Allow { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.SiteDefaultAction Deny { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppService.Models.SiteDefaultAction other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.AppService.Models.SiteDefaultAction left, Azure.ResourceManager.AppService.Models.SiteDefaultAction right) { throw null; } + public static implicit operator Azure.ResourceManager.AppService.Models.SiteDefaultAction (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppService.Models.SiteDefaultAction left, Azure.ResourceManager.AppService.Models.SiteDefaultAction right) { throw null; } + public override string ToString() { throw null; } + } + public partial class SiteDnsConfig : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SiteDnsConfig() { } + public string DnsAltServer { get { throw null; } set { } } + public bool? DnsLegacySortOrder { get { throw null; } } + public int? DnsMaxCacheTimeout { get { throw null; } set { } } + public int? DnsRetryAttemptCount { get { throw null; } set { } } + public int? DnsRetryAttemptTimeout { get { throw null; } set { } } + public System.Collections.Generic.IList DnsServers { get { throw null; } } + Azure.ResourceManager.AppService.Models.SiteDnsConfig System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.SiteDnsConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public enum SiteExtensionType { Gallery = 0, @@ -9477,6 +11111,7 @@ public SitePatchInfo() { } public string CustomDomainVerificationId { get { throw null; } set { } } public int? DailyMemoryTimeQuota { get { throw null; } set { } } public string DefaultHostName { get { throw null; } } + public Azure.ResourceManager.AppService.Models.SiteDnsConfig DnsConfiguration { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList EnabledHostNames { get { throw null; } } public Azure.ResourceManager.AppService.Models.HostingEnvironmentProfile HostingEnvironmentProfile { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList HostNames { get { throw null; } } @@ -9690,6 +11325,23 @@ internal StampCapacity() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct StaticSiteBasicAuthName : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public StaticSiteBasicAuthName(string value) { throw null; } + public static Azure.ResourceManager.AppService.Models.StaticSiteBasicAuthName Default { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppService.Models.StaticSiteBasicAuthName other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.AppService.Models.StaticSiteBasicAuthName left, Azure.ResourceManager.AppService.Models.StaticSiteBasicAuthName right) { throw null; } + public static implicit operator Azure.ResourceManager.AppService.Models.StaticSiteBasicAuthName (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppService.Models.StaticSiteBasicAuthName left, Azure.ResourceManager.AppService.Models.StaticSiteBasicAuthName right) { throw null; } + public override string ToString() { throw null; } + } public partial class StaticSiteBuildProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public StaticSiteBuildProperties() { } @@ -9741,6 +11393,45 @@ public StaticSiteCustomDomainContent() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class StaticSiteDatabaseConnectionConfigurationFileOverview : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal StaticSiteDatabaseConnectionConfigurationFileOverview() { } + public string Contents { get { throw null; } } + public string FileName { get { throw null; } } + public string StaticSiteDatabaseConnectionConfigurationFileOverviewType { get { throw null; } } + Azure.ResourceManager.AppService.Models.StaticSiteDatabaseConnectionConfigurationFileOverview System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.StaticSiteDatabaseConnectionConfigurationFileOverview System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class StaticSiteDatabaseConnectionOverview : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal StaticSiteDatabaseConnectionOverview() { } + public System.Collections.Generic.IReadOnlyList ConfigurationFiles { get { throw null; } } + public string ConnectionIdentity { get { throw null; } } + public string Name { get { throw null; } } + public string Region { get { throw null; } } + public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } } + Azure.ResourceManager.AppService.Models.StaticSiteDatabaseConnectionOverview System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.StaticSiteDatabaseConnectionOverview System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class StaticSiteDatabaseConnectionPatchContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public StaticSiteDatabaseConnectionPatchContent() { } + public string ConnectionIdentity { get { throw null; } set { } } + public string ConnectionString { get { throw null; } set { } } + public string Region { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } + Azure.ResourceManager.AppService.Models.StaticSiteDatabaseConnectionPatchContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.StaticSiteDatabaseConnectionPatchContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class StaticSiteFunctionOverview : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public StaticSiteFunctionOverview() { } @@ -9753,6 +11444,19 @@ public StaticSiteFunctionOverview() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class StaticSiteLinkedBackendInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal StaticSiteLinkedBackendInfo() { } + public string BackendResourceId { get { throw null; } } + public System.DateTimeOffset? CreatedOn { get { throw null; } } + public string ProvisioningState { get { throw null; } } + public string Region { get { throw null; } } + Azure.ResourceManager.AppService.Models.StaticSiteLinkedBackendInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.StaticSiteLinkedBackendInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class StaticSitePatch : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public StaticSitePatch() { } @@ -9761,11 +11465,15 @@ public StaticSitePatch() { } public Azure.ResourceManager.AppService.Models.StaticSiteBuildProperties BuildProperties { get { throw null; } set { } } public string ContentDistributionEndpoint { get { throw null; } } public System.Collections.Generic.IReadOnlyList CustomDomains { get { throw null; } } + public System.Collections.Generic.IReadOnlyList DatabaseConnections { get { throw null; } } public string DefaultHostname { get { throw null; } } + public Azure.ResourceManager.AppService.Models.EnterpriseGradeCdnStatus? EnterpriseGradeCdnStatus { get { throw null; } set { } } public string KeyVaultReferenceIdentity { get { throw null; } } public string Kind { get { throw null; } set { } } + public System.Collections.Generic.IReadOnlyList LinkedBackends { get { throw null; } } public System.Collections.Generic.IReadOnlyList PrivateEndpointConnections { get { throw null; } } - public string Provider { get { throw null; } } + public string Provider { get { throw null; } set { } } + public string PublicNetworkAccess { get { throw null; } set { } } public string RepositoryToken { get { throw null; } set { } } public System.Uri RepositoryUri { get { throw null; } set { } } public Azure.ResourceManager.AppService.Models.StagingEnvironmentPolicy? StagingEnvironmentPolicy { get { throw null; } set { } } @@ -10160,6 +11868,31 @@ public enum WebAppBackupStatus DeleteFailed = 8, Deleted = 9, } + public partial class WebAppContentHash : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal WebAppContentHash() { } + public string Algorithm { get { throw null; } } + public string Value { get { throw null; } } + Azure.ResourceManager.AppService.Models.WebAppContentHash System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.WebAppContentHash System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WebAppContentLink : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WebAppContentLink() { } + public Azure.ResourceManager.AppService.Models.WebAppContentHash ContentHash { get { throw null; } } + public long? ContentSize { get { throw null; } } + public string ContentVersion { get { throw null; } } + public System.BinaryData Metadata { get { throw null; } } + public System.Uri Uri { get { throw null; } set { } } + Azure.ResourceManager.AppService.Models.WebAppContentLink System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.WebAppContentLink System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class WebAppCookieExpiration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public WebAppCookieExpiration() { } @@ -10171,6 +11904,79 @@ public WebAppCookieExpiration() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public enum WebAppDayOfWeek + { + Sunday = 0, + Monday = 1, + Tuesday = 2, + Wednesday = 3, + Thursday = 4, + Friday = 5, + Saturday = 6, + } + public partial class WebAppEnvironmentVariable : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WebAppEnvironmentVariable(string name, string value) { } + public string Name { get { throw null; } set { } } + public string Value { get { throw null; } set { } } + Azure.ResourceManager.AppService.Models.WebAppEnvironmentVariable System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.WebAppEnvironmentVariable System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WebAppErrorInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal WebAppErrorInfo() { } + public string Code { get { throw null; } } + Azure.ResourceManager.AppService.Models.WebAppErrorInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.WebAppErrorInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WebAppErrorProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WebAppErrorProperties() { } + public string Code { get { throw null; } set { } } + public string Message { get { throw null; } set { } } + Azure.ResourceManager.AppService.Models.WebAppErrorProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.WebAppErrorProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WebAppIPAddress : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WebAppIPAddress() { } + public string Address { get { throw null; } set { } } + Azure.ResourceManager.AppService.Models.WebAppIPAddress System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.WebAppIPAddress System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WebAppIPAddressRange : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WebAppIPAddressRange() { } + public string AddressRange { get { throw null; } set { } } + Azure.ResourceManager.AppService.Models.WebAppIPAddressRange System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.WebAppIPAddressRange System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WebAppJsonSchema : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal WebAppJsonSchema() { } + public string Content { get { throw null; } } + public string Title { get { throw null; } } + Azure.ResourceManager.AppService.Models.WebAppJsonSchema System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.WebAppJsonSchema System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class WebAppKeyInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public WebAppKeyInfo() { } @@ -10198,6 +12004,25 @@ public WebAppKeyInfoProperties() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct WebAppKeyType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public WebAppKeyType(string value) { throw null; } + public static Azure.ResourceManager.AppService.Models.WebAppKeyType NotSpecified { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WebAppKeyType Primary { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WebAppKeyType Secondary { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppService.Models.WebAppKeyType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.AppService.Models.WebAppKeyType left, Azure.ResourceManager.AppService.Models.WebAppKeyType right) { throw null; } + public static implicit operator Azure.ResourceManager.AppService.Models.WebAppKeyType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppService.Models.WebAppKeyType left, Azure.ResourceManager.AppService.Models.WebAppKeyType right) { throw null; } + public override string ToString() { throw null; } + } public partial class WebAppLoginInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public WebAppLoginInfo() { } @@ -10303,6 +12128,31 @@ internal WebAppNetworkTrace() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct WebAppParameterType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public WebAppParameterType(string value) { throw null; } + public static Azure.ResourceManager.AppService.Models.WebAppParameterType Array { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WebAppParameterType Bool { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WebAppParameterType Float { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WebAppParameterType Int { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WebAppParameterType NotSpecified { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WebAppParameterType Object { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WebAppParameterType SecureObject { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WebAppParameterType SecureString { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WebAppParameterType String { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppService.Models.WebAppParameterType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.AppService.Models.WebAppParameterType left, Azure.ResourceManager.AppService.Models.WebAppParameterType right) { throw null; } + public static implicit operator Azure.ResourceManager.AppService.Models.WebAppParameterType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppService.Models.WebAppParameterType left, Azure.ResourceManager.AppService.Models.WebAppParameterType right) { throw null; } + public override string ToString() { throw null; } + } public partial class WebAppPushSettings : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public WebAppPushSettings() { } @@ -10317,6 +12167,79 @@ public WebAppPushSettings() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class WebAppRequest : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WebAppRequest() { } + public System.BinaryData Headers { get { throw null; } set { } } + public string Method { get { throw null; } set { } } + public System.Uri Uri { get { throw null; } set { } } + Azure.ResourceManager.AppService.Models.WebAppRequest System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.WebAppRequest System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WebAppRequestHistoryProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WebAppRequestHistoryProperties() { } + public System.DateTimeOffset? EndOn { get { throw null; } set { } } + public Azure.ResourceManager.AppService.Models.WebAppRequest Request { get { throw null; } set { } } + public Azure.ResourceManager.AppService.Models.WebAppResponse Response { get { throw null; } set { } } + public System.DateTimeOffset? StartOn { get { throw null; } set { } } + Azure.ResourceManager.AppService.Models.WebAppRequestHistoryProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.WebAppRequestHistoryProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WebAppResponse : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WebAppResponse() { } + public Azure.ResourceManager.AppService.Models.WebAppContentLink BodyLink { get { throw null; } set { } } + public System.BinaryData Headers { get { throw null; } set { } } + public int? StatusCode { get { throw null; } set { } } + Azure.ResourceManager.AppService.Models.WebAppResponse System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.WebAppResponse System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WebAppRetryHistory : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WebAppRetryHistory() { } + public string ClientRequestId { get { throw null; } set { } } + public string Code { get { throw null; } set { } } + public System.DateTimeOffset? EndOn { get { throw null; } set { } } + public Azure.ResourceManager.AppService.Models.WebAppErrorProperties ErrorInfo { get { throw null; } set { } } + public string ServiceRequestId { get { throw null; } set { } } + public System.DateTimeOffset? StartOn { get { throw null; } set { } } + Azure.ResourceManager.AppService.Models.WebAppRetryHistory System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.WebAppRetryHistory System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WebAppRunActionCorrelation : Azure.ResourceManager.AppService.Models.WebAppRunCorrelation, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WebAppRunActionCorrelation() { } + public string ActionTrackingId { get { throw null; } set { } } + Azure.ResourceManager.AppService.Models.WebAppRunActionCorrelation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.WebAppRunActionCorrelation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WebAppRunCorrelation : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WebAppRunCorrelation() { } + public System.Collections.Generic.IList ClientKeywords { get { throw null; } } + public string ClientTrackingId { get { throw null; } set { } } + Azure.ResourceManager.AppService.Models.WebAppRunCorrelation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.WebAppRunCorrelation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class WebAppRuntimes : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal WebAppRuntimes() { } @@ -10407,4 +12330,421 @@ public enum WorkerSizeOption NestedSmallLinux = 10, Default = 11, } + public partial class WorkflowArtifacts : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WorkflowArtifacts() { } + public System.BinaryData AppSettings { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Files { get { throw null; } } + public System.Collections.Generic.IList FilesToDelete { get { throw null; } } + Azure.ResourceManager.AppService.Models.WorkflowArtifacts System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.WorkflowArtifacts System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WorkflowContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WorkflowContent() { } + public string Description { get { throw null; } set { } } + public System.BinaryData Metadata { get { throw null; } set { } } + public System.BinaryData Value { get { throw null; } set { } } + public Azure.ResourceManager.AppService.Models.WebAppParameterType? WebAppParameterType { get { throw null; } set { } } + Azure.ResourceManager.AppService.Models.WorkflowContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.WorkflowContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WorkflowData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WorkflowData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.AppService.Models.FlowAccessControlConfiguration AccessControl { get { throw null; } set { } } + public string AccessEndpoint { get { throw null; } } + public System.DateTimeOffset? ChangedOn { get { throw null; } } + public System.DateTimeOffset? CreatedOn { get { throw null; } } + public System.BinaryData Definition { get { throw null; } set { } } + public Azure.ResourceManager.AppService.Models.FlowEndpointsConfiguration EndpointsConfiguration { get { throw null; } set { } } + public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } + public Azure.ResourceManager.AppService.Models.WorkflowResourceReference IntegrationAccount { get { throw null; } set { } } + public Azure.ResourceManager.AppService.Models.WorkflowResourceReference IntegrationServiceEnvironment { get { throw null; } set { } } + public Azure.ResourceManager.AppService.Models.AppServiceKind? Kind { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Parameters { get { throw null; } } + public Azure.ResourceManager.AppService.Models.WorkflowProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.AppService.Models.WorkflowSku Sku { get { throw null; } } + public Azure.ResourceManager.AppService.Models.WorkflowState? State { get { throw null; } set { } } + public string Version { get { throw null; } } + Azure.ResourceManager.AppService.Models.WorkflowData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.WorkflowData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WorkflowEnvelopeProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal WorkflowEnvelopeProperties() { } + public System.Collections.Generic.IReadOnlyDictionary Files { get { throw null; } } + public Azure.ResourceManager.AppService.Models.WorkflowState? FlowState { get { throw null; } } + public Azure.ResourceManager.AppService.Models.WorkflowHealth Health { get { throw null; } } + Azure.ResourceManager.AppService.Models.WorkflowEnvelopeProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.WorkflowEnvelopeProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WorkflowExpression : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal WorkflowExpression() { } + public Azure.ResourceManager.AppService.Models.WorkflowExpressionResourceErrorInfo Error { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Subexpressions { get { throw null; } } + public string Text { get { throw null; } } + public System.BinaryData Value { get { throw null; } } + Azure.ResourceManager.AppService.Models.WorkflowExpression System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.WorkflowExpression System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WorkflowExpressionResourceErrorInfo : Azure.ResourceManager.AppService.Models.WebAppErrorInfo, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal WorkflowExpressionResourceErrorInfo() { } + public System.Collections.Generic.IReadOnlyList Details { get { throw null; } } + public string Message { get { throw null; } } + Azure.ResourceManager.AppService.Models.WorkflowExpressionResourceErrorInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.WorkflowExpressionResourceErrorInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WorkflowExpressionRoot : Azure.ResourceManager.AppService.Models.WorkflowExpression, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal WorkflowExpressionRoot() { } + public string Path { get { throw null; } } + Azure.ResourceManager.AppService.Models.WorkflowExpressionRoot System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.WorkflowExpressionRoot System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WorkflowHealth : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal WorkflowHealth() { } + public Azure.ResponseError Error { get { throw null; } } + public Azure.ResourceManager.AppService.Models.WorkflowHealthState State { get { throw null; } } + Azure.ResourceManager.AppService.Models.WorkflowHealth System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.WorkflowHealth System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public enum WorkflowHealthState + { + Unknown = 0, + NotSpecified = 1, + Healthy = 2, + Unhealthy = 3, + } + public partial class WorkflowOutputContent : Azure.ResourceManager.AppService.Models.WorkflowContent, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WorkflowOutputContent() { } + public System.BinaryData Error { get { throw null; } } + Azure.ResourceManager.AppService.Models.WorkflowOutputContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.WorkflowOutputContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct WorkflowProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public WorkflowProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.AppService.Models.WorkflowProvisioningState Accepted { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowProvisioningState Completed { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowProvisioningState Created { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowProvisioningState Creating { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowProvisioningState Deleted { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowProvisioningState InProgress { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowProvisioningState Moving { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowProvisioningState NotSpecified { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowProvisioningState Pending { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowProvisioningState Ready { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowProvisioningState Registered { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowProvisioningState Registering { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowProvisioningState Renewing { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowProvisioningState Running { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowProvisioningState Unregistered { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowProvisioningState Unregistering { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowProvisioningState Updating { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowProvisioningState Waiting { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppService.Models.WorkflowProvisioningState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.AppService.Models.WorkflowProvisioningState left, Azure.ResourceManager.AppService.Models.WorkflowProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.AppService.Models.WorkflowProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppService.Models.WorkflowProvisioningState left, Azure.ResourceManager.AppService.Models.WorkflowProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct WorkflowRecurrenceFrequency : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public WorkflowRecurrenceFrequency(string value) { throw null; } + public static Azure.ResourceManager.AppService.Models.WorkflowRecurrenceFrequency Day { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowRecurrenceFrequency Hour { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowRecurrenceFrequency Minute { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowRecurrenceFrequency Month { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowRecurrenceFrequency NotSpecified { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowRecurrenceFrequency Second { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowRecurrenceFrequency Week { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowRecurrenceFrequency Year { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppService.Models.WorkflowRecurrenceFrequency other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.AppService.Models.WorkflowRecurrenceFrequency left, Azure.ResourceManager.AppService.Models.WorkflowRecurrenceFrequency right) { throw null; } + public static implicit operator Azure.ResourceManager.AppService.Models.WorkflowRecurrenceFrequency (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppService.Models.WorkflowRecurrenceFrequency left, Azure.ResourceManager.AppService.Models.WorkflowRecurrenceFrequency right) { throw null; } + public override string ToString() { throw null; } + } + public partial class WorkflowRecurrenceSchedule : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal WorkflowRecurrenceSchedule() { } + public System.Collections.Generic.IReadOnlyList Hours { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Minutes { get { throw null; } } + public System.Collections.Generic.IReadOnlyList MonthDays { get { throw null; } } + public System.Collections.Generic.IReadOnlyList MonthlyOccurrences { get { throw null; } } + public System.Collections.Generic.IReadOnlyList WeekDays { get { throw null; } } + Azure.ResourceManager.AppService.Models.WorkflowRecurrenceSchedule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.WorkflowRecurrenceSchedule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WorkflowRegenerateActionContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WorkflowRegenerateActionContent() { } + public Azure.ResourceManager.AppService.Models.WebAppKeyType? KeyType { get { throw null; } set { } } + Azure.ResourceManager.AppService.Models.WorkflowRegenerateActionContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.WorkflowRegenerateActionContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WorkflowResourceReference : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WorkflowResourceReference() { } + public Azure.Core.ResourceIdentifier Id { get { throw null; } set { } } + public string Name { get { throw null; } } + public Azure.Core.ResourceType? ResourceType { get { throw null; } } + Azure.ResourceManager.AppService.Models.WorkflowResourceReference System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.WorkflowResourceReference System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WorkflowRunActionRepetitionIndex : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WorkflowRunActionRepetitionIndex(int itemIndex) { } + public int ItemIndex { get { throw null; } set { } } + public string ScopeName { get { throw null; } set { } } + Azure.ResourceManager.AppService.Models.WorkflowRunActionRepetitionIndex System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.WorkflowRunActionRepetitionIndex System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WorkflowRunTrigger : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal WorkflowRunTrigger() { } + public string Code { get { throw null; } } + public string CorrelationClientTrackingId { get { throw null; } } + public System.DateTimeOffset? EndOn { get { throw null; } } + public System.BinaryData Error { get { throw null; } } + public System.BinaryData Inputs { get { throw null; } } + public Azure.ResourceManager.AppService.Models.WebAppContentLink InputsLink { get { throw null; } } + public string Name { get { throw null; } } + public System.BinaryData Outputs { get { throw null; } } + public Azure.ResourceManager.AppService.Models.WebAppContentLink OutputsLink { get { throw null; } } + public System.DateTimeOffset? ScheduledOn { get { throw null; } } + public System.DateTimeOffset? StartOn { get { throw null; } } + public Azure.ResourceManager.AppService.Models.WorkflowStatus? Status { get { throw null; } } + public System.BinaryData TrackedProperties { get { throw null; } } + public string TrackingId { get { throw null; } } + Azure.ResourceManager.AppService.Models.WorkflowRunTrigger System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.WorkflowRunTrigger System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WorkflowSku : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal WorkflowSku() { } + public Azure.ResourceManager.AppService.Models.WorkflowSkuName Name { get { throw null; } } + public Azure.ResourceManager.AppService.Models.WorkflowResourceReference Plan { get { throw null; } } + Azure.ResourceManager.AppService.Models.WorkflowSku System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.WorkflowSku System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct WorkflowSkuName : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public WorkflowSkuName(string value) { throw null; } + public static Azure.ResourceManager.AppService.Models.WorkflowSkuName Basic { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowSkuName Free { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowSkuName NotSpecified { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowSkuName Premium { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowSkuName Shared { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowSkuName Standard { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppService.Models.WorkflowSkuName other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.AppService.Models.WorkflowSkuName left, Azure.ResourceManager.AppService.Models.WorkflowSkuName right) { throw null; } + public static implicit operator Azure.ResourceManager.AppService.Models.WorkflowSkuName (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppService.Models.WorkflowSkuName left, Azure.ResourceManager.AppService.Models.WorkflowSkuName right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct WorkflowState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public WorkflowState(string value) { throw null; } + public static Azure.ResourceManager.AppService.Models.WorkflowState Completed { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowState Deleted { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowState Disabled { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowState Enabled { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowState NotSpecified { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowState Suspended { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppService.Models.WorkflowState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.AppService.Models.WorkflowState left, Azure.ResourceManager.AppService.Models.WorkflowState right) { throw null; } + public static implicit operator Azure.ResourceManager.AppService.Models.WorkflowState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppService.Models.WorkflowState left, Azure.ResourceManager.AppService.Models.WorkflowState right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct WorkflowStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public WorkflowStatus(string value) { throw null; } + public static Azure.ResourceManager.AppService.Models.WorkflowStatus Aborted { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowStatus Cancelled { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowStatus Failed { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowStatus Faulted { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowStatus Ignored { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowStatus NotSpecified { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowStatus Paused { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowStatus Running { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowStatus Skipped { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowStatus Succeeded { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowStatus Suspended { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowStatus TimedOut { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowStatus Waiting { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppService.Models.WorkflowStatus other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.AppService.Models.WorkflowStatus left, Azure.ResourceManager.AppService.Models.WorkflowStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.AppService.Models.WorkflowStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppService.Models.WorkflowStatus left, Azure.ResourceManager.AppService.Models.WorkflowStatus right) { throw null; } + public override string ToString() { throw null; } + } + public partial class WorkflowTriggerCallbackUri : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal WorkflowTriggerCallbackUri() { } + public string BasePath { get { throw null; } } + public string Method { get { throw null; } } + public Azure.ResourceManager.AppService.Models.WorkflowTriggerListCallbackUriQueries Queries { get { throw null; } } + public string RelativePath { get { throw null; } } + public System.Collections.Generic.IReadOnlyList RelativePathParameters { get { throw null; } } + public string Value { get { throw null; } } + Azure.ResourceManager.AppService.Models.WorkflowTriggerCallbackUri System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.WorkflowTriggerCallbackUri System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WorkflowTriggerListCallbackUriQueries : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal WorkflowTriggerListCallbackUriQueries() { } + public string ApiVersion { get { throw null; } } + public string SasPermission { get { throw null; } } + public string SasSignature { get { throw null; } } + public string SasTimestamp { get { throw null; } } + public string SasVersion { get { throw null; } } + Azure.ResourceManager.AppService.Models.WorkflowTriggerListCallbackUriQueries System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.WorkflowTriggerListCallbackUriQueries System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct WorkflowTriggerProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public WorkflowTriggerProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.AppService.Models.WorkflowTriggerProvisioningState Accepted { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowTriggerProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowTriggerProvisioningState Completed { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowTriggerProvisioningState Created { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowTriggerProvisioningState Creating { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowTriggerProvisioningState Deleted { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowTriggerProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowTriggerProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowTriggerProvisioningState Moving { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowTriggerProvisioningState NotSpecified { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowTriggerProvisioningState Ready { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowTriggerProvisioningState Registered { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowTriggerProvisioningState Registering { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowTriggerProvisioningState Running { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowTriggerProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowTriggerProvisioningState Unregistered { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowTriggerProvisioningState Unregistering { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowTriggerProvisioningState Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppService.Models.WorkflowTriggerProvisioningState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.AppService.Models.WorkflowTriggerProvisioningState left, Azure.ResourceManager.AppService.Models.WorkflowTriggerProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.AppService.Models.WorkflowTriggerProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppService.Models.WorkflowTriggerProvisioningState left, Azure.ResourceManager.AppService.Models.WorkflowTriggerProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class WorkflowTriggerRecurrence : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal WorkflowTriggerRecurrence() { } + public string EndTime { get { throw null; } } + public Azure.ResourceManager.AppService.Models.WorkflowRecurrenceFrequency? Frequency { get { throw null; } } + public int? Interval { get { throw null; } } + public Azure.ResourceManager.AppService.Models.WorkflowRecurrenceSchedule Schedule { get { throw null; } } + public string StartTime { get { throw null; } } + public string TimeZone { get { throw null; } } + Azure.ResourceManager.AppService.Models.WorkflowTriggerRecurrence System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.WorkflowTriggerRecurrence System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppCertificateCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppCertificateCollection.cs index 5fb26127641ba..f34738037776c 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppCertificateCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppCertificateCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_AppCertificateCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListCertificatesByResourceGroup() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/ListCertificatesByResourceGroup.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ListCertificatesByResourceGroup.json // this example is just showing the usage of "Certificates_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +56,7 @@ public async Task GetAll_ListCertificatesByResourceGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetCertificate() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetCertificate.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetCertificate.json // this example is just showing the usage of "Certificates_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -90,7 +90,7 @@ public async Task Get_GetCertificate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetCertificate() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetCertificate.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetCertificate.json // this example is just showing the usage of "Certificates_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -120,7 +120,7 @@ public async Task Exists_GetCertificate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetCertificate() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetCertificate.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetCertificate.json // this example is just showing the usage of "Certificates_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -162,7 +162,7 @@ public async Task GetIfExists_GetCertificate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateCertificate() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/CreateOrUpdateCertificate.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/CreateOrUpdateCertificate.json // this example is just showing the usage of "Certificates_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppCertificateResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppCertificateResource.cs index b5785192ff003..303daaeeb802d 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppCertificateResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppCertificateResource.cs @@ -21,7 +21,7 @@ public partial class Sample_AppCertificateResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAppCertificates_ListCertificatesForSubscription() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/ListCertificates.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ListCertificates.json // this example is just showing the usage of "Certificates_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -53,7 +53,7 @@ public async Task GetAppCertificates_ListCertificatesForSubscription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetCertificate() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetCertificate.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetCertificate.json // this example is just showing the usage of "Certificates_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -84,7 +84,7 @@ public async Task Get_GetCertificate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteCertificate() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/DeleteCertificate.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/DeleteCertificate.json // this example is just showing the usage of "Certificates_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -111,7 +111,7 @@ public async Task Delete_DeleteCertificate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_PatchCertificate() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/PatchCertificate.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/PatchCertificate.json // this example is just showing the usage of "Certificates_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceCertificateCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceCertificateCollection.cs new file mode 100644 index 0000000000000..09600eaf308c4 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceCertificateCollection.cs @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_AppServiceCertificateCollection + { + // List certificates by App Service Certificate + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ListCertificatesByAppServiceCertificate() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2023-12-01/examples/ListCertificatesByAppServiceCertificateOrder.json + // this example is just showing the usage of "AppServiceCertificateOrders_ListCertificates" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceCertificateOrderResource created on azure + // for more information of creating AppServiceCertificateOrderResource, please refer to the document of AppServiceCertificateOrderResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string certificateOrderName = "SampleCertificateOrderName"; + ResourceIdentifier appServiceCertificateOrderResourceId = AppServiceCertificateOrderResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, certificateOrderName); + AppServiceCertificateOrderResource appServiceCertificateOrder = client.GetAppServiceCertificateOrderResource(appServiceCertificateOrderResourceId); + + // get the collection of this AppServiceCertificateResource + AppServiceCertificateCollection collection = appServiceCertificateOrder.GetAppServiceCertificates(); + + // invoke the operation and iterate over the result + await foreach (AppServiceCertificateResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppServiceCertificateData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get App Service Certificate + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetAppServiceCertificate() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2023-12-01/examples/GetAppServiceCertificate.json + // this example is just showing the usage of "AppServiceCertificateOrders_GetCertificate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceCertificateOrderResource created on azure + // for more information of creating AppServiceCertificateOrderResource, please refer to the document of AppServiceCertificateOrderResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string certificateOrderName = "SampleCertificateOrderName"; + ResourceIdentifier appServiceCertificateOrderResourceId = AppServiceCertificateOrderResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, certificateOrderName); + AppServiceCertificateOrderResource appServiceCertificateOrder = client.GetAppServiceCertificateOrderResource(appServiceCertificateOrderResourceId); + + // get the collection of this AppServiceCertificateResource + AppServiceCertificateCollection collection = appServiceCertificateOrder.GetAppServiceCertificates(); + + // invoke the operation + string name = "SampleCertName1"; + AppServiceCertificateResource result = await collection.GetAsync(name); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppServiceCertificateData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get App Service Certificate + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetAppServiceCertificate() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2023-12-01/examples/GetAppServiceCertificate.json + // this example is just showing the usage of "AppServiceCertificateOrders_GetCertificate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceCertificateOrderResource created on azure + // for more information of creating AppServiceCertificateOrderResource, please refer to the document of AppServiceCertificateOrderResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string certificateOrderName = "SampleCertificateOrderName"; + ResourceIdentifier appServiceCertificateOrderResourceId = AppServiceCertificateOrderResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, certificateOrderName); + AppServiceCertificateOrderResource appServiceCertificateOrder = client.GetAppServiceCertificateOrderResource(appServiceCertificateOrderResourceId); + + // get the collection of this AppServiceCertificateResource + AppServiceCertificateCollection collection = appServiceCertificateOrder.GetAppServiceCertificates(); + + // invoke the operation + string name = "SampleCertName1"; + bool result = await collection.ExistsAsync(name); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Get App Service Certificate + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetAppServiceCertificate() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2023-12-01/examples/GetAppServiceCertificate.json + // this example is just showing the usage of "AppServiceCertificateOrders_GetCertificate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceCertificateOrderResource created on azure + // for more information of creating AppServiceCertificateOrderResource, please refer to the document of AppServiceCertificateOrderResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string certificateOrderName = "SampleCertificateOrderName"; + ResourceIdentifier appServiceCertificateOrderResourceId = AppServiceCertificateOrderResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, certificateOrderName); + AppServiceCertificateOrderResource appServiceCertificateOrder = client.GetAppServiceCertificateOrderResource(appServiceCertificateOrderResourceId); + + // get the collection of this AppServiceCertificateResource + AppServiceCertificateCollection collection = appServiceCertificateOrder.GetAppServiceCertificates(); + + // invoke the operation + string name = "SampleCertName1"; + NullableResponse response = await collection.GetIfExistsAsync(name); + AppServiceCertificateResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppServiceCertificateData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // Create Certificate + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CreateCertificate() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2023-12-01/examples/CreateAppServiceCertificate.json + // this example is just showing the usage of "AppServiceCertificateOrders_CreateOrUpdateCertificate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceCertificateOrderResource created on azure + // for more information of creating AppServiceCertificateOrderResource, please refer to the document of AppServiceCertificateOrderResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string certificateOrderName = "SampleCertificateOrderName"; + ResourceIdentifier appServiceCertificateOrderResourceId = AppServiceCertificateOrderResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, certificateOrderName); + AppServiceCertificateOrderResource appServiceCertificateOrder = client.GetAppServiceCertificateOrderResource(appServiceCertificateOrderResourceId); + + // get the collection of this AppServiceCertificateResource + AppServiceCertificateCollection collection = appServiceCertificateOrder.GetAppServiceCertificates(); + + // invoke the operation + string name = "SampleCertName1"; + AppServiceCertificateData data = new AppServiceCertificateData(new AzureLocation("Global")) + { + KeyVaultId = new ResourceIdentifier("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/microsoft.keyvault/vaults/SamplevaultName"), + KeyVaultSecretName = "SampleSecretName1", + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, name, data); + AppServiceCertificateResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppServiceCertificateData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceCertificateOrderCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceCertificateOrderCollection.cs new file mode 100644 index 0000000000000..cd522972e0f27 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceCertificateOrderCollection.cs @@ -0,0 +1,217 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.AppService.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_AppServiceCertificateOrderCollection + { + // List App Service Certificate orders by resource group + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ListAppServiceCertificateOrdersByResourceGroup() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2023-12-01/examples/ListAppServiceCertificateOrdersByResourceGroup.json + // this example is just showing the usage of "AppServiceCertificateOrders_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this AppServiceCertificateOrderResource + AppServiceCertificateOrderCollection collection = resourceGroupResource.GetAppServiceCertificateOrders(); + + // invoke the operation and iterate over the result + await foreach (AppServiceCertificateOrderResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppServiceCertificateOrderData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get App Service Certificate Order + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetAppServiceCertificateOrder() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2023-12-01/examples/GetAppServiceCertificateOrder.json + // this example is just showing the usage of "AppServiceCertificateOrders_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this AppServiceCertificateOrderResource + AppServiceCertificateOrderCollection collection = resourceGroupResource.GetAppServiceCertificateOrders(); + + // invoke the operation + string certificateOrderName = "SampleCertificateOrderName"; + AppServiceCertificateOrderResource result = await collection.GetAsync(certificateOrderName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppServiceCertificateOrderData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get App Service Certificate Order + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetAppServiceCertificateOrder() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2023-12-01/examples/GetAppServiceCertificateOrder.json + // this example is just showing the usage of "AppServiceCertificateOrders_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this AppServiceCertificateOrderResource + AppServiceCertificateOrderCollection collection = resourceGroupResource.GetAppServiceCertificateOrders(); + + // invoke the operation + string certificateOrderName = "SampleCertificateOrderName"; + bool result = await collection.ExistsAsync(certificateOrderName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Get App Service Certificate Order + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetAppServiceCertificateOrder() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2023-12-01/examples/GetAppServiceCertificateOrder.json + // this example is just showing the usage of "AppServiceCertificateOrders_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this AppServiceCertificateOrderResource + AppServiceCertificateOrderCollection collection = resourceGroupResource.GetAppServiceCertificateOrders(); + + // invoke the operation + string certificateOrderName = "SampleCertificateOrderName"; + NullableResponse response = await collection.GetIfExistsAsync(certificateOrderName); + AppServiceCertificateOrderResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppServiceCertificateOrderData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // Create Certificate order + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CreateCertificateOrder() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2023-12-01/examples/CreateAppServiceCertificateOrder.json + // this example is just showing the usage of "AppServiceCertificateOrders_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this AppServiceCertificateOrderResource + AppServiceCertificateOrderCollection collection = resourceGroupResource.GetAppServiceCertificateOrders(); + + // invoke the operation + string certificateOrderName = "SampleCertificateOrderName"; + AppServiceCertificateOrderData data = new AppServiceCertificateOrderData(new AzureLocation("Global")) + { + Certificates = +{ +["SampleCertName1"] = new AppServiceCertificateProperties() +{ +KeyVaultId = new ResourceIdentifier("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/microsoft.keyvault/vaults/SamplevaultName"), +KeyVaultSecretName = "SampleSecretName1", +}, +["SampleCertName2"] = new AppServiceCertificateProperties() +{ +KeyVaultId = new ResourceIdentifier("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/microsoft.keyvault/vaults/SamplevaultName"), +KeyVaultSecretName = "SampleSecretName2", +}, +}, + DistinguishedName = "CN=SampleCustomDomain.com", + ValidityInYears = 2, + KeySize = 2048, + ProductType = CertificateProductType.StandardDomainValidatedSsl, + IsAutoRenew = true, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, certificateOrderName, data); + AppServiceCertificateOrderResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppServiceCertificateOrderData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceCertificateOrderResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceCertificateOrderResource.cs new file mode 100644 index 0000000000000..c75bbdfd42232 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceCertificateOrderResource.cs @@ -0,0 +1,405 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.AppService.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_AppServiceCertificateOrderResource + { + // List App Service Certificate orders by subscription + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAppServiceCertificateOrders_ListAppServiceCertificateOrdersBySubscription() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2023-12-01/examples/ListAppServiceCertificateOrdersBySubscription.json + // this example is just showing the usage of "AppServiceCertificateOrders_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + await foreach (AppServiceCertificateOrderResource item in subscriptionResource.GetAppServiceCertificateOrdersAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppServiceCertificateOrderData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get App Service Certificate Order + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetAppServiceCertificateOrder() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2023-12-01/examples/GetAppServiceCertificateOrder.json + // this example is just showing the usage of "AppServiceCertificateOrders_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceCertificateOrderResource created on azure + // for more information of creating AppServiceCertificateOrderResource, please refer to the document of AppServiceCertificateOrderResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string certificateOrderName = "SampleCertificateOrderName"; + ResourceIdentifier appServiceCertificateOrderResourceId = AppServiceCertificateOrderResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, certificateOrderName); + AppServiceCertificateOrderResource appServiceCertificateOrder = client.GetAppServiceCertificateOrderResource(appServiceCertificateOrderResourceId); + + // invoke the operation + AppServiceCertificateOrderResource result = await appServiceCertificateOrder.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppServiceCertificateOrderData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Delete App Service Certificate Order + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_DeleteAppServiceCertificateOrder() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2023-12-01/examples/DeleteAppServiceCertificateOrder.json + // this example is just showing the usage of "AppServiceCertificateOrders_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceCertificateOrderResource created on azure + // for more information of creating AppServiceCertificateOrderResource, please refer to the document of AppServiceCertificateOrderResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string certificateOrderName = "SampleCertificateOrderName"; + ResourceIdentifier appServiceCertificateOrderResourceId = AppServiceCertificateOrderResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, certificateOrderName); + AppServiceCertificateOrderResource appServiceCertificateOrder = client.GetAppServiceCertificateOrderResource(appServiceCertificateOrderResourceId); + + // invoke the operation + await appServiceCertificateOrder.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + + // Update Certificate order + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_UpdateCertificateOrder() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2023-12-01/examples/UpdateAppServiceCertificateOrder.json + // this example is just showing the usage of "AppServiceCertificateOrders_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceCertificateOrderResource created on azure + // for more information of creating AppServiceCertificateOrderResource, please refer to the document of AppServiceCertificateOrderResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string certificateOrderName = "SampleCertificateOrderName"; + ResourceIdentifier appServiceCertificateOrderResourceId = AppServiceCertificateOrderResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, certificateOrderName); + AppServiceCertificateOrderResource appServiceCertificateOrder = client.GetAppServiceCertificateOrderResource(appServiceCertificateOrderResourceId); + + // invoke the operation + AppServiceCertificateOrderPatch patch = new AppServiceCertificateOrderPatch() + { + Certificates = +{ +["SampleCertName1"] = new AppServiceCertificateProperties() +{ +KeyVaultId = new ResourceIdentifier("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/microsoft.keyvault/vaults/SamplevaultName"), +KeyVaultSecretName = "SampleSecretName1", +}, +["SampleCertName2"] = new AppServiceCertificateProperties() +{ +KeyVaultId = new ResourceIdentifier("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/microsoft.keyvault/vaults/SamplevaultName"), +KeyVaultSecretName = "SampleSecretName2", +}, +}, + DistinguishedName = "CN=SampleCustomDomain.com", + ValidityInYears = 2, + KeySize = 2048, + ProductType = CertificateProductType.StandardDomainValidatedSsl, + IsAutoRenew = true, + }; + AppServiceCertificateOrderResource result = await appServiceCertificateOrder.UpdateAsync(patch); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppServiceCertificateOrderData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Reissue App Service Certificate Order + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Reissue_ReissueAppServiceCertificateOrder() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2023-12-01/examples/ReissueAppServiceCertificateOrder.json + // this example is just showing the usage of "AppServiceCertificateOrders_Reissue" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceCertificateOrderResource created on azure + // for more information of creating AppServiceCertificateOrderResource, please refer to the document of AppServiceCertificateOrderResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string certificateOrderName = "SampleCertificateOrderName"; + ResourceIdentifier appServiceCertificateOrderResourceId = AppServiceCertificateOrderResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, certificateOrderName); + AppServiceCertificateOrderResource appServiceCertificateOrder = client.GetAppServiceCertificateOrderResource(appServiceCertificateOrderResourceId); + + // invoke the operation + ReissueCertificateOrderContent content = new ReissueCertificateOrderContent() + { + KeySize = 2048, + DelayExistingRevokeInHours = 2, + Csr = "CSR1223238Value", + IsPrivateKeyExternal = false, + }; + await appServiceCertificateOrder.ReissueAsync(content); + + Console.WriteLine($"Succeeded"); + } + + // Renew App Service Certificate Order + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Renew_RenewAppServiceCertificateOrder() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2023-12-01/examples/RenewAppServiceCertificateOrder.json + // this example is just showing the usage of "AppServiceCertificateOrders_Renew" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceCertificateOrderResource created on azure + // for more information of creating AppServiceCertificateOrderResource, please refer to the document of AppServiceCertificateOrderResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string certificateOrderName = "SampleCertificateOrderName"; + ResourceIdentifier appServiceCertificateOrderResourceId = AppServiceCertificateOrderResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, certificateOrderName); + AppServiceCertificateOrderResource appServiceCertificateOrder = client.GetAppServiceCertificateOrderResource(appServiceCertificateOrderResourceId); + + // invoke the operation + RenewCertificateOrderContent content = new RenewCertificateOrderContent() + { + KeySize = 2048, + Csr = "CSR1223238Value", + IsPrivateKeyExternal = false, + }; + await appServiceCertificateOrder.RenewAsync(content); + + Console.WriteLine($"Succeeded"); + } + + // Resend App Service Certificate Order email + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task ResendEmail_ResendAppServiceCertificateOrderEmail() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2023-12-01/examples/ResendAppServiceCertificateOrderEmail.json + // this example is just showing the usage of "AppServiceCertificateOrders_ResendEmail" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceCertificateOrderResource created on azure + // for more information of creating AppServiceCertificateOrderResource, please refer to the document of AppServiceCertificateOrderResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string certificateOrderName = "SampleCertificateOrderName"; + ResourceIdentifier appServiceCertificateOrderResourceId = AppServiceCertificateOrderResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, certificateOrderName); + AppServiceCertificateOrderResource appServiceCertificateOrder = client.GetAppServiceCertificateOrderResource(appServiceCertificateOrderResourceId); + + // invoke the operation + await appServiceCertificateOrder.ResendEmailAsync(); + + Console.WriteLine($"Succeeded"); + } + + // Resend Domain Ownership verification email + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task ResendRequestEmails_ResendDomainOwnershipVerificationEmail() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2023-12-01/examples/ResendDomainOwnershipVerificationEmail.json + // this example is just showing the usage of "AppServiceCertificateOrders_ResendRequestEmails" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceCertificateOrderResource created on azure + // for more information of creating AppServiceCertificateOrderResource, please refer to the document of AppServiceCertificateOrderResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string certificateOrderName = "SampleCertificateOrderName"; + ResourceIdentifier appServiceCertificateOrderResourceId = AppServiceCertificateOrderResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, certificateOrderName); + AppServiceCertificateOrderResource appServiceCertificateOrder = client.GetAppServiceCertificateOrderResource(appServiceCertificateOrderResourceId); + + // invoke the operation + AppServiceDomainNameIdentifier nameIdentifier = new AppServiceDomainNameIdentifier() + { + Name = "Domain name", + }; + await appServiceCertificateOrder.ResendRequestEmailsAsync(nameIdentifier); + + Console.WriteLine($"Succeeded"); + } + + // Retrieve Site Seal + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task RetrieveSiteSeal_RetrieveSiteSeal() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2023-12-01/examples/RetrieveSiteSeal.json + // this example is just showing the usage of "AppServiceCertificateOrders_RetrieveSiteSeal" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceCertificateOrderResource created on azure + // for more information of creating AppServiceCertificateOrderResource, please refer to the document of AppServiceCertificateOrderResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string certificateOrderName = "SampleCertOrder"; + ResourceIdentifier appServiceCertificateOrderResourceId = AppServiceCertificateOrderResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, certificateOrderName); + AppServiceCertificateOrderResource appServiceCertificateOrder = client.GetAppServiceCertificateOrderResource(appServiceCertificateOrderResourceId); + + // invoke the operation + SiteSealContent content = new SiteSealContent() + { + IsLightTheme = true, + Locale = "en-us", + }; + SiteSeal result = await appServiceCertificateOrder.RetrieveSiteSealAsync(content); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Verify Domain Ownership + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task VerifyDomainOwnership_VerifyDomainOwnership() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2023-12-01/examples/VerifyDomainOwnership.json + // this example is just showing the usage of "AppServiceCertificateOrders_VerifyDomainOwnership" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceCertificateOrderResource created on azure + // for more information of creating AppServiceCertificateOrderResource, please refer to the document of AppServiceCertificateOrderResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string certificateOrderName = "SampleCertificateOrderName"; + ResourceIdentifier appServiceCertificateOrderResourceId = AppServiceCertificateOrderResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, certificateOrderName); + AppServiceCertificateOrderResource appServiceCertificateOrder = client.GetAppServiceCertificateOrderResource(appServiceCertificateOrderResourceId); + + // invoke the operation + await appServiceCertificateOrder.VerifyDomainOwnershipAsync(); + + Console.WriteLine($"Succeeded"); + } + + // Retrieve Certificate Order Actions + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task RetrieveCertificateActions_RetrieveCertificateOrderActions() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2023-12-01/examples/RetrieveCertificateOrderActions.json + // this example is just showing the usage of "AppServiceCertificateOrders_RetrieveCertificateActions" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceCertificateOrderResource created on azure + // for more information of creating AppServiceCertificateOrderResource, please refer to the document of AppServiceCertificateOrderResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "SampleCertOrder"; + ResourceIdentifier appServiceCertificateOrderResourceId = AppServiceCertificateOrderResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + AppServiceCertificateOrderResource appServiceCertificateOrder = client.GetAppServiceCertificateOrderResource(appServiceCertificateOrderResourceId); + + // invoke the operation and iterate over the result + await foreach (CertificateOrderAction item in appServiceCertificateOrder.RetrieveCertificateActionsAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Retrieve Certificate Email History + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task RetrieveCertificateEmailHistory_RetrieveCertificateEmailHistory() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2023-12-01/examples/RetrieveCertificateEmailHistory.json + // this example is just showing the usage of "AppServiceCertificateOrders_RetrieveCertificateEmailHistory" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceCertificateOrderResource created on azure + // for more information of creating AppServiceCertificateOrderResource, please refer to the document of AppServiceCertificateOrderResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "SampleCertOrder"; + ResourceIdentifier appServiceCertificateOrderResourceId = AppServiceCertificateOrderResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + AppServiceCertificateOrderResource appServiceCertificateOrder = client.GetAppServiceCertificateOrderResource(appServiceCertificateOrderResourceId); + + // invoke the operation and iterate over the result + await foreach (AppServiceCertificateEmail item in appServiceCertificateOrder.RetrieveCertificateEmailHistoryAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceCertificateResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceCertificateResource.cs new file mode 100644 index 0000000000000..8731fb76e4e26 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceCertificateResource.cs @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_AppServiceCertificateResource + { + // Get App Service Certificate + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetAppServiceCertificate() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2023-12-01/examples/GetAppServiceCertificate.json + // this example is just showing the usage of "AppServiceCertificateOrders_GetCertificate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceCertificateResource created on azure + // for more information of creating AppServiceCertificateResource, please refer to the document of AppServiceCertificateResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string certificateOrderName = "SampleCertificateOrderName"; + string name = "SampleCertName1"; + ResourceIdentifier appServiceCertificateResourceId = AppServiceCertificateResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, certificateOrderName, name); + AppServiceCertificateResource appServiceCertificate = client.GetAppServiceCertificateResource(appServiceCertificateResourceId); + + // invoke the operation + AppServiceCertificateResource result = await appServiceCertificate.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppServiceCertificateData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Delete App Service Certificate + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_DeleteAppServiceCertificate() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2023-12-01/examples/DeleteAppServiceCertificate.json + // this example is just showing the usage of "AppServiceCertificateOrders_DeleteCertificate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceCertificateResource created on azure + // for more information of creating AppServiceCertificateResource, please refer to the document of AppServiceCertificateResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string certificateOrderName = "SampleCertificateOrderName"; + string name = "SampleCertName1"; + ResourceIdentifier appServiceCertificateResourceId = AppServiceCertificateResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, certificateOrderName, name); + AppServiceCertificateResource appServiceCertificate = client.GetAppServiceCertificateResource(appServiceCertificateResourceId); + + // invoke the operation + await appServiceCertificate.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + + // Update Certificate + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_UpdateCertificate() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2023-12-01/examples/UpdateAppServiceCertificate.json + // this example is just showing the usage of "AppServiceCertificateOrders_UpdateCertificate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceCertificateResource created on azure + // for more information of creating AppServiceCertificateResource, please refer to the document of AppServiceCertificateResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string certificateOrderName = "SampleCertificateOrderName"; + string name = "SampleCertName1"; + ResourceIdentifier appServiceCertificateResourceId = AppServiceCertificateResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, certificateOrderName, name); + AppServiceCertificateResource appServiceCertificate = client.GetAppServiceCertificateResource(appServiceCertificateResourceId); + + // invoke the operation + AppServiceCertificatePatch patch = new AppServiceCertificatePatch() + { + KeyVaultId = new ResourceIdentifier("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/microsoft.keyvault/vaults/SamplevaultName"), + KeyVaultSecretName = "SampleSecretName1", + }; + AppServiceCertificateResource result = await appServiceCertificate.UpdateAsync(patch); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppServiceCertificateData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceDomainCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceDomainCollection.cs new file mode 100644 index 0000000000000..c0763248e1b70 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceDomainCollection.cs @@ -0,0 +1,247 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.AppService.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_AppServiceDomainCollection + { + // List domains by resource group + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ListDomainsByResourceGroup() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2023-12-01/examples/ListDomainsByResourceGroup.json + // this example is just showing the usage of "Domains_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this AppServiceDomainResource + AppServiceDomainCollection collection = resourceGroupResource.GetAppServiceDomains(); + + // invoke the operation and iterate over the result + await foreach (AppServiceDomainResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppServiceDomainData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get Domain + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetDomain() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2023-12-01/examples/GetDomain.json + // this example is just showing the usage of "Domains_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this AppServiceDomainResource + AppServiceDomainCollection collection = resourceGroupResource.GetAppServiceDomains(); + + // invoke the operation + string domainName = "example.com"; + AppServiceDomainResource result = await collection.GetAsync(domainName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppServiceDomainData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get Domain + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetDomain() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2023-12-01/examples/GetDomain.json + // this example is just showing the usage of "Domains_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this AppServiceDomainResource + AppServiceDomainCollection collection = resourceGroupResource.GetAppServiceDomains(); + + // invoke the operation + string domainName = "example.com"; + bool result = await collection.ExistsAsync(domainName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Get Domain + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetDomain() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2023-12-01/examples/GetDomain.json + // this example is just showing the usage of "Domains_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this AppServiceDomainResource + AppServiceDomainCollection collection = resourceGroupResource.GetAppServiceDomains(); + + // invoke the operation + string domainName = "example.com"; + NullableResponse response = await collection.GetIfExistsAsync(domainName); + AppServiceDomainResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppServiceDomainData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // Create App Service Domain + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CreateAppServiceDomain() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2023-12-01/examples/CreateAppServiceDomain.json + // this example is just showing the usage of "Domains_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this AppServiceDomainResource + AppServiceDomainCollection collection = resourceGroupResource.GetAppServiceDomains(); + + // invoke the operation + string domainName = "example.com"; + AppServiceDomainData data = new AppServiceDomainData(new AzureLocation("global")) + { + ContactAdmin = new RegistrationContactInfo("admin@email.com", "John", "Doe", "1-245-534-2242") + { + AddressMailing = new RegistrationAddressInfo("3400 State St", "Chicago", "United States", "67098", "IL"), + Fax = "1-245-534-2242", + JobTitle = "Admin", + NameMiddle = "", + Organization = "Microsoft Inc.", + }, + ContactBilling = new RegistrationContactInfo("billing@email.com", "John", "Doe", "1-245-534-2242") + { + AddressMailing = new RegistrationAddressInfo("3400 State St", "Chicago", "United States", "67098", "IL"), + Fax = "1-245-534-2242", + JobTitle = "Billing", + NameMiddle = "", + Organization = "Microsoft Inc.", + }, + ContactRegistrant = new RegistrationContactInfo("registrant@email.com", "John", "Doe", "1-245-534-2242") + { + AddressMailing = new RegistrationAddressInfo("3400 State St", "Chicago", "United States", "67098", "IL"), + Fax = "1-245-534-2242", + JobTitle = "Registrant", + NameMiddle = "", + Organization = "Microsoft Inc.", + }, + ContactTech = new RegistrationContactInfo("tech@email.com", "John", "Doe", "1-245-534-2242") + { + AddressMailing = new RegistrationAddressInfo("3400 State St", "Chicago", "United States", "67098", "IL"), + Fax = "1-245-534-2242", + JobTitle = "Tech", + NameMiddle = "", + Organization = "Microsoft Inc.", + }, + IsDomainPrivacyEnabled = false, + IsAutoRenew = true, + Consent = new DomainPurchaseConsent() + { + AgreementKeys = +{ +"agreementKey1" +}, + AgreedBy = "192.0.2.1", + AgreedOn = DateTimeOffset.Parse("2021-09-10T19:30:53Z"), + }, + DnsType = AppServiceDnsType.DefaultDomainRegistrarDns, + AuthCode = "exampleAuthCode", + Tags = +{ +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, domainName, data); + AppServiceDomainResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppServiceDomainData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceDomainResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceDomainResource.cs index 88c07cba0f152..1aa38cb29c0f4 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceDomainResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceDomainResource.cs @@ -9,17 +9,189 @@ using System.Threading.Tasks; using Azure.Core; using Azure.Identity; +using Azure.ResourceManager.AppService.Models; +using Azure.ResourceManager.Resources; namespace Azure.ResourceManager.AppService.Samples { public partial class Sample_AppServiceDomainResource { + // List domains by subscription + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAppServiceDomains_ListDomainsBySubscription() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2023-12-01/examples/ListDomainsBySubscription.json + // this example is just showing the usage of "Domains_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + await foreach (AppServiceDomainResource item in subscriptionResource.GetAppServiceDomainsAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppServiceDomainData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get Domain + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetDomain() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2023-12-01/examples/GetDomain.json + // this example is just showing the usage of "Domains_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceDomainResource created on azure + // for more information of creating AppServiceDomainResource, please refer to the document of AppServiceDomainResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string domainName = "example.com"; + ResourceIdentifier appServiceDomainResourceId = AppServiceDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, domainName); + AppServiceDomainResource appServiceDomain = client.GetAppServiceDomainResource(appServiceDomainResourceId); + + // invoke the operation + AppServiceDomainResource result = await appServiceDomain.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppServiceDomainData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Delete App Service Domain + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_DeleteAppServiceDomain() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2023-12-01/examples/DeleteAppServiceDomain.json + // this example is just showing the usage of "Domains_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceDomainResource created on azure + // for more information of creating AppServiceDomainResource, please refer to the document of AppServiceDomainResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string domainName = "example.com"; + ResourceIdentifier appServiceDomainResourceId = AppServiceDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, domainName); + AppServiceDomainResource appServiceDomain = client.GetAppServiceDomainResource(appServiceDomainResourceId); + + // invoke the operation + bool? forceHardDeleteDomain = true; + await appServiceDomain.DeleteAsync(WaitUntil.Completed, forceHardDeleteDomain: forceHardDeleteDomain); + + Console.WriteLine($"Succeeded"); + } + + // Update App Service Domain + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_UpdateAppServiceDomain() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2023-12-01/examples/UpdateAppServiceDomain.json + // this example is just showing the usage of "Domains_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceDomainResource created on azure + // for more information of creating AppServiceDomainResource, please refer to the document of AppServiceDomainResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string domainName = "example.com"; + ResourceIdentifier appServiceDomainResourceId = AppServiceDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, domainName); + AppServiceDomainResource appServiceDomain = client.GetAppServiceDomainResource(appServiceDomainResourceId); + + // invoke the operation + AppServiceDomainPatch patch = new AppServiceDomainPatch() + { + ContactAdmin = new RegistrationContactInfo("admin@email.com", "John", "Doe", "1-245-534-2242") + { + AddressMailing = new RegistrationAddressInfo("3400 State St", "Chicago", "United States", "67098", "IL"), + Fax = "1-245-534-2242", + JobTitle = "Admin", + NameMiddle = "", + Organization = "Microsoft Inc.", + }, + ContactBilling = new RegistrationContactInfo("billing@email.com", "John", "Doe", "1-245-534-2242") + { + AddressMailing = new RegistrationAddressInfo("3400 State St", "Chicago", "United States", "67098", "IL"), + Fax = "1-245-534-2242", + JobTitle = "Billing", + NameMiddle = "", + Organization = "Microsoft Inc.", + }, + ContactRegistrant = new RegistrationContactInfo("registrant@email.com", "John", "Doe", "1-245-534-2242") + { + AddressMailing = new RegistrationAddressInfo("3400 State St", "Chicago", "United States", "67098", "IL"), + Fax = "1-245-534-2242", + JobTitle = "Registrant", + NameMiddle = "", + Organization = "Microsoft Inc.", + }, + ContactTech = new RegistrationContactInfo("tech@email.com", "John", "Doe", "1-245-534-2242") + { + AddressMailing = new RegistrationAddressInfo("3400 State St", "Chicago", "United States", "67098", "IL"), + Fax = "1-245-534-2242", + JobTitle = "Tech", + NameMiddle = "", + Organization = "Microsoft Inc.", + }, + IsDomainPrivacyEnabled = false, + IsAutoRenew = true, + Consent = new DomainPurchaseConsent() + { + AgreementKeys = +{ +"agreementKey1" +}, + AgreedBy = "192.0.2.1", + AgreedOn = DateTimeOffset.Parse("2021-09-10T19:30:53Z"), + }, + DnsType = AppServiceDnsType.DefaultDomainRegistrarDns, + AuthCode = "exampleAuthCode", + }; + AppServiceDomainResource result = await appServiceDomain.UpdateAsync(patch); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppServiceDomainData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + // Renew an existing domain [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Renew_RenewAnExistingDomain() { - // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2021-02-01/examples/RenewDomain.json + // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2023-12-01/examples/RenewDomain.json // this example is just showing the usage of "Domains_Renew" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -40,5 +212,36 @@ public async Task Renew_RenewAnExistingDomain() Console.WriteLine($"Succeeded"); } + + // Transfer out domain + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task TransferOut_TransferOutDomain() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2023-12-01/examples/TransferOutDomain.json + // this example is just showing the usage of "Domains_TransferOut" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceDomainResource created on azure + // for more information of creating AppServiceDomainResource, please refer to the document of AppServiceDomainResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string domainName = "example.com"; + ResourceIdentifier appServiceDomainResourceId = AppServiceDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, domainName); + AppServiceDomainResource appServiceDomain = client.GetAppServiceDomainResource(appServiceDomainResourceId); + + // invoke the operation + AppServiceDomainResource result = await appServiceDomain.TransferOutAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppServiceDomainData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceEnvironmentCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceEnvironmentCollection.cs new file mode 100644 index 0000000000000..c631dbd9c6bdf --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceEnvironmentCollection.cs @@ -0,0 +1,201 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.AppService.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_AppServiceEnvironmentCollection + { + // Get all App Service Environments in a resource group. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_GetAllAppServiceEnvironmentsInAResourceGroup() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_ListByResourceGroup.json + // this example is just showing the usage of "AppServiceEnvironments_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this AppServiceEnvironmentResource + AppServiceEnvironmentCollection collection = resourceGroupResource.GetAppServiceEnvironments(); + + // invoke the operation and iterate over the result + await foreach (AppServiceEnvironmentResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppServiceEnvironmentData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get the properties of an App Service Environment. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetThePropertiesOfAnAppServiceEnvironment() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_Get.json + // this example is just showing the usage of "AppServiceEnvironments_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this AppServiceEnvironmentResource + AppServiceEnvironmentCollection collection = resourceGroupResource.GetAppServiceEnvironments(); + + // invoke the operation + string name = "test-ase"; + AppServiceEnvironmentResource result = await collection.GetAsync(name); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppServiceEnvironmentData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get the properties of an App Service Environment. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetThePropertiesOfAnAppServiceEnvironment() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_Get.json + // this example is just showing the usage of "AppServiceEnvironments_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this AppServiceEnvironmentResource + AppServiceEnvironmentCollection collection = resourceGroupResource.GetAppServiceEnvironments(); + + // invoke the operation + string name = "test-ase"; + bool result = await collection.ExistsAsync(name); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Get the properties of an App Service Environment. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetThePropertiesOfAnAppServiceEnvironment() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_Get.json + // this example is just showing the usage of "AppServiceEnvironments_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this AppServiceEnvironmentResource + AppServiceEnvironmentCollection collection = resourceGroupResource.GetAppServiceEnvironments(); + + // invoke the operation + string name = "test-ase"; + NullableResponse response = await collection.GetIfExistsAsync(name); + AppServiceEnvironmentResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppServiceEnvironmentData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // Create or update an App Service Environment. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CreateOrUpdateAnAppServiceEnvironment() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_CreateOrUpdate.json + // this example is just showing the usage of "AppServiceEnvironments_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this AppServiceEnvironmentResource + AppServiceEnvironmentCollection collection = resourceGroupResource.GetAppServiceEnvironments(); + + // invoke the operation + string name = "test-ase"; + AppServiceEnvironmentData data = new AppServiceEnvironmentData(new AzureLocation("South Central US")) + { + VirtualNetwork = new AppServiceVirtualNetworkProfile(new ResourceIdentifier("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/delegated")), + Kind = "Asev3", + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, name, data); + AppServiceEnvironmentResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppServiceEnvironmentData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceEnvironmentResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceEnvironmentResource.cs index 1337819550f72..884e49036dd01 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceEnvironmentResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceEnvironmentResource.cs @@ -10,17 +10,259 @@ using Azure.Core; using Azure.Identity; using Azure.ResourceManager.AppService.Models; +using Azure.ResourceManager.Resources; namespace Azure.ResourceManager.AppService.Samples { public partial class Sample_AppServiceEnvironmentResource { - // Get Inbound Network Dependencies Endpoints + // Get all App Service Environments for a subscription. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetInboundNetworkDependenciesEndpoints_GetInboundNetworkDependenciesEndpoints() + public async Task GetAppServiceEnvironments_GetAllAppServiceEnvironmentsForASubscription() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetInboundNetworkDependenciesEndpoints.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_List.json + // this example is just showing the usage of "AppServiceEnvironments_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + await foreach (AppServiceEnvironmentResource item in subscriptionResource.GetAppServiceEnvironmentsAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppServiceEnvironmentData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get the properties of an App Service Environment. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetThePropertiesOfAnAppServiceEnvironment() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_Get.json + // this example is just showing the usage of "AppServiceEnvironments_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceEnvironmentResource created on azure + // for more information of creating AppServiceEnvironmentResource, please refer to the document of AppServiceEnvironmentResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + ResourceIdentifier appServiceEnvironmentResourceId = AppServiceEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + AppServiceEnvironmentResource appServiceEnvironment = client.GetAppServiceEnvironmentResource(appServiceEnvironmentResourceId); + + // invoke the operation + AppServiceEnvironmentResource result = await appServiceEnvironment.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppServiceEnvironmentData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Delete an App Service Environment. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_DeleteAnAppServiceEnvironment() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_Delete.json + // this example is just showing the usage of "AppServiceEnvironments_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceEnvironmentResource created on azure + // for more information of creating AppServiceEnvironmentResource, please refer to the document of AppServiceEnvironmentResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + ResourceIdentifier appServiceEnvironmentResourceId = AppServiceEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + AppServiceEnvironmentResource appServiceEnvironment = client.GetAppServiceEnvironmentResource(appServiceEnvironmentResourceId); + + // invoke the operation + await appServiceEnvironment.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + + // Create or update an App Service Environment. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_CreateOrUpdateAnAppServiceEnvironment() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_Update.json + // this example is just showing the usage of "AppServiceEnvironments_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceEnvironmentResource created on azure + // for more information of creating AppServiceEnvironmentResource, please refer to the document of AppServiceEnvironmentResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + ResourceIdentifier appServiceEnvironmentResourceId = AppServiceEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + AppServiceEnvironmentResource appServiceEnvironment = client.GetAppServiceEnvironmentResource(appServiceEnvironmentResourceId); + + // invoke the operation + AppServiceEnvironmentPatch patch = new AppServiceEnvironmentPatch() + { + VirtualNetwork = new AppServiceVirtualNetworkProfile(new ResourceIdentifier("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-subnet/subnets/delegated")), + FrontEndScaleFactor = 20, + }; + AppServiceEnvironmentResource result = await appServiceEnvironment.UpdateAsync(patch); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppServiceEnvironmentData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get the used, available, and total worker capacity an App Service Environment. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetCapacities_GetTheUsedAvailableAndTotalWorkerCapacityAnAppServiceEnvironment() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_ListCapacities.json + // this example is just showing the usage of "AppServiceEnvironments_ListCapacities" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceEnvironmentResource created on azure + // for more information of creating AppServiceEnvironmentResource, please refer to the document of AppServiceEnvironmentResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + ResourceIdentifier appServiceEnvironmentResourceId = AppServiceEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + AppServiceEnvironmentResource appServiceEnvironment = client.GetAppServiceEnvironmentResource(appServiceEnvironmentResourceId); + + // invoke the operation and iterate over the result + await foreach (StampCapacity item in appServiceEnvironment.GetCapacitiesAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get IP addresses assigned to an App Service Environment. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetVipInfo_GetIPAddressesAssignedToAnAppServiceEnvironment() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_GetVipInfo.json + // this example is just showing the usage of "AppServiceEnvironments_GetVipInfo" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceEnvironmentResource created on azure + // for more information of creating AppServiceEnvironmentResource, please refer to the document of AppServiceEnvironmentResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + ResourceIdentifier appServiceEnvironmentResourceId = AppServiceEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + AppServiceEnvironmentResource appServiceEnvironment = client.GetAppServiceEnvironmentResource(appServiceEnvironmentResourceId); + + // invoke the operation + AppServiceEnvironmentAddressResult result = await appServiceEnvironment.GetVipInfoAsync(); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Get diagnostic information for an App Service Environment. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetDiagnostics_GetDiagnosticInformationForAnAppServiceEnvironment() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_ListDiagnostics.json + // this example is just showing the usage of "AppServiceEnvironments_ListDiagnostics" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceEnvironmentResource created on azure + // for more information of creating AppServiceEnvironmentResource, please refer to the document of AppServiceEnvironmentResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + ResourceIdentifier appServiceEnvironmentResourceId = AppServiceEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + AppServiceEnvironmentResource appServiceEnvironment = client.GetAppServiceEnvironmentResource(appServiceEnvironmentResourceId); + + // invoke the operation and iterate over the result + await foreach (HostingEnvironmentDiagnostics item in appServiceEnvironment.GetDiagnosticsAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get a diagnostics item for an App Service Environment. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetDiagnosticsItem_GetADiagnosticsItemForAnAppServiceEnvironment() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_GetDiagnosticsItem.json + // this example is just showing the usage of "AppServiceEnvironments_GetDiagnosticsItem" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceEnvironmentResource created on azure + // for more information of creating AppServiceEnvironmentResource, please refer to the document of AppServiceEnvironmentResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + ResourceIdentifier appServiceEnvironmentResourceId = AppServiceEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + AppServiceEnvironmentResource appServiceEnvironment = client.GetAppServiceEnvironmentResource(appServiceEnvironmentResourceId); + + // invoke the operation + string diagnosticsName = "test-diagnostic"; + HostingEnvironmentDiagnostics result = await appServiceEnvironment.GetDiagnosticsItemAsync(diagnosticsName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Get the network endpoints of all inbound dependencies of an App Service Environment. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetInboundNetworkDependenciesEndpoints_GetTheNetworkEndpointsOfAllInboundDependenciesOfAnAppServiceEnvironment() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetInboundNetworkDependenciesEndpoints.json // this example is just showing the usage of "AppServiceEnvironments_GetInboundNetworkDependenciesEndpoints" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -45,12 +287,96 @@ public async Task GetInboundNetworkDependenciesEndpoints_GetInboundNetworkDepend Console.WriteLine($"Succeeded"); } - // Get Outbound Network Dependencies Endpoints + // Send a test notification that an upgrade is available for this App Service Environment + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task TestUpgradeAvailableNotification_SendATestNotificationThatAnUpgradeIsAvailableForThisAppServiceEnvironment() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_TestUpgradeAvailableNotification.json + // this example is just showing the usage of "AppServiceEnvironments_TestUpgradeAvailableNotification" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceEnvironmentResource created on azure + // for more information of creating AppServiceEnvironmentResource, please refer to the document of AppServiceEnvironmentResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "SampleHostingEnvironment"; + ResourceIdentifier appServiceEnvironmentResourceId = AppServiceEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + AppServiceEnvironmentResource appServiceEnvironment = client.GetAppServiceEnvironmentResource(appServiceEnvironmentResourceId); + + // invoke the operation + await appServiceEnvironment.TestUpgradeAvailableNotificationAsync(); + + Console.WriteLine($"Succeeded"); + } + + // Initiate an upgrade on an App Service Environment + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Upgrade_InitiateAnUpgradeOnAnAppServiceEnvironment() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_Upgrade.json + // this example is just showing the usage of "AppServiceEnvironments_Upgrade" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceEnvironmentResource created on azure + // for more information of creating AppServiceEnvironmentResource, please refer to the document of AppServiceEnvironmentResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "SampleHostingEnvironment"; + ResourceIdentifier appServiceEnvironmentResourceId = AppServiceEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + AppServiceEnvironmentResource appServiceEnvironment = client.GetAppServiceEnvironmentResource(appServiceEnvironmentResourceId); + + // invoke the operation + await appServiceEnvironment.UpgradeAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + + // List all currently running operations on the App Service Environment. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetOperations_ListAllCurrentlyRunningOperationsOnTheAppServiceEnvironment() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_ListOperations.json + // this example is just showing the usage of "AppServiceEnvironments_ListOperations" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceEnvironmentResource created on azure + // for more information of creating AppServiceEnvironmentResource, please refer to the document of AppServiceEnvironmentResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + ResourceIdentifier appServiceEnvironmentResourceId = AppServiceEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + AppServiceEnvironmentResource appServiceEnvironment = client.GetAppServiceEnvironmentResource(appServiceEnvironmentResourceId); + + // invoke the operation and iterate over the result + await foreach (AppServiceOperation item in appServiceEnvironment.GetOperationsAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get the network endpoints of all outbound dependencies of an App Service Environment. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetOutboundNetworkDependenciesEndpoints_GetOutboundNetworkDependenciesEndpoints() + public async Task GetOutboundNetworkDependenciesEndpoints_GetTheNetworkEndpointsOfAllOutboundDependenciesOfAnAppServiceEnvironment() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetOutboundNetworkDependenciesEndpoints.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetOutboundNetworkDependenciesEndpoints.json // this example is just showing the usage of "AppServiceEnvironments_GetOutboundNetworkDependenciesEndpoints" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -74,5 +400,157 @@ public async Task GetOutboundNetworkDependenciesEndpoints_GetOutboundNetworkDepe Console.WriteLine($"Succeeded"); } + + // Gets the private link resources. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetPrivateLinkResources_GetsThePrivateLinkResources() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_GetPrivateLinkResources.json + // this example is just showing the usage of "AppServiceEnvironments_GetPrivateLinkResources" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceEnvironmentResource created on azure + // for more information of creating AppServiceEnvironmentResource, please refer to the document of AppServiceEnvironmentResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + ResourceIdentifier appServiceEnvironmentResourceId = AppServiceEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + AppServiceEnvironmentResource appServiceEnvironment = client.GetAppServiceEnvironmentResource(appServiceEnvironmentResourceId); + + // invoke the operation and iterate over the result + await foreach (AppServicePrivateLinkResourceData item in appServiceEnvironment.GetPrivateLinkResourcesAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Reboot all machines in an App Service Environment. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Reboot_RebootAllMachinesInAnAppServiceEnvironment() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_Reboot.json + // this example is just showing the usage of "AppServiceEnvironments_Reboot" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceEnvironmentResource created on azure + // for more information of creating AppServiceEnvironmentResource, please refer to the document of AppServiceEnvironmentResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + ResourceIdentifier appServiceEnvironmentResourceId = AppServiceEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + AppServiceEnvironmentResource appServiceEnvironment = client.GetAppServiceEnvironmentResource(appServiceEnvironmentResourceId); + + // invoke the operation + await appServiceEnvironment.RebootAsync(); + + Console.WriteLine($"Succeeded"); + } + + // Get all App Service plans in an App Service Environment. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAppServicePlans_GetAllAppServicePlansInAnAppServiceEnvironment() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_ListAppServicePlans.json + // this example is just showing the usage of "AppServiceEnvironments_ListAppServicePlans" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceEnvironmentResource created on azure + // for more information of creating AppServiceEnvironmentResource, please refer to the document of AppServiceEnvironmentResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + ResourceIdentifier appServiceEnvironmentResourceId = AppServiceEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + AppServiceEnvironmentResource appServiceEnvironment = client.GetAppServiceEnvironmentResource(appServiceEnvironmentResourceId); + + // invoke the operation and iterate over the result + await foreach (AppServicePlanResource item in appServiceEnvironment.GetAppServicePlansAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppServicePlanData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get all apps in an App Service Environment. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAllWebAppData_GetAllAppsInAnAppServiceEnvironment() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_ListWebApps.json + // this example is just showing the usage of "AppServiceEnvironments_ListWebApps" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceEnvironmentResource created on azure + // for more information of creating AppServiceEnvironmentResource, please refer to the document of AppServiceEnvironmentResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + ResourceIdentifier appServiceEnvironmentResourceId = AppServiceEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + AppServiceEnvironmentResource appServiceEnvironment = client.GetAppServiceEnvironmentResource(appServiceEnvironmentResourceId); + + // invoke the operation and iterate over the result + await foreach (WebSiteData item in appServiceEnvironment.GetAllWebAppDataAsync()) + { + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {item.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get global usage metrics of an App Service Environment. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetUsages_GetGlobalUsageMetricsOfAnAppServiceEnvironment() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_ListUsages.json + // this example is just showing the usage of "AppServiceEnvironments_ListUsages" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceEnvironmentResource created on azure + // for more information of creating AppServiceEnvironmentResource, please refer to the document of AppServiceEnvironmentResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + ResourceIdentifier appServiceEnvironmentResourceId = AppServiceEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + AppServiceEnvironmentResource appServiceEnvironment = client.GetAppServiceEnvironmentResource(appServiceEnvironmentResourceId); + + // invoke the operation and iterate over the result + await foreach (CsmUsageQuota item in appServiceEnvironment.GetUsagesAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine($"Succeeded"); + } } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServicePlanCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServicePlanCollection.cs index 0812f60ab4f53..06f5a3eed8115 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServicePlanCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServicePlanCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_AppServicePlanCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListAppServicePlansByResourceGroup() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/ListAppServicePlansByResourceGroup.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ListAppServicePlansByResourceGroup.json // this example is just showing the usage of "AppServicePlans_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_ListAppServicePlansByResourceGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAppServicePlan() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetAppServicePlan.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetAppServicePlan.json // this example is just showing the usage of "AppServicePlans_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -91,7 +91,7 @@ public async Task Get_GetAppServicePlan() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAppServicePlan() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetAppServicePlan.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetAppServicePlan.json // this example is just showing the usage of "AppServicePlans_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -121,7 +121,7 @@ public async Task Exists_GetAppServicePlan() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAppServicePlan() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetAppServicePlan.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetAppServicePlan.json // this example is just showing the usage of "AppServicePlans_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -163,7 +163,7 @@ public async Task GetIfExists_GetAppServicePlan() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateAppServicePlan() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/CreateOrUpdateAppServicePlan.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/CreateOrUpdateAppServicePlan.json // this example is just showing the usage of "AppServicePlans_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServicePlanResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServicePlanResource.cs index dfeee5c4c25e7..653713dbc8753 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServicePlanResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServicePlanResource.cs @@ -21,7 +21,7 @@ public partial class Sample_AppServicePlanResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAppServicePlans_ListAppServicePlans() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/ListAppServicePlans.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ListAppServicePlans.json // this example is just showing the usage of "AppServicePlans_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -53,7 +53,7 @@ public async Task GetAppServicePlans_ListAppServicePlans() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAppServicePlan() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetAppServicePlan.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetAppServicePlan.json // this example is just showing the usage of "AppServicePlans_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -84,7 +84,7 @@ public async Task Get_GetAppServicePlan() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteAppServicePlan() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/DeleteAppServicePlan.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/DeleteAppServicePlan.json // this example is just showing the usage of "AppServicePlans_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -111,7 +111,7 @@ public async Task Delete_DeleteAppServicePlan() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_PatchServicePlan() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/PatchAppServicePlan.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/PatchAppServicePlan.json // this example is just showing the usage of "AppServicePlans_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AseV3NetworkingConfigurationResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AseV3NetworkingConfigurationResource.cs new file mode 100644 index 0000000000000..08757dd3e2025 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AseV3NetworkingConfigurationResource.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_AseV3NetworkingConfigurationResource + { + // Get networking configuration of an App Service Environment. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetNetworkingConfigurationOfAnAppServiceEnvironment() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_GetAseV3NetworkingConfiguration.json + // this example is just showing the usage of "AppServiceEnvironments_GetAseV3NetworkingConfiguration" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AseV3NetworkingConfigurationResource created on azure + // for more information of creating AseV3NetworkingConfigurationResource, please refer to the document of AseV3NetworkingConfigurationResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + ResourceIdentifier aseV3NetworkingConfigurationResourceId = AseV3NetworkingConfigurationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + AseV3NetworkingConfigurationResource aseV3NetworkingConfiguration = client.GetAseV3NetworkingConfigurationResource(aseV3NetworkingConfigurationResourceId); + + // invoke the operation + AseV3NetworkingConfigurationResource result = await aseV3NetworkingConfiguration.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AseV3NetworkingConfigurationData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Update networking configuration of an App Service Environment. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_UpdateNetworkingConfigurationOfAnAppServiceEnvironment() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_UpdateAseNetworkingConfiguration.json + // this example is just showing the usage of "AppServiceEnvironments_UpdateAseNetworkingConfiguration" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AseV3NetworkingConfigurationResource created on azure + // for more information of creating AseV3NetworkingConfigurationResource, please refer to the document of AseV3NetworkingConfigurationResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + ResourceIdentifier aseV3NetworkingConfigurationResourceId = AseV3NetworkingConfigurationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + AseV3NetworkingConfigurationResource aseV3NetworkingConfiguration = client.GetAseV3NetworkingConfigurationResource(aseV3NetworkingConfigurationResourceId); + + // invoke the operation + AseV3NetworkingConfigurationData data = new AseV3NetworkingConfigurationData() + { + IsFtpEnabled = true, + IsRemoteDebugEnabled = true, + }; + ArmOperation lro = await aseV3NetworkingConfiguration.CreateOrUpdateAsync(WaitUntil.Completed, data); + AseV3NetworkingConfigurationResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AseV3NetworkingConfigurationData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_CertificateOrderDetectorCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_CertificateOrderDetectorCollection.cs index d7f26c3dd08bd..266a3bba1bd6b 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_CertificateOrderDetectorCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_CertificateOrderDetectorCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_CertificateOrderDetectorCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListAppServiceCertificateDetectorResponse() { - // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2021-02-01/examples/Diagnostics_ListAppServiceCertificateOrderDetectorResponse.json + // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2023-12-01/examples/Diagnostics_ListAppServiceCertificateOrderDetectorResponse.json // this example is just showing the usage of "CertificateOrdersDiagnostics_ListAppServiceCertificateOrderDetectorResponse" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +56,7 @@ public async Task GetAll_ListAppServiceCertificateDetectorResponse() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAppServiceCertificateOrderDetectorResponse() { - // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2021-02-01/examples/Diagnostics_GetAppServiceCertificateOrderDetectorResponse.json + // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2023-12-01/examples/Diagnostics_GetAppServiceCertificateOrderDetectorResponse.json // this example is just showing the usage of "CertificateOrdersDiagnostics_GetAppServiceCertificateOrderDetectorResponse" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -91,7 +91,7 @@ public async Task Get_GetAppServiceCertificateOrderDetectorResponse() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAppServiceCertificateOrderDetectorResponse() { - // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2021-02-01/examples/Diagnostics_GetAppServiceCertificateOrderDetectorResponse.json + // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2023-12-01/examples/Diagnostics_GetAppServiceCertificateOrderDetectorResponse.json // this example is just showing the usage of "CertificateOrdersDiagnostics_GetAppServiceCertificateOrderDetectorResponse" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -122,7 +122,7 @@ public async Task Exists_GetAppServiceCertificateOrderDetectorResponse() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAppServiceCertificateOrderDetectorResponse() { - // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2021-02-01/examples/Diagnostics_GetAppServiceCertificateOrderDetectorResponse.json + // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2023-12-01/examples/Diagnostics_GetAppServiceCertificateOrderDetectorResponse.json // this example is just showing the usage of "CertificateOrdersDiagnostics_GetAppServiceCertificateOrderDetectorResponse" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_CertificateOrderDetectorResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_CertificateOrderDetectorResource.cs index e2d77a52fe9eb..dbb1a1a101ecc 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_CertificateOrderDetectorResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_CertificateOrderDetectorResource.cs @@ -19,7 +19,7 @@ public partial class Sample_CertificateOrderDetectorResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAppServiceCertificateOrderDetectorResponse() { - // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2021-02-01/examples/Diagnostics_GetAppServiceCertificateOrderDetectorResponse.json + // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2023-12-01/examples/Diagnostics_GetAppServiceCertificateOrderDetectorResponse.json // this example is just showing the usage of "CertificateOrdersDiagnostics_GetAppServiceCertificateOrderDetectorResponse" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_CustomDnsSuffixConfigurationResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_CustomDnsSuffixConfigurationResource.cs new file mode 100644 index 0000000000000..3dec6239065bc --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_CustomDnsSuffixConfigurationResource.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_CustomDnsSuffixConfigurationResource + { + // Get ASE custom DNS suffix configuration + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetASECustomDNSSuffixConfiguration() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetAseCustomDnsSuffixConfiguration.json + // this example is just showing the usage of "AppServiceEnvironments_GetAseCustomDnsSuffixConfiguration" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this CustomDnsSuffixConfigurationResource created on azure + // for more information of creating CustomDnsSuffixConfigurationResource, please refer to the document of CustomDnsSuffixConfigurationResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + ResourceIdentifier customDnsSuffixConfigurationResourceId = CustomDnsSuffixConfigurationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + CustomDnsSuffixConfigurationResource customDnsSuffixConfiguration = client.GetCustomDnsSuffixConfigurationResource(customDnsSuffixConfigurationResourceId); + + // invoke the operation + CustomDnsSuffixConfigurationResource result = await customDnsSuffixConfiguration.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + CustomDnsSuffixConfigurationData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Update ASE custom DNS suffix configuration + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_UpdateASECustomDNSSuffixConfiguration() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/UpdateAseCustomDnsSuffixConfiguration.json + // this example is just showing the usage of "AppServiceEnvironments_UpdateAseCustomDnsSuffixConfiguration" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this CustomDnsSuffixConfigurationResource created on azure + // for more information of creating CustomDnsSuffixConfigurationResource, please refer to the document of CustomDnsSuffixConfigurationResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + ResourceIdentifier customDnsSuffixConfigurationResourceId = CustomDnsSuffixConfigurationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + CustomDnsSuffixConfigurationResource customDnsSuffixConfiguration = client.GetCustomDnsSuffixConfigurationResource(customDnsSuffixConfigurationResourceId); + + // invoke the operation + CustomDnsSuffixConfigurationData data = new CustomDnsSuffixConfigurationData() + { + DnsSuffix = "contoso.com", + CertificateUri = new Uri("https://test-kv.vault.azure.net/secrets/contosocert"), + KeyVaultReferenceIdentity = "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/test-rg/providers/microsoft.managedidentity/userassignedidentities/test-user-mi", + }; + ArmOperation lro = await customDnsSuffixConfiguration.CreateOrUpdateAsync(WaitUntil.Completed, data); + CustomDnsSuffixConfigurationResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + CustomDnsSuffixConfigurationData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Delete ASE custom DNS suffix configuration + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_DeleteASECustomDNSSuffixConfiguration() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/DeleteAseCustomDnsSuffixConfiguration.json + // this example is just showing the usage of "AppServiceEnvironments_DeleteAseCustomDnsSuffixConfiguration" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this CustomDnsSuffixConfigurationResource created on azure + // for more information of creating CustomDnsSuffixConfigurationResource, please refer to the document of CustomDnsSuffixConfigurationResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + ResourceIdentifier customDnsSuffixConfigurationResourceId = CustomDnsSuffixConfigurationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + CustomDnsSuffixConfigurationResource customDnsSuffixConfiguration = client.GetCustomDnsSuffixConfigurationResource(customDnsSuffixConfigurationResourceId); + + // invoke the operation + ArmOperation lro = await customDnsSuffixConfiguration.DeleteAsync(WaitUntil.Completed); + BinaryData result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_DeletedSiteCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_DeletedSiteCollection.cs index 506a73ce23861..7d8e3a3e3e1a5 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_DeletedSiteCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_DeletedSiteCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_DeletedSiteCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetDeletedWebApp() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetDeletedWebApp.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetDeletedWebApp.json // this example is just showing the usage of "Global_GetDeletedWebApp" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -53,7 +53,7 @@ public async Task Get_GetDeletedWebApp() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetDeletedWebApp() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetDeletedWebApp.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetDeletedWebApp.json // this example is just showing the usage of "Global_GetDeletedWebApp" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -82,7 +82,7 @@ public async Task Exists_GetDeletedWebApp() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetDeletedWebApp() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetDeletedWebApp.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetDeletedWebApp.json // this example is just showing the usage of "Global_GetDeletedWebApp" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_DeletedSiteResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_DeletedSiteResource.cs index 5eabeaedeaa88..8b5719debc9b8 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_DeletedSiteResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_DeletedSiteResource.cs @@ -21,7 +21,7 @@ public partial class Sample_DeletedSiteResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetDeletedSitesByLocation_ListDeletedWebAppByLocation() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/ListDeletedWebAppsByLocation.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ListDeletedWebAppsByLocation.json // this example is just showing the usage of "DeletedWebApps_ListByLocation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -54,7 +54,7 @@ public async Task GetDeletedSitesByLocation_ListDeletedWebAppByLocation() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetDeletedWebAppByLocationDeletedWebApp_GetDeletedWebAppByLocation() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetDeletedWebAppByLocation.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetDeletedWebAppByLocation.json // this example is just showing the usage of "DeletedWebApps_GetDeletedWebAppByLocation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -85,7 +85,7 @@ public async Task GetDeletedWebAppByLocationDeletedWebApp_GetDeletedWebAppByLoca [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetDeletedWebApp() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetDeletedWebApp.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetDeletedWebApp.json // this example is just showing the usage of "Global_GetDeletedWebApp" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -115,7 +115,7 @@ public async Task Get_GetDeletedWebApp() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetDeletedWebAppSnapshots_GetDeletedWebAppSnapshots() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetDeletedWebAppSnapshots.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetDeletedWebAppSnapshots.json // this example is just showing the usage of "Global_GetDeletedWebAppSnapshots" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_DomainOwnershipIdentifierCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_DomainOwnershipIdentifierCollection.cs new file mode 100644 index 0000000000000..8c77d30b7a4f4 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_DomainOwnershipIdentifierCollection.cs @@ -0,0 +1,203 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_DomainOwnershipIdentifierCollection + { + // List Domain Ownership Identifiers + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ListDomainOwnershipIdentifiers() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2023-12-01/examples/ListDomainOwnershipIdentifiers.json + // this example is just showing the usage of "Domains_ListOwnershipIdentifiers" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceDomainResource created on azure + // for more information of creating AppServiceDomainResource, please refer to the document of AppServiceDomainResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string domainName = "example.com"; + ResourceIdentifier appServiceDomainResourceId = AppServiceDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, domainName); + AppServiceDomainResource appServiceDomain = client.GetAppServiceDomainResource(appServiceDomainResourceId); + + // get the collection of this DomainOwnershipIdentifierResource + DomainOwnershipIdentifierCollection collection = appServiceDomain.GetDomainOwnershipIdentifiers(); + + // invoke the operation and iterate over the result + await foreach (DomainOwnershipIdentifierResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DomainOwnershipIdentifierData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get Domain Ownership Identifier + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetDomainOwnershipIdentifier() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2023-12-01/examples/GetDomainOwnershipIdentifier.json + // this example is just showing the usage of "Domains_GetOwnershipIdentifier" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceDomainResource created on azure + // for more information of creating AppServiceDomainResource, please refer to the document of AppServiceDomainResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string domainName = "example.com"; + ResourceIdentifier appServiceDomainResourceId = AppServiceDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, domainName); + AppServiceDomainResource appServiceDomain = client.GetAppServiceDomainResource(appServiceDomainResourceId); + + // get the collection of this DomainOwnershipIdentifierResource + DomainOwnershipIdentifierCollection collection = appServiceDomain.GetDomainOwnershipIdentifiers(); + + // invoke the operation + string name = "SampleOwnershipId"; + DomainOwnershipIdentifierResource result = await collection.GetAsync(name); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DomainOwnershipIdentifierData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get Domain Ownership Identifier + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetDomainOwnershipIdentifier() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2023-12-01/examples/GetDomainOwnershipIdentifier.json + // this example is just showing the usage of "Domains_GetOwnershipIdentifier" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceDomainResource created on azure + // for more information of creating AppServiceDomainResource, please refer to the document of AppServiceDomainResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string domainName = "example.com"; + ResourceIdentifier appServiceDomainResourceId = AppServiceDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, domainName); + AppServiceDomainResource appServiceDomain = client.GetAppServiceDomainResource(appServiceDomainResourceId); + + // get the collection of this DomainOwnershipIdentifierResource + DomainOwnershipIdentifierCollection collection = appServiceDomain.GetDomainOwnershipIdentifiers(); + + // invoke the operation + string name = "SampleOwnershipId"; + bool result = await collection.ExistsAsync(name); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Get Domain Ownership Identifier + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetDomainOwnershipIdentifier() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2023-12-01/examples/GetDomainOwnershipIdentifier.json + // this example is just showing the usage of "Domains_GetOwnershipIdentifier" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceDomainResource created on azure + // for more information of creating AppServiceDomainResource, please refer to the document of AppServiceDomainResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string domainName = "example.com"; + ResourceIdentifier appServiceDomainResourceId = AppServiceDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, domainName); + AppServiceDomainResource appServiceDomain = client.GetAppServiceDomainResource(appServiceDomainResourceId); + + // get the collection of this DomainOwnershipIdentifierResource + DomainOwnershipIdentifierCollection collection = appServiceDomain.GetDomainOwnershipIdentifiers(); + + // invoke the operation + string name = "SampleOwnershipId"; + NullableResponse response = await collection.GetIfExistsAsync(name); + DomainOwnershipIdentifierResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DomainOwnershipIdentifierData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // Create App Service Domain OwnershipIdentifier + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CreateAppServiceDomainOwnershipIdentifier() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2023-12-01/examples/CreateAppServiceDomainOwnershipIdentifier.json + // this example is just showing the usage of "Domains_CreateOrUpdateOwnershipIdentifier" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceDomainResource created on azure + // for more information of creating AppServiceDomainResource, please refer to the document of AppServiceDomainResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string domainName = "example.com"; + ResourceIdentifier appServiceDomainResourceId = AppServiceDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, domainName); + AppServiceDomainResource appServiceDomain = client.GetAppServiceDomainResource(appServiceDomainResourceId); + + // get the collection of this DomainOwnershipIdentifierResource + DomainOwnershipIdentifierCollection collection = appServiceDomain.GetDomainOwnershipIdentifiers(); + + // invoke the operation + string name = "SampleOwnershipId"; + DomainOwnershipIdentifierData data = new DomainOwnershipIdentifierData() + { + OwnershipId = "SampleOwnershipId", + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, name, data); + DomainOwnershipIdentifierResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DomainOwnershipIdentifierData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_DomainOwnershipIdentifierResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_DomainOwnershipIdentifierResource.cs new file mode 100644 index 0000000000000..e1b5e3793b58a --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_DomainOwnershipIdentifierResource.cs @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_DomainOwnershipIdentifierResource + { + // Get Domain Ownership Identifier + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetDomainOwnershipIdentifier() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2023-12-01/examples/GetDomainOwnershipIdentifier.json + // this example is just showing the usage of "Domains_GetOwnershipIdentifier" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DomainOwnershipIdentifierResource created on azure + // for more information of creating DomainOwnershipIdentifierResource, please refer to the document of DomainOwnershipIdentifierResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string domainName = "example.com"; + string name = "SampleOwnershipId"; + ResourceIdentifier domainOwnershipIdentifierResourceId = DomainOwnershipIdentifierResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, domainName, name); + DomainOwnershipIdentifierResource domainOwnershipIdentifier = client.GetDomainOwnershipIdentifierResource(domainOwnershipIdentifierResourceId); + + // invoke the operation + DomainOwnershipIdentifierResource result = await domainOwnershipIdentifier.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DomainOwnershipIdentifierData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Delete App Service Domain Ownership Identifier + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_DeleteAppServiceDomainOwnershipIdentifier() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2023-12-01/examples/DeleteAppServiceDomainOwnershipIdentifier.json + // this example is just showing the usage of "Domains_DeleteOwnershipIdentifier" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DomainOwnershipIdentifierResource created on azure + // for more information of creating DomainOwnershipIdentifierResource, please refer to the document of DomainOwnershipIdentifierResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string domainName = "example.com"; + string name = "ownershipIdentifier"; + ResourceIdentifier domainOwnershipIdentifierResourceId = DomainOwnershipIdentifierResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, domainName, name); + DomainOwnershipIdentifierResource domainOwnershipIdentifier = client.GetDomainOwnershipIdentifierResource(domainOwnershipIdentifierResourceId); + + // invoke the operation + await domainOwnershipIdentifier.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + + // Update App Service Domain OwnershipIdentifier + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_UpdateAppServiceDomainOwnershipIdentifier() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2023-12-01/examples/UpdateAppServiceDomainOwnershipIdentifier.json + // this example is just showing the usage of "Domains_UpdateOwnershipIdentifier" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DomainOwnershipIdentifierResource created on azure + // for more information of creating DomainOwnershipIdentifierResource, please refer to the document of DomainOwnershipIdentifierResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string domainName = "example.com"; + string name = "SampleOwnershipId"; + ResourceIdentifier domainOwnershipIdentifierResourceId = DomainOwnershipIdentifierResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, domainName, name); + DomainOwnershipIdentifierResource domainOwnershipIdentifier = client.GetDomainOwnershipIdentifierResource(domainOwnershipIdentifierResourceId); + + // invoke the operation + DomainOwnershipIdentifierData data = new DomainOwnershipIdentifierData() + { + OwnershipId = "SampleOwnershipId", + }; + DomainOwnershipIdentifierResource result = await domainOwnershipIdentifier.UpdateAsync(data); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DomainOwnershipIdentifierData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_HostingEnvironmentDetectorCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_HostingEnvironmentDetectorCollection.cs index e156e212919ec..7bb311252d9e6 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_HostingEnvironmentDetectorCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_HostingEnvironmentDetectorCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_HostingEnvironmentDetectorCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_GetAppServiceEnvironmentDetectorResponses() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_ListHostingEnvironmentDetectorResponses.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_ListHostingEnvironmentDetectorResponses.json // this example is just showing the usage of "Diagnostics_ListHostingEnvironmentDetectorResponses" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +56,7 @@ public async Task GetAll_GetAppServiceEnvironmentDetectorResponses() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAppServiceEnvironmentDetectorResponses() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetHostingEnvironmentDetectorResponse.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetHostingEnvironmentDetectorResponse.json // this example is just showing the usage of "Diagnostics_GetHostingEnvironmentDetectorResponse" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -91,7 +91,7 @@ public async Task Get_GetAppServiceEnvironmentDetectorResponses() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAppServiceEnvironmentDetectorResponses() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetHostingEnvironmentDetectorResponse.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetHostingEnvironmentDetectorResponse.json // this example is just showing the usage of "Diagnostics_GetHostingEnvironmentDetectorResponse" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -122,7 +122,7 @@ public async Task Exists_GetAppServiceEnvironmentDetectorResponses() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAppServiceEnvironmentDetectorResponses() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetHostingEnvironmentDetectorResponse.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetHostingEnvironmentDetectorResponse.json // this example is just showing the usage of "Diagnostics_GetHostingEnvironmentDetectorResponse" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_HostingEnvironmentDetectorResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_HostingEnvironmentDetectorResource.cs index 8c08a61b5a1d9..d0defde492e5b 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_HostingEnvironmentDetectorResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_HostingEnvironmentDetectorResource.cs @@ -19,7 +19,7 @@ public partial class Sample_HostingEnvironmentDetectorResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAppServiceEnvironmentDetectorResponses() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetHostingEnvironmentDetectorResponse.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetHostingEnvironmentDetectorResponse.json // this example is just showing the usage of "Diagnostics_GetHostingEnvironmentDetectorResponse" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_HostingEnvironmentMultiRolePoolResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_HostingEnvironmentMultiRolePoolResource.cs new file mode 100644 index 0000000000000..7b3ef7f036969 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_HostingEnvironmentMultiRolePoolResource.cs @@ -0,0 +1,243 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_HostingEnvironmentMultiRolePoolResource + { + // Get properties of a multi-role pool. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetPropertiesOfAMultiRolePool() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_GetMultiRolePool.json + // this example is just showing the usage of "AppServiceEnvironments_GetMultiRolePool" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this HostingEnvironmentMultiRolePoolResource created on azure + // for more information of creating HostingEnvironmentMultiRolePoolResource, please refer to the document of HostingEnvironmentMultiRolePoolResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + ResourceIdentifier hostingEnvironmentMultiRolePoolResourceId = HostingEnvironmentMultiRolePoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + HostingEnvironmentMultiRolePoolResource hostingEnvironmentMultiRolePool = client.GetHostingEnvironmentMultiRolePoolResource(hostingEnvironmentMultiRolePoolResourceId); + + // invoke the operation + HostingEnvironmentMultiRolePoolResource result = await hostingEnvironmentMultiRolePool.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppServiceWorkerPoolData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Create or update a multi-role pool. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CreateOrUpdateAMultiRolePool() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_CreateOrUpdateMultiRolePool.json + // this example is just showing the usage of "AppServiceEnvironments_CreateOrUpdateMultiRolePool" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this HostingEnvironmentMultiRolePoolResource created on azure + // for more information of creating HostingEnvironmentMultiRolePoolResource, please refer to the document of HostingEnvironmentMultiRolePoolResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + ResourceIdentifier hostingEnvironmentMultiRolePoolResourceId = HostingEnvironmentMultiRolePoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + HostingEnvironmentMultiRolePoolResource hostingEnvironmentMultiRolePool = client.GetHostingEnvironmentMultiRolePoolResource(hostingEnvironmentMultiRolePoolResourceId); + + // invoke the operation + AppServiceWorkerPoolData data = new AppServiceWorkerPoolData() + { + WorkerSize = "Medium", + WorkerCount = 3, + }; + ArmOperation lro = await hostingEnvironmentMultiRolePool.CreateOrUpdateAsync(WaitUntil.Completed, data); + HostingEnvironmentMultiRolePoolResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppServiceWorkerPoolData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Create or update a multi-role pool. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_CreateOrUpdateAMultiRolePool() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_CreateOrUpdateMultiRolePool.json + // this example is just showing the usage of "AppServiceEnvironments_UpdateMultiRolePool" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this HostingEnvironmentMultiRolePoolResource created on azure + // for more information of creating HostingEnvironmentMultiRolePoolResource, please refer to the document of HostingEnvironmentMultiRolePoolResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + ResourceIdentifier hostingEnvironmentMultiRolePoolResourceId = HostingEnvironmentMultiRolePoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + HostingEnvironmentMultiRolePoolResource hostingEnvironmentMultiRolePool = client.GetHostingEnvironmentMultiRolePoolResource(hostingEnvironmentMultiRolePoolResourceId); + + // invoke the operation + AppServiceWorkerPoolData data = new AppServiceWorkerPoolData() + { + WorkerSize = "Medium", + WorkerCount = 3, + }; + HostingEnvironmentMultiRolePoolResource result = await hostingEnvironmentMultiRolePool.UpdateAsync(data); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppServiceWorkerPoolData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get metric definitions for a specific instance of a multi-role pool of an App Service Environment. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetMultiRolePoolInstanceMetricDefinitions_GetMetricDefinitionsForASpecificInstanceOfAMultiRolePoolOfAnAppServiceEnvironment() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_ListMultiRolePoolInstanceMetricDefinitions.json + // this example is just showing the usage of "AppServiceEnvironments_ListMultiRolePoolInstanceMetricDefinitions" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this HostingEnvironmentMultiRolePoolResource created on azure + // for more information of creating HostingEnvironmentMultiRolePoolResource, please refer to the document of HostingEnvironmentMultiRolePoolResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + ResourceIdentifier hostingEnvironmentMultiRolePoolResourceId = HostingEnvironmentMultiRolePoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + HostingEnvironmentMultiRolePoolResource hostingEnvironmentMultiRolePool = client.GetHostingEnvironmentMultiRolePoolResource(hostingEnvironmentMultiRolePoolResourceId); + + // invoke the operation and iterate over the result + string instance = "10.7.1.8"; + await foreach (ResourceMetricDefinition item in hostingEnvironmentMultiRolePool.GetMultiRolePoolInstanceMetricDefinitionsAsync(instance)) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get metric definitions for a multi-role pool of an App Service Environment. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetMultiRoleMetricDefinitions_GetMetricDefinitionsForAMultiRolePoolOfAnAppServiceEnvironment() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_ListMultiRoleMetricDefinitions.json + // this example is just showing the usage of "AppServiceEnvironments_ListMultiRoleMetricDefinitions" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this HostingEnvironmentMultiRolePoolResource created on azure + // for more information of creating HostingEnvironmentMultiRolePoolResource, please refer to the document of HostingEnvironmentMultiRolePoolResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + ResourceIdentifier hostingEnvironmentMultiRolePoolResourceId = HostingEnvironmentMultiRolePoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + HostingEnvironmentMultiRolePoolResource hostingEnvironmentMultiRolePool = client.GetHostingEnvironmentMultiRolePoolResource(hostingEnvironmentMultiRolePoolResourceId); + + // invoke the operation and iterate over the result + await foreach (ResourceMetricDefinition item in hostingEnvironmentMultiRolePool.GetMultiRoleMetricDefinitionsAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get available SKUs for scaling a multi-role pool. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetMultiRolePoolSkus_GetAvailableSKUsForScalingAMultiRolePool() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_ListMultiRolePoolSkus.json + // this example is just showing the usage of "AppServiceEnvironments_ListMultiRolePoolSkus" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this HostingEnvironmentMultiRolePoolResource created on azure + // for more information of creating HostingEnvironmentMultiRolePoolResource, please refer to the document of HostingEnvironmentMultiRolePoolResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + ResourceIdentifier hostingEnvironmentMultiRolePoolResourceId = HostingEnvironmentMultiRolePoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + HostingEnvironmentMultiRolePoolResource hostingEnvironmentMultiRolePool = client.GetHostingEnvironmentMultiRolePoolResource(hostingEnvironmentMultiRolePoolResourceId); + + // invoke the operation and iterate over the result + await foreach (AppServicePoolSkuInfo item in hostingEnvironmentMultiRolePool.GetMultiRolePoolSkusAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get usage metrics for a multi-role pool of an App Service Environment. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetMultiRoleUsages_GetUsageMetricsForAMultiRolePoolOfAnAppServiceEnvironment() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_ListMultiRoleUsages.json + // this example is just showing the usage of "AppServiceEnvironments_ListMultiRoleUsages" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this HostingEnvironmentMultiRolePoolResource created on azure + // for more information of creating HostingEnvironmentMultiRolePoolResource, please refer to the document of HostingEnvironmentMultiRolePoolResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + ResourceIdentifier hostingEnvironmentMultiRolePoolResourceId = HostingEnvironmentMultiRolePoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + HostingEnvironmentMultiRolePoolResource hostingEnvironmentMultiRolePool = client.GetHostingEnvironmentMultiRolePoolResource(hostingEnvironmentMultiRolePoolResourceId); + + // invoke the operation and iterate over the result + await foreach (AppServiceUsage item in hostingEnvironmentMultiRolePool.GetMultiRoleUsagesAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_HostingEnvironmentPrivateEndpointConnectionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_HostingEnvironmentPrivateEndpointConnectionCollection.cs new file mode 100644 index 0000000000000..5c4d3fc020bd5 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_HostingEnvironmentPrivateEndpointConnectionCollection.cs @@ -0,0 +1,208 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_HostingEnvironmentPrivateEndpointConnectionCollection + { + // Gets the list of private endpoints associated with a hosting environment. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_GetsTheListOfPrivateEndpointsAssociatedWithAHostingEnvironment() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_GetPrivateEndpointConnectionList.json + // this example is just showing the usage of "AppServiceEnvironments_GetPrivateEndpointConnectionList" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceEnvironmentResource created on azure + // for more information of creating AppServiceEnvironmentResource, please refer to the document of AppServiceEnvironmentResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + ResourceIdentifier appServiceEnvironmentResourceId = AppServiceEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + AppServiceEnvironmentResource appServiceEnvironment = client.GetAppServiceEnvironmentResource(appServiceEnvironmentResourceId); + + // get the collection of this HostingEnvironmentPrivateEndpointConnectionResource + HostingEnvironmentPrivateEndpointConnectionCollection collection = appServiceEnvironment.GetHostingEnvironmentPrivateEndpointConnections(); + + // invoke the operation and iterate over the result + await foreach (HostingEnvironmentPrivateEndpointConnectionResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + RemotePrivateEndpointConnectionARMResourceData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Gets a private endpoint connection. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetsAPrivateEndpointConnection() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_GetPrivateEndpointConnection.json + // this example is just showing the usage of "AppServiceEnvironments_GetPrivateEndpointConnection" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceEnvironmentResource created on azure + // for more information of creating AppServiceEnvironmentResource, please refer to the document of AppServiceEnvironmentResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + ResourceIdentifier appServiceEnvironmentResourceId = AppServiceEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + AppServiceEnvironmentResource appServiceEnvironment = client.GetAppServiceEnvironmentResource(appServiceEnvironmentResourceId); + + // get the collection of this HostingEnvironmentPrivateEndpointConnectionResource + HostingEnvironmentPrivateEndpointConnectionCollection collection = appServiceEnvironment.GetHostingEnvironmentPrivateEndpointConnections(); + + // invoke the operation + string privateEndpointConnectionName = "fa38656c-034e-43d8-adce-fe06ce039c98"; + HostingEnvironmentPrivateEndpointConnectionResource result = await collection.GetAsync(privateEndpointConnectionName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + RemotePrivateEndpointConnectionARMResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Gets a private endpoint connection. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetsAPrivateEndpointConnection() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_GetPrivateEndpointConnection.json + // this example is just showing the usage of "AppServiceEnvironments_GetPrivateEndpointConnection" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceEnvironmentResource created on azure + // for more information of creating AppServiceEnvironmentResource, please refer to the document of AppServiceEnvironmentResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + ResourceIdentifier appServiceEnvironmentResourceId = AppServiceEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + AppServiceEnvironmentResource appServiceEnvironment = client.GetAppServiceEnvironmentResource(appServiceEnvironmentResourceId); + + // get the collection of this HostingEnvironmentPrivateEndpointConnectionResource + HostingEnvironmentPrivateEndpointConnectionCollection collection = appServiceEnvironment.GetHostingEnvironmentPrivateEndpointConnections(); + + // invoke the operation + string privateEndpointConnectionName = "fa38656c-034e-43d8-adce-fe06ce039c98"; + bool result = await collection.ExistsAsync(privateEndpointConnectionName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Gets a private endpoint connection. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetsAPrivateEndpointConnection() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_GetPrivateEndpointConnection.json + // this example is just showing the usage of "AppServiceEnvironments_GetPrivateEndpointConnection" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceEnvironmentResource created on azure + // for more information of creating AppServiceEnvironmentResource, please refer to the document of AppServiceEnvironmentResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + ResourceIdentifier appServiceEnvironmentResourceId = AppServiceEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + AppServiceEnvironmentResource appServiceEnvironment = client.GetAppServiceEnvironmentResource(appServiceEnvironmentResourceId); + + // get the collection of this HostingEnvironmentPrivateEndpointConnectionResource + HostingEnvironmentPrivateEndpointConnectionCollection collection = appServiceEnvironment.GetHostingEnvironmentPrivateEndpointConnections(); + + // invoke the operation + string privateEndpointConnectionName = "fa38656c-034e-43d8-adce-fe06ce039c98"; + NullableResponse response = await collection.GetIfExistsAsync(privateEndpointConnectionName); + HostingEnvironmentPrivateEndpointConnectionResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + RemotePrivateEndpointConnectionARMResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // Approves or rejects a private endpoint connection. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_ApprovesOrRejectsAPrivateEndpointConnection() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_ApproveOrRejectPrivateEndpointConnection.json + // this example is just showing the usage of "AppServiceEnvironments_ApproveOrRejectPrivateEndpointConnection" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceEnvironmentResource created on azure + // for more information of creating AppServiceEnvironmentResource, please refer to the document of AppServiceEnvironmentResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + ResourceIdentifier appServiceEnvironmentResourceId = AppServiceEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + AppServiceEnvironmentResource appServiceEnvironment = client.GetAppServiceEnvironmentResource(appServiceEnvironmentResourceId); + + // get the collection of this HostingEnvironmentPrivateEndpointConnectionResource + HostingEnvironmentPrivateEndpointConnectionCollection collection = appServiceEnvironment.GetHostingEnvironmentPrivateEndpointConnections(); + + // invoke the operation + string privateEndpointConnectionName = "fa38656c-034e-43d8-adce-fe06ce039c98"; + RemotePrivateEndpointConnectionARMResourceData data = new RemotePrivateEndpointConnectionARMResourceData() + { + PrivateLinkServiceConnectionState = new PrivateLinkConnectionState() + { + Status = "Approved", + Description = "Approved by johndoe@company.com", + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, privateEndpointConnectionName, data); + HostingEnvironmentPrivateEndpointConnectionResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + RemotePrivateEndpointConnectionARMResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_HostingEnvironmentPrivateEndpointConnectionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_HostingEnvironmentPrivateEndpointConnectionResource.cs new file mode 100644 index 0000000000000..89da0d5a1e019 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_HostingEnvironmentPrivateEndpointConnectionResource.cs @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_HostingEnvironmentPrivateEndpointConnectionResource + { + // Gets a private endpoint connection. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetsAPrivateEndpointConnection() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_GetPrivateEndpointConnection.json + // this example is just showing the usage of "AppServiceEnvironments_GetPrivateEndpointConnection" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this HostingEnvironmentPrivateEndpointConnectionResource created on azure + // for more information of creating HostingEnvironmentPrivateEndpointConnectionResource, please refer to the document of HostingEnvironmentPrivateEndpointConnectionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + string privateEndpointConnectionName = "fa38656c-034e-43d8-adce-fe06ce039c98"; + ResourceIdentifier hostingEnvironmentPrivateEndpointConnectionResourceId = HostingEnvironmentPrivateEndpointConnectionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, privateEndpointConnectionName); + HostingEnvironmentPrivateEndpointConnectionResource hostingEnvironmentPrivateEndpointConnection = client.GetHostingEnvironmentPrivateEndpointConnectionResource(hostingEnvironmentPrivateEndpointConnectionResourceId); + + // invoke the operation + HostingEnvironmentPrivateEndpointConnectionResource result = await hostingEnvironmentPrivateEndpointConnection.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + RemotePrivateEndpointConnectionARMResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Approves or rejects a private endpoint connection. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_ApprovesOrRejectsAPrivateEndpointConnection() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_ApproveOrRejectPrivateEndpointConnection.json + // this example is just showing the usage of "AppServiceEnvironments_ApproveOrRejectPrivateEndpointConnection" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this HostingEnvironmentPrivateEndpointConnectionResource created on azure + // for more information of creating HostingEnvironmentPrivateEndpointConnectionResource, please refer to the document of HostingEnvironmentPrivateEndpointConnectionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + string privateEndpointConnectionName = "fa38656c-034e-43d8-adce-fe06ce039c98"; + ResourceIdentifier hostingEnvironmentPrivateEndpointConnectionResourceId = HostingEnvironmentPrivateEndpointConnectionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, privateEndpointConnectionName); + HostingEnvironmentPrivateEndpointConnectionResource hostingEnvironmentPrivateEndpointConnection = client.GetHostingEnvironmentPrivateEndpointConnectionResource(hostingEnvironmentPrivateEndpointConnectionResourceId); + + // invoke the operation + RemotePrivateEndpointConnectionARMResourceData data = new RemotePrivateEndpointConnectionARMResourceData() + { + PrivateLinkServiceConnectionState = new PrivateLinkConnectionState() + { + Status = "Approved", + Description = "Approved by johndoe@company.com", + }, + }; + ArmOperation lro = await hostingEnvironmentPrivateEndpointConnection.UpdateAsync(WaitUntil.Completed, data); + HostingEnvironmentPrivateEndpointConnectionResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + RemotePrivateEndpointConnectionARMResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Deletes a private endpoint connection. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_DeletesAPrivateEndpointConnection() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_DeletePrivateEndpointConnection.json + // this example is just showing the usage of "AppServiceEnvironments_DeletePrivateEndpointConnection" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this HostingEnvironmentPrivateEndpointConnectionResource created on azure + // for more information of creating HostingEnvironmentPrivateEndpointConnectionResource, please refer to the document of HostingEnvironmentPrivateEndpointConnectionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + string privateEndpointConnectionName = "fa38656c-034e-43d8-adce-fe06ce039c98"; + ResourceIdentifier hostingEnvironmentPrivateEndpointConnectionResourceId = HostingEnvironmentPrivateEndpointConnectionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, privateEndpointConnectionName); + HostingEnvironmentPrivateEndpointConnectionResource hostingEnvironmentPrivateEndpointConnection = client.GetHostingEnvironmentPrivateEndpointConnectionResource(hostingEnvironmentPrivateEndpointConnectionResourceId); + + // invoke the operation + ArmOperation lro = await hostingEnvironmentPrivateEndpointConnection.DeleteAsync(WaitUntil.Completed); + BinaryData result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_HostingEnvironmentWorkerPoolCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_HostingEnvironmentWorkerPoolCollection.cs new file mode 100644 index 0000000000000..7396b3db2faa3 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_HostingEnvironmentWorkerPoolCollection.cs @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_HostingEnvironmentWorkerPoolCollection + { + // Get all worker pools of an App Service Environment. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_GetAllWorkerPoolsOfAnAppServiceEnvironment() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_ListWorkerPools.json + // this example is just showing the usage of "AppServiceEnvironments_ListWorkerPools" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceEnvironmentResource created on azure + // for more information of creating AppServiceEnvironmentResource, please refer to the document of AppServiceEnvironmentResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + ResourceIdentifier appServiceEnvironmentResourceId = AppServiceEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + AppServiceEnvironmentResource appServiceEnvironment = client.GetAppServiceEnvironmentResource(appServiceEnvironmentResourceId); + + // get the collection of this HostingEnvironmentWorkerPoolResource + HostingEnvironmentWorkerPoolCollection collection = appServiceEnvironment.GetHostingEnvironmentWorkerPools(); + + // invoke the operation and iterate over the result + await foreach (HostingEnvironmentWorkerPoolResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppServiceWorkerPoolData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get properties of a worker pool. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetPropertiesOfAWorkerPool() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_GetWorkerPool.json + // this example is just showing the usage of "AppServiceEnvironments_GetWorkerPool" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceEnvironmentResource created on azure + // for more information of creating AppServiceEnvironmentResource, please refer to the document of AppServiceEnvironmentResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + ResourceIdentifier appServiceEnvironmentResourceId = AppServiceEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + AppServiceEnvironmentResource appServiceEnvironment = client.GetAppServiceEnvironmentResource(appServiceEnvironmentResourceId); + + // get the collection of this HostingEnvironmentWorkerPoolResource + HostingEnvironmentWorkerPoolCollection collection = appServiceEnvironment.GetHostingEnvironmentWorkerPools(); + + // invoke the operation + string workerPoolName = "workerPool1"; + HostingEnvironmentWorkerPoolResource result = await collection.GetAsync(workerPoolName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppServiceWorkerPoolData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get properties of a worker pool. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetPropertiesOfAWorkerPool() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_GetWorkerPool.json + // this example is just showing the usage of "AppServiceEnvironments_GetWorkerPool" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceEnvironmentResource created on azure + // for more information of creating AppServiceEnvironmentResource, please refer to the document of AppServiceEnvironmentResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + ResourceIdentifier appServiceEnvironmentResourceId = AppServiceEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + AppServiceEnvironmentResource appServiceEnvironment = client.GetAppServiceEnvironmentResource(appServiceEnvironmentResourceId); + + // get the collection of this HostingEnvironmentWorkerPoolResource + HostingEnvironmentWorkerPoolCollection collection = appServiceEnvironment.GetHostingEnvironmentWorkerPools(); + + // invoke the operation + string workerPoolName = "workerPool1"; + bool result = await collection.ExistsAsync(workerPoolName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Get properties of a worker pool. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetPropertiesOfAWorkerPool() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_GetWorkerPool.json + // this example is just showing the usage of "AppServiceEnvironments_GetWorkerPool" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceEnvironmentResource created on azure + // for more information of creating AppServiceEnvironmentResource, please refer to the document of AppServiceEnvironmentResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + ResourceIdentifier appServiceEnvironmentResourceId = AppServiceEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + AppServiceEnvironmentResource appServiceEnvironment = client.GetAppServiceEnvironmentResource(appServiceEnvironmentResourceId); + + // get the collection of this HostingEnvironmentWorkerPoolResource + HostingEnvironmentWorkerPoolCollection collection = appServiceEnvironment.GetHostingEnvironmentWorkerPools(); + + // invoke the operation + string workerPoolName = "workerPool1"; + NullableResponse response = await collection.GetIfExistsAsync(workerPoolName); + HostingEnvironmentWorkerPoolResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppServiceWorkerPoolData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // Get properties of a worker pool. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_GetPropertiesOfAWorkerPool() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_CreateOrUpdateWorkerPool.json + // this example is just showing the usage of "AppServiceEnvironments_CreateOrUpdateWorkerPool" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceEnvironmentResource created on azure + // for more information of creating AppServiceEnvironmentResource, please refer to the document of AppServiceEnvironmentResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + ResourceIdentifier appServiceEnvironmentResourceId = AppServiceEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + AppServiceEnvironmentResource appServiceEnvironment = client.GetAppServiceEnvironmentResource(appServiceEnvironmentResourceId); + + // get the collection of this HostingEnvironmentWorkerPoolResource + HostingEnvironmentWorkerPoolCollection collection = appServiceEnvironment.GetHostingEnvironmentWorkerPools(); + + // invoke the operation + string workerPoolName = "0"; + AppServiceWorkerPoolData data = new AppServiceWorkerPoolData() + { + WorkerSize = "Small", + WorkerCount = 3, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, workerPoolName, data); + HostingEnvironmentWorkerPoolResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppServiceWorkerPoolData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_HostingEnvironmentWorkerPoolResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_HostingEnvironmentWorkerPoolResource.cs new file mode 100644 index 0000000000000..f4b460ae2698f --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_HostingEnvironmentWorkerPoolResource.cs @@ -0,0 +1,212 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_HostingEnvironmentWorkerPoolResource + { + // Get properties of a worker pool. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetPropertiesOfAWorkerPool() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_GetWorkerPool.json + // this example is just showing the usage of "AppServiceEnvironments_GetWorkerPool" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this HostingEnvironmentWorkerPoolResource created on azure + // for more information of creating HostingEnvironmentWorkerPoolResource, please refer to the document of HostingEnvironmentWorkerPoolResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + string workerPoolName = "workerPool1"; + ResourceIdentifier hostingEnvironmentWorkerPoolResourceId = HostingEnvironmentWorkerPoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workerPoolName); + HostingEnvironmentWorkerPoolResource hostingEnvironmentWorkerPool = client.GetHostingEnvironmentWorkerPoolResource(hostingEnvironmentWorkerPoolResourceId); + + // invoke the operation + HostingEnvironmentWorkerPoolResource result = await hostingEnvironmentWorkerPool.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppServiceWorkerPoolData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get properties of a worker pool. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_GetPropertiesOfAWorkerPool() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_CreateOrUpdateWorkerPool.json + // this example is just showing the usage of "AppServiceEnvironments_UpdateWorkerPool" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this HostingEnvironmentWorkerPoolResource created on azure + // for more information of creating HostingEnvironmentWorkerPoolResource, please refer to the document of HostingEnvironmentWorkerPoolResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + string workerPoolName = "0"; + ResourceIdentifier hostingEnvironmentWorkerPoolResourceId = HostingEnvironmentWorkerPoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workerPoolName); + HostingEnvironmentWorkerPoolResource hostingEnvironmentWorkerPool = client.GetHostingEnvironmentWorkerPoolResource(hostingEnvironmentWorkerPoolResourceId); + + // invoke the operation + AppServiceWorkerPoolData data = new AppServiceWorkerPoolData() + { + WorkerSize = "Small", + WorkerCount = 3, + }; + HostingEnvironmentWorkerPoolResource result = await hostingEnvironmentWorkerPool.UpdateAsync(data); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppServiceWorkerPoolData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get metric definitions for a specific instance of a worker pool of an App Service Environment. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetWorkerPoolInstanceMetricDefinitions_GetMetricDefinitionsForASpecificInstanceOfAWorkerPoolOfAnAppServiceEnvironment() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_ListWorkerPoolInstanceMetricDefinitions.json + // this example is just showing the usage of "AppServiceEnvironments_ListWorkerPoolInstanceMetricDefinitions" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this HostingEnvironmentWorkerPoolResource created on azure + // for more information of creating HostingEnvironmentWorkerPoolResource, please refer to the document of HostingEnvironmentWorkerPoolResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + string workerPoolName = "0"; + ResourceIdentifier hostingEnvironmentWorkerPoolResourceId = HostingEnvironmentWorkerPoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workerPoolName); + HostingEnvironmentWorkerPoolResource hostingEnvironmentWorkerPool = client.GetHostingEnvironmentWorkerPoolResource(hostingEnvironmentWorkerPoolResourceId); + + // invoke the operation and iterate over the result + string instance = "10.8.0.7"; + await foreach (ResourceMetricDefinition item in hostingEnvironmentWorkerPool.GetWorkerPoolInstanceMetricDefinitionsAsync(instance)) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get metric definitions for a worker pool of an App Service Environment. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetWebWorkerMetricDefinitions_GetMetricDefinitionsForAWorkerPoolOfAnAppServiceEnvironment() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_ListWebWorkerMetricDefinitions.json + // this example is just showing the usage of "AppServiceEnvironments_ListWebWorkerMetricDefinitions" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this HostingEnvironmentWorkerPoolResource created on azure + // for more information of creating HostingEnvironmentWorkerPoolResource, please refer to the document of HostingEnvironmentWorkerPoolResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + string workerPoolName = "0"; + ResourceIdentifier hostingEnvironmentWorkerPoolResourceId = HostingEnvironmentWorkerPoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workerPoolName); + HostingEnvironmentWorkerPoolResource hostingEnvironmentWorkerPool = client.GetHostingEnvironmentWorkerPoolResource(hostingEnvironmentWorkerPoolResourceId); + + // invoke the operation and iterate over the result + await foreach (ResourceMetricDefinition item in hostingEnvironmentWorkerPool.GetWebWorkerMetricDefinitionsAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get available SKUs for scaling a worker pool. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetWorkerPoolSkus_GetAvailableSKUsForScalingAWorkerPool() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_ListWorkerPoolSkus.json + // this example is just showing the usage of "AppServiceEnvironments_ListWorkerPoolSkus" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this HostingEnvironmentWorkerPoolResource created on azure + // for more information of creating HostingEnvironmentWorkerPoolResource, please refer to the document of HostingEnvironmentWorkerPoolResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + string workerPoolName = "workerPool1"; + ResourceIdentifier hostingEnvironmentWorkerPoolResourceId = HostingEnvironmentWorkerPoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workerPoolName); + HostingEnvironmentWorkerPoolResource hostingEnvironmentWorkerPool = client.GetHostingEnvironmentWorkerPoolResource(hostingEnvironmentWorkerPoolResourceId); + + // invoke the operation and iterate over the result + await foreach (AppServicePoolSkuInfo item in hostingEnvironmentWorkerPool.GetWorkerPoolSkusAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get usage metrics for a worker pool of an App Service Environment. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetWebWorkerUsages_GetUsageMetricsForAWorkerPoolOfAnAppServiceEnvironment() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_ListWebWorkerUsages.json + // this example is just showing the usage of "AppServiceEnvironments_ListWebWorkerUsages" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this HostingEnvironmentWorkerPoolResource created on azure + // for more information of creating HostingEnvironmentWorkerPoolResource, please refer to the document of HostingEnvironmentWorkerPoolResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + string workerPoolName = "0"; + ResourceIdentifier hostingEnvironmentWorkerPoolResourceId = HostingEnvironmentWorkerPoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workerPoolName); + HostingEnvironmentWorkerPoolResource hostingEnvironmentWorkerPool = client.GetHostingEnvironmentWorkerPoolResource(hostingEnvironmentWorkerPoolResourceId); + + // invoke the operation and iterate over the result + await foreach (AppServiceUsage item in hostingEnvironmentWorkerPool.GetWebWorkerUsagesAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_KubeEnvironmentCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_KubeEnvironmentCollection.cs index 88c6659686180..f17ba3903342f 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_KubeEnvironmentCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_KubeEnvironmentCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_KubeEnvironmentCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListKubeEnvironmentsByResourceGroup() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/KubeEnvironments_ListByResourceGroup.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/KubeEnvironments_ListByResourceGroup.json // this example is just showing the usage of "KubeEnvironments_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +56,7 @@ public async Task GetAll_ListKubeEnvironmentsByResourceGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetKubeEnvironmentsByName() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/KubeEnvironments_Get.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/KubeEnvironments_Get.json // this example is just showing the usage of "KubeEnvironments_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -90,7 +90,7 @@ public async Task Get_GetKubeEnvironmentsByName() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetKubeEnvironmentsByName() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/KubeEnvironments_Get.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/KubeEnvironments_Get.json // this example is just showing the usage of "KubeEnvironments_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -120,7 +120,7 @@ public async Task Exists_GetKubeEnvironmentsByName() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetKubeEnvironmentsByName() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/KubeEnvironments_Get.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/KubeEnvironments_Get.json // this example is just showing the usage of "KubeEnvironments_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -162,7 +162,7 @@ public async Task GetIfExists_GetKubeEnvironmentsByName() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateKubeEnvironments() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/KubeEnvironments_CreateOrUpdate.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/KubeEnvironments_CreateOrUpdate.json // this example is just showing the usage of "KubeEnvironments_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_KubeEnvironmentResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_KubeEnvironmentResource.cs index 6df8e08220bff..b711c90418dce 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_KubeEnvironmentResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_KubeEnvironmentResource.cs @@ -21,7 +21,7 @@ public partial class Sample_KubeEnvironmentResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetKubeEnvironments_ListKubeEnvironmentsBySubscription() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/KubeEnvironments_ListBySubscription.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/KubeEnvironments_ListBySubscription.json // this example is just showing the usage of "KubeEnvironments_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -53,7 +53,7 @@ public async Task GetKubeEnvironments_ListKubeEnvironmentsBySubscription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetKubeEnvironmentsByName() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/KubeEnvironments_Get.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/KubeEnvironments_Get.json // this example is just showing the usage of "KubeEnvironments_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -84,7 +84,7 @@ public async Task Get_GetKubeEnvironmentsByName() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteKubeEnvironmentByName() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/KubeEnvironments_Delete.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/KubeEnvironments_Delete.json // this example is just showing the usage of "KubeEnvironments_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -111,7 +111,7 @@ public async Task Delete_DeleteKubeEnvironmentByName() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateKubeEnvironments() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/KubeEnvironments_Update.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/KubeEnvironments_Update.json // this example is just showing the usage of "KubeEnvironments_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs index 965ea13989e8f..1d5f77a046579 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs @@ -20,7 +20,7 @@ public partial class Sample_ResourceGroupResourceExtensions [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAllResourceHealthMetadataData_ListResourceHealthMetadataForAResourceGroup() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/ListResourceHealthMetadataByResourceGroup.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ListResourceHealthMetadataByResourceGroup.json // this example is just showing the usage of "ResourceHealthMetadata_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_ScmSiteBasicPublishingCredentialsPolicyResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_ScmSiteBasicPublishingCredentialsPolicyResource.cs index f14a6d120ba6f..dbc539394344c 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_ScmSiteBasicPublishingCredentialsPolicyResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_ScmSiteBasicPublishingCredentialsPolicyResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ScmSiteBasicPublishingCredentialsPolicyResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetSCMAllowed() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetPublishingCredentialsPolicy.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetPublishingCredentialsPolicy.json // this example is just showing the usage of "WebApps_GetScmAllowed" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -50,7 +50,7 @@ public async Task Get_GetSCMAllowed() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_UpdateSCMAllowed() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/UpdatePublishingCredentialsPolicy.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/UpdatePublishingCredentialsPolicy.json // this example is just showing the usage of "WebApps_UpdateScmAllowed" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_ScmSiteSlotBasicPublishingCredentialsPolicyResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_ScmSiteSlotBasicPublishingCredentialsPolicyResource.cs index 6aae22f83557f..a628b6049a3a0 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_ScmSiteSlotBasicPublishingCredentialsPolicyResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_ScmSiteSlotBasicPublishingCredentialsPolicyResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ScmSiteSlotBasicPublishingCredentialsPolicyResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetSCMAllowed() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetPublishingCredentialsPolicySlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetPublishingCredentialsPolicySlot.json // this example is just showing the usage of "WebApps_GetScmAllowedSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Get_GetSCMAllowed() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_UpdateSCMAllowed() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/UpdatePublishingCredentialsPolicySlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/UpdatePublishingCredentialsPolicySlot.json // this example is just showing the usage of "WebApps_UpdateScmAllowedSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteBackupCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteBackupCollection.cs new file mode 100644 index 0000000000000..d3119738bd2b9 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteBackupCollection.cs @@ -0,0 +1,163 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_SiteBackupCollection + { + // List web app backups + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ListWebAppBackups() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ListWebAppBackups.json + // this example is just showing the usage of "WebApps_ListBackups" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "sitef6141"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // get the collection of this SiteBackupResource + SiteBackupCollection collection = webSite.GetSiteBackups(); + + // invoke the operation and iterate over the result + await foreach (SiteBackupResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WebAppBackupData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get web app backup + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetWebAppBackup() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetWebAppBackup.json + // this example is just showing the usage of "WebApps_GetBackupStatus" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "sitef6141"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // get the collection of this SiteBackupResource + SiteBackupCollection collection = webSite.GetSiteBackups(); + + // invoke the operation + string backupId = "12345"; + SiteBackupResource result = await collection.GetAsync(backupId); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WebAppBackupData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get web app backup + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetWebAppBackup() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetWebAppBackup.json + // this example is just showing the usage of "WebApps_GetBackupStatus" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "sitef6141"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // get the collection of this SiteBackupResource + SiteBackupCollection collection = webSite.GetSiteBackups(); + + // invoke the operation + string backupId = "12345"; + bool result = await collection.ExistsAsync(backupId); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Get web app backup + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetWebAppBackup() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetWebAppBackup.json + // this example is just showing the usage of "WebApps_GetBackupStatus" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "sitef6141"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // get the collection of this SiteBackupResource + SiteBackupCollection collection = webSite.GetSiteBackups(); + + // invoke the operation + string backupId = "12345"; + NullableResponse response = await collection.GetIfExistsAsync(backupId); + SiteBackupResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WebAppBackupData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteBackupResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteBackupResource.cs new file mode 100644 index 0000000000000..156a605d1aa4e --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteBackupResource.cs @@ -0,0 +1,182 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_SiteBackupResource + { + // Get web app backup + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetWebAppBackup() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetWebAppBackup.json + // this example is just showing the usage of "WebApps_GetBackupStatus" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SiteBackupResource created on azure + // for more information of creating SiteBackupResource, please refer to the document of SiteBackupResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "sitef6141"; + string backupId = "12345"; + ResourceIdentifier siteBackupResourceId = SiteBackupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, backupId); + SiteBackupResource siteBackup = client.GetSiteBackupResource(siteBackupResourceId); + + // invoke the operation + SiteBackupResource result = await siteBackup.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WebAppBackupData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Delete web app backup + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_DeleteWebAppBackup() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/DeleteWebAppBackup.json + // this example is just showing the usage of "WebApps_DeleteBackup" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SiteBackupResource created on azure + // for more information of creating SiteBackupResource, please refer to the document of SiteBackupResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "sitef6141"; + string backupId = "12345"; + ResourceIdentifier siteBackupResourceId = SiteBackupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, backupId); + SiteBackupResource siteBackup = client.GetSiteBackupResource(siteBackupResourceId); + + // invoke the operation + await siteBackup.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + + // Get web app backup with secrets + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetBackupStatusSecrets_GetWebAppBackupWithSecrets() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetWebAppBackupWithSecrets.json + // this example is just showing the usage of "WebApps_ListBackupStatusSecrets" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SiteBackupResource created on azure + // for more information of creating SiteBackupResource, please refer to the document of SiteBackupResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "sitef6141"; + string backupId = "12345"; + ResourceIdentifier siteBackupResourceId = SiteBackupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, backupId); + SiteBackupResource siteBackup = client.GetSiteBackupResource(siteBackupResourceId); + + // invoke the operation + WebAppBackupInfo info = new WebAppBackupInfo() + { + BackupName = "abcdwe", + IsEnabled = true, + StorageAccountUri = new Uri("DefaultEndpointsProtocol=https;AccountName=storagesample;AccountKey="), + BackupSchedule = new WebAppBackupSchedule(7, BackupFrequencyUnit.Day, true, 30) + { + StartOn = DateTimeOffset.Parse("2022-09-02T17:33:11.641Z"), + }, + Databases = +{ +new AppServiceDatabaseBackupSetting(AppServiceDatabaseType.SqlAzure) +{ +Name = "backenddb", +ConnectionStringName = "backend", +ConnectionString = "DSN=data-source-name[;SERVER=value] [;PWD=value] [;UID=value] [;=]", +},new AppServiceDatabaseBackupSetting(AppServiceDatabaseType.SqlAzure) +{ +Name = "statsdb", +ConnectionStringName = "stats", +ConnectionString = "DSN=data-source-name[;SERVER=value] [;PWD=value] [;UID=value] [;=]", +} +}, + }; + SiteBackupResource result = await siteBackup.GetBackupStatusSecretsAsync(info); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WebAppBackupData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Restore web app from backup + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Restore_RestoreWebAppFromBackup() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/RestoreWebAppBackup.json + // this example is just showing the usage of "WebApps_Restore" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SiteBackupResource created on azure + // for more information of creating SiteBackupResource, please refer to the document of SiteBackupResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "sitef6141"; + string backupId = "123244"; + ResourceIdentifier siteBackupResourceId = SiteBackupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, backupId); + SiteBackupResource siteBackup = client.GetSiteBackupResource(siteBackupResourceId); + + // invoke the operation + RestoreRequestInfo info = new RestoreRequestInfo() + { + StorageAccountUri = new Uri("DefaultEndpointsProtocol=https;AccountName=storagesample;AccountKey="), + CanOverwrite = true, + SiteName = "sitef6141", + Databases = +{ +new AppServiceDatabaseBackupSetting(AppServiceDatabaseType.SqlAzure) +{ +Name = "backenddb", +ConnectionStringName = "backend", +ConnectionString = "DSN=data-source-name[;SERVER=value] [;PWD=value] [;UID=value] [;=]", +},new AppServiceDatabaseBackupSetting(AppServiceDatabaseType.SqlAzure) +{ +Name = "statsdb", +ConnectionStringName = "stats", +ConnectionString = "DSN=data-source-name[;SERVER=value] [;PWD=value] [;UID=value] [;=]", +} +}, + }; + await siteBackup.RestoreAsync(WaitUntil.Completed, info); + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteConfigAppsettingCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteConfigAppsettingCollection.cs index 2f6e420c28161..94420b9951802 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteConfigAppsettingCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteConfigAppsettingCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_SiteConfigAppsettingCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_GetAzureKeyVaultReferencesForAppSettings() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetKeyVaultReferencesForAppSettings.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetKeyVaultReferencesForAppSettings.json // this example is just showing the usage of "WebApps_GetAppSettingsKeyVaultReferences" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +56,7 @@ public async Task GetAll_GetAzureKeyVaultReferencesForAppSettings() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAzureKeyVaultAppSettingReference() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetKeyVaultReferencesForAppSetting.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetKeyVaultReferencesForAppSetting.json // this example is just showing the usage of "WebApps_GetAppSettingKeyVaultReference" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -91,7 +91,7 @@ public async Task Get_GetAzureKeyVaultAppSettingReference() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAzureKeyVaultAppSettingReference() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetKeyVaultReferencesForAppSetting.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetKeyVaultReferencesForAppSetting.json // this example is just showing the usage of "WebApps_GetAppSettingKeyVaultReference" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -122,7 +122,7 @@ public async Task Exists_GetAzureKeyVaultAppSettingReference() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAzureKeyVaultAppSettingReference() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetKeyVaultReferencesForAppSetting.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetKeyVaultReferencesForAppSetting.json // this example is just showing the usage of "WebApps_GetAppSettingKeyVaultReference" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteConfigAppsettingResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteConfigAppsettingResource.cs index b2cbbf3fc4258..95f020252ae1e 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteConfigAppsettingResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteConfigAppsettingResource.cs @@ -19,7 +19,7 @@ public partial class Sample_SiteConfigAppsettingResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAzureKeyVaultAppSettingReference() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetKeyVaultReferencesForAppSetting.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetKeyVaultReferencesForAppSetting.json // this example is just showing the usage of "WebApps_GetAppSettingKeyVaultReference" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDetectorCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDetectorCollection.cs index aaad52320efa7..98f8d08df3cc0 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDetectorCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDetectorCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_SiteDetectorCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_GetAppDetectorResponses() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_ListSiteDetectorResponses.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_ListSiteDetectorResponses.json // this example is just showing the usage of "Diagnostics_ListSiteDetectorResponses" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +56,7 @@ public async Task GetAll_GetAppDetectorResponses() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_GetAppSlotDetectorResponses() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_ListSiteDetectorResponsesSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_ListSiteDetectorResponsesSlot.json // this example is just showing the usage of "Diagnostics_ListSiteDetectorResponses" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -93,7 +93,7 @@ public async Task GetAll_GetAppSlotDetectorResponses() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAppDetectorResponse() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetectorResponse.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDetectorResponse.json // this example is just showing the usage of "Diagnostics_GetSiteDetectorResponse" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -128,7 +128,7 @@ public async Task Get_GetAppDetectorResponse() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAppDetectorResponse() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetectorResponse.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDetectorResponse.json // this example is just showing the usage of "Diagnostics_GetSiteDetectorResponse" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -159,7 +159,7 @@ public async Task Exists_GetAppDetectorResponse() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAppDetectorResponse() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetectorResponse.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDetectorResponse.json // this example is just showing the usage of "Diagnostics_GetSiteDetectorResponse" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -202,7 +202,7 @@ public async Task GetIfExists_GetAppDetectorResponse() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAppSlotDetectorResponse() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetectorResponseSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDetectorResponseSlot.json // this example is just showing the usage of "Diagnostics_GetSiteDetectorResponse" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -237,7 +237,7 @@ public async Task Get_GetAppSlotDetectorResponse() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAppSlotDetectorResponse() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetectorResponseSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDetectorResponseSlot.json // this example is just showing the usage of "Diagnostics_GetSiteDetectorResponse" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -268,7 +268,7 @@ public async Task Exists_GetAppSlotDetectorResponse() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAppSlotDetectorResponse() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetectorResponseSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDetectorResponseSlot.json // this example is just showing the usage of "Diagnostics_GetSiteDetectorResponse" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDetectorResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDetectorResource.cs index 8d90406e90778..cf9c52a03a4f6 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDetectorResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDetectorResource.cs @@ -19,7 +19,7 @@ public partial class Sample_SiteDetectorResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAppDetectorResponse() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetectorResponse.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDetectorResponse.json // this example is just showing the usage of "Diagnostics_GetSiteDetectorResponse" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Get_GetAppDetectorResponse() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAppSlotDetectorResponse() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetectorResponseSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDetectorResponseSlot.json // this example is just showing the usage of "Diagnostics_GetSiteDetectorResponse" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDiagnosticAnalysisCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDiagnosticAnalysisCollection.cs index 8567e699bd1a2..321f6c07873ab 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDiagnosticAnalysisCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDiagnosticAnalysisCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_SiteDiagnosticAnalysisCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListAppAnalyses() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_ListSiteAnalyses.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_ListSiteAnalyses.json // this example is just showing the usage of "Diagnostics_ListSiteAnalyses" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_ListAppAnalyses() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListAppSlotAnalyses() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_ListSiteAnalysesSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_ListSiteAnalysesSlot.json // this example is just showing the usage of "Diagnostics_ListSiteAnalyses" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -95,7 +95,7 @@ public async Task GetAll_ListAppSlotAnalyses() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAppAnalysis() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteAnalysis.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteAnalysis.json // this example is just showing the usage of "Diagnostics_GetSiteAnalysis" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -131,7 +131,7 @@ public async Task Get_GetAppAnalysis() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAppAnalysis() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteAnalysis.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteAnalysis.json // this example is just showing the usage of "Diagnostics_GetSiteAnalysis" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -163,7 +163,7 @@ public async Task Exists_GetAppAnalysis() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAppAnalysis() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteAnalysis.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteAnalysis.json // this example is just showing the usage of "Diagnostics_GetSiteAnalysis" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -207,7 +207,7 @@ public async Task GetIfExists_GetAppAnalysis() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAppSlotAnalysis() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteAnalysisSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteAnalysisSlot.json // this example is just showing the usage of "Diagnostics_GetSiteAnalysis" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -243,7 +243,7 @@ public async Task Get_GetAppSlotAnalysis() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAppSlotAnalysis() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteAnalysisSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteAnalysisSlot.json // this example is just showing the usage of "Diagnostics_GetSiteAnalysis" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -275,7 +275,7 @@ public async Task Exists_GetAppSlotAnalysis() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAppSlotAnalysis() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteAnalysisSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteAnalysisSlot.json // this example is just showing the usage of "Diagnostics_GetSiteAnalysis" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDiagnosticAnalysisResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDiagnosticAnalysisResource.cs index 8af543b2081a6..025efedc3dd43 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDiagnosticAnalysisResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDiagnosticAnalysisResource.cs @@ -20,7 +20,7 @@ public partial class Sample_SiteDiagnosticAnalysisResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAppAnalysis() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteAnalysis.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteAnalysis.json // this example is just showing the usage of "Diagnostics_GetSiteAnalysis" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -53,7 +53,7 @@ public async Task Get_GetAppAnalysis() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAppSlotAnalysis() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteAnalysisSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteAnalysisSlot.json // this example is just showing the usage of "Diagnostics_GetSiteAnalysis" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -86,7 +86,7 @@ public async Task Get_GetAppSlotAnalysis() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Execute_ExecuteSiteAnalysis() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_ExecuteSiteAnalysis.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_ExecuteSiteAnalysis.json // this example is just showing the usage of "Diagnostics_ExecuteSiteAnalysis" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -115,7 +115,7 @@ public async Task Execute_ExecuteSiteAnalysis() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Execute_ExecuteSiteSlotAnalysis() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_ExecuteSiteAnalysisSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_ExecuteSiteAnalysisSlot.json // this example is just showing the usage of "Diagnostics_ExecuteSiteAnalysis" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDiagnosticCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDiagnosticCollection.cs index 98faeaf8c19b4..4a26e6680fc54 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDiagnosticCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDiagnosticCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_SiteDiagnosticCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListAppDiagnosticCategories() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_ListSiteDiagnosticCategories.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_ListSiteDiagnosticCategories.json // this example is just showing the usage of "Diagnostics_ListSiteDiagnosticCategories" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +56,7 @@ public async Task GetAll_ListAppDiagnosticCategories() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListAppSlotDiagnosticCategories() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_ListSiteDiagnosticCategoriesSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_ListSiteDiagnosticCategoriesSlot.json // this example is just showing the usage of "Diagnostics_ListSiteDiagnosticCategories" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -93,7 +93,7 @@ public async Task GetAll_ListAppSlotDiagnosticCategories() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAppDiagnosticCategory() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDiagnosticCategory.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDiagnosticCategory.json // this example is just showing the usage of "Diagnostics_GetSiteDiagnosticCategory" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -128,7 +128,7 @@ public async Task Get_GetAppDiagnosticCategory() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAppDiagnosticCategory() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDiagnosticCategory.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDiagnosticCategory.json // this example is just showing the usage of "Diagnostics_GetSiteDiagnosticCategory" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -159,7 +159,7 @@ public async Task Exists_GetAppDiagnosticCategory() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAppDiagnosticCategory() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDiagnosticCategory.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDiagnosticCategory.json // this example is just showing the usage of "Diagnostics_GetSiteDiagnosticCategory" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -202,7 +202,7 @@ public async Task GetIfExists_GetAppDiagnosticCategory() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAppSlotDiagnosticCategory() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDiagnosticCategorySlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDiagnosticCategorySlot.json // this example is just showing the usage of "Diagnostics_GetSiteDiagnosticCategory" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -237,7 +237,7 @@ public async Task Get_GetAppSlotDiagnosticCategory() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAppSlotDiagnosticCategory() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDiagnosticCategorySlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDiagnosticCategorySlot.json // this example is just showing the usage of "Diagnostics_GetSiteDiagnosticCategory" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -268,7 +268,7 @@ public async Task Exists_GetAppSlotDiagnosticCategory() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAppSlotDiagnosticCategory() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDiagnosticCategorySlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDiagnosticCategorySlot.json // this example is just showing the usage of "Diagnostics_GetSiteDiagnosticCategory" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDiagnosticDetectorCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDiagnosticDetectorCollection.cs index f62441e07e023..6f21149580ef6 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDiagnosticDetectorCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDiagnosticDetectorCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_SiteDiagnosticDetectorCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListAppDetectors() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_ListSiteDetectors.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_ListSiteDetectors.json // this example is just showing the usage of "Diagnostics_ListSiteDetectors" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_ListAppDetectors() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListAppSlotDetectors() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_ListSiteDetectorsSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_ListSiteDetectorsSlot.json // this example is just showing the usage of "Diagnostics_ListSiteDetectors" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -95,7 +95,7 @@ public async Task GetAll_ListAppSlotDetectors() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAppDetector() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetector.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDetector.json // this example is just showing the usage of "Diagnostics_GetSiteDetector" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -131,7 +131,7 @@ public async Task Get_GetAppDetector() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAppDetector() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetector.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDetector.json // this example is just showing the usage of "Diagnostics_GetSiteDetector" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -163,7 +163,7 @@ public async Task Exists_GetAppDetector() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAppDetector() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetector.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDetector.json // this example is just showing the usage of "Diagnostics_GetSiteDetector" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -207,7 +207,7 @@ public async Task GetIfExists_GetAppDetector() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAppSlotDetector() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetectorSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDetectorSlot.json // this example is just showing the usage of "Diagnostics_GetSiteDetector" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -243,7 +243,7 @@ public async Task Get_GetAppSlotDetector() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAppSlotDetector() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetectorSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDetectorSlot.json // this example is just showing the usage of "Diagnostics_GetSiteDetector" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -275,7 +275,7 @@ public async Task Exists_GetAppSlotDetector() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAppSlotDetector() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetectorSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDetectorSlot.json // this example is just showing the usage of "Diagnostics_GetSiteDetector" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDiagnosticDetectorResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDiagnosticDetectorResource.cs index 15a7ac2bbed5d..d9f6ea5703869 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDiagnosticDetectorResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDiagnosticDetectorResource.cs @@ -20,7 +20,7 @@ public partial class Sample_SiteDiagnosticDetectorResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAppDetector() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetector.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDetector.json // this example is just showing the usage of "Diagnostics_GetSiteDetector" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -53,7 +53,7 @@ public async Task Get_GetAppDetector() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAppSlotDetector() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetectorSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDetectorSlot.json // this example is just showing the usage of "Diagnostics_GetSiteDetector" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -86,7 +86,7 @@ public async Task Get_GetAppSlotDetector() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Execute_ExecuteSiteDetector() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_ExecuteSiteDetector.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_ExecuteSiteDetector.json // this example is just showing the usage of "Diagnostics_ExecuteSiteDetector" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -115,7 +115,7 @@ public async Task Execute_ExecuteSiteDetector() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Execute_ExecuteSiteSlotDetector() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_ExecuteSiteDetectorSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_ExecuteSiteDetectorSlot.json // this example is just showing the usage of "Diagnostics_ExecuteSiteDetector" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDiagnosticResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDiagnosticResource.cs index d73535cea1ced..4cf8daf8596e0 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDiagnosticResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDiagnosticResource.cs @@ -19,7 +19,7 @@ public partial class Sample_SiteDiagnosticResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAppDiagnosticCategory() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDiagnosticCategory.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDiagnosticCategory.json // this example is just showing the usage of "Diagnostics_GetSiteDiagnosticCategory" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Get_GetAppDiagnosticCategory() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAppSlotDiagnosticCategory() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDiagnosticCategorySlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDiagnosticCategorySlot.json // this example is just showing the usage of "Diagnostics_GetSiteDiagnosticCategory" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteInstanceCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteInstanceCollection.cs index 71b19f9b11594..681bea8753000 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteInstanceCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteInstanceCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_SiteInstanceCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetSiteInstanceInfo() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetSiteInstanceInfo.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetSiteInstanceInfo.json // this example is just showing the usage of "WebApps_GetInstanceInfo" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -54,7 +54,7 @@ public async Task Get_GetSiteInstanceInfo() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetSiteInstanceInfo() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetSiteInstanceInfo.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetSiteInstanceInfo.json // this example is just showing the usage of "WebApps_GetInstanceInfo" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -85,7 +85,7 @@ public async Task Exists_GetSiteInstanceInfo() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetSiteInstanceInfo() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetSiteInstanceInfo.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetSiteInstanceInfo.json // this example is just showing the usage of "WebApps_GetInstanceInfo" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteInstanceResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteInstanceResource.cs index 599ebeecf82ab..198a5b40de52c 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteInstanceResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteInstanceResource.cs @@ -19,7 +19,7 @@ public partial class Sample_SiteInstanceResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetSiteInstanceInfo() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetSiteInstanceInfo.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetSiteInstanceInfo.json // this example is just showing the usage of "WebApps_GetInstanceInfo" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SitePrivateEndpointConnectionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SitePrivateEndpointConnectionCollection.cs index a3afab1e02aab..2886837a6753c 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SitePrivateEndpointConnectionCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SitePrivateEndpointConnectionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_SitePrivateEndpointConnectionCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAPrivateEndpointConnectionForASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetSitePrivateEndpointConnection.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetSitePrivateEndpointConnection.json // this example is just showing the usage of "WebApps_GetPrivateEndpointConnection" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -55,7 +55,7 @@ public async Task Get_GetAPrivateEndpointConnectionForASite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAPrivateEndpointConnectionForASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetSitePrivateEndpointConnection.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetSitePrivateEndpointConnection.json // this example is just showing the usage of "WebApps_GetPrivateEndpointConnection" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -86,7 +86,7 @@ public async Task Exists_GetAPrivateEndpointConnectionForASite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAPrivateEndpointConnectionForASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetSitePrivateEndpointConnection.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetSitePrivateEndpointConnection.json // this example is just showing the usage of "WebApps_GetPrivateEndpointConnection" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -129,7 +129,7 @@ public async Task GetIfExists_GetAPrivateEndpointConnectionForASite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApprovesOrRejectsAPrivateEndpointConnectionForASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/ApproveRejectSitePrivateEndpointConnection.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ApproveRejectSitePrivateEndpointConnection.json // this example is just showing the usage of "WebApps_ApproveOrRejectPrivateEndpointConnection" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -150,7 +150,7 @@ public async Task CreateOrUpdate_ApprovesOrRejectsAPrivateEndpointConnectionForA // invoke the operation string privateEndpointConnectionName = "connection"; - PrivateLinkConnectionApprovalRequestInfo info = new PrivateLinkConnectionApprovalRequestInfo() + RemotePrivateEndpointConnectionARMResourceData data = new RemotePrivateEndpointConnectionARMResourceData() { PrivateLinkServiceConnectionState = new PrivateLinkConnectionState() { @@ -159,7 +159,7 @@ public async Task CreateOrUpdate_ApprovesOrRejectsAPrivateEndpointConnectionForA ActionsRequired = "", }, }; - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, privateEndpointConnectionName, info); + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, privateEndpointConnectionName, data); SitePrivateEndpointConnectionResource result = lro.Value; // the variable result is a resource, you could call other operations on this instance as well diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SitePrivateEndpointConnectionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SitePrivateEndpointConnectionResource.cs index 1c6c5111fa774..16be95e108895 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SitePrivateEndpointConnectionResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SitePrivateEndpointConnectionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_SitePrivateEndpointConnectionResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAPrivateEndpointConnectionForASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetSitePrivateEndpointConnection.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetSitePrivateEndpointConnection.json // this example is just showing the usage of "WebApps_GetPrivateEndpointConnection" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +52,7 @@ public async Task Get_GetAPrivateEndpointConnectionForASite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApprovesOrRejectsAPrivateEndpointConnectionForASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/ApproveRejectSitePrivateEndpointConnection.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ApproveRejectSitePrivateEndpointConnection.json // this example is just showing the usage of "WebApps_ApproveOrRejectPrivateEndpointConnection" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -70,7 +70,7 @@ public async Task Update_ApprovesOrRejectsAPrivateEndpointConnectionForASite() SitePrivateEndpointConnectionResource sitePrivateEndpointConnection = client.GetSitePrivateEndpointConnectionResource(sitePrivateEndpointConnectionResourceId); // invoke the operation - PrivateLinkConnectionApprovalRequestInfo info = new PrivateLinkConnectionApprovalRequestInfo() + RemotePrivateEndpointConnectionARMResourceData data = new RemotePrivateEndpointConnectionARMResourceData() { PrivateLinkServiceConnectionState = new PrivateLinkConnectionState() { @@ -79,7 +79,7 @@ public async Task Update_ApprovesOrRejectsAPrivateEndpointConnectionForASite() ActionsRequired = "", }, }; - ArmOperation lro = await sitePrivateEndpointConnection.UpdateAsync(WaitUntil.Completed, info); + ArmOperation lro = await sitePrivateEndpointConnection.UpdateAsync(WaitUntil.Completed, data); SitePrivateEndpointConnectionResource result = lro.Value; // the variable result is a resource, you could call other operations on this instance as well @@ -94,7 +94,7 @@ public async Task Update_ApprovesOrRejectsAPrivateEndpointConnectionForASite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteAPrivateEndpointConnectionForASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/DeleteSitePrivateEndpointConnection.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/DeleteSitePrivateEndpointConnection.json // this example is just showing the usage of "WebApps_DeletePrivateEndpointConnection" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDetectorCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDetectorCollection.cs index dcb4785d9221e..e160856bc7aea 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDetectorCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDetectorCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_SiteSlotDetectorCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_GetAppDetectorResponses() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_ListSiteDetectorResponses.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_ListSiteDetectorResponses.json // this example is just showing the usage of "Diagnostics_ListSiteDetectorResponsesSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_GetAppDetectorResponses() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_GetAppSlotDetectorResponses() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_ListSiteDetectorResponsesSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_ListSiteDetectorResponsesSlot.json // this example is just showing the usage of "Diagnostics_ListSiteDetectorResponsesSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -95,7 +95,7 @@ public async Task GetAll_GetAppSlotDetectorResponses() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAppDetectorResponse() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetectorResponse.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDetectorResponse.json // this example is just showing the usage of "Diagnostics_GetSiteDetectorResponseSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -131,7 +131,7 @@ public async Task Get_GetAppDetectorResponse() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAppDetectorResponse() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetectorResponse.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDetectorResponse.json // this example is just showing the usage of "Diagnostics_GetSiteDetectorResponseSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -163,7 +163,7 @@ public async Task Exists_GetAppDetectorResponse() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAppDetectorResponse() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetectorResponse.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDetectorResponse.json // this example is just showing the usage of "Diagnostics_GetSiteDetectorResponseSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -207,7 +207,7 @@ public async Task GetIfExists_GetAppDetectorResponse() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAppSlotDetectorResponse() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetectorResponseSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDetectorResponseSlot.json // this example is just showing the usage of "Diagnostics_GetSiteDetectorResponseSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -243,7 +243,7 @@ public async Task Get_GetAppSlotDetectorResponse() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAppSlotDetectorResponse() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetectorResponseSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDetectorResponseSlot.json // this example is just showing the usage of "Diagnostics_GetSiteDetectorResponseSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -275,7 +275,7 @@ public async Task Exists_GetAppSlotDetectorResponse() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAppSlotDetectorResponse() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetectorResponseSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDetectorResponseSlot.json // this example is just showing the usage of "Diagnostics_GetSiteDetectorResponseSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDetectorResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDetectorResource.cs index 7aa4f183d79d1..aca8b51904ff8 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDetectorResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDetectorResource.cs @@ -19,7 +19,7 @@ public partial class Sample_SiteSlotDetectorResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAppDetectorResponse() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetectorResponse.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDetectorResponse.json // this example is just showing the usage of "Diagnostics_GetSiteDetectorResponseSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +52,7 @@ public async Task Get_GetAppDetectorResponse() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAppSlotDetectorResponse() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetectorResponseSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDetectorResponseSlot.json // this example is just showing the usage of "Diagnostics_GetSiteDetectorResponseSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDiagnosticAnalysisCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDiagnosticAnalysisCollection.cs index 84f3ce19b9101..398447faf86a7 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDiagnosticAnalysisCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDiagnosticAnalysisCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_SiteSlotDiagnosticAnalysisCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListAppAnalyses() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_ListSiteAnalyses.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_ListSiteAnalyses.json // this example is just showing the usage of "Diagnostics_ListSiteAnalysesSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -58,7 +58,7 @@ public async Task GetAll_ListAppAnalyses() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListAppSlotAnalyses() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_ListSiteAnalysesSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_ListSiteAnalysesSlot.json // this example is just showing the usage of "Diagnostics_ListSiteAnalysesSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -97,7 +97,7 @@ public async Task GetAll_ListAppSlotAnalyses() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAppAnalysis() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteAnalysis.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteAnalysis.json // this example is just showing the usage of "Diagnostics_GetSiteAnalysisSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -134,7 +134,7 @@ public async Task Get_GetAppAnalysis() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAppAnalysis() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteAnalysis.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteAnalysis.json // this example is just showing the usage of "Diagnostics_GetSiteAnalysisSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -167,7 +167,7 @@ public async Task Exists_GetAppAnalysis() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAppAnalysis() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteAnalysis.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteAnalysis.json // this example is just showing the usage of "Diagnostics_GetSiteAnalysisSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -212,7 +212,7 @@ public async Task GetIfExists_GetAppAnalysis() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAppSlotAnalysis() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteAnalysisSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteAnalysisSlot.json // this example is just showing the usage of "Diagnostics_GetSiteAnalysisSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -249,7 +249,7 @@ public async Task Get_GetAppSlotAnalysis() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAppSlotAnalysis() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteAnalysisSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteAnalysisSlot.json // this example is just showing the usage of "Diagnostics_GetSiteAnalysisSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -282,7 +282,7 @@ public async Task Exists_GetAppSlotAnalysis() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAppSlotAnalysis() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteAnalysisSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteAnalysisSlot.json // this example is just showing the usage of "Diagnostics_GetSiteAnalysisSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDiagnosticAnalysisResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDiagnosticAnalysisResource.cs index e84b9bda4be38..6237c2a1816d4 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDiagnosticAnalysisResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDiagnosticAnalysisResource.cs @@ -20,7 +20,7 @@ public partial class Sample_SiteSlotDiagnosticAnalysisResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAppAnalysis() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteAnalysis.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteAnalysis.json // this example is just showing the usage of "Diagnostics_GetSiteAnalysisSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -54,7 +54,7 @@ public async Task Get_GetAppAnalysis() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAppSlotAnalysis() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteAnalysisSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteAnalysisSlot.json // this example is just showing the usage of "Diagnostics_GetSiteAnalysisSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -88,7 +88,7 @@ public async Task Get_GetAppSlotAnalysis() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task ExecuteSiteAnalysisSlot_ExecuteSiteAnalysis() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_ExecuteSiteAnalysis.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_ExecuteSiteAnalysis.json // this example is just showing the usage of "Diagnostics_ExecuteSiteAnalysisSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -118,7 +118,7 @@ public async Task ExecuteSiteAnalysisSlot_ExecuteSiteAnalysis() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task ExecuteSiteAnalysisSlot_ExecuteSiteSlotAnalysis() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_ExecuteSiteAnalysisSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_ExecuteSiteAnalysisSlot.json // this example is just showing the usage of "Diagnostics_ExecuteSiteAnalysisSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDiagnosticCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDiagnosticCollection.cs index 8a5868d16506f..840eaee88734c 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDiagnosticCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDiagnosticCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_SiteSlotDiagnosticCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListAppDiagnosticCategories() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_ListSiteDiagnosticCategories.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_ListSiteDiagnosticCategories.json // this example is just showing the usage of "Diagnostics_ListSiteDiagnosticCategoriesSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_ListAppDiagnosticCategories() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListAppSlotDiagnosticCategories() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_ListSiteDiagnosticCategoriesSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_ListSiteDiagnosticCategoriesSlot.json // this example is just showing the usage of "Diagnostics_ListSiteDiagnosticCategoriesSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -95,7 +95,7 @@ public async Task GetAll_ListAppSlotDiagnosticCategories() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAppDiagnosticCategory() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDiagnosticCategory.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDiagnosticCategory.json // this example is just showing the usage of "Diagnostics_GetSiteDiagnosticCategorySlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -131,7 +131,7 @@ public async Task Get_GetAppDiagnosticCategory() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAppDiagnosticCategory() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDiagnosticCategory.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDiagnosticCategory.json // this example is just showing the usage of "Diagnostics_GetSiteDiagnosticCategorySlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -163,7 +163,7 @@ public async Task Exists_GetAppDiagnosticCategory() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAppDiagnosticCategory() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDiagnosticCategory.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDiagnosticCategory.json // this example is just showing the usage of "Diagnostics_GetSiteDiagnosticCategorySlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -207,7 +207,7 @@ public async Task GetIfExists_GetAppDiagnosticCategory() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAppSlotDiagnosticCategory() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDiagnosticCategorySlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDiagnosticCategorySlot.json // this example is just showing the usage of "Diagnostics_GetSiteDiagnosticCategorySlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -243,7 +243,7 @@ public async Task Get_GetAppSlotDiagnosticCategory() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAppSlotDiagnosticCategory() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDiagnosticCategorySlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDiagnosticCategorySlot.json // this example is just showing the usage of "Diagnostics_GetSiteDiagnosticCategorySlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -275,7 +275,7 @@ public async Task Exists_GetAppSlotDiagnosticCategory() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAppSlotDiagnosticCategory() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDiagnosticCategorySlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDiagnosticCategorySlot.json // this example is just showing the usage of "Diagnostics_GetSiteDiagnosticCategorySlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDiagnosticDetectorCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDiagnosticDetectorCollection.cs index 616decce60186..7fcb9296e6faf 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDiagnosticDetectorCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDiagnosticDetectorCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_SiteSlotDiagnosticDetectorCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListAppDetectors() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_ListSiteDetectors.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_ListSiteDetectors.json // this example is just showing the usage of "Diagnostics_ListSiteDetectorsSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -58,7 +58,7 @@ public async Task GetAll_ListAppDetectors() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListAppSlotDetectors() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_ListSiteDetectorsSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_ListSiteDetectorsSlot.json // this example is just showing the usage of "Diagnostics_ListSiteDetectorsSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -97,7 +97,7 @@ public async Task GetAll_ListAppSlotDetectors() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAppDetector() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetector.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDetector.json // this example is just showing the usage of "Diagnostics_GetSiteDetectorSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -134,7 +134,7 @@ public async Task Get_GetAppDetector() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAppDetector() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetector.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDetector.json // this example is just showing the usage of "Diagnostics_GetSiteDetectorSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -167,7 +167,7 @@ public async Task Exists_GetAppDetector() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAppDetector() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetector.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDetector.json // this example is just showing the usage of "Diagnostics_GetSiteDetectorSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -212,7 +212,7 @@ public async Task GetIfExists_GetAppDetector() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAppSlotDetector() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetectorSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDetectorSlot.json // this example is just showing the usage of "Diagnostics_GetSiteDetectorSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -249,7 +249,7 @@ public async Task Get_GetAppSlotDetector() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAppSlotDetector() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetectorSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDetectorSlot.json // this example is just showing the usage of "Diagnostics_GetSiteDetectorSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -282,7 +282,7 @@ public async Task Exists_GetAppSlotDetector() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAppSlotDetector() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetectorSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDetectorSlot.json // this example is just showing the usage of "Diagnostics_GetSiteDetectorSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDiagnosticDetectorResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDiagnosticDetectorResource.cs index 722cb050b612b..9e5534c1a4e06 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDiagnosticDetectorResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDiagnosticDetectorResource.cs @@ -20,7 +20,7 @@ public partial class Sample_SiteSlotDiagnosticDetectorResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAppDetector() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetector.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDetector.json // this example is just showing the usage of "Diagnostics_GetSiteDetectorSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -54,7 +54,7 @@ public async Task Get_GetAppDetector() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAppSlotDetector() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetectorSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDetectorSlot.json // this example is just showing the usage of "Diagnostics_GetSiteDetectorSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -88,7 +88,7 @@ public async Task Get_GetAppSlotDetector() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task ExecuteSiteDetectorSlot_ExecuteSiteDetector() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_ExecuteSiteDetector.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_ExecuteSiteDetector.json // this example is just showing the usage of "Diagnostics_ExecuteSiteDetectorSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -118,7 +118,7 @@ public async Task ExecuteSiteDetectorSlot_ExecuteSiteDetector() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task ExecuteSiteDetectorSlot_ExecuteSiteSlotDetector() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_ExecuteSiteDetectorSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_ExecuteSiteDetectorSlot.json // this example is just showing the usage of "Diagnostics_ExecuteSiteDetectorSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDiagnosticResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDiagnosticResource.cs index d0445feab79f4..547510bb2e001 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDiagnosticResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDiagnosticResource.cs @@ -19,7 +19,7 @@ public partial class Sample_SiteSlotDiagnosticResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAppDiagnosticCategory() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDiagnosticCategory.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDiagnosticCategory.json // this example is just showing the usage of "Diagnostics_GetSiteDiagnosticCategorySlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +52,7 @@ public async Task Get_GetAppDiagnosticCategory() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAppSlotDiagnosticCategory() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDiagnosticCategorySlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDiagnosticCategorySlot.json // this example is just showing the usage of "Diagnostics_GetSiteDiagnosticCategorySlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotInstanceCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotInstanceCollection.cs index adcd27e8e73b9..efe70c8d2239c 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotInstanceCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotInstanceCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_SiteSlotInstanceCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetSiteInstanceInfo() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetSiteInstanceInfo.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetSiteInstanceInfo.json // this example is just showing the usage of "WebApps_GetInstanceInfoSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -55,7 +55,7 @@ public async Task Get_GetSiteInstanceInfo() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetSiteInstanceInfo() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetSiteInstanceInfo.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetSiteInstanceInfo.json // this example is just showing the usage of "WebApps_GetInstanceInfoSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -87,7 +87,7 @@ public async Task Exists_GetSiteInstanceInfo() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetSiteInstanceInfo() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetSiteInstanceInfo.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetSiteInstanceInfo.json // this example is just showing the usage of "WebApps_GetInstanceInfoSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotInstanceResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotInstanceResource.cs index 9f124dafd646d..c0a7b79d34c4b 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotInstanceResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotInstanceResource.cs @@ -19,7 +19,7 @@ public partial class Sample_SiteSlotInstanceResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetSiteInstanceInfo() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetSiteInstanceInfo.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetSiteInstanceInfo.json // this example is just showing the usage of "WebApps_GetInstanceInfoSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotPrivateEndpointConnectionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotPrivateEndpointConnectionCollection.cs index c57165f009298..b564b969e5155 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotPrivateEndpointConnectionCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotPrivateEndpointConnectionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_SiteSlotPrivateEndpointConnectionCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAPrivateEndpointConnectionForASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetSitePrivateEndpointConnectionSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetSitePrivateEndpointConnectionSlot.json // this example is just showing the usage of "WebApps_GetPrivateEndpointConnectionSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +56,7 @@ public async Task Get_GetAPrivateEndpointConnectionForASite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAPrivateEndpointConnectionForASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetSitePrivateEndpointConnectionSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetSitePrivateEndpointConnectionSlot.json // this example is just showing the usage of "WebApps_GetPrivateEndpointConnectionSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -88,7 +88,7 @@ public async Task Exists_GetAPrivateEndpointConnectionForASite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAPrivateEndpointConnectionForASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetSitePrivateEndpointConnectionSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetSitePrivateEndpointConnectionSlot.json // this example is just showing the usage of "WebApps_GetPrivateEndpointConnectionSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -132,7 +132,7 @@ public async Task GetIfExists_GetAPrivateEndpointConnectionForASite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApprovesOrRejectsAPrivateEndpointConnectionForASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/ApproveRejectSitePrivateEndpointConnectionSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ApproveRejectSitePrivateEndpointConnectionSlot.json // this example is just showing the usage of "WebApps_ApproveOrRejectPrivateEndpointConnectionSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -154,7 +154,7 @@ public async Task CreateOrUpdate_ApprovesOrRejectsAPrivateEndpointConnectionForA // invoke the operation string privateEndpointConnectionName = "connection"; - PrivateLinkConnectionApprovalRequestInfo info = new PrivateLinkConnectionApprovalRequestInfo() + RemotePrivateEndpointConnectionARMResourceData data = new RemotePrivateEndpointConnectionARMResourceData() { PrivateLinkServiceConnectionState = new PrivateLinkConnectionState() { @@ -163,7 +163,7 @@ public async Task CreateOrUpdate_ApprovesOrRejectsAPrivateEndpointConnectionForA ActionsRequired = "", }, }; - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, privateEndpointConnectionName, info); + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, privateEndpointConnectionName, data); SiteSlotPrivateEndpointConnectionResource result = lro.Value; // the variable result is a resource, you could call other operations on this instance as well diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotPrivateEndpointConnectionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotPrivateEndpointConnectionResource.cs index 6bc0ff9966ddf..90b7d67b8a62a 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotPrivateEndpointConnectionResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotPrivateEndpointConnectionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_SiteSlotPrivateEndpointConnectionResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAPrivateEndpointConnectionForASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetSitePrivateEndpointConnectionSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetSitePrivateEndpointConnectionSlot.json // this example is just showing the usage of "WebApps_GetPrivateEndpointConnectionSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -53,7 +53,7 @@ public async Task Get_GetAPrivateEndpointConnectionForASite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApprovesOrRejectsAPrivateEndpointConnectionForASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/ApproveRejectSitePrivateEndpointConnectionSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ApproveRejectSitePrivateEndpointConnectionSlot.json // this example is just showing the usage of "WebApps_ApproveOrRejectPrivateEndpointConnectionSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -72,7 +72,7 @@ public async Task Update_ApprovesOrRejectsAPrivateEndpointConnectionForASite() SiteSlotPrivateEndpointConnectionResource siteSlotPrivateEndpointConnection = client.GetSiteSlotPrivateEndpointConnectionResource(siteSlotPrivateEndpointConnectionResourceId); // invoke the operation - PrivateLinkConnectionApprovalRequestInfo info = new PrivateLinkConnectionApprovalRequestInfo() + RemotePrivateEndpointConnectionARMResourceData data = new RemotePrivateEndpointConnectionARMResourceData() { PrivateLinkServiceConnectionState = new PrivateLinkConnectionState() { @@ -81,7 +81,7 @@ public async Task Update_ApprovesOrRejectsAPrivateEndpointConnectionForASite() ActionsRequired = "", }, }; - ArmOperation lro = await siteSlotPrivateEndpointConnection.UpdateAsync(WaitUntil.Completed, info); + ArmOperation lro = await siteSlotPrivateEndpointConnection.UpdateAsync(WaitUntil.Completed, data); SiteSlotPrivateEndpointConnectionResource result = lro.Value; // the variable result is a resource, you could call other operations on this instance as well @@ -96,7 +96,7 @@ public async Task Update_ApprovesOrRejectsAPrivateEndpointConnectionForASite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteAPrivateEndpointConnectionForASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/DeleteSitePrivateEndpointConnectionSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/DeleteSitePrivateEndpointConnectionSlot.json // this example is just showing the usage of "WebApps_DeletePrivateEndpointConnectionSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotWorkflowCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotWorkflowCollection.cs new file mode 100644 index 0000000000000..8e76353ade46f --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotWorkflowCollection.cs @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_SiteSlotWorkflowCollection + { + // List the workflows Slot + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ListTheWorkflowsSlot() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ListWorkflows.json + // this example is just showing the usage of "WebApps_ListInstanceWorkflowsSlot" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteSlotResource created on azure + // for more information of creating WebSiteSlotResource, please refer to the document of WebSiteSlotResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "testsite2"; + string slot = "staging"; + ResourceIdentifier webSiteSlotResourceId = WebSiteSlotResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, slot); + WebSiteSlotResource webSiteSlot = client.GetWebSiteSlotResource(webSiteSlotResourceId); + + // get the collection of this SiteSlotWorkflowResource + SiteSlotWorkflowCollection collection = webSiteSlot.GetSiteSlotWorkflows(); + + // invoke the operation and iterate over the result + await foreach (SiteSlotWorkflowResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkflowEnvelopeData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // GET a workflow Slot + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GETAWorkflowSlot() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetWorkflow.json + // this example is just showing the usage of "WebApps_GetInstanceWorkflowSlot" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteSlotResource created on azure + // for more information of creating WebSiteSlotResource, please refer to the document of WebSiteSlotResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "testsite2"; + string slot = "staging"; + ResourceIdentifier webSiteSlotResourceId = WebSiteSlotResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, slot); + WebSiteSlotResource webSiteSlot = client.GetWebSiteSlotResource(webSiteSlotResourceId); + + // get the collection of this SiteSlotWorkflowResource + SiteSlotWorkflowCollection collection = webSiteSlot.GetSiteSlotWorkflows(); + + // invoke the operation + string workflowName = "stateful1"; + SiteSlotWorkflowResource result = await collection.GetAsync(workflowName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkflowEnvelopeData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // GET a workflow Slot + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GETAWorkflowSlot() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetWorkflow.json + // this example is just showing the usage of "WebApps_GetInstanceWorkflowSlot" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteSlotResource created on azure + // for more information of creating WebSiteSlotResource, please refer to the document of WebSiteSlotResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "testsite2"; + string slot = "staging"; + ResourceIdentifier webSiteSlotResourceId = WebSiteSlotResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, slot); + WebSiteSlotResource webSiteSlot = client.GetWebSiteSlotResource(webSiteSlotResourceId); + + // get the collection of this SiteSlotWorkflowResource + SiteSlotWorkflowCollection collection = webSiteSlot.GetSiteSlotWorkflows(); + + // invoke the operation + string workflowName = "stateful1"; + bool result = await collection.ExistsAsync(workflowName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // GET a workflow Slot + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GETAWorkflowSlot() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetWorkflow.json + // this example is just showing the usage of "WebApps_GetInstanceWorkflowSlot" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteSlotResource created on azure + // for more information of creating WebSiteSlotResource, please refer to the document of WebSiteSlotResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "testsite2"; + string slot = "staging"; + ResourceIdentifier webSiteSlotResourceId = WebSiteSlotResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, slot); + WebSiteSlotResource webSiteSlot = client.GetWebSiteSlotResource(webSiteSlotResourceId); + + // get the collection of this SiteSlotWorkflowResource + SiteSlotWorkflowCollection collection = webSiteSlot.GetSiteSlotWorkflows(); + + // invoke the operation + string workflowName = "stateful1"; + NullableResponse response = await collection.GetIfExistsAsync(workflowName); + SiteSlotWorkflowResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkflowEnvelopeData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotWorkflowResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotWorkflowResource.cs new file mode 100644 index 0000000000000..ea1154da9880f --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotWorkflowResource.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_SiteSlotWorkflowResource + { + // GET a workflow Slot + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GETAWorkflowSlot() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetWorkflow.json + // this example is just showing the usage of "WebApps_GetInstanceWorkflowSlot" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SiteSlotWorkflowResource created on azure + // for more information of creating SiteSlotWorkflowResource, please refer to the document of SiteSlotWorkflowResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "testsite2"; + string slot = "staging"; + string workflowName = "stateful1"; + ResourceIdentifier siteSlotWorkflowResourceId = SiteSlotWorkflowResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, slot, workflowName); + SiteSlotWorkflowResource siteSlotWorkflow = client.GetSiteSlotWorkflowResource(siteSlotWorkflowResourceId); + + // invoke the operation + SiteSlotWorkflowResource result = await siteSlotWorkflow.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkflowEnvelopeData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteWorkflowCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteWorkflowCollection.cs new file mode 100644 index 0000000000000..ad5834a0b0528 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteWorkflowCollection.cs @@ -0,0 +1,163 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_SiteWorkflowCollection + { + // List the workflows + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ListTheWorkflows() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ListWorkflows.json + // this example is just showing the usage of "WebApps_ListWorkflows" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "testsite2"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // get the collection of this SiteWorkflowResource + SiteWorkflowCollection collection = webSite.GetSiteWorkflows(); + + // invoke the operation and iterate over the result + await foreach (SiteWorkflowResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkflowEnvelopeData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // GET a workflow + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GETAWorkflow() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetWorkflow.json + // this example is just showing the usage of "WebApps_GetWorkflow" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "testsite2"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // get the collection of this SiteWorkflowResource + SiteWorkflowCollection collection = webSite.GetSiteWorkflows(); + + // invoke the operation + string workflowName = "stateful1"; + SiteWorkflowResource result = await collection.GetAsync(workflowName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkflowEnvelopeData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // GET a workflow + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GETAWorkflow() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetWorkflow.json + // this example is just showing the usage of "WebApps_GetWorkflow" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "testsite2"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // get the collection of this SiteWorkflowResource + SiteWorkflowCollection collection = webSite.GetSiteWorkflows(); + + // invoke the operation + string workflowName = "stateful1"; + bool result = await collection.ExistsAsync(workflowName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // GET a workflow + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GETAWorkflow() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetWorkflow.json + // this example is just showing the usage of "WebApps_GetWorkflow" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "testsite2"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // get the collection of this SiteWorkflowResource + SiteWorkflowCollection collection = webSite.GetSiteWorkflows(); + + // invoke the operation + string workflowName = "stateful1"; + NullableResponse response = await collection.GetIfExistsAsync(workflowName); + SiteWorkflowResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkflowEnvelopeData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteWorkflowResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteWorkflowResource.cs new file mode 100644 index 0000000000000..daf75b2bb2ff0 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteWorkflowResource.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_SiteWorkflowResource + { + // GET a workflow + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GETAWorkflow() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetWorkflow.json + // this example is just showing the usage of "WebApps_GetWorkflow" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SiteWorkflowResource created on azure + // for more information of creating SiteWorkflowResource, please refer to the document of SiteWorkflowResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "testsite2"; + string workflowName = "stateful1"; + ResourceIdentifier siteWorkflowResourceId = SiteWorkflowResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName); + SiteWorkflowResource siteWorkflow = client.GetSiteWorkflowResource(siteWorkflowResourceId); + + // invoke the operation + SiteWorkflowResource result = await siteWorkflow.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkflowEnvelopeData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBasicAuthPropertyCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBasicAuthPropertyCollection.cs new file mode 100644 index 0000000000000..4bc0ba825051f --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBasicAuthPropertyCollection.cs @@ -0,0 +1,209 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_StaticSiteBasicAuthPropertyCollection + { + // Lists the basic auth properties for a static site. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ListsTheBasicAuthPropertiesForAStaticSite() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ListStaticSiteBasicAuth.json + // this example is just showing the usage of "StaticSites_ListBasicAuth" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteResource created on azure + // for more information of creating StaticSiteResource, please refer to the document of StaticSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + ResourceIdentifier staticSiteResourceId = StaticSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + StaticSiteResource staticSite = client.GetStaticSiteResource(staticSiteResourceId); + + // get the collection of this StaticSiteBasicAuthPropertyResource + StaticSiteBasicAuthPropertyCollection collection = staticSite.GetStaticSiteBasicAuthProperties(); + + // invoke the operation and iterate over the result + await foreach (StaticSiteBasicAuthPropertyResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + StaticSiteBasicAuthPropertyData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Gets the basic auth properties for a static site. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetsTheBasicAuthPropertiesForAStaticSite() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetStaticSiteBasicAuth.json + // this example is just showing the usage of "StaticSites_GetBasicAuth" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteResource created on azure + // for more information of creating StaticSiteResource, please refer to the document of StaticSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + ResourceIdentifier staticSiteResourceId = StaticSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + StaticSiteResource staticSite = client.GetStaticSiteResource(staticSiteResourceId); + + // get the collection of this StaticSiteBasicAuthPropertyResource + StaticSiteBasicAuthPropertyCollection collection = staticSite.GetStaticSiteBasicAuthProperties(); + + // invoke the operation + StaticSiteBasicAuthName basicAuthName = StaticSiteBasicAuthName.Default; + StaticSiteBasicAuthPropertyResource result = await collection.GetAsync(basicAuthName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + StaticSiteBasicAuthPropertyData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Gets the basic auth properties for a static site. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetsTheBasicAuthPropertiesForAStaticSite() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetStaticSiteBasicAuth.json + // this example is just showing the usage of "StaticSites_GetBasicAuth" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteResource created on azure + // for more information of creating StaticSiteResource, please refer to the document of StaticSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + ResourceIdentifier staticSiteResourceId = StaticSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + StaticSiteResource staticSite = client.GetStaticSiteResource(staticSiteResourceId); + + // get the collection of this StaticSiteBasicAuthPropertyResource + StaticSiteBasicAuthPropertyCollection collection = staticSite.GetStaticSiteBasicAuthProperties(); + + // invoke the operation + StaticSiteBasicAuthName basicAuthName = StaticSiteBasicAuthName.Default; + bool result = await collection.ExistsAsync(basicAuthName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Gets the basic auth properties for a static site. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetsTheBasicAuthPropertiesForAStaticSite() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetStaticSiteBasicAuth.json + // this example is just showing the usage of "StaticSites_GetBasicAuth" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteResource created on azure + // for more information of creating StaticSiteResource, please refer to the document of StaticSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + ResourceIdentifier staticSiteResourceId = StaticSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + StaticSiteResource staticSite = client.GetStaticSiteResource(staticSiteResourceId); + + // get the collection of this StaticSiteBasicAuthPropertyResource + StaticSiteBasicAuthPropertyCollection collection = staticSite.GetStaticSiteBasicAuthProperties(); + + // invoke the operation + StaticSiteBasicAuthName basicAuthName = StaticSiteBasicAuthName.Default; + NullableResponse response = await collection.GetIfExistsAsync(basicAuthName); + StaticSiteBasicAuthPropertyResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + StaticSiteBasicAuthPropertyData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // Creates or updates basic auth properties for a static site. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CreatesOrUpdatesBasicAuthPropertiesForAStaticSite() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/CreateOrUpdateStaticSiteBasicAuth.json + // this example is just showing the usage of "StaticSites_CreateOrUpdateBasicAuth" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteResource created on azure + // for more information of creating StaticSiteResource, please refer to the document of StaticSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + ResourceIdentifier staticSiteResourceId = StaticSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + StaticSiteResource staticSite = client.GetStaticSiteResource(staticSiteResourceId); + + // get the collection of this StaticSiteBasicAuthPropertyResource + StaticSiteBasicAuthPropertyCollection collection = staticSite.GetStaticSiteBasicAuthProperties(); + + // invoke the operation + StaticSiteBasicAuthName basicAuthName = StaticSiteBasicAuthName.Default; + StaticSiteBasicAuthPropertyData data = new StaticSiteBasicAuthPropertyData() + { + Password = "**********************", + SecretUri = null, + ApplicableEnvironmentsMode = "AllEnvironments", + Environments = +{ +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, basicAuthName, data); + StaticSiteBasicAuthPropertyResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + StaticSiteBasicAuthPropertyData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBasicAuthPropertyResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBasicAuthPropertyResource.cs new file mode 100644 index 0000000000000..ef70639557cfa --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBasicAuthPropertyResource.cs @@ -0,0 +1,92 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_StaticSiteBasicAuthPropertyResource + { + // Gets the basic auth properties for a static site. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetsTheBasicAuthPropertiesForAStaticSite() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetStaticSiteBasicAuth.json + // this example is just showing the usage of "StaticSites_GetBasicAuth" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteBasicAuthPropertyResource created on azure + // for more information of creating StaticSiteBasicAuthPropertyResource, please refer to the document of StaticSiteBasicAuthPropertyResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + StaticSiteBasicAuthName basicAuthName = StaticSiteBasicAuthName.Default; + ResourceIdentifier staticSiteBasicAuthPropertyResourceId = StaticSiteBasicAuthPropertyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, basicAuthName); + StaticSiteBasicAuthPropertyResource staticSiteBasicAuthProperty = client.GetStaticSiteBasicAuthPropertyResource(staticSiteBasicAuthPropertyResourceId); + + // invoke the operation + StaticSiteBasicAuthPropertyResource result = await staticSiteBasicAuthProperty.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + StaticSiteBasicAuthPropertyData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Creates or updates basic auth properties for a static site. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_CreatesOrUpdatesBasicAuthPropertiesForAStaticSite() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/CreateOrUpdateStaticSiteBasicAuth.json + // this example is just showing the usage of "StaticSites_CreateOrUpdateBasicAuth" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteBasicAuthPropertyResource created on azure + // for more information of creating StaticSiteBasicAuthPropertyResource, please refer to the document of StaticSiteBasicAuthPropertyResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + StaticSiteBasicAuthName basicAuthName = StaticSiteBasicAuthName.Default; + ResourceIdentifier staticSiteBasicAuthPropertyResourceId = StaticSiteBasicAuthPropertyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, basicAuthName); + StaticSiteBasicAuthPropertyResource staticSiteBasicAuthProperty = client.GetStaticSiteBasicAuthPropertyResource(staticSiteBasicAuthPropertyResourceId); + + // invoke the operation + StaticSiteBasicAuthPropertyData data = new StaticSiteBasicAuthPropertyData() + { + Password = "**********************", + SecretUri = null, + ApplicableEnvironmentsMode = "AllEnvironments", + Environments = +{ +}, + }; + ArmOperation lro = await staticSiteBasicAuthProperty.UpdateAsync(WaitUntil.Completed, data); + StaticSiteBasicAuthPropertyResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + StaticSiteBasicAuthPropertyData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildCollection.cs index 598ab030f6a11..bb22cbcdccb7d 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_StaticSiteBuildCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_GetAllBuildsForAStaticSite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetStaticSiteBuilds.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetStaticSiteBuilds.json // this example is just showing the usage of "StaticSites_GetStaticSiteBuilds" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +56,7 @@ public async Task GetAll_GetAllBuildsForAStaticSite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAStaticSiteBuild() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetStaticSiteBuild.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetStaticSiteBuild.json // this example is just showing the usage of "StaticSites_GetStaticSiteBuild" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -91,7 +91,7 @@ public async Task Get_GetAStaticSiteBuild() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAStaticSiteBuild() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetStaticSiteBuild.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetStaticSiteBuild.json // this example is just showing the usage of "StaticSites_GetStaticSiteBuild" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -122,7 +122,7 @@ public async Task Exists_GetAStaticSiteBuild() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAStaticSiteBuild() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetStaticSiteBuild.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetStaticSiteBuild.json // this example is just showing the usage of "StaticSites_GetStaticSiteBuild" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildDatabaseConnectionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildDatabaseConnectionCollection.cs new file mode 100644 index 0000000000000..b590ced193deb --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildDatabaseConnectionCollection.cs @@ -0,0 +1,211 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_StaticSiteBuildDatabaseConnectionCollection + { + // List overviews of database connections for the static site build. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ListOverviewsOfDatabaseConnectionsForTheStaticSiteBuild() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetStaticSiteBuildDatabaseConnections.json + // this example is just showing the usage of "StaticSites_GetBuildDatabaseConnections" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteBuildResource created on azure + // for more information of creating StaticSiteBuildResource, please refer to the document of StaticSiteBuildResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + string environmentName = "default"; + ResourceIdentifier staticSiteBuildResourceId = StaticSiteBuildResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, environmentName); + StaticSiteBuildResource staticSiteBuild = client.GetStaticSiteBuildResource(staticSiteBuildResourceId); + + // get the collection of this StaticSiteBuildDatabaseConnectionResource + StaticSiteBuildDatabaseConnectionCollection collection = staticSiteBuild.GetStaticSiteBuildDatabaseConnections(); + + // invoke the operation and iterate over the result + await foreach (StaticSiteBuildDatabaseConnectionResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + StaticSiteDatabaseConnectionData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get overview of database connections for the static site build. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetOverviewOfDatabaseConnectionsForTheStaticSiteBuild() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetStaticSiteBuildDatabaseConnection.json + // this example is just showing the usage of "StaticSites_GetBuildDatabaseConnection" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteBuildResource created on azure + // for more information of creating StaticSiteBuildResource, please refer to the document of StaticSiteBuildResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + string environmentName = "default"; + ResourceIdentifier staticSiteBuildResourceId = StaticSiteBuildResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, environmentName); + StaticSiteBuildResource staticSiteBuild = client.GetStaticSiteBuildResource(staticSiteBuildResourceId); + + // get the collection of this StaticSiteBuildDatabaseConnectionResource + StaticSiteBuildDatabaseConnectionCollection collection = staticSiteBuild.GetStaticSiteBuildDatabaseConnections(); + + // invoke the operation + string databaseConnectionName = "default"; + StaticSiteBuildDatabaseConnectionResource result = await collection.GetAsync(databaseConnectionName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + StaticSiteDatabaseConnectionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get overview of database connections for the static site build. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetOverviewOfDatabaseConnectionsForTheStaticSiteBuild() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetStaticSiteBuildDatabaseConnection.json + // this example is just showing the usage of "StaticSites_GetBuildDatabaseConnection" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteBuildResource created on azure + // for more information of creating StaticSiteBuildResource, please refer to the document of StaticSiteBuildResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + string environmentName = "default"; + ResourceIdentifier staticSiteBuildResourceId = StaticSiteBuildResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, environmentName); + StaticSiteBuildResource staticSiteBuild = client.GetStaticSiteBuildResource(staticSiteBuildResourceId); + + // get the collection of this StaticSiteBuildDatabaseConnectionResource + StaticSiteBuildDatabaseConnectionCollection collection = staticSiteBuild.GetStaticSiteBuildDatabaseConnections(); + + // invoke the operation + string databaseConnectionName = "default"; + bool result = await collection.ExistsAsync(databaseConnectionName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Get overview of database connections for the static site build. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetOverviewOfDatabaseConnectionsForTheStaticSiteBuild() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetStaticSiteBuildDatabaseConnection.json + // this example is just showing the usage of "StaticSites_GetBuildDatabaseConnection" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteBuildResource created on azure + // for more information of creating StaticSiteBuildResource, please refer to the document of StaticSiteBuildResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + string environmentName = "default"; + ResourceIdentifier staticSiteBuildResourceId = StaticSiteBuildResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, environmentName); + StaticSiteBuildResource staticSiteBuild = client.GetStaticSiteBuildResource(staticSiteBuildResourceId); + + // get the collection of this StaticSiteBuildDatabaseConnectionResource + StaticSiteBuildDatabaseConnectionCollection collection = staticSiteBuild.GetStaticSiteBuildDatabaseConnections(); + + // invoke the operation + string databaseConnectionName = "default"; + NullableResponse response = await collection.GetIfExistsAsync(databaseConnectionName); + StaticSiteBuildDatabaseConnectionResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + StaticSiteDatabaseConnectionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // Create or update a database connection for a static site build + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CreateOrUpdateADatabaseConnectionForAStaticSiteBuild() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/CreateOrUpdateStaticSiteBuildDatabaseConnection.json + // this example is just showing the usage of "StaticSites_CreateOrUpdateBuildDatabaseConnection" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteBuildResource created on azure + // for more information of creating StaticSiteBuildResource, please refer to the document of StaticSiteBuildResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + string environmentName = "default"; + ResourceIdentifier staticSiteBuildResourceId = StaticSiteBuildResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, environmentName); + StaticSiteBuildResource staticSiteBuild = client.GetStaticSiteBuildResource(staticSiteBuildResourceId); + + // get the collection of this StaticSiteBuildDatabaseConnectionResource + StaticSiteBuildDatabaseConnectionCollection collection = staticSiteBuild.GetStaticSiteBuildDatabaseConnections(); + + // invoke the operation + string databaseConnectionName = "default"; + StaticSiteDatabaseConnectionData data = new StaticSiteDatabaseConnectionData() + { + ResourceId = new ResourceIdentifier("/subscription/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/databaseRG/providers/Microsoft.DocumentDB/databaseAccounts/exampleDatabaseName"), + ConnectionIdentity = "SystemAssigned", + ConnectionString = "AccountEndpoint=https://exampleDatabaseName.documents.azure.com:443/;Database=mydb;", + Region = "West US 2", + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, databaseConnectionName, data); + StaticSiteBuildDatabaseConnectionResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + StaticSiteDatabaseConnectionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildDatabaseConnectionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildDatabaseConnectionResource.cs new file mode 100644 index 0000000000000..275fe096b82d2 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildDatabaseConnectionResource.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_StaticSiteBuildDatabaseConnectionResource + { + // Get overview of database connections for the static site build. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetOverviewOfDatabaseConnectionsForTheStaticSiteBuild() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetStaticSiteBuildDatabaseConnection.json + // this example is just showing the usage of "StaticSites_GetBuildDatabaseConnection" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteBuildDatabaseConnectionResource created on azure + // for more information of creating StaticSiteBuildDatabaseConnectionResource, please refer to the document of StaticSiteBuildDatabaseConnectionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + string environmentName = "default"; + string databaseConnectionName = "default"; + ResourceIdentifier staticSiteBuildDatabaseConnectionResourceId = StaticSiteBuildDatabaseConnectionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, environmentName, databaseConnectionName); + StaticSiteBuildDatabaseConnectionResource staticSiteBuildDatabaseConnection = client.GetStaticSiteBuildDatabaseConnectionResource(staticSiteBuildDatabaseConnectionResourceId); + + // invoke the operation + StaticSiteBuildDatabaseConnectionResource result = await staticSiteBuildDatabaseConnection.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + StaticSiteDatabaseConnectionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Delete a database connection from a static site build. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_DeleteADatabaseConnectionFromAStaticSiteBuild() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/DeleteStaticSiteBuildDatabaseConnection.json + // this example is just showing the usage of "StaticSites_DeleteBuildDatabaseConnection" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteBuildDatabaseConnectionResource created on azure + // for more information of creating StaticSiteBuildDatabaseConnectionResource, please refer to the document of StaticSiteBuildDatabaseConnectionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + string environmentName = "default"; + string databaseConnectionName = "default"; + ResourceIdentifier staticSiteBuildDatabaseConnectionResourceId = StaticSiteBuildDatabaseConnectionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, environmentName, databaseConnectionName); + StaticSiteBuildDatabaseConnectionResource staticSiteBuildDatabaseConnection = client.GetStaticSiteBuildDatabaseConnectionResource(staticSiteBuildDatabaseConnectionResourceId); + + // invoke the operation + await staticSiteBuildDatabaseConnection.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + + // Patch a database connection for a static site build + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_PatchADatabaseConnectionForAStaticSiteBuild() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/PatchStaticSiteBuildDatabaseConnection.json + // this example is just showing the usage of "StaticSites_UpdateBuildDatabaseConnection" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteBuildDatabaseConnectionResource created on azure + // for more information of creating StaticSiteBuildDatabaseConnectionResource, please refer to the document of StaticSiteBuildDatabaseConnectionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + string environmentName = "default"; + string databaseConnectionName = "default"; + ResourceIdentifier staticSiteBuildDatabaseConnectionResourceId = StaticSiteBuildDatabaseConnectionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, environmentName, databaseConnectionName); + StaticSiteBuildDatabaseConnectionResource staticSiteBuildDatabaseConnection = client.GetStaticSiteBuildDatabaseConnectionResource(staticSiteBuildDatabaseConnectionResourceId); + + // invoke the operation + StaticSiteDatabaseConnectionPatchContent content = new StaticSiteDatabaseConnectionPatchContent(); + StaticSiteBuildDatabaseConnectionResource result = await staticSiteBuildDatabaseConnection.UpdateAsync(content); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + StaticSiteDatabaseConnectionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get details of database connections for the static site build. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetBuildDatabaseConnectionWithDetails_GetDetailsOfDatabaseConnectionsForTheStaticSiteBuild() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetStaticSiteBuildDatabaseConnectionWithDetails.json + // this example is just showing the usage of "StaticSites_GetBuildDatabaseConnectionWithDetails" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteBuildDatabaseConnectionResource created on azure + // for more information of creating StaticSiteBuildDatabaseConnectionResource, please refer to the document of StaticSiteBuildDatabaseConnectionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + string environmentName = "default"; + string databaseConnectionName = "default"; + ResourceIdentifier staticSiteBuildDatabaseConnectionResourceId = StaticSiteBuildDatabaseConnectionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, environmentName, databaseConnectionName); + StaticSiteBuildDatabaseConnectionResource staticSiteBuildDatabaseConnection = client.GetStaticSiteBuildDatabaseConnectionResource(staticSiteBuildDatabaseConnectionResourceId); + + // invoke the operation + StaticSiteBuildDatabaseConnectionResource result = await staticSiteBuildDatabaseConnection.GetBuildDatabaseConnectionWithDetailsAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + StaticSiteDatabaseConnectionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildLinkedBackendCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildLinkedBackendCollection.cs new file mode 100644 index 0000000000000..3b83e18064370 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildLinkedBackendCollection.cs @@ -0,0 +1,209 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_StaticSiteBuildLinkedBackendCollection + { + // Get details of the linked backends registered with a static site build. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_GetDetailsOfTheLinkedBackendsRegisteredWithAStaticSiteBuild() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetLinkedBackendsForStaticSiteBuild.json + // this example is just showing the usage of "StaticSites_GetLinkedBackendsForBuild" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteBuildResource created on azure + // for more information of creating StaticSiteBuildResource, please refer to the document of StaticSiteBuildResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + string environmentName = "default"; + ResourceIdentifier staticSiteBuildResourceId = StaticSiteBuildResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, environmentName); + StaticSiteBuildResource staticSiteBuild = client.GetStaticSiteBuildResource(staticSiteBuildResourceId); + + // get the collection of this StaticSiteBuildLinkedBackendResource + StaticSiteBuildLinkedBackendCollection collection = staticSiteBuild.GetStaticSiteBuildLinkedBackends(); + + // invoke the operation and iterate over the result + await foreach (StaticSiteBuildLinkedBackendResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + StaticSiteLinkedBackendData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get details of the linked backend registered with a static site build by name. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetDetailsOfTheLinkedBackendRegisteredWithAStaticSiteBuildByName() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetLinkedBackendForStaticSiteBuild.json + // this example is just showing the usage of "StaticSites_GetLinkedBackendForBuild" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteBuildResource created on azure + // for more information of creating StaticSiteBuildResource, please refer to the document of StaticSiteBuildResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + string environmentName = "default"; + ResourceIdentifier staticSiteBuildResourceId = StaticSiteBuildResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, environmentName); + StaticSiteBuildResource staticSiteBuild = client.GetStaticSiteBuildResource(staticSiteBuildResourceId); + + // get the collection of this StaticSiteBuildLinkedBackendResource + StaticSiteBuildLinkedBackendCollection collection = staticSiteBuild.GetStaticSiteBuildLinkedBackends(); + + // invoke the operation + string linkedBackendName = "testBackend"; + StaticSiteBuildLinkedBackendResource result = await collection.GetAsync(linkedBackendName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + StaticSiteLinkedBackendData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get details of the linked backend registered with a static site build by name. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetDetailsOfTheLinkedBackendRegisteredWithAStaticSiteBuildByName() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetLinkedBackendForStaticSiteBuild.json + // this example is just showing the usage of "StaticSites_GetLinkedBackendForBuild" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteBuildResource created on azure + // for more information of creating StaticSiteBuildResource, please refer to the document of StaticSiteBuildResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + string environmentName = "default"; + ResourceIdentifier staticSiteBuildResourceId = StaticSiteBuildResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, environmentName); + StaticSiteBuildResource staticSiteBuild = client.GetStaticSiteBuildResource(staticSiteBuildResourceId); + + // get the collection of this StaticSiteBuildLinkedBackendResource + StaticSiteBuildLinkedBackendCollection collection = staticSiteBuild.GetStaticSiteBuildLinkedBackends(); + + // invoke the operation + string linkedBackendName = "testBackend"; + bool result = await collection.ExistsAsync(linkedBackendName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Get details of the linked backend registered with a static site build by name. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetDetailsOfTheLinkedBackendRegisteredWithAStaticSiteBuildByName() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetLinkedBackendForStaticSiteBuild.json + // this example is just showing the usage of "StaticSites_GetLinkedBackendForBuild" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteBuildResource created on azure + // for more information of creating StaticSiteBuildResource, please refer to the document of StaticSiteBuildResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + string environmentName = "default"; + ResourceIdentifier staticSiteBuildResourceId = StaticSiteBuildResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, environmentName); + StaticSiteBuildResource staticSiteBuild = client.GetStaticSiteBuildResource(staticSiteBuildResourceId); + + // get the collection of this StaticSiteBuildLinkedBackendResource + StaticSiteBuildLinkedBackendCollection collection = staticSiteBuild.GetStaticSiteBuildLinkedBackends(); + + // invoke the operation + string linkedBackendName = "testBackend"; + NullableResponse response = await collection.GetIfExistsAsync(linkedBackendName); + StaticSiteBuildLinkedBackendResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + StaticSiteLinkedBackendData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // Link a backend to a static site build + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_LinkABackendToAStaticSiteBuild() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/LinkBackendToStaticSiteBuild.json + // this example is just showing the usage of "StaticSites_LinkBackendToBuild" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteBuildResource created on azure + // for more information of creating StaticSiteBuildResource, please refer to the document of StaticSiteBuildResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + string environmentName = "default"; + ResourceIdentifier staticSiteBuildResourceId = StaticSiteBuildResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, environmentName); + StaticSiteBuildResource staticSiteBuild = client.GetStaticSiteBuildResource(staticSiteBuildResourceId); + + // get the collection of this StaticSiteBuildLinkedBackendResource + StaticSiteBuildLinkedBackendCollection collection = staticSiteBuild.GetStaticSiteBuildLinkedBackends(); + + // invoke the operation + string linkedBackendName = "testBackend"; + StaticSiteLinkedBackendData data = new StaticSiteLinkedBackendData() + { + BackendResourceId = new ResourceIdentifier("/subscription/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/backendRg/providers/Microsoft.Web/sites/testBackend"), + Region = "West US 2", + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, linkedBackendName, data); + StaticSiteBuildLinkedBackendResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + StaticSiteLinkedBackendData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildLinkedBackendResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildLinkedBackendResource.cs new file mode 100644 index 0000000000000..3e928e49fa8e4 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildLinkedBackendResource.cs @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_StaticSiteBuildLinkedBackendResource + { + // Validate if backend can be linked to static site build. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task ValidateBackendForBuild_ValidateIfBackendCanBeLinkedToStaticSiteBuild() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ValidateLinkedBackendForStaticSiteBuild.json + // this example is just showing the usage of "StaticSites_ValidateBackendForBuild" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteBuildLinkedBackendResource created on azure + // for more information of creating StaticSiteBuildLinkedBackendResource, please refer to the document of StaticSiteBuildLinkedBackendResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + string environmentName = "default"; + string linkedBackendName = "testBackend"; + ResourceIdentifier staticSiteBuildLinkedBackendResourceId = StaticSiteBuildLinkedBackendResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, environmentName, linkedBackendName); + StaticSiteBuildLinkedBackendResource staticSiteBuildLinkedBackend = client.GetStaticSiteBuildLinkedBackendResource(staticSiteBuildLinkedBackendResourceId); + + // invoke the operation + StaticSiteLinkedBackendData data = new StaticSiteLinkedBackendData() + { + BackendResourceId = new ResourceIdentifier("/subscription/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/backendRg/providers/Microsoft.Web/sites/testBackend"), + Region = "West US 2", + }; + await staticSiteBuildLinkedBackend.ValidateBackendForBuildAsync(WaitUntil.Completed, data); + + Console.WriteLine($"Succeeded"); + } + + // Get details of the linked backend registered with a static site build by name. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetDetailsOfTheLinkedBackendRegisteredWithAStaticSiteBuildByName() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetLinkedBackendForStaticSiteBuild.json + // this example is just showing the usage of "StaticSites_GetLinkedBackendForBuild" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteBuildLinkedBackendResource created on azure + // for more information of creating StaticSiteBuildLinkedBackendResource, please refer to the document of StaticSiteBuildLinkedBackendResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + string environmentName = "default"; + string linkedBackendName = "testBackend"; + ResourceIdentifier staticSiteBuildLinkedBackendResourceId = StaticSiteBuildLinkedBackendResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, environmentName, linkedBackendName); + StaticSiteBuildLinkedBackendResource staticSiteBuildLinkedBackend = client.GetStaticSiteBuildLinkedBackendResource(staticSiteBuildLinkedBackendResourceId); + + // invoke the operation + StaticSiteBuildLinkedBackendResource result = await staticSiteBuildLinkedBackend.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + StaticSiteLinkedBackendData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Link a backend to a static site build + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_LinkABackendToAStaticSiteBuild() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/LinkBackendToStaticSiteBuild.json + // this example is just showing the usage of "StaticSites_LinkBackendToBuild" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteBuildLinkedBackendResource created on azure + // for more information of creating StaticSiteBuildLinkedBackendResource, please refer to the document of StaticSiteBuildLinkedBackendResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + string environmentName = "default"; + string linkedBackendName = "testBackend"; + ResourceIdentifier staticSiteBuildLinkedBackendResourceId = StaticSiteBuildLinkedBackendResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, environmentName, linkedBackendName); + StaticSiteBuildLinkedBackendResource staticSiteBuildLinkedBackend = client.GetStaticSiteBuildLinkedBackendResource(staticSiteBuildLinkedBackendResourceId); + + // invoke the operation + StaticSiteLinkedBackendData data = new StaticSiteLinkedBackendData() + { + BackendResourceId = new ResourceIdentifier("/subscription/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/backendRg/providers/Microsoft.Web/sites/testBackend"), + Region = "West US 2", + }; + ArmOperation lro = await staticSiteBuildLinkedBackend.UpdateAsync(WaitUntil.Completed, data); + StaticSiteBuildLinkedBackendResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + StaticSiteLinkedBackendData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Unlink a backend from a static site build. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_UnlinkABackendFromAStaticSiteBuild() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/UnlinkBackendFromStaticSiteBuild.json + // this example is just showing the usage of "StaticSites_UnlinkBackendFromBuild" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteBuildLinkedBackendResource created on azure + // for more information of creating StaticSiteBuildLinkedBackendResource, please refer to the document of StaticSiteBuildLinkedBackendResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + string environmentName = "12"; + string linkedBackendName = "testBackend"; + ResourceIdentifier staticSiteBuildLinkedBackendResourceId = StaticSiteBuildLinkedBackendResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, environmentName, linkedBackendName); + StaticSiteBuildLinkedBackendResource staticSiteBuildLinkedBackend = client.GetStaticSiteBuildLinkedBackendResource(staticSiteBuildLinkedBackendResourceId); + + // invoke the operation + await staticSiteBuildLinkedBackend.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildResource.cs index 5eeee0dff457a..f9e1ce6666e72 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildResource.cs @@ -20,7 +20,7 @@ public partial class Sample_StaticSiteBuildResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAStaticSiteBuild() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetStaticSiteBuild.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetStaticSiteBuild.json // this example is just showing the usage of "StaticSites_GetStaticSiteBuild" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +52,7 @@ public async Task Get_GetAStaticSiteBuild() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteAStaticSiteBuild() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/DeleteStaticSiteBuild.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/DeleteStaticSiteBuild.json // this example is just showing the usage of "StaticSites_DeleteStaticSiteBuild" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -80,7 +80,7 @@ public async Task Delete_DeleteAStaticSiteBuild() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdateAppSettings_CreatesOrUpdatesTheFunctionAppSettingsOfAStaticSiteBuild() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/CreateOrUpdateStaticSiteBuildAppSettings.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/CreateOrUpdateStaticSiteBuildAppSettings.json // this example is just showing the usage of "StaticSites_CreateOrUpdateStaticSiteBuildAppSettings" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -116,7 +116,7 @@ public async Task CreateOrUpdateAppSettings_CreatesOrUpdatesTheFunctionAppSettin [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdateFunctionAppSettings_CreatesOrUpdatesTheFunctionAppSettingsOfAStaticSiteBuild() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/CreateOrUpdateStaticSiteBuildFunctionAppSettings.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/CreateOrUpdateStaticSiteBuildFunctionAppSettings.json // this example is just showing the usage of "StaticSites_CreateOrUpdateStaticSiteBuildFunctionAppSettings" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -152,7 +152,7 @@ public async Task CreateOrUpdateFunctionAppSettings_CreatesOrUpdatesTheFunctionA [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetFunctions_GetsTheFunctionsOfAParticularStaticSiteBuild() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/ListStaticSiteBuildFunctions.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ListStaticSiteBuildFunctions.json // this example is just showing the usage of "StaticSites_ListStaticSiteBuildFunctions" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -183,7 +183,7 @@ public async Task GetFunctions_GetsTheFunctionsOfAParticularStaticSiteBuild() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetStaticSiteBuildAppSettings_GetAppSettingsOfAStaticSiteBuild() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/ListStaticSiteBuildAppSettings.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ListStaticSiteBuildAppSettings.json // this example is just showing the usage of "StaticSites_ListStaticSiteBuildAppSettings" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -211,7 +211,7 @@ public async Task GetStaticSiteBuildAppSettings_GetAppSettingsOfAStaticSiteBuild [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetFunctionAppSettings_GetFunctionAppSettingsOfAStaticSiteBuild() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/ListStaticSiteBuildFunctionAppSettings.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ListStaticSiteBuildFunctionAppSettings.json // this example is just showing the usage of "StaticSites_ListStaticSiteBuildFunctionAppSettings" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -234,12 +234,44 @@ public async Task GetFunctionAppSettings_GetFunctionAppSettingsOfAStaticSiteBuil Console.WriteLine($"Succeeded: {result}"); } + // List full details of database connections for the static site build. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetBuildDatabaseConnectionsWithDetails_ListFullDetailsOfDatabaseConnectionsForTheStaticSiteBuild() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetStaticSiteBuildDatabaseConnectionsWithDetails.json + // this example is just showing the usage of "StaticSites_GetBuildDatabaseConnectionsWithDetails" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteBuildResource created on azure + // for more information of creating StaticSiteBuildResource, please refer to the document of StaticSiteBuildResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + string environmentName = "default"; + ResourceIdentifier staticSiteBuildResourceId = StaticSiteBuildResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, environmentName); + StaticSiteBuildResource staticSiteBuild = client.GetStaticSiteBuildResource(staticSiteBuildResourceId); + + // invoke the operation and iterate over the result + await foreach (StaticSiteDatabaseConnectionData item in staticSiteBuild.GetBuildDatabaseConnectionsWithDetailsAsync()) + { + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {item.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + // Deploy a site from a zipped package to a particular static site build [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateZipDeployment_DeployASiteFromAZippedPackageToAParticularStaticSiteBuild() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/StaticSiteBuildZipDeploy.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/StaticSiteBuildZipDeploy.json // this example is just showing the usage of "StaticSites_CreateZipDeploymentForStaticSiteBuild" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildUserProvidedFunctionAppCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildUserProvidedFunctionAppCollection.cs index 03d017d58af08..7e92a4709e626 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildUserProvidedFunctionAppCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildUserProvidedFunctionAppCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_StaticSiteBuildUserProvidedFunctionAppCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_GetDetailsOfTheUserProvidedFunctionAppsRegisteredWithAStaticSiteBuild() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetUserProvidedFunctionAppsForStaticSiteBuild.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetUserProvidedFunctionAppsForStaticSiteBuild.json // this example is just showing the usage of "StaticSites_GetUserProvidedFunctionAppsForStaticSiteBuild" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_GetDetailsOfTheUserProvidedFunctionAppsRegisteredWithAS [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetDetailsOfTheUserProvidedFunctionAppRegisteredWithAStaticSiteBuild() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetUserProvidedFunctionAppForStaticSiteBuild.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetUserProvidedFunctionAppForStaticSiteBuild.json // this example is just showing the usage of "StaticSites_GetUserProvidedFunctionAppForStaticSiteBuild" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -93,7 +93,7 @@ public async Task Get_GetDetailsOfTheUserProvidedFunctionAppRegisteredWithAStati [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetDetailsOfTheUserProvidedFunctionAppRegisteredWithAStaticSiteBuild() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetUserProvidedFunctionAppForStaticSiteBuild.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetUserProvidedFunctionAppForStaticSiteBuild.json // this example is just showing the usage of "StaticSites_GetUserProvidedFunctionAppForStaticSiteBuild" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -125,7 +125,7 @@ public async Task Exists_GetDetailsOfTheUserProvidedFunctionAppRegisteredWithASt [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetDetailsOfTheUserProvidedFunctionAppRegisteredWithAStaticSiteBuild() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetUserProvidedFunctionAppForStaticSiteBuild.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetUserProvidedFunctionAppForStaticSiteBuild.json // this example is just showing the usage of "StaticSites_GetUserProvidedFunctionAppForStaticSiteBuild" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -169,7 +169,7 @@ public async Task GetIfExists_GetDetailsOfTheUserProvidedFunctionAppRegisteredWi [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_RegisterAUserProvidedFunctionAppWithAStaticSiteBuild() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/RegisterUserProvidedFunctionAppWithStaticSiteBuild.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/RegisterUserProvidedFunctionAppWithStaticSiteBuild.json // this example is just showing the usage of "StaticSites_RegisterUserProvidedFunctionAppWithStaticSiteBuild" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildUserProvidedFunctionAppResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildUserProvidedFunctionAppResource.cs index 3eefdd64d9529..fa56ac81e6cab 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildUserProvidedFunctionAppResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildUserProvidedFunctionAppResource.cs @@ -19,7 +19,7 @@ public partial class Sample_StaticSiteBuildUserProvidedFunctionAppResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetDetailsOfTheUserProvidedFunctionAppRegisteredWithAStaticSiteBuild() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetUserProvidedFunctionAppForStaticSiteBuild.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetUserProvidedFunctionAppForStaticSiteBuild.json // this example is just showing the usage of "StaticSites_GetUserProvidedFunctionAppForStaticSiteBuild" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +52,7 @@ public async Task Get_GetDetailsOfTheUserProvidedFunctionAppRegisteredWithAStati [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_RegisterAUserProvidedFunctionAppWithAStaticSiteBuild() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/RegisterUserProvidedFunctionAppWithStaticSiteBuild.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/RegisterUserProvidedFunctionAppWithStaticSiteBuild.json // this example is just showing the usage of "StaticSites_RegisterUserProvidedFunctionAppWithStaticSiteBuild" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -92,7 +92,7 @@ public async Task Update_RegisterAUserProvidedFunctionAppWithAStaticSiteBuild() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DetachTheUserProvidedFunctionAppFromTheStaticSiteBuild() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/DetachUserProvidedFunctionAppFromStaticSiteBuild.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/DetachUserProvidedFunctionAppFromStaticSiteBuild.json // this example is just showing the usage of "StaticSites_DetachUserProvidedFunctionAppFromStaticSiteBuild" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteCollection.cs index f1ba0dbd95e62..09958f2ed2180 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_StaticSiteCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_GetStaticSitesForAResourceGroup() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetStaticSites.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetStaticSites.json // this example is just showing the usage of "StaticSites_GetStaticSitesByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_GetStaticSitesForAResourceGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetDetailsForAStaticSite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetStaticSite.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetStaticSite.json // this example is just showing the usage of "StaticSites_GetStaticSite" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -91,7 +91,7 @@ public async Task Get_GetDetailsForAStaticSite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetDetailsForAStaticSite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetStaticSite.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetStaticSite.json // this example is just showing the usage of "StaticSites_GetStaticSite" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -121,7 +121,7 @@ public async Task Exists_GetDetailsForAStaticSite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetDetailsForAStaticSite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetStaticSite.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetStaticSite.json // this example is just showing the usage of "StaticSites_GetStaticSite" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -163,7 +163,7 @@ public async Task GetIfExists_GetDetailsForAStaticSite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateAStaticSite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/CreateOrUpdateStaticSite.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/CreateOrUpdateStaticSite.json // this example is just showing the usage of "StaticSites_CreateOrUpdateStaticSite" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteCustomDomainOverviewCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteCustomDomainOverviewCollection.cs index 42c8e97a48766..245215f5b9567 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteCustomDomainOverviewCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteCustomDomainOverviewCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_StaticSiteCustomDomainOverviewCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListCustomDomainsForAStaticSite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetStaticSiteCustomDomains.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetStaticSiteCustomDomains.json // this example is just showing the usage of "StaticSites_ListStaticSiteCustomDomains" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_ListCustomDomainsForAStaticSite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetCustomDomainForAStaticSite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetStaticSiteCustomDomain.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetStaticSiteCustomDomain.json // this example is just showing the usage of "StaticSites_GetStaticSiteCustomDomain" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -92,7 +92,7 @@ public async Task Get_GetCustomDomainForAStaticSite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetCustomDomainForAStaticSite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetStaticSiteCustomDomain.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetStaticSiteCustomDomain.json // this example is just showing the usage of "StaticSites_GetStaticSiteCustomDomain" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -123,7 +123,7 @@ public async Task Exists_GetCustomDomainForAStaticSite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetCustomDomainForAStaticSite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetStaticSiteCustomDomain.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetStaticSiteCustomDomain.json // this example is just showing the usage of "StaticSites_GetStaticSiteCustomDomain" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -166,7 +166,7 @@ public async Task GetIfExists_GetCustomDomainForAStaticSite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateACustomDomainForAStaticSite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/CreateOrUpdateStaticSiteCustomDomain.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/CreateOrUpdateStaticSiteCustomDomain.json // this example is just showing the usage of "StaticSites_CreateOrUpdateStaticSiteCustomDomain" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteCustomDomainOverviewResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteCustomDomainOverviewResource.cs index 11365c3fd8427..90e3d5720700e 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteCustomDomainOverviewResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteCustomDomainOverviewResource.cs @@ -20,7 +20,7 @@ public partial class Sample_StaticSiteCustomDomainOverviewResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetCustomDomainForAStaticSite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetStaticSiteCustomDomain.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetStaticSiteCustomDomain.json // this example is just showing the usage of "StaticSites_GetStaticSiteCustomDomain" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +52,7 @@ public async Task Get_GetCustomDomainForAStaticSite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateOrUpdateACustomDomainForAStaticSite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/CreateOrUpdateStaticSiteCustomDomain.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/CreateOrUpdateStaticSiteCustomDomain.json // this example is just showing the usage of "StaticSites_CreateOrUpdateStaticSiteCustomDomain" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -86,7 +86,7 @@ public async Task Update_CreateOrUpdateACustomDomainForAStaticSite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteACustomDomainForAStaticSite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/DeleteStaticSiteCustomDomain.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/DeleteStaticSiteCustomDomain.json // this example is just showing the usage of "StaticSites_DeleteStaticSiteCustomDomain" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -114,7 +114,7 @@ public async Task Delete_DeleteACustomDomainForAStaticSite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task ValidateCustomDomainCanBeAddedToStaticSite_ValidateACustomDomainForAStaticSite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/ValidateStaticSiteCustomDomain.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ValidateStaticSiteCustomDomain.json // this example is just showing the usage of "StaticSites_ValidateCustomDomainCanBeAddedToStaticSite" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteDatabaseConnectionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteDatabaseConnectionCollection.cs new file mode 100644 index 0000000000000..f3815b0690776 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteDatabaseConnectionCollection.cs @@ -0,0 +1,206 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_StaticSiteDatabaseConnectionCollection + { + // List overviews of database connections for the static site. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ListOverviewsOfDatabaseConnectionsForTheStaticSite() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetStaticSiteDatabaseConnections.json + // this example is just showing the usage of "StaticSites_GetDatabaseConnections" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteResource created on azure + // for more information of creating StaticSiteResource, please refer to the document of StaticSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + ResourceIdentifier staticSiteResourceId = StaticSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + StaticSiteResource staticSite = client.GetStaticSiteResource(staticSiteResourceId); + + // get the collection of this StaticSiteDatabaseConnectionResource + StaticSiteDatabaseConnectionCollection collection = staticSite.GetStaticSiteDatabaseConnections(); + + // invoke the operation and iterate over the result + await foreach (StaticSiteDatabaseConnectionResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + StaticSiteDatabaseConnectionData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get overview of database connections for the static site. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetOverviewOfDatabaseConnectionsForTheStaticSite() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetStaticSiteDatabaseConnection.json + // this example is just showing the usage of "StaticSites_GetDatabaseConnection" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteResource created on azure + // for more information of creating StaticSiteResource, please refer to the document of StaticSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + ResourceIdentifier staticSiteResourceId = StaticSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + StaticSiteResource staticSite = client.GetStaticSiteResource(staticSiteResourceId); + + // get the collection of this StaticSiteDatabaseConnectionResource + StaticSiteDatabaseConnectionCollection collection = staticSite.GetStaticSiteDatabaseConnections(); + + // invoke the operation + string databaseConnectionName = "default"; + StaticSiteDatabaseConnectionResource result = await collection.GetAsync(databaseConnectionName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + StaticSiteDatabaseConnectionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get overview of database connections for the static site. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetOverviewOfDatabaseConnectionsForTheStaticSite() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetStaticSiteDatabaseConnection.json + // this example is just showing the usage of "StaticSites_GetDatabaseConnection" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteResource created on azure + // for more information of creating StaticSiteResource, please refer to the document of StaticSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + ResourceIdentifier staticSiteResourceId = StaticSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + StaticSiteResource staticSite = client.GetStaticSiteResource(staticSiteResourceId); + + // get the collection of this StaticSiteDatabaseConnectionResource + StaticSiteDatabaseConnectionCollection collection = staticSite.GetStaticSiteDatabaseConnections(); + + // invoke the operation + string databaseConnectionName = "default"; + bool result = await collection.ExistsAsync(databaseConnectionName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Get overview of database connections for the static site. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetOverviewOfDatabaseConnectionsForTheStaticSite() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetStaticSiteDatabaseConnection.json + // this example is just showing the usage of "StaticSites_GetDatabaseConnection" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteResource created on azure + // for more information of creating StaticSiteResource, please refer to the document of StaticSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + ResourceIdentifier staticSiteResourceId = StaticSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + StaticSiteResource staticSite = client.GetStaticSiteResource(staticSiteResourceId); + + // get the collection of this StaticSiteDatabaseConnectionResource + StaticSiteDatabaseConnectionCollection collection = staticSite.GetStaticSiteDatabaseConnections(); + + // invoke the operation + string databaseConnectionName = "default"; + NullableResponse response = await collection.GetIfExistsAsync(databaseConnectionName); + StaticSiteDatabaseConnectionResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + StaticSiteDatabaseConnectionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // Create or update a database connection for a static site + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CreateOrUpdateADatabaseConnectionForAStaticSite() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/CreateOrUpdateStaticSiteDatabaseConnection.json + // this example is just showing the usage of "StaticSites_CreateOrUpdateDatabaseConnection" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteResource created on azure + // for more information of creating StaticSiteResource, please refer to the document of StaticSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + ResourceIdentifier staticSiteResourceId = StaticSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + StaticSiteResource staticSite = client.GetStaticSiteResource(staticSiteResourceId); + + // get the collection of this StaticSiteDatabaseConnectionResource + StaticSiteDatabaseConnectionCollection collection = staticSite.GetStaticSiteDatabaseConnections(); + + // invoke the operation + string databaseConnectionName = "default"; + StaticSiteDatabaseConnectionData data = new StaticSiteDatabaseConnectionData() + { + ResourceId = new ResourceIdentifier("/subscription/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/databaseRG/providers/Microsoft.DocumentDB/databaseAccounts/exampleDatabaseName"), + ConnectionIdentity = "SystemAssigned", + ConnectionString = "AccountEndpoint=https://exampleDatabaseName.documents.azure.com:443/;Database=mydb;", + Region = "West US 2", + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, databaseConnectionName, data); + StaticSiteDatabaseConnectionResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + StaticSiteDatabaseConnectionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteDatabaseConnectionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteDatabaseConnectionResource.cs new file mode 100644 index 0000000000000..969b9b17f48ac --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteDatabaseConnectionResource.cs @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_StaticSiteDatabaseConnectionResource + { + // Get overview of database connections for the static site. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetOverviewOfDatabaseConnectionsForTheStaticSite() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetStaticSiteDatabaseConnection.json + // this example is just showing the usage of "StaticSites_GetDatabaseConnection" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteDatabaseConnectionResource created on azure + // for more information of creating StaticSiteDatabaseConnectionResource, please refer to the document of StaticSiteDatabaseConnectionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + string databaseConnectionName = "default"; + ResourceIdentifier staticSiteDatabaseConnectionResourceId = StaticSiteDatabaseConnectionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, databaseConnectionName); + StaticSiteDatabaseConnectionResource staticSiteDatabaseConnection = client.GetStaticSiteDatabaseConnectionResource(staticSiteDatabaseConnectionResourceId); + + // invoke the operation + StaticSiteDatabaseConnectionResource result = await staticSiteDatabaseConnection.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + StaticSiteDatabaseConnectionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Delete a database connection from a static site. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_DeleteADatabaseConnectionFromAStaticSite() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/DeleteStaticSiteDatabaseConnection.json + // this example is just showing the usage of "StaticSites_DeleteDatabaseConnection" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteDatabaseConnectionResource created on azure + // for more information of creating StaticSiteDatabaseConnectionResource, please refer to the document of StaticSiteDatabaseConnectionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + string databaseConnectionName = "default"; + ResourceIdentifier staticSiteDatabaseConnectionResourceId = StaticSiteDatabaseConnectionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, databaseConnectionName); + StaticSiteDatabaseConnectionResource staticSiteDatabaseConnection = client.GetStaticSiteDatabaseConnectionResource(staticSiteDatabaseConnectionResourceId); + + // invoke the operation + await staticSiteDatabaseConnection.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + + // Patch a database connection for a static site + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_PatchADatabaseConnectionForAStaticSite() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/PatchStaticSiteDatabaseConnection.json + // this example is just showing the usage of "StaticSites_UpdateDatabaseConnection" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteDatabaseConnectionResource created on azure + // for more information of creating StaticSiteDatabaseConnectionResource, please refer to the document of StaticSiteDatabaseConnectionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + string databaseConnectionName = "default"; + ResourceIdentifier staticSiteDatabaseConnectionResourceId = StaticSiteDatabaseConnectionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, databaseConnectionName); + StaticSiteDatabaseConnectionResource staticSiteDatabaseConnection = client.GetStaticSiteDatabaseConnectionResource(staticSiteDatabaseConnectionResourceId); + + // invoke the operation + StaticSiteDatabaseConnectionPatchContent content = new StaticSiteDatabaseConnectionPatchContent(); + StaticSiteDatabaseConnectionResource result = await staticSiteDatabaseConnection.UpdateAsync(content); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + StaticSiteDatabaseConnectionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get details of database connections for the static site. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetDatabaseConnectionWithDetails_GetDetailsOfDatabaseConnectionsForTheStaticSite() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetStaticSiteDatabaseConnectionWithDetails.json + // this example is just showing the usage of "StaticSites_GetDatabaseConnectionWithDetails" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteDatabaseConnectionResource created on azure + // for more information of creating StaticSiteDatabaseConnectionResource, please refer to the document of StaticSiteDatabaseConnectionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + string databaseConnectionName = "default"; + ResourceIdentifier staticSiteDatabaseConnectionResourceId = StaticSiteDatabaseConnectionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, databaseConnectionName); + StaticSiteDatabaseConnectionResource staticSiteDatabaseConnection = client.GetStaticSiteDatabaseConnectionResource(staticSiteDatabaseConnectionResourceId); + + // invoke the operation + StaticSiteDatabaseConnectionResource result = await staticSiteDatabaseConnection.GetDatabaseConnectionWithDetailsAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + StaticSiteDatabaseConnectionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteLinkedBackendCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteLinkedBackendCollection.cs new file mode 100644 index 0000000000000..a36f4640d4315 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteLinkedBackendCollection.cs @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_StaticSiteLinkedBackendCollection + { + // Get details of the linked backends registered with a static site. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_GetDetailsOfTheLinkedBackendsRegisteredWithAStaticSite() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetLinkedBackendsForStaticSite.json + // this example is just showing the usage of "StaticSites_GetLinkedBackends" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteResource created on azure + // for more information of creating StaticSiteResource, please refer to the document of StaticSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + ResourceIdentifier staticSiteResourceId = StaticSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + StaticSiteResource staticSite = client.GetStaticSiteResource(staticSiteResourceId); + + // get the collection of this StaticSiteLinkedBackendResource + StaticSiteLinkedBackendCollection collection = staticSite.GetStaticSiteLinkedBackends(); + + // invoke the operation and iterate over the result + await foreach (StaticSiteLinkedBackendResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + StaticSiteLinkedBackendData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get details of the linked backend registered with a static site by name. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetDetailsOfTheLinkedBackendRegisteredWithAStaticSiteByName() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetLinkedBackendForStaticSite.json + // this example is just showing the usage of "StaticSites_GetLinkedBackend" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteResource created on azure + // for more information of creating StaticSiteResource, please refer to the document of StaticSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + ResourceIdentifier staticSiteResourceId = StaticSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + StaticSiteResource staticSite = client.GetStaticSiteResource(staticSiteResourceId); + + // get the collection of this StaticSiteLinkedBackendResource + StaticSiteLinkedBackendCollection collection = staticSite.GetStaticSiteLinkedBackends(); + + // invoke the operation + string linkedBackendName = "testBackend"; + StaticSiteLinkedBackendResource result = await collection.GetAsync(linkedBackendName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + StaticSiteLinkedBackendData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get details of the linked backend registered with a static site by name. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetDetailsOfTheLinkedBackendRegisteredWithAStaticSiteByName() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetLinkedBackendForStaticSite.json + // this example is just showing the usage of "StaticSites_GetLinkedBackend" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteResource created on azure + // for more information of creating StaticSiteResource, please refer to the document of StaticSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + ResourceIdentifier staticSiteResourceId = StaticSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + StaticSiteResource staticSite = client.GetStaticSiteResource(staticSiteResourceId); + + // get the collection of this StaticSiteLinkedBackendResource + StaticSiteLinkedBackendCollection collection = staticSite.GetStaticSiteLinkedBackends(); + + // invoke the operation + string linkedBackendName = "testBackend"; + bool result = await collection.ExistsAsync(linkedBackendName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Get details of the linked backend registered with a static site by name. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetDetailsOfTheLinkedBackendRegisteredWithAStaticSiteByName() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetLinkedBackendForStaticSite.json + // this example is just showing the usage of "StaticSites_GetLinkedBackend" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteResource created on azure + // for more information of creating StaticSiteResource, please refer to the document of StaticSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + ResourceIdentifier staticSiteResourceId = StaticSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + StaticSiteResource staticSite = client.GetStaticSiteResource(staticSiteResourceId); + + // get the collection of this StaticSiteLinkedBackendResource + StaticSiteLinkedBackendCollection collection = staticSite.GetStaticSiteLinkedBackends(); + + // invoke the operation + string linkedBackendName = "testBackend"; + NullableResponse response = await collection.GetIfExistsAsync(linkedBackendName); + StaticSiteLinkedBackendResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + StaticSiteLinkedBackendData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // Link a backend to a static site + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_LinkABackendToAStaticSite() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/LinkBackendToStaticSite.json + // this example is just showing the usage of "StaticSites_LinkBackend" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteResource created on azure + // for more information of creating StaticSiteResource, please refer to the document of StaticSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + ResourceIdentifier staticSiteResourceId = StaticSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + StaticSiteResource staticSite = client.GetStaticSiteResource(staticSiteResourceId); + + // get the collection of this StaticSiteLinkedBackendResource + StaticSiteLinkedBackendCollection collection = staticSite.GetStaticSiteLinkedBackends(); + + // invoke the operation + string linkedBackendName = "testBackend"; + StaticSiteLinkedBackendData data = new StaticSiteLinkedBackendData() + { + BackendResourceId = new ResourceIdentifier("/subscription/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/backendRg/providers/Microsoft.Web/sites/testBackend"), + Region = "West US 2", + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, linkedBackendName, data); + StaticSiteLinkedBackendResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + StaticSiteLinkedBackendData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteLinkedBackendResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteLinkedBackendResource.cs new file mode 100644 index 0000000000000..a091f9a43bf0a --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteLinkedBackendResource.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_StaticSiteLinkedBackendResource + { + // Validate if backend can be linked to static site. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task ValidateBackend_ValidateIfBackendCanBeLinkedToStaticSite() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ValidateLinkedBackendForStaticSite.json + // this example is just showing the usage of "StaticSites_ValidateBackend" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteLinkedBackendResource created on azure + // for more information of creating StaticSiteLinkedBackendResource, please refer to the document of StaticSiteLinkedBackendResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + string linkedBackendName = "testBackend"; + ResourceIdentifier staticSiteLinkedBackendResourceId = StaticSiteLinkedBackendResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, linkedBackendName); + StaticSiteLinkedBackendResource staticSiteLinkedBackend = client.GetStaticSiteLinkedBackendResource(staticSiteLinkedBackendResourceId); + + // invoke the operation + StaticSiteLinkedBackendData data = new StaticSiteLinkedBackendData() + { + BackendResourceId = new ResourceIdentifier("/subscription/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/backendRg/providers/Microsoft.Web/sites/testBackend"), + Region = "West US 2", + }; + await staticSiteLinkedBackend.ValidateBackendAsync(WaitUntil.Completed, data); + + Console.WriteLine($"Succeeded"); + } + + // Get details of the linked backend registered with a static site by name. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetDetailsOfTheLinkedBackendRegisteredWithAStaticSiteByName() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetLinkedBackendForStaticSite.json + // this example is just showing the usage of "StaticSites_GetLinkedBackend" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteLinkedBackendResource created on azure + // for more information of creating StaticSiteLinkedBackendResource, please refer to the document of StaticSiteLinkedBackendResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + string linkedBackendName = "testBackend"; + ResourceIdentifier staticSiteLinkedBackendResourceId = StaticSiteLinkedBackendResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, linkedBackendName); + StaticSiteLinkedBackendResource staticSiteLinkedBackend = client.GetStaticSiteLinkedBackendResource(staticSiteLinkedBackendResourceId); + + // invoke the operation + StaticSiteLinkedBackendResource result = await staticSiteLinkedBackend.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + StaticSiteLinkedBackendData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Link a backend to a static site + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_LinkABackendToAStaticSite() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/LinkBackendToStaticSite.json + // this example is just showing the usage of "StaticSites_LinkBackend" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteLinkedBackendResource created on azure + // for more information of creating StaticSiteLinkedBackendResource, please refer to the document of StaticSiteLinkedBackendResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + string linkedBackendName = "testBackend"; + ResourceIdentifier staticSiteLinkedBackendResourceId = StaticSiteLinkedBackendResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, linkedBackendName); + StaticSiteLinkedBackendResource staticSiteLinkedBackend = client.GetStaticSiteLinkedBackendResource(staticSiteLinkedBackendResourceId); + + // invoke the operation + StaticSiteLinkedBackendData data = new StaticSiteLinkedBackendData() + { + BackendResourceId = new ResourceIdentifier("/subscription/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/backendRg/providers/Microsoft.Web/sites/testBackend"), + Region = "West US 2", + }; + ArmOperation lro = await staticSiteLinkedBackend.UpdateAsync(WaitUntil.Completed, data); + StaticSiteLinkedBackendResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + StaticSiteLinkedBackendData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Unlink a backend from a static site. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_UnlinkABackendFromAStaticSite() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/UnlinkBackendFromStaticSite.json + // this example is just showing the usage of "StaticSites_UnlinkBackend" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteLinkedBackendResource created on azure + // for more information of creating StaticSiteLinkedBackendResource, please refer to the document of StaticSiteLinkedBackendResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + string linkedBackendName = "testBackend"; + ResourceIdentifier staticSiteLinkedBackendResourceId = StaticSiteLinkedBackendResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, linkedBackendName); + StaticSiteLinkedBackendResource staticSiteLinkedBackend = client.GetStaticSiteLinkedBackendResource(staticSiteLinkedBackendResourceId); + + // invoke the operation + await staticSiteLinkedBackend.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSitePrivateEndpointConnectionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSitePrivateEndpointConnectionCollection.cs index 58528eaa74acd..a1ecd59ccc82c 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSitePrivateEndpointConnectionCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSitePrivateEndpointConnectionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_StaticSitePrivateEndpointConnectionCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_GetAListOfPrivateEndpointConnectionsAssociatedWithASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetSitePrivateEndpointConnectionList.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetSitePrivateEndpointConnectionList.json // this example is just showing the usage of "StaticSites_GetPrivateEndpointConnectionList" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_GetAListOfPrivateEndpointConnectionsAssociatedWithASite [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAPrivateEndpointConnectionForASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetSitePrivateEndpointConnection.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetSitePrivateEndpointConnection.json // this example is just showing the usage of "StaticSites_GetPrivateEndpointConnection" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -92,7 +92,7 @@ public async Task Get_GetAPrivateEndpointConnectionForASite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAPrivateEndpointConnectionForASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetSitePrivateEndpointConnection.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetSitePrivateEndpointConnection.json // this example is just showing the usage of "StaticSites_GetPrivateEndpointConnection" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -123,7 +123,7 @@ public async Task Exists_GetAPrivateEndpointConnectionForASite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAPrivateEndpointConnectionForASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetSitePrivateEndpointConnection.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetSitePrivateEndpointConnection.json // this example is just showing the usage of "StaticSites_GetPrivateEndpointConnection" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -166,7 +166,7 @@ public async Task GetIfExists_GetAPrivateEndpointConnectionForASite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApprovesOrRejectsAPrivateEndpointConnectionForASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/ApproveRejectSitePrivateEndpointConnection.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ApproveRejectSitePrivateEndpointConnection.json // this example is just showing the usage of "StaticSites_ApproveOrRejectPrivateEndpointConnection" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -187,7 +187,7 @@ public async Task CreateOrUpdate_ApprovesOrRejectsAPrivateEndpointConnectionForA // invoke the operation string privateEndpointConnectionName = "connection"; - PrivateLinkConnectionApprovalRequestInfo info = new PrivateLinkConnectionApprovalRequestInfo() + RemotePrivateEndpointConnectionARMResourceData data = new RemotePrivateEndpointConnectionARMResourceData() { PrivateLinkServiceConnectionState = new PrivateLinkConnectionState() { @@ -196,7 +196,7 @@ public async Task CreateOrUpdate_ApprovesOrRejectsAPrivateEndpointConnectionForA ActionsRequired = "", }, }; - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, privateEndpointConnectionName, info); + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, privateEndpointConnectionName, data); StaticSitePrivateEndpointConnectionResource result = lro.Value; // the variable result is a resource, you could call other operations on this instance as well diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSitePrivateEndpointConnectionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSitePrivateEndpointConnectionResource.cs index 6fbce2bfea852..60cf3e583ad63 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSitePrivateEndpointConnectionResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSitePrivateEndpointConnectionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_StaticSitePrivateEndpointConnectionResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAPrivateEndpointConnectionForASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetSitePrivateEndpointConnection.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetSitePrivateEndpointConnection.json // this example is just showing the usage of "StaticSites_GetPrivateEndpointConnection" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +52,7 @@ public async Task Get_GetAPrivateEndpointConnectionForASite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApprovesOrRejectsAPrivateEndpointConnectionForASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/ApproveRejectSitePrivateEndpointConnection.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ApproveRejectSitePrivateEndpointConnection.json // this example is just showing the usage of "StaticSites_ApproveOrRejectPrivateEndpointConnection" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -70,7 +70,7 @@ public async Task Update_ApprovesOrRejectsAPrivateEndpointConnectionForASite() StaticSitePrivateEndpointConnectionResource staticSitePrivateEndpointConnection = client.GetStaticSitePrivateEndpointConnectionResource(staticSitePrivateEndpointConnectionResourceId); // invoke the operation - PrivateLinkConnectionApprovalRequestInfo info = new PrivateLinkConnectionApprovalRequestInfo() + RemotePrivateEndpointConnectionARMResourceData data = new RemotePrivateEndpointConnectionARMResourceData() { PrivateLinkServiceConnectionState = new PrivateLinkConnectionState() { @@ -79,7 +79,7 @@ public async Task Update_ApprovesOrRejectsAPrivateEndpointConnectionForASite() ActionsRequired = "", }, }; - ArmOperation lro = await staticSitePrivateEndpointConnection.UpdateAsync(WaitUntil.Completed, info); + ArmOperation lro = await staticSitePrivateEndpointConnection.UpdateAsync(WaitUntil.Completed, data); StaticSitePrivateEndpointConnectionResource result = lro.Value; // the variable result is a resource, you could call other operations on this instance as well @@ -94,7 +94,7 @@ public async Task Update_ApprovesOrRejectsAPrivateEndpointConnectionForASite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteAPrivateEndpointConnectionForASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/DeleteSitePrivateEndpointConnection.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/DeleteSitePrivateEndpointConnection.json // this example is just showing the usage of "StaticSites_DeletePrivateEndpointConnection" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteResource.cs index b19f6dfc5fc11..c88eef37badd5 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteResource.cs @@ -21,7 +21,7 @@ public partial class Sample_StaticSiteResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetStaticSites_GetAllStaticSitesInASubscription() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetAllStaticSites.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetAllStaticSites.json // this example is just showing the usage of "StaticSites_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -53,7 +53,7 @@ public async Task GetStaticSites_GetAllStaticSitesInASubscription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetDetailsForAStaticSite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetStaticSite.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetStaticSite.json // this example is just showing the usage of "StaticSites_GetStaticSite" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -84,7 +84,7 @@ public async Task Get_GetDetailsForAStaticSite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteAStaticSite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/DeleteStaticSite.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/DeleteStaticSite.json // this example is just showing the usage of "StaticSites_DeleteStaticSite" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -111,7 +111,7 @@ public async Task Delete_DeleteAStaticSite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_PatchAStaticSite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/PatchStaticSite.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/PatchStaticSite.json // this example is just showing the usage of "StaticSites_UpdateStaticSite" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -143,7 +143,7 @@ public async Task Update_PatchAStaticSite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetUsers_ListUsersForAStaticSite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/ListStaticSiteUsers.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ListStaticSiteUsers.json // this example is just showing the usage of "StaticSites_ListStaticSiteUsers" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -174,7 +174,7 @@ public async Task GetUsers_ListUsersForAStaticSite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task DeleteUser_DeleteAUserForAStaticSite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/DeleteStaticSiteUser.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/DeleteStaticSiteUser.json // this example is just showing the usage of "StaticSites_DeleteStaticSiteUser" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -203,7 +203,7 @@ public async Task DeleteUser_DeleteAUserForAStaticSite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task UpdateUser_CreateOrUpdateAUserForAStaticSite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/UpdateStaticSiteUser.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/UpdateStaticSiteUser.json // this example is just showing the usage of "StaticSites_UpdateStaticSiteUser" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -236,7 +236,7 @@ public async Task UpdateUser_CreateOrUpdateAUserForAStaticSite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdateAppSettings_CreatesOrUpdatesTheAppSettingsOfAStaticSite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/CreateOrUpdateStaticSiteAppSettings.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/CreateOrUpdateStaticSiteAppSettings.json // this example is just showing the usage of "StaticSites_CreateOrUpdateStaticSiteAppSettings" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -271,7 +271,7 @@ public async Task CreateOrUpdateAppSettings_CreatesOrUpdatesTheAppSettingsOfASta [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdateFunctionAppSettings_CreatesOrUpdatesTheFunctionAppSettingsOfAStaticSite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/CreateOrUpdateStaticSiteFunctionAppSettings.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/CreateOrUpdateStaticSiteFunctionAppSettings.json // this example is just showing the usage of "StaticSites_CreateOrUpdateStaticSiteFunctionAppSettings" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -306,7 +306,7 @@ public async Task CreateOrUpdateFunctionAppSettings_CreatesOrUpdatesTheFunctionA [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateUserRolesInvitationLink_CreateAnInvitationLinkForAUserForAStaticSite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/CreateUserRolesInvitationLink.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/CreateUserRolesInvitationLink.json // this example is just showing the usage of "StaticSites_CreateUserRolesInvitationLink" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -341,7 +341,7 @@ public async Task CreateUserRolesInvitationLink_CreateAnInvitationLinkForAUserFo [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Detach_DetachAStaticSite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/DetachStaticSite.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/DetachStaticSite.json // this example is just showing the usage of "StaticSites_DetachStaticSite" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -368,7 +368,7 @@ public async Task Detach_DetachAStaticSite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetStaticSiteFunctions_GetsTheFunctionsOfAStaticSite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/ListStaticSiteFunctions.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ListStaticSiteFunctions.json // this example is just showing the usage of "StaticSites_ListStaticSiteFunctions" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -398,7 +398,7 @@ public async Task GetStaticSiteFunctions_GetsTheFunctionsOfAStaticSite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAppSettings_GetAppSettingsOfAStaticSite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/ListStaticSiteAppSettings.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ListStaticSiteAppSettings.json // this example is just showing the usage of "StaticSites_ListStaticSiteAppSettings" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -425,7 +425,7 @@ public async Task GetAppSettings_GetAppSettingsOfAStaticSite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetConfiguredRoles_ListsTheConfiguredRolesForAStaticSite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/ListStaticSiteConfiguredRoles.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ListStaticSiteConfiguredRoles.json // this example is just showing the usage of "StaticSites_ListStaticSiteConfiguredRoles" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -452,7 +452,7 @@ public async Task GetConfiguredRoles_ListsTheConfiguredRolesForAStaticSite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetFunctionAppSettings_GetFunctionAppSettingsOfAStaticSite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/ListStaticSiteFunctionAppSettings.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ListStaticSiteFunctionAppSettings.json // this example is just showing the usage of "StaticSites_ListStaticSiteFunctionAppSettings" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -479,7 +479,7 @@ public async Task GetFunctionAppSettings_GetFunctionAppSettingsOfAStaticSite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetStaticSiteSecrets_ListSecretsForAStaticSite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/ListStaticSiteSecrets.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ListStaticSiteSecrets.json // this example is just showing the usage of "StaticSites_ListStaticSiteSecrets" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -506,7 +506,7 @@ public async Task GetStaticSiteSecrets_ListSecretsForAStaticSite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetPrivateLinkResources_GetPrivateLinkResourcesOfASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetSitePrivateLinkResources.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetSitePrivateLinkResources.json // this example is just showing the usage of "StaticSites_GetPrivateLinkResources" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -536,7 +536,7 @@ public async Task GetPrivateLinkResources_GetPrivateLinkResourcesOfASite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task ResetApiKey_ResetTheApiKeyForAStaticSite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/ResetStaticSiteApiKey.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ResetStaticSiteApiKey.json // this example is just showing the usage of "StaticSites_ResetStaticSiteApiKey" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -563,12 +563,43 @@ public async Task ResetApiKey_ResetTheApiKeyForAStaticSite() Console.WriteLine($"Succeeded"); } + // List full details of database connections for the static site. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetDatabaseConnectionsWithDetails_ListFullDetailsOfDatabaseConnectionsForTheStaticSite() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetStaticSiteDatabaseConnectionsWithDetails.json + // this example is just showing the usage of "StaticSites_GetDatabaseConnectionsWithDetails" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteResource created on azure + // for more information of creating StaticSiteResource, please refer to the document of StaticSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + ResourceIdentifier staticSiteResourceId = StaticSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + StaticSiteResource staticSite = client.GetStaticSiteResource(staticSiteResourceId); + + // invoke the operation and iterate over the result + await foreach (StaticSiteDatabaseConnectionData item in staticSite.GetDatabaseConnectionsWithDetailsAsync()) + { + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {item.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + // Deploy a site from a zipped package [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateZipDeploymentForStaticSite_DeployASiteFromAZippedPackage() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/StaticSiteZipDeploy.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/StaticSiteZipDeploy.json // this example is just showing the usage of "StaticSites_CreateZipDeploymentForStaticSite" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteUserProvidedFunctionAppCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteUserProvidedFunctionAppCollection.cs index a4bc603512756..fe182a4f46223 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteUserProvidedFunctionAppCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteUserProvidedFunctionAppCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_StaticSiteUserProvidedFunctionAppCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_GetDetailsOfTheUserProvidedFunctionAppsRegisteredWithAStaticSite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetUserProvidedFunctionAppsForStaticSite.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetUserProvidedFunctionAppsForStaticSite.json // this example is just showing the usage of "StaticSites_GetUserProvidedFunctionAppsForStaticSite" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +56,7 @@ public async Task GetAll_GetDetailsOfTheUserProvidedFunctionAppsRegisteredWithAS [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetDetailsOfTheUserProvidedFunctionAppRegisteredWithAStaticSite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetUserProvidedFunctionAppForStaticSite.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetUserProvidedFunctionAppForStaticSite.json // this example is just showing the usage of "StaticSites_GetUserProvidedFunctionAppForStaticSite" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -91,7 +91,7 @@ public async Task Get_GetDetailsOfTheUserProvidedFunctionAppRegisteredWithAStati [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetDetailsOfTheUserProvidedFunctionAppRegisteredWithAStaticSite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetUserProvidedFunctionAppForStaticSite.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetUserProvidedFunctionAppForStaticSite.json // this example is just showing the usage of "StaticSites_GetUserProvidedFunctionAppForStaticSite" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -122,7 +122,7 @@ public async Task Exists_GetDetailsOfTheUserProvidedFunctionAppRegisteredWithASt [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetDetailsOfTheUserProvidedFunctionAppRegisteredWithAStaticSite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetUserProvidedFunctionAppForStaticSite.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetUserProvidedFunctionAppForStaticSite.json // this example is just showing the usage of "StaticSites_GetUserProvidedFunctionAppForStaticSite" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -165,7 +165,7 @@ public async Task GetIfExists_GetDetailsOfTheUserProvidedFunctionAppRegisteredWi [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_RegisterAUserProvidedFunctionAppWithAStaticSite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/RegisterUserProvidedFunctionAppWithStaticSite.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/RegisterUserProvidedFunctionAppWithStaticSite.json // this example is just showing the usage of "StaticSites_RegisterUserProvidedFunctionAppWithStaticSite" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteUserProvidedFunctionAppResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteUserProvidedFunctionAppResource.cs index f8115fe5672b2..829ecea369c12 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteUserProvidedFunctionAppResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteUserProvidedFunctionAppResource.cs @@ -19,7 +19,7 @@ public partial class Sample_StaticSiteUserProvidedFunctionAppResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetDetailsOfTheUserProvidedFunctionAppRegisteredWithAStaticSite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetUserProvidedFunctionAppForStaticSite.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetUserProvidedFunctionAppForStaticSite.json // this example is just showing the usage of "StaticSites_GetUserProvidedFunctionAppForStaticSite" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Get_GetDetailsOfTheUserProvidedFunctionAppRegisteredWithAStati [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_RegisterAUserProvidedFunctionAppWithAStaticSite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/RegisterUserProvidedFunctionAppWithStaticSite.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/RegisterUserProvidedFunctionAppWithStaticSite.json // this example is just showing the usage of "StaticSites_RegisterUserProvidedFunctionAppWithStaticSite" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -90,7 +90,7 @@ public async Task Update_RegisterAUserProvidedFunctionAppWithAStaticSite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DetachTheUserProvidedFunctionAppFromTheStaticSite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/DetachUserProvidedFunctionAppFromStaticSite.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/DetachUserProvidedFunctionAppFromStaticSite.json // this example is just showing the usage of "StaticSites_DetachUserProvidedFunctionAppFromStaticSite" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs index 34d78cd14c49f..05152db06f55c 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -16,12 +16,145 @@ namespace Azure.ResourceManager.AppService.Samples { public partial class Sample_SubscriptionResourceExtensions { + // Validate App Service Certificate purchase information by subscription + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task ValidateAppServiceCertificateOrderPurchaseInformation_ValidateAppServiceCertificatePurchaseInformationBySubscription() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2023-12-01/examples/ValidateAppServiceCertificatePurchaseInformationBySubscription.json + // this example is just showing the usage of "AppServiceCertificateOrders_ValidatePurchaseInformation" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation + AppServiceCertificateOrderData data = new AppServiceCertificateOrderData(new AzureLocation("Global")) + { + Certificates = +{ +["SampleCertName1"] = new AppServiceCertificateProperties() +{ +KeyVaultId = new ResourceIdentifier("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/microsoft.keyvault/vaults/SamplevaultName"), +KeyVaultSecretName = "SampleSecretName1", +}, +["SampleCertName2"] = new AppServiceCertificateProperties() +{ +KeyVaultId = new ResourceIdentifier("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/microsoft.keyvault/vaults/SamplevaultName"), +KeyVaultSecretName = "SampleSecretName2", +}, +}, + DistinguishedName = "CN=SampleCustomDomain.com", + ValidityInYears = 2, + KeySize = 2048, + ProductType = CertificateProductType.StandardDomainValidatedSsl, + IsAutoRenew = true, + }; + await subscriptionResource.ValidateAppServiceCertificateOrderPurchaseInformationAsync(data); + + Console.WriteLine($"Succeeded"); + } + + // Check domain availability + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CheckAppServiceDomainRegistrationAvailability_CheckDomainAvailability() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2023-12-01/examples/CheckDomainAvailability.json + // this example is just showing the usage of "Domains_CheckAvailability" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation + AppServiceDomainNameIdentifier identifier = new AppServiceDomainNameIdentifier() + { + Name = "abcd.com", + }; + DomainAvailabilityCheckResult result = await subscriptionResource.CheckAppServiceDomainRegistrationAvailabilityAsync(identifier); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Get Domain Control Center Sso Request + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetControlCenterSsoRequestDomain_GetDomainControlCenterSsoRequest() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2023-12-01/examples/GetDomainControlCenterSsoRequest.json + // this example is just showing the usage of "Domains_GetControlCenterSsoRequest" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation + DomainControlCenterSsoRequestInfo result = await subscriptionResource.GetControlCenterSsoRequestDomainAsync(); + + Console.WriteLine($"Succeeded: {result}"); + } + + // List domain recommendations + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAppServiceDomainRecommendations_ListDomainRecommendations() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2023-12-01/examples/ListDomainRecommendations.json + // this example is just showing the usage of "Domains_ListRecommendations" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + DomainRecommendationSearchContent content = new DomainRecommendationSearchContent() + { + Keywords = "example1", + MaxDomainRecommendations = 10, + }; + await foreach (AppServiceDomainNameIdentifier item in subscriptionResource.GetAppServiceDomainRecommendationsAsync(content)) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine($"Succeeded"); + } + // List ResourceHealthMetadata for a subscription [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAllResourceHealthMetadata_ListResourceHealthMetadataForASubscription() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/ListResourceHealthMetadataBySubscription.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ListResourceHealthMetadataBySubscription.json // this example is just showing the usage of "ResourceHealthMetadata_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -45,12 +178,97 @@ public async Task GetAllResourceHealthMetadata_ListResourceHealthMetadataForASub Console.WriteLine($"Succeeded"); } + // Get custom hostnames under subscription + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetCustomHostNameSites_GetCustomHostnamesUnderSubscription() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ListCustomHostNameSites.json + // this example is just showing the usage of "ListCustomHostNameSites" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + await foreach (CustomHostnameSites item in subscriptionResource.GetCustomHostNameSitesAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get specific custom hostname under subscription + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetCustomHostNameSites_GetSpecificCustomHostnameUnderSubscription() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ListCustomSpecificHostNameSites.json + // this example is just showing the usage of "ListCustomHostNameSites" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + string hostname = "www.example.com"; + await foreach (CustomHostnameSites item in subscriptionResource.GetCustomHostNameSitesAsync(hostname: hostname)) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine($"Succeeded"); + } + + // List aseregions + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAseRegions_ListAseregions() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ListAseRegions.json + // this example is just showing the usage of "ListAseRegions" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + await foreach (AppServiceAseRegion item in subscriptionResource.GetAseRegionsAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine($"Succeeded"); + } + // VerifyHostingEnvironmentVnet [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task VerifyHostingEnvironmentVnet_VerifyHostingEnvironmentVnet() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/VerifyHostingEnvironmentVnet.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/VerifyHostingEnvironmentVnet.json // this example is just showing the usage of "VerifyHostingEnvironmentVnet" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -76,12 +294,41 @@ public async Task VerifyHostingEnvironmentVnet_VerifyHostingEnvironmentVnet() Console.WriteLine($"Succeeded: {result}"); } + // Get usages in location for subscription + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetGetUsagesInLocations_GetUsagesInLocationForSubscription() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetUsagesInLocation.json + // this example is just showing the usage of "GetUsagesInLocation_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + AzureLocation location = new AzureLocation("West US"); + await foreach (CsmUsageQuota item in subscriptionResource.GetGetUsagesInLocationsAsync(location)) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine($"Succeeded"); + } + // Generates a preview workflow file for the static site [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task PreviewStaticSiteWorkflow_GeneratesAPreviewWorkflowFileForTheStaticSite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GenerateStaticSiteWorkflowPreview.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GenerateStaticSiteWorkflowPreview.json // this example is just showing the usage of "StaticSites_PreviewWorkflow" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_TenantResourceExtensions.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_TenantResourceExtensions.cs index 06001376938d6..787f296339e8c 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_TenantResourceExtensions.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_TenantResourceExtensions.cs @@ -20,7 +20,7 @@ public partial class Sample_TenantResourceExtensions [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetOperationsCertificateRegistrationProviders_ListOperations() { - // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2021-02-01/examples/ListOperations.json + // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2023-12-01/examples/ListOperations.json // this example is just showing the usage of "CertificateRegistrationProvider_ListOperations" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -46,7 +46,7 @@ public async Task GetOperationsCertificateRegistrationProviders_ListOperations() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetOperationsDomainRegistrationProviders_ListOperations() { - // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2021-02-01/examples/ListOperations.json + // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2023-12-01/examples/ListOperations.json // this example is just showing the usage of "DomainRegistrationProvider_ListOperations" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -72,7 +72,7 @@ public async Task GetOperationsDomainRegistrationProviders_ListOperations() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetFunctionAppStacksProviders_GetFunctionAppStacks() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetFunctionAppStacks.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetFunctionAppStacks.json // this example is just showing the usage of "Provider_GetFunctionAppStacks" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -98,7 +98,7 @@ public async Task GetFunctionAppStacksProviders_GetFunctionAppStacks() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetFunctionAppStacksForLocationProviders_GetLocationsFunctionAppStacks() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetFunctionAppStacksForLocation.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetFunctionAppStacksForLocation.json // this example is just showing the usage of "Provider_GetFunctionAppStacksForLocation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -125,7 +125,7 @@ public async Task GetFunctionAppStacksForLocationProviders_GetLocationsFunctionA [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetWebAppStacksByLocation_GetLocationsWebAppStacks() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetWebAppStacksForLocation.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetWebAppStacksForLocation.json // this example is just showing the usage of "Provider_GetWebAppStacksForLocation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -152,7 +152,7 @@ public async Task GetWebAppStacksByLocation_GetLocationsWebAppStacks() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetOperationsProviders_ListOperations() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/ListOperations.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ListOperations.json // this example is just showing the usage of "Provider_ListOperations" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -178,7 +178,7 @@ public async Task GetOperationsProviders_ListOperations() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetWebAppStacksProviders_GetWebAppStacks() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetWebAppStacks.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetWebAppStacks.json // this example is just showing the usage of "Provider_GetWebAppStacks" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_TopLevelDomainCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_TopLevelDomainCollection.cs index fc2117cac3baf..fa1d506447de6 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_TopLevelDomainCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_TopLevelDomainCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_TopLevelDomainCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListTopLevelDomains() { - // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2021-02-01/examples/ListTopLevelDomains.json + // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2023-12-01/examples/ListTopLevelDomains.json // this example is just showing the usage of "TopLevelDomains_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -55,7 +55,7 @@ public async Task GetAll_ListTopLevelDomains() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetTopLevelDomain() { - // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2021-02-01/examples/GetTopLevelDomain.json + // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2023-12-01/examples/GetTopLevelDomain.json // this example is just showing the usage of "TopLevelDomains_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -88,7 +88,7 @@ public async Task Get_GetTopLevelDomain() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetTopLevelDomain() { - // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2021-02-01/examples/GetTopLevelDomain.json + // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2023-12-01/examples/GetTopLevelDomain.json // this example is just showing the usage of "TopLevelDomains_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -117,7 +117,7 @@ public async Task Exists_GetTopLevelDomain() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetTopLevelDomain() { - // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2021-02-01/examples/GetTopLevelDomain.json + // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2023-12-01/examples/GetTopLevelDomain.json // this example is just showing the usage of "TopLevelDomains_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_TopLevelDomainResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_TopLevelDomainResource.cs index 4f317ce049b80..840c7e08a18ec 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_TopLevelDomainResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_TopLevelDomainResource.cs @@ -20,7 +20,7 @@ public partial class Sample_TopLevelDomainResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetTopLevelDomain() { - // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2021-02-01/examples/GetTopLevelDomain.json + // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2023-12-01/examples/GetTopLevelDomain.json // this example is just showing the usage of "TopLevelDomains_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -50,7 +50,7 @@ public async Task Get_GetTopLevelDomain() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAgreements_ListTopLevelDomainAgreements() { - // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2021-02-01/examples/ListTopLevelDomainAgreements.json + // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2023-12-01/examples/ListTopLevelDomainAgreements.json // this example is just showing the usage of "TopLevelDomains_ListAgreements" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebAppRequestHistoryCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebAppRequestHistoryCollection.cs new file mode 100644 index 0000000000000..40ed24c5c37e4 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebAppRequestHistoryCollection.cs @@ -0,0 +1,179 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_WebAppRequestHistoryCollection + { + // List repetition request history + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ListRepetitionRequestHistory() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowRunActionRepetitionsRequestHistories_List.json + // this example is just showing the usage of "WorkflowRunActionRepetitionsRequestHistories_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkflowRunActionRepetitionResource created on azure + // for more information of creating WorkflowRunActionRepetitionResource, please refer to the document of WorkflowRunActionRepetitionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-resource-group"; + string name = "test-name"; + string workflowName = "test-workflow"; + string runName = "08586776228332053161046300351"; + string actionName = "HTTP_Webhook"; + string repetitionName = "000001"; + ResourceIdentifier workflowRunActionRepetitionResourceId = WorkflowRunActionRepetitionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, runName, actionName, repetitionName); + WorkflowRunActionRepetitionResource workflowRunActionRepetition = client.GetWorkflowRunActionRepetitionResource(workflowRunActionRepetitionResourceId); + + // get the collection of this WebAppRequestHistoryResource + WebAppRequestHistoryCollection collection = workflowRunActionRepetition.GetWebAppRequestHistories(); + + // invoke the operation and iterate over the result + await foreach (WebAppRequestHistoryResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WebAppRequestHistoryData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get a repetition request history + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetARepetitionRequestHistory() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowRunActionRepetitionsRequestHistories_Get.json + // this example is just showing the usage of "WorkflowRunActionRepetitionsRequestHistories_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkflowRunActionRepetitionResource created on azure + // for more information of creating WorkflowRunActionRepetitionResource, please refer to the document of WorkflowRunActionRepetitionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-resource-group"; + string name = "test-name"; + string workflowName = "test-workflow"; + string runName = "08586776228332053161046300351"; + string actionName = "HTTP_Webhook"; + string repetitionName = "000001"; + ResourceIdentifier workflowRunActionRepetitionResourceId = WorkflowRunActionRepetitionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, runName, actionName, repetitionName); + WorkflowRunActionRepetitionResource workflowRunActionRepetition = client.GetWorkflowRunActionRepetitionResource(workflowRunActionRepetitionResourceId); + + // get the collection of this WebAppRequestHistoryResource + WebAppRequestHistoryCollection collection = workflowRunActionRepetition.GetWebAppRequestHistories(); + + // invoke the operation + string requestHistoryName = "08586611142732800686"; + WebAppRequestHistoryResource result = await collection.GetAsync(requestHistoryName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WebAppRequestHistoryData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get a repetition request history + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetARepetitionRequestHistory() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowRunActionRepetitionsRequestHistories_Get.json + // this example is just showing the usage of "WorkflowRunActionRepetitionsRequestHistories_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkflowRunActionRepetitionResource created on azure + // for more information of creating WorkflowRunActionRepetitionResource, please refer to the document of WorkflowRunActionRepetitionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-resource-group"; + string name = "test-name"; + string workflowName = "test-workflow"; + string runName = "08586776228332053161046300351"; + string actionName = "HTTP_Webhook"; + string repetitionName = "000001"; + ResourceIdentifier workflowRunActionRepetitionResourceId = WorkflowRunActionRepetitionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, runName, actionName, repetitionName); + WorkflowRunActionRepetitionResource workflowRunActionRepetition = client.GetWorkflowRunActionRepetitionResource(workflowRunActionRepetitionResourceId); + + // get the collection of this WebAppRequestHistoryResource + WebAppRequestHistoryCollection collection = workflowRunActionRepetition.GetWebAppRequestHistories(); + + // invoke the operation + string requestHistoryName = "08586611142732800686"; + bool result = await collection.ExistsAsync(requestHistoryName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Get a repetition request history + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetARepetitionRequestHistory() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowRunActionRepetitionsRequestHistories_Get.json + // this example is just showing the usage of "WorkflowRunActionRepetitionsRequestHistories_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkflowRunActionRepetitionResource created on azure + // for more information of creating WorkflowRunActionRepetitionResource, please refer to the document of WorkflowRunActionRepetitionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-resource-group"; + string name = "test-name"; + string workflowName = "test-workflow"; + string runName = "08586776228332053161046300351"; + string actionName = "HTTP_Webhook"; + string repetitionName = "000001"; + ResourceIdentifier workflowRunActionRepetitionResourceId = WorkflowRunActionRepetitionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, runName, actionName, repetitionName); + WorkflowRunActionRepetitionResource workflowRunActionRepetition = client.GetWorkflowRunActionRepetitionResource(workflowRunActionRepetitionResourceId); + + // get the collection of this WebAppRequestHistoryResource + WebAppRequestHistoryCollection collection = workflowRunActionRepetition.GetWebAppRequestHistories(); + + // invoke the operation + string requestHistoryName = "08586611142732800686"; + NullableResponse response = await collection.GetIfExistsAsync(requestHistoryName); + WebAppRequestHistoryResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WebAppRequestHistoryData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebAppRequestHistoryResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebAppRequestHistoryResource.cs new file mode 100644 index 0000000000000..7e3ba305cdb75 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebAppRequestHistoryResource.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_WebAppRequestHistoryResource + { + // Get a repetition request history + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetARepetitionRequestHistory() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowRunActionRepetitionsRequestHistories_Get.json + // this example is just showing the usage of "WorkflowRunActionRepetitionsRequestHistories_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebAppRequestHistoryResource created on azure + // for more information of creating WebAppRequestHistoryResource, please refer to the document of WebAppRequestHistoryResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-resource-group"; + string name = "test-name"; + string workflowName = "test-workflow"; + string runName = "08586776228332053161046300351"; + string actionName = "HTTP_Webhook"; + string repetitionName = "000001"; + string requestHistoryName = "08586611142732800686"; + ResourceIdentifier webAppRequestHistoryResourceId = WebAppRequestHistoryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, runName, actionName, repetitionName, requestHistoryName); + WebAppRequestHistoryResource webAppRequestHistory = client.GetWebAppRequestHistoryResource(webAppRequestHistoryResourceId); + + // invoke the operation + WebAppRequestHistoryResource result = await webAppRequestHistory.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WebAppRequestHistoryData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteCollection.cs new file mode 100644 index 0000000000000..d112cdb6df3be --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteCollection.cs @@ -0,0 +1,417 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.AppService.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_WebSiteCollection + { + // List Web Apps by Resource group + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ListWebAppsByResourceGroup() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ListWebAppsByResourceGroup.json + // this example is just showing the usage of "WebApps_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this WebSiteResource + WebSiteCollection collection = resourceGroupResource.GetWebSites(); + + // invoke the operation and iterate over the result + await foreach (WebSiteResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WebSiteData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get Web App + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetWebApp() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetWebApp.json + // this example is just showing the usage of "WebApps_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this WebSiteResource + WebSiteCollection collection = resourceGroupResource.GetWebSites(); + + // invoke the operation + string name = "sitef6141"; + WebSiteResource result = await collection.GetAsync(name); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WebSiteData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get Web App + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetWebApp() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetWebApp.json + // this example is just showing the usage of "WebApps_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this WebSiteResource + WebSiteCollection collection = resourceGroupResource.GetWebSites(); + + // invoke the operation + string name = "sitef6141"; + bool result = await collection.ExistsAsync(name); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Get Web App + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetWebApp() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetWebApp.json + // this example is just showing the usage of "WebApps_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this WebSiteResource + WebSiteCollection collection = resourceGroupResource.GetWebSites(); + + // invoke the operation + string name = "sitef6141"; + NullableResponse response = await collection.GetIfExistsAsync(name); + WebSiteResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WebSiteData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // Clone web app + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CloneWebApp() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/CloneWebApp.json + // this example is just showing the usage of "WebApps_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this WebSiteResource + WebSiteCollection collection = resourceGroupResource.GetWebSites(); + + // invoke the operation + string name = "sitef6141"; + WebSiteData data = new WebSiteData(new AzureLocation("East US")) + { + CloningInfo = new CloningInfo(new ResourceIdentifier("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg456/providers/Microsoft.Web/sites/srcsiteg478")) + { + CanOverwrite = false, + CloneCustomHostNames = true, + CloneSourceControl = true, + SourceWebAppLocation = new AzureLocation("West Europe"), + HostingEnvironment = "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg456/providers/Microsoft.Web/hostingenvironments/aseforsites", + AppSettingsOverrides = +{ +["Setting1"] = "NewValue1", +["Setting3"] = "NewValue5", +}, + ConfigureLoadBalancing = false, + }, + Kind = "app", + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, name, data); + WebSiteResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WebSiteData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Create or Update Flex Consumption function app + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CreateOrUpdateFlexConsumptionFunctionApp() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/CreateOrUpdateFunctionAppFlexConsumption.json + // this example is just showing the usage of "WebApps_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this WebSiteResource + WebSiteCollection collection = resourceGroupResource.GetWebSites(); + + // invoke the operation + string name = "sitef6141"; + WebSiteData data = new WebSiteData(new AzureLocation("East US")) + { + SiteConfig = new SiteConfigProperties() + { + AppSettings = +{ +new AppServiceNameValuePair() +{ +Name = "AzureWebJobsStorage", +Value = "DefaultEndpointsProtocol=https;AccountName=StorageAccountName;AccountKey=Sanitized;EndpointSuffix=core.windows.net", +},new AppServiceNameValuePair() +{ +Name = "APPLICATIONINSIGHTS_CONNECTION_STRING", +Value = "InstrumentationKey=Sanitized;IngestionEndpoint=Sanitized;LiveEndpoint=Sanitized", +} +}, + }, + FunctionAppConfig = new FunctionAppConfig() + { + DeploymentStorage = new FunctionAppStorage() + { + StorageType = FunctionAppStorageType.BlobContainer, + Value = new Uri("https://storageAccountName.blob.core.windows.net/containername"), + Authentication = new FunctionAppStorageAuthentication() + { + AuthenticationType = FunctionAppStorageAccountAuthenticationType.StorageAccountConnectionString, + StorageAccountConnectionStringName = "TheAppSettingName", + }, + }, + Runtime = new FunctionAppRuntime() + { + Name = FunctionAppRuntimeName.Python, + Version = "3.11", + }, + ScaleAndConcurrency = new FunctionAppScaleAndConcurrency() + { + MaximumInstanceCount = 100, + InstanceMemoryMB = 2048, + }, + }, + Kind = "functionapp,linux", + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, name, data); + WebSiteResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WebSiteData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Create or Update Flex Consumption function app with details + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CreateOrUpdateFlexConsumptionFunctionAppWithDetails() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/CreateOrUpdateFunctionAppFlexConsumptionWithDetails.json + // this example is just showing the usage of "WebApps_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this WebSiteResource + WebSiteCollection collection = resourceGroupResource.GetWebSites(); + + // invoke the operation + string name = "sitef6141"; + WebSiteData data = new WebSiteData(new AzureLocation("East US")) + { + SiteConfig = new SiteConfigProperties() + { + AppSettings = +{ +new AppServiceNameValuePair() +{ +Name = "AzureWebJobsStorage", +Value = "DefaultEndpointsProtocol=https;AccountName=StorageAccountName;AccountKey=Sanitized;EndpointSuffix=core.windows.net", +},new AppServiceNameValuePair() +{ +Name = "APPLICATIONINSIGHTS_CONNECTION_STRING", +Value = "InstrumentationKey=Sanitized;IngestionEndpoint=Sanitized;LiveEndpoint=Sanitized", +} +}, + }, + FunctionAppConfig = new FunctionAppConfig() + { + DeploymentStorage = new FunctionAppStorage() + { + StorageType = FunctionAppStorageType.BlobContainer, + Value = new Uri("https://storageAccountName.blob.core.windows.net/containername"), + Authentication = new FunctionAppStorageAuthentication() + { + AuthenticationType = FunctionAppStorageAccountAuthenticationType.StorageAccountConnectionString, + StorageAccountConnectionStringName = "TheAppSettingName", + }, + }, + Runtime = new FunctionAppRuntime() + { + Name = FunctionAppRuntimeName.Python, + Version = "3.11", + }, + ScaleAndConcurrency = new FunctionAppScaleAndConcurrency() + { + AlwaysReady = +{ +new FunctionAppAlwaysReadyConfig() +{ +Name = "http", +InstanceCount = 2, +} +}, + MaximumInstanceCount = 100, + InstanceMemoryMB = 2048, + HttpPerInstanceConcurrency = 16, + }, + }, + Kind = "functionapp,linux", + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, name, data); + WebSiteResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WebSiteData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Create or Update web app + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CreateOrUpdateWebApp() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/CreateOrUpdateWebApp.json + // this example is just showing the usage of "WebApps_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this WebSiteResource + WebSiteCollection collection = resourceGroupResource.GetWebSites(); + + // invoke the operation + string name = "sitef6141"; + WebSiteData data = new WebSiteData(new AzureLocation("East US")) + { + AppServicePlanId = new ResourceIdentifier("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/serverfarms/DefaultAsp"), + Kind = "app", + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, name, data); + WebSiteResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WebSiteData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteConfigResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteConfigResource.cs new file mode 100644 index 0000000000000..079e2ef73bc15 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteConfigResource.cs @@ -0,0 +1,130 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_WebSiteConfigResource + { + // Get Site Config + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetSiteConfig() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetSiteConfig.json + // this example is just showing the usage of "WebApps_GetConfiguration" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteConfigResource created on azure + // for more information of creating WebSiteConfigResource, please refer to the document of WebSiteConfigResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "sitef6141"; + ResourceIdentifier webSiteConfigResourceId = WebSiteConfigResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteConfigResource webSiteConfig = client.GetWebSiteConfigResource(webSiteConfigResourceId); + + // invoke the operation + WebSiteConfigResource result = await webSiteConfig.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SiteConfigData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Update Site Config + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_UpdateSiteConfig() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/UpdateSiteConfig.json + // this example is just showing the usage of "WebApps_CreateOrUpdateConfiguration" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteConfigResource created on azure + // for more information of creating WebSiteConfigResource, please refer to the document of WebSiteConfigResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "sitef6141"; + ResourceIdentifier webSiteConfigResourceId = WebSiteConfigResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteConfigResource webSiteConfig = client.GetWebSiteConfigResource(webSiteConfigResourceId); + + // invoke the operation + SiteConfigData data = new SiteConfigData() + { + NumberOfWorkers = 1, + DefaultDocuments = +{ +"Default.htm","Default.html","Default.asp","index.htm","index.html","iisstart.htm","default.aspx","index.php","hostingstart.html" +}, + NetFrameworkVersion = "v4.0", + PhpVersion = "5.6", + PythonVersion = "", + NodeVersion = "", + PowerShellVersion = "", + LinuxFxVersion = "", + IsRequestTracingEnabled = false, + IsRemoteDebuggingEnabled = false, + IsHttpLoggingEnabled = false, + UseManagedIdentityCreds = false, + LogsDirectorySizeLimit = 35, + IsDetailedErrorLoggingEnabled = false, + Use32BitWorkerProcess = true, + IsWebSocketsEnabled = false, + IsAlwaysOn = false, + AppCommandLine = "", + ManagedPipelineMode = ManagedPipelineMode.Integrated, + VirtualApplications = +{ +new VirtualApplication() +{ +VirtualPath = "/", +PhysicalPath = "site\\wwwroot", +IsPreloadEnabled = false, +} +}, + LoadBalancing = SiteLoadBalancing.LeastRequests, + IsAutoHealEnabled = false, + VnetName = "", + IsVnetRouteAllEnabled = false, + VnetPrivatePortsCount = 0, + IsHttp20Enabled = false, + MinTlsVersion = AppServiceSupportedTlsVersion.Tls1_2, + ScmMinTlsVersion = AppServiceSupportedTlsVersion.Tls1_2, + FtpsState = AppServiceFtpsState.AllAllowed, + FunctionAppScaleLimit = 0, + IsFunctionsRuntimeScaleMonitoringEnabled = false, + MinimumElasticInstanceCount = 0, + AzureStorageAccounts = +{ +}, + }; + ArmOperation lro = await webSiteConfig.CreateOrUpdateAsync(WaitUntil.Completed, data); + WebSiteConfigResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SiteConfigData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteFtpPublishingCredentialsPolicyResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteFtpPublishingCredentialsPolicyResource.cs index 9fd1d87a63fc1..4dfc7654a27b9 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteFtpPublishingCredentialsPolicyResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteFtpPublishingCredentialsPolicyResource.cs @@ -19,7 +19,7 @@ public partial class Sample_WebSiteFtpPublishingCredentialsPolicyResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetFTPAllowed() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetPublishingCredentialsPolicy.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetPublishingCredentialsPolicy.json // this example is just showing the usage of "WebApps_GetFtpAllowed" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -50,7 +50,7 @@ public async Task Get_GetFTPAllowed() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_UpdateFTPAllowed() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/UpdatePublishingCredentialsPolicy.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/UpdatePublishingCredentialsPolicy.json // this example is just showing the usage of "WebApps_UpdateFtpAllowed" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteResource.cs index b77cb3b47ffb1..d5d6b3a204fb0 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteResource.cs @@ -11,17 +11,665 @@ using Azure.Core; using Azure.Identity; using Azure.ResourceManager.AppService.Models; +using Azure.ResourceManager.Resources; namespace Azure.ResourceManager.AppService.Samples { public partial class Sample_WebSiteResource { + // List Web apps for subscription + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetWebSites_ListWebAppsForSubscription() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ListWebApps.json + // this example is just showing the usage of "WebApps_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + await foreach (WebSiteResource item in subscriptionResource.GetWebSitesAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WebSiteData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get Web App + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetWebApp() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetWebApp.json + // this example is just showing the usage of "WebApps_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "sitef6141"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // invoke the operation + WebSiteResource result = await webSite.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WebSiteData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Delete Web app + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_DeleteWebApp() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/DeleteWebApp.json + // this example is just showing the usage of "WebApps_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "sitef6141"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // invoke the operation + await webSite.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + + // Update web app + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_UpdateWebApp() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/UpdateWebApp.json + // this example is just showing the usage of "WebApps_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "sitef6141"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // invoke the operation + SitePatchInfo info = new SitePatchInfo() + { + ServerFarmId = new ResourceIdentifier("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/serverfarms/DefaultAsp"), + }; + WebSiteResource result = await webSite.UpdateAsync(info); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WebSiteData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Analyze custom hostname for webapp. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task AnalyzeCustomHostname_AnalyzeCustomHostnameForWebapp() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AnalyzeCustomHostName.json + // this example is just showing the usage of "WebApps_AnalyzeCustomHostname" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "sitef6141"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // invoke the operation + CustomHostnameAnalysisResult result = await webSite.AnalyzeCustomHostnameAsync(); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Apply web app slot config + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task ApplySlotConfigToProduction_ApplyWebAppSlotConfig() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ApplySlotConfig.json + // this example is just showing the usage of "WebApps_ApplySlotConfigToProduction" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "sitef6141"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // invoke the operation + CsmSlotEntity slotSwapEntity = new CsmSlotEntity("staging", true); + await webSite.ApplySlotConfigToProductionAsync(slotSwapEntity); + + Console.WriteLine($"Succeeded"); + } + + // Backup web app + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Backup_BackupWebApp() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/BackupWebApp.json + // this example is just showing the usage of "WebApps_Backup" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "sitef6141"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // invoke the operation + WebAppBackupInfo info = new WebAppBackupInfo() + { + BackupName = "abcdwe", + IsEnabled = true, + StorageAccountUri = new Uri("DefaultEndpointsProtocol=https;AccountName=storagesample;AccountKey="), + BackupSchedule = new WebAppBackupSchedule(7, BackupFrequencyUnit.Day, true, 30) + { + StartOn = DateTimeOffset.Parse("2022-09-02T17:33:11.641Z"), + }, + Databases = +{ +new AppServiceDatabaseBackupSetting(AppServiceDatabaseType.SqlAzure) +{ +Name = "backenddb", +ConnectionStringName = "backend", +ConnectionString = "DSN=data-source-name[;SERVER=value] [;PWD=value] [;UID=value] [;=]", +},new AppServiceDatabaseBackupSetting(AppServiceDatabaseType.SqlAzure) +{ +Name = "statsdb", +ConnectionStringName = "stats", +ConnectionString = "DSN=data-source-name[;SERVER=value] [;PWD=value] [;UID=value] [;=]", +} +}, + }; + WebAppBackupData result = await webSite.BackupAsync(info); + + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {result.Id}"); + } + + // List web app configurations + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAllConfigurationData_ListWebAppConfigurations() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ListWebAppConfigurations.json + // this example is just showing the usage of "WebApps_ListConfigurations" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "sitef6141"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // invoke the operation and iterate over the result + await foreach (SiteConfigData item in webSite.GetAllConfigurationDataAsync()) + { + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {item.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Update App Settings + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task UpdateApplicationSettings_UpdateAppSettings() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/UpdateAppSettings.json + // this example is just showing the usage of "WebApps_UpdateApplicationSettings" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "sitef6141"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // invoke the operation + AppServiceConfigurationDictionary appSettings = new AppServiceConfigurationDictionary() + { + Properties = +{ +["Setting1"] = "Value1", +["Setting2"] = "Value2", +}, + }; + AppServiceConfigurationDictionary result = await webSite.UpdateApplicationSettingsAsync(appSettings); + + Console.WriteLine($"Succeeded: {result}"); + } + + // List App Settings + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetApplicationSettings_ListAppSettings() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ListAppSettings.json + // this example is just showing the usage of "WebApps_ListApplicationSettings" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "sitef6141"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // invoke the operation + AppServiceConfigurationDictionary result = await webSite.GetApplicationSettingsAsync(); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Update Auth Settings + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task UpdateAuthSettings_UpdateAuthSettings() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/UpdateAuthSettings.json + // this example is just showing the usage of "WebApps_UpdateAuthSettings" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "sitef6141"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // invoke the operation + SiteAuthSettings siteAuthSettings = new SiteAuthSettings() + { + IsEnabled = true, + RuntimeVersion = "~1", + UnauthenticatedClientAction = UnauthenticatedClientAction.RedirectToLoginPage, + IsTokenStoreEnabled = true, + AllowedExternalRedirectUrls = +{ +"sitef6141.customdomain.net","sitef6141.customdomain.info" +}, + DefaultProvider = BuiltInAuthenticationProvider.Google, + TokenRefreshExtensionHours = 120, + ClientId = "42d795a9-8abb-4d06-8534-39528af40f8e.apps.googleusercontent.com", + }; + SiteAuthSettings result = await webSite.UpdateAuthSettingsAsync(siteAuthSettings); + + Console.WriteLine($"Succeeded: {result}"); + } + + // List Auth Settings + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAuthSettings_ListAuthSettings() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ListAuthSettings.json + // this example is just showing the usage of "WebApps_GetAuthSettings" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "sitef6141"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // invoke the operation + SiteAuthSettings result = await webSite.GetAuthSettingsAsync(); + + Console.WriteLine($"Succeeded: {result}"); + } + + // List Auth Settings without Secrets + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAuthSettingsV2WithoutSecrets_ListAuthSettingsWithoutSecrets() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetAuthSettingsV2WithoutSecrets.json + // this example is just showing the usage of "WebApps_GetAuthSettingsV2WithoutSecrets" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "sitef6141"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // invoke the operation + SiteAuthSettingsV2 result = await webSite.GetAuthSettingsV2WithoutSecretsAsync(); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Update Auth Settings V2 + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task UpdateAuthSettingsV2_UpdateAuthSettingsV2() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/UpdateAuthSettingsV2.json + // this example is just showing the usage of "WebApps_UpdateAuthSettingsV2" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "sitef6141"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // invoke the operation + SiteAuthSettingsV2 siteAuthSettingsV2 = new SiteAuthSettingsV2() + { + Platform = new AuthPlatform() + { + IsEnabled = true, + RuntimeVersion = "~1", + ConfigFilePath = "/auth/config.json", + }, + GlobalValidation = new GlobalValidation() + { + IsAuthenticationRequired = true, + UnauthenticatedClientAction = UnauthenticatedClientActionV2.Return403, + ExcludedPaths = +{ +"/nosecrets/Path" +}, + }, + IdentityProviders = new AppServiceIdentityProviders() + { + Google = new AppServiceGoogleProvider() + { + IsEnabled = true, + Registration = new ClientRegistration() + { + ClientId = "42d795a9-8abb-4d06-8534-39528af40f8e.apps.googleusercontent.com", + ClientSecretSettingName = "ClientSecret", + }, + LoginScopes = +{ +"admin" +}, + ValidationAllowedAudiences = +{ +"https://example.com" +}, + }, + }, + Login = new WebAppLoginInfo() + { + RoutesLogoutEndpoint = "https://app.com/logout", + TokenStore = new AppServiceTokenStore() + { + IsEnabled = true, + TokenRefreshExtensionHours = 96, + FileSystemDirectory = "/wwwroot/sites/example", + }, + PreserveUrlFragmentsForLogins = true, + AllowedExternalRedirectUrls = +{ +"https://someurl.com" +}, + CookieExpiration = new WebAppCookieExpiration() + { + Convention = CookieExpirationConvention.IdentityProviderDerived, + TimeToExpiration = "2022:09-01T00:00Z", + }, + Nonce = new LoginFlowNonceSettings() + { + ValidateNonce = true, + }, + }, + HttpSettings = new AppServiceHttpSettings() + { + IsHttpsRequired = true, + RoutesApiPrefix = "/authv2/", + ForwardProxy = new AppServiceForwardProxy() + { + Convention = ForwardProxyConvention.Standard, + CustomHostHeaderName = "authHeader", + CustomProtoHeaderName = "customProtoHeader", + }, + }, + }; + SiteAuthSettingsV2 result = await webSite.UpdateAuthSettingsV2Async(siteAuthSettingsV2); + + Console.WriteLine($"Succeeded: {result}"); + } + + // List Auth Settings V2 + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAuthSettingsV2_ListAuthSettingsV2() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ListAuthSettingsV2.json + // this example is just showing the usage of "WebApps_GetAuthSettingsV2" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "sitef6141"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // invoke the operation + SiteAuthSettingsV2 result = await webSite.GetAuthSettingsV2Async(); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Update Azure Storage Accounts + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task UpdateAzureStorageAccounts_UpdateAzureStorageAccounts() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/UpdateAzureStorageAccounts.json + // this example is just showing the usage of "WebApps_UpdateAzureStorageAccounts" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "sitef6141"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // invoke the operation + AzureStoragePropertyDictionary azureStorageAccounts = new AzureStoragePropertyDictionary() + { + Properties = +{ +["account1"] = new AppServiceStorageAccessInfo() +{ +StorageType = AppServiceStorageType.AzureFiles, +AccountName = "testsa", +ShareName = "web", +AccessKey = "26515^%@#*", +MountPath = "/mounts/a/files", +}, +}, + }; + AzureStoragePropertyDictionary result = await webSite.UpdateAzureStorageAccountsAsync(azureStorageAccounts); + + Console.WriteLine($"Succeeded: {result}"); + } + + // List Deployment Status + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetProductionSiteDeploymentStatuses_ListDeploymentStatus() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ListSiteDeploymentStatus.json + // this example is just showing the usage of "WebApps_ListProductionSiteDeploymentStatuses" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testSite"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // invoke the operation and iterate over the result + await foreach (CsmDeploymentStatus item in webSite.GetProductionSiteDeploymentStatusesAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get Deployment Status + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetProductionSiteDeploymentStatus_GetDeploymentStatus() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetSiteDeploymentStatus.json + // this example is just showing the usage of "WebApps_GetProductionSiteDeploymentStatus" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testSite"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // invoke the operation + string deploymentStatusId = "eacfd68b-3bbd-4ad9-99c5-98614d89c8e5"; + ArmOperation lro = await webSite.GetProductionSiteDeploymentStatusAsync(WaitUntil.Completed, deploymentStatusId); + CsmDeploymentStatus result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + // List backups [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAllSiteBackupData_ListBackups() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/ListSlotBackups.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ListSlotBackups.json // this example is just showing the usage of "WebApps_ListSiteBackups" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +700,7 @@ public async Task GetAllSiteBackupData_ListBackups() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetNetworkTraceOperation_GetTheCurrentStatusOfANetworkTraceOperationForASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetWebSiteNetworkTraceOperation.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetWebSiteNetworkTraceOperation.json // this example is just showing the usage of "WebApps_GetNetworkTraceOperation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -83,7 +731,7 @@ public async Task GetNetworkTraceOperation_GetTheCurrentStatusOfANetworkTraceOpe [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task StartWebSiteNetworkTraceOperation_StartANewNetworkTraceOperationForASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/StartWebSiteNetworkTraceOperation.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/StartWebSiteNetworkTraceOperation.json // this example is just showing the usage of "WebApps_StartWebSiteNetworkTraceOperation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -112,7 +760,7 @@ public async Task StartWebSiteNetworkTraceOperation_StartANewNetworkTraceOperati [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task StopWebSiteNetworkTrace_StopACurrentlyRunningNetworkTraceOperationForASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/StopWebSiteNetworkTrace.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/StopWebSiteNetworkTrace.json // this example is just showing the usage of "WebApps_StopWebSiteNetworkTrace" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -139,7 +787,7 @@ public async Task StopWebSiteNetworkTrace_StopACurrentlyRunningNetworkTraceOpera [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetNetworkTraces_GetNetworkTracesForASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetWebSiteNetworkTraces.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetWebSiteNetworkTraces.json // this example is just showing the usage of "WebApps_GetNetworkTraces" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -170,7 +818,7 @@ public async Task GetNetworkTraces_GetNetworkTracesForASite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetNetworkTraceOperationV2_GetTheCurrentStatusOfANetworkTraceOperationForASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetWebSiteNetworkTraceOperation.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetWebSiteNetworkTraceOperation.json // this example is just showing the usage of "WebApps_GetNetworkTraceOperationV2" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -201,7 +849,7 @@ public async Task GetNetworkTraceOperationV2_GetTheCurrentStatusOfANetworkTraceO [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetNetworkTracesV2_GetNetworkTracesForASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetWebSiteNetworkTraces.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetWebSiteNetworkTraces.json // this example is just showing the usage of "WebApps_GetNetworkTracesV2" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -232,7 +880,7 @@ public async Task GetNetworkTracesV2_GetNetworkTracesForASite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetPrivateLinkResources_GetPrivateLinkResourcesOfASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetSitePrivateLinkResources.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetSitePrivateLinkResources.json // this example is just showing the usage of "WebApps_GetPrivateLinkResources" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -262,7 +910,7 @@ public async Task GetPrivateLinkResources_GetPrivateLinkResourcesOfASite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task StartNetworkTrace_StartANewNetworkTraceOperationForASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/StartWebSiteNetworkTraceOperation.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/StartWebSiteNetworkTraceOperation.json // this example is just showing the usage of "WebApps_StartNetworkTrace" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -291,7 +939,7 @@ public async Task StartNetworkTrace_StartANewNetworkTraceOperationForASite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task StopNetworkTrace_StopACurrentlyRunningNetworkTraceOperationForASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/StopWebSiteNetworkTrace.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/StopWebSiteNetworkTrace.json // this example is just showing the usage of "WebApps_StopNetworkTrace" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -312,5 +960,230 @@ public async Task StopNetworkTrace_StopACurrentlyRunningNetworkTraceOperationFor Console.WriteLine($"Succeeded"); } + + // Delete workflow artifacts + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task DeployWorkflowArtifacts_DeleteWorkflowArtifacts() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/DeleteDeployWorkflowArtifacts.json + // this example is just showing the usage of "WebApps_DeployWorkflowArtifacts" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "testsite2"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // invoke the operation + WorkflowArtifacts workflowArtifacts = new WorkflowArtifacts() + { + FilesToDelete = +{ +"test/workflow.json","test/" +}, + }; + await webSite.DeployWorkflowArtifactsAsync(workflowArtifacts: workflowArtifacts); + + Console.WriteLine($"Succeeded"); + } + + // Deploys workflow artifacts + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task DeployWorkflowArtifacts_DeploysWorkflowArtifacts() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/PostDeployWorkflowArtifacts.json + // this example is just showing the usage of "WebApps_DeployWorkflowArtifacts" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "testsite2"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // invoke the operation + WorkflowArtifacts workflowArtifacts = new WorkflowArtifacts() + { + AppSettings = BinaryData.FromObjectAsJson(new Dictionary() + { + ["eventHub_connectionString"] = "Endpoint=sb://example.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=EXAMPLE1a2b3c4d5e6fEXAMPLE=" + }), + Files = +{ +["connections.json"] = BinaryData.FromObjectAsJson(new Dictionary() +{ +["managedApiConnections"] = new Dictionary() +{ +}, +["serviceProviderConnections"] = new Dictionary() +{ +["eventHub"] = new Dictionary() +{ +["displayName"] = "example1", +["parameterValues"] = new Dictionary() +{ +["connectionString"] = "@appsetting('eventHub_connectionString')"}, +["serviceProvider"] = new Dictionary() +{ +["id"] = "/serviceProviders/eventHub"}}}}), +["test1/workflow.json"] = BinaryData.FromObjectAsJson(new Dictionary() +{ +["definition"] = new Dictionary() +{ +["$schema"] = "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", +["actions"] = new Dictionary() +{ +}, +["contentVersion"] = "1.0.0.0", +["outputs"] = new Dictionary() +{ +}, +["triggers"] = new Dictionary() +{ +["When_events_are_available_in_Event_hub"] = new Dictionary() +{ +["type"] = "ServiceProvider", +["inputs"] = new Dictionary() +{ +["parameters"] = new Dictionary() +{ +["eventHubName"] = "test123"}, +["serviceProviderConfiguration"] = new Dictionary() +{ +["operationId"] = "receiveEvents", +["connectionName"] = "eventHub", +["serviceProviderId"] = "/serviceProviders/eventHub"}}, +["splitOn"] = "@triggerOutputs()?['body']"}}}, +["kind"] = "Stateful"}), +}, + }; + await webSite.DeployWorkflowArtifactsAsync(workflowArtifacts: workflowArtifacts); + + Console.WriteLine($"Succeeded"); + } + + // List the Instance Workflows Configuration Connections + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetWorkflowsConnections_ListTheInstanceWorkflowsConfigurationConnections() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ListWorkflowsConfigurationConnections.json + // this example is just showing the usage of "WebApps_ListWorkflowsConnections" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "testsite2"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // invoke the operation + WorkflowEnvelopeData result = await webSite.GetWorkflowsConnectionsAsync(); + + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {result.Id}"); + } + + // Regenerate the callback URL access key for request triggers + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task RegenerateAccessKeyWorkflow_RegenerateTheCallbackURLAccessKeyForRequestTriggers() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Workflows_RegenerateAccessKey.json + // this example is just showing the usage of "Workflows_RegenerateAccessKey" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testResourceGroup"; + string name = "test-name"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // invoke the operation + string workflowName = "testWorkflowName"; + WorkflowRegenerateActionContent content = new WorkflowRegenerateActionContent() + { + KeyType = WebAppKeyType.Primary, + }; + await webSite.RegenerateAccessKeyWorkflowAsync(workflowName, content); + + Console.WriteLine($"Succeeded"); + } + + // Validate a workflow + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task ValidateWorkflow_ValidateAWorkflow() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Workflows_Validate.json + // this example is just showing the usage of "Workflows_Validate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-resource-group"; + string name = "test-name"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // invoke the operation + string workflowName = "test-workflow"; + WorkflowData data = new WorkflowData(new AzureLocation("placeholder")) + { + Definition = BinaryData.FromObjectAsJson(new Dictionary() + { + ["$schema"] = "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", + ["actions"] = new Dictionary() + { + }, + ["contentVersion"] = "1.0.0.0", + ["outputs"] = new Dictionary() + { + }, + ["parameters"] = new Dictionary() + { + }, + ["triggers"] = new Dictionary() + { + } + }), + Kind = AppServiceKind.Stateful, + }; + await webSite.ValidateWorkflowAsync(workflowName, data); + + Console.WriteLine($"Succeeded"); + } } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteResourceHealthMetadataResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteResourceHealthMetadataResource.cs index 1eaef0c4cd4f8..2706f6aeb4c78 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteResourceHealthMetadataResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteResourceHealthMetadataResource.cs @@ -19,7 +19,7 @@ public partial class Sample_WebSiteResourceHealthMetadataResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetResourceHealthMetadata() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetResourceHealthMetadataBySite.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetResourceHealthMetadataBySite.json // this example is just showing the usage of "ResourceHealthMetadata_GetBySite" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteSlotCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteSlotCollection.cs new file mode 100644 index 0000000000000..9100ae8990c97 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteSlotCollection.cs @@ -0,0 +1,259 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_WebSiteSlotCollection + { + // List Web App Slots + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ListWebAppSlots() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ListWebAppSlots.json + // this example is just showing the usage of "WebApps_ListSlots" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "sitef6141"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // get the collection of this WebSiteSlotResource + WebSiteSlotCollection collection = webSite.GetWebSiteSlots(); + + // invoke the operation and iterate over the result + await foreach (WebSiteSlotResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WebSiteData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get Web App Slot + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetWebAppSlot() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetWebAppSlot.json + // this example is just showing the usage of "WebApps_GetSlot" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "sitef6141"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // get the collection of this WebSiteSlotResource + WebSiteSlotCollection collection = webSite.GetWebSiteSlots(); + + // invoke the operation + string slot = "staging"; + WebSiteSlotResource result = await collection.GetAsync(slot); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WebSiteData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get Web App Slot + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetWebAppSlot() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetWebAppSlot.json + // this example is just showing the usage of "WebApps_GetSlot" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "sitef6141"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // get the collection of this WebSiteSlotResource + WebSiteSlotCollection collection = webSite.GetWebSiteSlots(); + + // invoke the operation + string slot = "staging"; + bool result = await collection.ExistsAsync(slot); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Get Web App Slot + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetWebAppSlot() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetWebAppSlot.json + // this example is just showing the usage of "WebApps_GetSlot" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "sitef6141"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // get the collection of this WebSiteSlotResource + WebSiteSlotCollection collection = webSite.GetWebSiteSlots(); + + // invoke the operation + string slot = "staging"; + NullableResponse response = await collection.GetIfExistsAsync(slot); + WebSiteSlotResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WebSiteData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // Clone web app slot + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CloneWebAppSlot() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/CloneWebAppSlot.json + // this example is just showing the usage of "WebApps_CreateOrUpdateSlot" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "sitef6141"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // get the collection of this WebSiteSlotResource + WebSiteSlotCollection collection = webSite.GetWebSiteSlots(); + + // invoke the operation + string slot = "staging"; + WebSiteData data = new WebSiteData(new AzureLocation("East US")) + { + CloningInfo = new CloningInfo(new ResourceIdentifier("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg456/providers/Microsoft.Web/sites/srcsiteg478/slot/qa")) + { + CanOverwrite = false, + CloneCustomHostNames = true, + CloneSourceControl = true, + SourceWebAppLocation = new AzureLocation("West Europe"), + HostingEnvironment = "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg456/providers/Microsoft.Web/hostingenvironments/aseforsites", + AppSettingsOverrides = +{ +["Setting1"] = "NewValue1", +["Setting3"] = "NewValue5", +}, + ConfigureLoadBalancing = false, + }, + Kind = "app", + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, slot, data); + WebSiteSlotResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WebSiteData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Create or Update Web App Slot + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CreateOrUpdateWebAppSlot() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/CreateOrUpdateWebAppSlot.json + // this example is just showing the usage of "WebApps_CreateOrUpdateSlot" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "sitef6141"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // get the collection of this WebSiteSlotResource + WebSiteSlotCollection collection = webSite.GetWebSiteSlots(); + + // invoke the operation + string slot = "staging"; + WebSiteData data = new WebSiteData(new AzureLocation("East US")) + { + AppServicePlanId = new ResourceIdentifier("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/serverfarms/DefaultAsp"), + Kind = "app", + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, slot, data); + WebSiteSlotResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WebSiteData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteSlotConfigAppSettingCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteSlotConfigAppSettingCollection.cs index 21cb49889d92c..53c072a7d5108 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteSlotConfigAppSettingCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteSlotConfigAppSettingCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_WebSiteSlotConfigAppSettingCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_GetAzureKeyVaultReferencesForAppSettingsForSlot() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetKeyVaultReferencesForAppSettingsSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetKeyVaultReferencesForAppSettingsSlot.json // this example is just showing the usage of "WebApps_GetAppSettingsKeyVaultReferencesSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_GetAzureKeyVaultReferencesForAppSettingsForSlot() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAzureKeyVaultSlotAppSettingReference() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetKeyVaultReferencesForAppSettingSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetKeyVaultReferencesForAppSettingSlot.json // this example is just showing the usage of "WebApps_GetAppSettingKeyVaultReferenceSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -93,7 +93,7 @@ public async Task Get_GetAzureKeyVaultSlotAppSettingReference() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAzureKeyVaultSlotAppSettingReference() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetKeyVaultReferencesForAppSettingSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetKeyVaultReferencesForAppSettingSlot.json // this example is just showing the usage of "WebApps_GetAppSettingKeyVaultReferenceSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -125,7 +125,7 @@ public async Task Exists_GetAzureKeyVaultSlotAppSettingReference() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAzureKeyVaultSlotAppSettingReference() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetKeyVaultReferencesForAppSettingSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetKeyVaultReferencesForAppSettingSlot.json // this example is just showing the usage of "WebApps_GetAppSettingKeyVaultReferenceSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteSlotConfigAppSettingResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteSlotConfigAppSettingResource.cs index 4e8b4fb08795a..bdf388da8441d 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteSlotConfigAppSettingResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteSlotConfigAppSettingResource.cs @@ -19,7 +19,7 @@ public partial class Sample_WebSiteSlotConfigAppSettingResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAzureKeyVaultSlotAppSettingReference() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetKeyVaultReferencesForAppSettingSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetKeyVaultReferencesForAppSettingSlot.json // this example is just showing the usage of "WebApps_GetAppSettingKeyVaultReferenceSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteSlotFtpPublishingCredentialsPolicyResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteSlotFtpPublishingCredentialsPolicyResource.cs index 4cd228adb61dc..371021097930a 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteSlotFtpPublishingCredentialsPolicyResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteSlotFtpPublishingCredentialsPolicyResource.cs @@ -19,7 +19,7 @@ public partial class Sample_WebSiteSlotFtpPublishingCredentialsPolicyResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetFTPAllowed() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetPublishingCredentialsPolicySlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetPublishingCredentialsPolicySlot.json // this example is just showing the usage of "WebApps_GetFtpAllowedSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Get_GetFTPAllowed() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_UpdateFTPAllowed() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/UpdatePublishingCredentialsPolicySlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/UpdatePublishingCredentialsPolicySlot.json // this example is just showing the usage of "WebApps_UpdateFtpAllowedSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteSlotResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteSlotResource.cs index 08590fc21e670..b719c908b435a 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteSlotResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteSlotResource.cs @@ -16,12 +16,197 @@ namespace Azure.ResourceManager.AppService.Samples { public partial class Sample_WebSiteSlotResource { + // Get Web App Slot + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetWebAppSlot() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetWebAppSlot.json + // this example is just showing the usage of "WebApps_GetSlot" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteSlotResource created on azure + // for more information of creating WebSiteSlotResource, please refer to the document of WebSiteSlotResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "sitef6141"; + string slot = "staging"; + ResourceIdentifier webSiteSlotResourceId = WebSiteSlotResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, slot); + WebSiteSlotResource webSiteSlot = client.GetWebSiteSlotResource(webSiteSlotResourceId); + + // invoke the operation + WebSiteSlotResource result = await webSiteSlot.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WebSiteData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Delete Web App Slot + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_DeleteWebAppSlot() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/DeleteWebAppSlot.json + // this example is just showing the usage of "WebApps_DeleteSlot" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteSlotResource created on azure + // for more information of creating WebSiteSlotResource, please refer to the document of WebSiteSlotResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "sitef6141"; + string slot = "staging"; + ResourceIdentifier webSiteSlotResourceId = WebSiteSlotResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, slot); + WebSiteSlotResource webSiteSlot = client.GetWebSiteSlotResource(webSiteSlotResourceId); + + // invoke the operation + await webSiteSlot.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + + // Update Web App Slot + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_UpdateWebAppSlot() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/UpdateWebAppSlot.json + // this example is just showing the usage of "WebApps_UpdateSlot" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteSlotResource created on azure + // for more information of creating WebSiteSlotResource, please refer to the document of WebSiteSlotResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "sitef6141"; + string slot = "staging"; + ResourceIdentifier webSiteSlotResourceId = WebSiteSlotResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, slot); + WebSiteSlotResource webSiteSlot = client.GetWebSiteSlotResource(webSiteSlotResourceId); + + // invoke the operation + SitePatchInfo info = new SitePatchInfo() + { + ServerFarmId = new ResourceIdentifier("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/serverfarms/DefaultAsp"), + }; + WebSiteSlotResource result = await webSiteSlot.UpdateAsync(info); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WebSiteData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Analyze custom hostname for slot + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task AnalyzeCustomHostnameSlot_AnalyzeCustomHostnameForSlot() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AnalyzeCustomHostNameSlot.json + // this example is just showing the usage of "WebApps_AnalyzeCustomHostnameSlot" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteSlotResource created on azure + // for more information of creating WebSiteSlotResource, please refer to the document of WebSiteSlotResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "sitef6141"; + string slot = "staging"; + ResourceIdentifier webSiteSlotResourceId = WebSiteSlotResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, slot); + WebSiteSlotResource webSiteSlot = client.GetWebSiteSlotResource(webSiteSlotResourceId); + + // invoke the operation + CustomHostnameAnalysisResult result = await webSiteSlot.AnalyzeCustomHostnameSlotAsync(); + + Console.WriteLine($"Succeeded: {result}"); + } + + // List Deployment Status Slot + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetSlotSiteDeploymentStatusesSlot_ListDeploymentStatusSlot() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ListSiteDeploymentStatusSlot.json + // this example is just showing the usage of "WebApps_ListSlotSiteDeploymentStatusesSlot" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteSlotResource created on azure + // for more information of creating WebSiteSlotResource, please refer to the document of WebSiteSlotResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testSite"; + string slot = "stage"; + ResourceIdentifier webSiteSlotResourceId = WebSiteSlotResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, slot); + WebSiteSlotResource webSiteSlot = client.GetWebSiteSlotResource(webSiteSlotResourceId); + + // invoke the operation and iterate over the result + await foreach (CsmDeploymentStatus item in webSiteSlot.GetSlotSiteDeploymentStatusesSlotAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get Deployment Status Slot + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetSlotSiteDeploymentStatusSlot_GetDeploymentStatusSlot() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetSiteDeploymentStatusSlot.json + // this example is just showing the usage of "WebApps_GetSlotSiteDeploymentStatusSlot" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteSlotResource created on azure + // for more information of creating WebSiteSlotResource, please refer to the document of WebSiteSlotResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testSite"; + string slot = "stage"; + ResourceIdentifier webSiteSlotResourceId = WebSiteSlotResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, slot); + WebSiteSlotResource webSiteSlot = client.GetWebSiteSlotResource(webSiteSlotResourceId); + + // invoke the operation + string deploymentStatusId = "eacfd68b-3bbd-4ad9-99c5-98614d89c8e5"; + ArmOperation lro = await webSiteSlot.GetSlotSiteDeploymentStatusSlotAsync(WaitUntil.Completed, deploymentStatusId); + CsmDeploymentStatus result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + // List backups [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAllSiteBackupSlotData_ListBackups() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/ListSlotBackups.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ListSlotBackups.json // this example is just showing the usage of "WebApps_ListSiteBackupsSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -53,7 +238,7 @@ public async Task GetAllSiteBackupSlotData_ListBackups() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetNetworkTraceOperationSlot_GetTheCurrentStatusOfANetworkTraceOperationForASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetWebSiteNetworkTraceOperation.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetWebSiteNetworkTraceOperation.json // this example is just showing the usage of "WebApps_GetNetworkTraceOperationSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -85,7 +270,7 @@ public async Task GetNetworkTraceOperationSlot_GetTheCurrentStatusOfANetworkTrac [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task StartWebSiteNetworkTraceOperationSlot_StartANewNetworkTraceOperationForASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/StartWebSiteNetworkTraceOperation.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/StartWebSiteNetworkTraceOperation.json // this example is just showing the usage of "WebApps_StartWebSiteNetworkTraceOperationSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -115,7 +300,7 @@ public async Task StartWebSiteNetworkTraceOperationSlot_StartANewNetworkTraceOpe [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task StopWebSiteNetworkTraceSlot_StopACurrentlyRunningNetworkTraceOperationForASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/StopWebSiteNetworkTrace.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/StopWebSiteNetworkTrace.json // this example is just showing the usage of "WebApps_StopWebSiteNetworkTraceSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -143,7 +328,7 @@ public async Task StopWebSiteNetworkTraceSlot_StopACurrentlyRunningNetworkTraceO [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetNetworkTracesSlot_GetNetworkTracesForASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetWebSiteNetworkTraces.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetWebSiteNetworkTraces.json // this example is just showing the usage of "WebApps_GetNetworkTracesSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -175,7 +360,7 @@ public async Task GetNetworkTracesSlot_GetNetworkTracesForASite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetNetworkTraceOperationSlotV2_GetTheCurrentStatusOfANetworkTraceOperationForASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetWebSiteNetworkTraceOperation.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetWebSiteNetworkTraceOperation.json // this example is just showing the usage of "WebApps_GetNetworkTraceOperationSlotV2" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -207,7 +392,7 @@ public async Task GetNetworkTraceOperationSlotV2_GetTheCurrentStatusOfANetworkTr [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetNetworkTracesSlotV2_GetNetworkTracesForASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetWebSiteNetworkTraces.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetWebSiteNetworkTraces.json // this example is just showing the usage of "WebApps_GetNetworkTracesSlotV2" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -239,7 +424,7 @@ public async Task GetNetworkTracesSlotV2_GetNetworkTracesForASite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetPrivateLinkResourcesSlot_GetPrivateLinkResourcesOfASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetSitePrivateLinkResourcesSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetSitePrivateLinkResourcesSlot.json // this example is just showing the usage of "WebApps_GetPrivateLinkResourcesSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -270,7 +455,7 @@ public async Task GetPrivateLinkResourcesSlot_GetPrivateLinkResourcesOfASite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task StartNetworkTraceSlot_StartANewNetworkTraceOperationForASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/StartWebSiteNetworkTraceOperation.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/StartWebSiteNetworkTraceOperation.json // this example is just showing the usage of "WebApps_StartNetworkTraceSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -300,7 +485,7 @@ public async Task StartNetworkTraceSlot_StartANewNetworkTraceOperationForASite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task StopNetworkTraceSlot_StopACurrentlyRunningNetworkTraceOperationForASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/StopWebSiteNetworkTrace.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/StopWebSiteNetworkTrace.json // this example is just showing the usage of "WebApps_StopNetworkTraceSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -322,5 +507,117 @@ public async Task StopNetworkTraceSlot_StopACurrentlyRunningNetworkTraceOperatio Console.WriteLine($"Succeeded"); } + + // Deploys workflow artifacts slot + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task DeployWorkflowArtifactsSlot_DeploysWorkflowArtifactsSlot() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/PostDeployWorkflowArtifactsSlot.json + // this example is just showing the usage of "WebApps_DeployWorkflowArtifactsSlot" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteSlotResource created on azure + // for more information of creating WebSiteSlotResource, please refer to the document of WebSiteSlotResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "testsite2"; + string slot = "testsSlot"; + ResourceIdentifier webSiteSlotResourceId = WebSiteSlotResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, slot); + WebSiteSlotResource webSiteSlot = client.GetWebSiteSlotResource(webSiteSlotResourceId); + + // invoke the operation + WorkflowArtifacts workflowArtifacts = new WorkflowArtifacts() + { + AppSettings = BinaryData.FromObjectAsJson(new Dictionary() + { + ["eventHub_connectionString"] = "Endpoint=sb://example.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=EXAMPLE1a2b3c4d5e6fEXAMPLE=" + }), + Files = +{ +["connections.json"] = BinaryData.FromObjectAsJson(new Dictionary() +{ +["managedApiConnections"] = new Dictionary() +{ +}, +["serviceProviderConnections"] = new Dictionary() +{ +["eventHub"] = new Dictionary() +{ +["displayName"] = "example1", +["parameterValues"] = new Dictionary() +{ +["connectionString"] = "@appsetting('eventHub_connectionString')"}, +["serviceProvider"] = new Dictionary() +{ +["id"] = "/serviceProviders/eventHub"}}}}), +["test1/workflow.json"] = BinaryData.FromObjectAsJson(new Dictionary() +{ +["definition"] = new Dictionary() +{ +["$schema"] = "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", +["actions"] = new Dictionary() +{ +}, +["contentVersion"] = "1.0.0.0", +["outputs"] = new Dictionary() +{ +}, +["triggers"] = new Dictionary() +{ +["When_events_are_available_in_Event_hub"] = new Dictionary() +{ +["type"] = "ServiceProvider", +["inputs"] = new Dictionary() +{ +["parameters"] = new Dictionary() +{ +["eventHubName"] = "test123"}, +["serviceProviderConfiguration"] = new Dictionary() +{ +["operationId"] = "receiveEvents", +["connectionName"] = "eventHub", +["serviceProviderId"] = "/serviceProviders/eventHub"}}, +["splitOn"] = "@triggerOutputs()?['body']"}}}, +["kind"] = "Stateful"}), +}, + }; + await webSiteSlot.DeployWorkflowArtifactsSlotAsync(workflowArtifacts: workflowArtifacts); + + Console.WriteLine($"Succeeded"); + } + + // List the Instance Workflows Configuration Connections Slot + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetWorkflowsConnectionsSlot_ListTheInstanceWorkflowsConfigurationConnectionsSlot() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ListWorkflowsConfigurationConnections.json + // this example is just showing the usage of "WebApps_ListWorkflowsConnectionsSlot" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteSlotResource created on azure + // for more information of creating WebSiteSlotResource, please refer to the document of WebSiteSlotResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "testsite2"; + string slot = "staging"; + ResourceIdentifier webSiteSlotResourceId = WebSiteSlotResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, slot); + WebSiteSlotResource webSiteSlot = client.GetWebSiteSlotResource(webSiteSlotResourceId); + + // invoke the operation + WorkflowEnvelopeData result = await webSiteSlot.GetWorkflowsConnectionsSlotAsync(); + + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {result.Id}"); + } } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteSlotResourceHealthMetadataResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteSlotResourceHealthMetadataResource.cs index c1b15fe7741ea..f0605f2e90055 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteSlotResourceHealthMetadataResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteSlotResourceHealthMetadataResource.cs @@ -19,7 +19,7 @@ public partial class Sample_WebSiteSlotResourceHealthMetadataResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetResourceHealthMetadata() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetResourceHealthMetadataBySite.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetResourceHealthMetadataBySite.json // this example is just showing the usage of "ResourceHealthMetadata_GetBySiteSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowRunActionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowRunActionCollection.cs new file mode 100644 index 0000000000000..a9de422257c11 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowRunActionCollection.cs @@ -0,0 +1,171 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_WorkflowRunActionCollection + { + // List a workflow run actions + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ListAWorkflowRunActions() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowRunActions_List.json + // this example is just showing the usage of "WorkflowRunActions_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkflowRunResource created on azure + // for more information of creating WorkflowRunResource, please refer to the document of WorkflowRunResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-resource-group"; + string name = "test-name"; + string workflowName = "test-workflow"; + string runName = "08586676746934337772206998657CU22"; + ResourceIdentifier workflowRunResourceId = WorkflowRunResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, runName); + WorkflowRunResource workflowRun = client.GetWorkflowRunResource(workflowRunResourceId); + + // get the collection of this WorkflowRunActionResource + WorkflowRunActionCollection collection = workflowRun.GetWorkflowRunActions(); + + // invoke the operation and iterate over the result + await foreach (WorkflowRunActionResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkflowRunActionData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get a workflow run action + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetAWorkflowRunAction() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowRunActions_Get.json + // this example is just showing the usage of "WorkflowRunActions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkflowRunResource created on azure + // for more information of creating WorkflowRunResource, please refer to the document of WorkflowRunResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-resource-group"; + string name = "test-name"; + string workflowName = "test-workflow"; + string runName = "08586676746934337772206998657CU22"; + ResourceIdentifier workflowRunResourceId = WorkflowRunResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, runName); + WorkflowRunResource workflowRun = client.GetWorkflowRunResource(workflowRunResourceId); + + // get the collection of this WorkflowRunActionResource + WorkflowRunActionCollection collection = workflowRun.GetWorkflowRunActions(); + + // invoke the operation + string actionName = "HTTP"; + WorkflowRunActionResource result = await collection.GetAsync(actionName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkflowRunActionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get a workflow run action + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetAWorkflowRunAction() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowRunActions_Get.json + // this example is just showing the usage of "WorkflowRunActions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkflowRunResource created on azure + // for more information of creating WorkflowRunResource, please refer to the document of WorkflowRunResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-resource-group"; + string name = "test-name"; + string workflowName = "test-workflow"; + string runName = "08586676746934337772206998657CU22"; + ResourceIdentifier workflowRunResourceId = WorkflowRunResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, runName); + WorkflowRunResource workflowRun = client.GetWorkflowRunResource(workflowRunResourceId); + + // get the collection of this WorkflowRunActionResource + WorkflowRunActionCollection collection = workflowRun.GetWorkflowRunActions(); + + // invoke the operation + string actionName = "HTTP"; + bool result = await collection.ExistsAsync(actionName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Get a workflow run action + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetAWorkflowRunAction() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowRunActions_Get.json + // this example is just showing the usage of "WorkflowRunActions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkflowRunResource created on azure + // for more information of creating WorkflowRunResource, please refer to the document of WorkflowRunResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-resource-group"; + string name = "test-name"; + string workflowName = "test-workflow"; + string runName = "08586676746934337772206998657CU22"; + ResourceIdentifier workflowRunResourceId = WorkflowRunResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, runName); + WorkflowRunResource workflowRun = client.GetWorkflowRunResource(workflowRunResourceId); + + // get the collection of this WorkflowRunActionResource + WorkflowRunActionCollection collection = workflowRun.GetWorkflowRunActions(); + + // invoke the operation + string actionName = "HTTP"; + NullableResponse response = await collection.GetIfExistsAsync(actionName); + WorkflowRunActionResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkflowRunActionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowRunActionRepetitionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowRunActionRepetitionCollection.cs new file mode 100644 index 0000000000000..b95f12d9267fa --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowRunActionRepetitionCollection.cs @@ -0,0 +1,175 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_WorkflowRunActionRepetitionCollection + { + // List repetitions + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ListRepetitions() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowRunActionRepetitions_List.json + // this example is just showing the usage of "WorkflowRunActionRepetitions_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkflowRunActionResource created on azure + // for more information of creating WorkflowRunActionResource, please refer to the document of WorkflowRunActionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testResourceGroup"; + string name = "test-name"; + string workflowName = "testFlow"; + string runName = "08586776228332053161046300351"; + string actionName = "testAction"; + ResourceIdentifier workflowRunActionResourceId = WorkflowRunActionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, runName, actionName); + WorkflowRunActionResource workflowRunAction = client.GetWorkflowRunActionResource(workflowRunActionResourceId); + + // get the collection of this WorkflowRunActionRepetitionResource + WorkflowRunActionRepetitionCollection collection = workflowRunAction.GetWorkflowRunActionRepetitions(); + + // invoke the operation and iterate over the result + await foreach (WorkflowRunActionRepetitionResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkflowRunActionRepetitionDefinitionData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get a repetition + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetARepetition() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowRunActionRepetitions_Get.json + // this example is just showing the usage of "WorkflowRunActionRepetitions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkflowRunActionResource created on azure + // for more information of creating WorkflowRunActionResource, please refer to the document of WorkflowRunActionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testResourceGroup"; + string name = "test-name"; + string workflowName = "testFlow"; + string runName = "08586776228332053161046300351"; + string actionName = "testAction"; + ResourceIdentifier workflowRunActionResourceId = WorkflowRunActionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, runName, actionName); + WorkflowRunActionResource workflowRunAction = client.GetWorkflowRunActionResource(workflowRunActionResourceId); + + // get the collection of this WorkflowRunActionRepetitionResource + WorkflowRunActionRepetitionCollection collection = workflowRunAction.GetWorkflowRunActionRepetitions(); + + // invoke the operation + string repetitionName = "000001"; + WorkflowRunActionRepetitionResource result = await collection.GetAsync(repetitionName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkflowRunActionRepetitionDefinitionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get a repetition + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetARepetition() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowRunActionRepetitions_Get.json + // this example is just showing the usage of "WorkflowRunActionRepetitions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkflowRunActionResource created on azure + // for more information of creating WorkflowRunActionResource, please refer to the document of WorkflowRunActionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testResourceGroup"; + string name = "test-name"; + string workflowName = "testFlow"; + string runName = "08586776228332053161046300351"; + string actionName = "testAction"; + ResourceIdentifier workflowRunActionResourceId = WorkflowRunActionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, runName, actionName); + WorkflowRunActionResource workflowRunAction = client.GetWorkflowRunActionResource(workflowRunActionResourceId); + + // get the collection of this WorkflowRunActionRepetitionResource + WorkflowRunActionRepetitionCollection collection = workflowRunAction.GetWorkflowRunActionRepetitions(); + + // invoke the operation + string repetitionName = "000001"; + bool result = await collection.ExistsAsync(repetitionName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Get a repetition + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetARepetition() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowRunActionRepetitions_Get.json + // this example is just showing the usage of "WorkflowRunActionRepetitions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkflowRunActionResource created on azure + // for more information of creating WorkflowRunActionResource, please refer to the document of WorkflowRunActionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testResourceGroup"; + string name = "test-name"; + string workflowName = "testFlow"; + string runName = "08586776228332053161046300351"; + string actionName = "testAction"; + ResourceIdentifier workflowRunActionResourceId = WorkflowRunActionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, runName, actionName); + WorkflowRunActionResource workflowRunAction = client.GetWorkflowRunActionResource(workflowRunActionResourceId); + + // get the collection of this WorkflowRunActionRepetitionResource + WorkflowRunActionRepetitionCollection collection = workflowRunAction.GetWorkflowRunActionRepetitions(); + + // invoke the operation + string repetitionName = "000001"; + NullableResponse response = await collection.GetIfExistsAsync(repetitionName); + WorkflowRunActionRepetitionResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkflowRunActionRepetitionDefinitionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowRunActionRepetitionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowRunActionRepetitionResource.cs new file mode 100644 index 0000000000000..31eb2602b1e11 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowRunActionRepetitionResource.cs @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_WorkflowRunActionRepetitionResource + { + // Get a repetition + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetARepetition() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowRunActionRepetitions_Get.json + // this example is just showing the usage of "WorkflowRunActionRepetitions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkflowRunActionRepetitionResource created on azure + // for more information of creating WorkflowRunActionRepetitionResource, please refer to the document of WorkflowRunActionRepetitionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testResourceGroup"; + string name = "test-name"; + string workflowName = "testFlow"; + string runName = "08586776228332053161046300351"; + string actionName = "testAction"; + string repetitionName = "000001"; + ResourceIdentifier workflowRunActionRepetitionResourceId = WorkflowRunActionRepetitionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, runName, actionName, repetitionName); + WorkflowRunActionRepetitionResource workflowRunActionRepetition = client.GetWorkflowRunActionRepetitionResource(workflowRunActionRepetitionResourceId); + + // invoke the operation + WorkflowRunActionRepetitionResource result = await workflowRunActionRepetition.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkflowRunActionRepetitionDefinitionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // List expression traces for a repetition + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetExpressionTraces_ListExpressionTracesForARepetition() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowRunActionRepetitions_ListExpressionTraces.json + // this example is just showing the usage of "WorkflowRunActionRepetitions_ListExpressionTraces" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkflowRunActionRepetitionResource created on azure + // for more information of creating WorkflowRunActionRepetitionResource, please refer to the document of WorkflowRunActionRepetitionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testResourceGroup"; + string name = "test-name"; + string workflowName = "testFlow"; + string runName = "08586776228332053161046300351"; + string actionName = "testAction"; + string repetitionName = "000001"; + ResourceIdentifier workflowRunActionRepetitionResourceId = WorkflowRunActionRepetitionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, runName, actionName, repetitionName); + WorkflowRunActionRepetitionResource workflowRunActionRepetition = client.GetWorkflowRunActionRepetitionResource(workflowRunActionRepetitionResourceId); + + // invoke the operation and iterate over the result + await foreach (WorkflowExpressionRoot item in workflowRunActionRepetition.GetExpressionTracesAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowRunActionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowRunActionResource.cs new file mode 100644 index 0000000000000..4da1db2251126 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowRunActionResource.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_WorkflowRunActionResource + { + // Get a workflow run action + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetAWorkflowRunAction() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowRunActions_Get.json + // this example is just showing the usage of "WorkflowRunActions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkflowRunActionResource created on azure + // for more information of creating WorkflowRunActionResource, please refer to the document of WorkflowRunActionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-resource-group"; + string name = "test-name"; + string workflowName = "test-workflow"; + string runName = "08586676746934337772206998657CU22"; + string actionName = "HTTP"; + ResourceIdentifier workflowRunActionResourceId = WorkflowRunActionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, runName, actionName); + WorkflowRunActionResource workflowRunAction = client.GetWorkflowRunActionResource(workflowRunActionResourceId); + + // invoke the operation + WorkflowRunActionResource result = await workflowRunAction.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkflowRunActionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // List expression traces + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetExpressionTraces_ListExpressionTraces() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowRunActions_ListExpressionTraces.json + // this example is just showing the usage of "WorkflowRunActions_ListExpressionTraces" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkflowRunActionResource created on azure + // for more information of creating WorkflowRunActionResource, please refer to the document of WorkflowRunActionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testResourceGroup"; + string name = "test-name"; + string workflowName = "testFlow"; + string runName = "08586776228332053161046300351"; + string actionName = "testAction"; + ResourceIdentifier workflowRunActionResourceId = WorkflowRunActionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, runName, actionName); + WorkflowRunActionResource workflowRunAction = client.GetWorkflowRunActionResource(workflowRunActionResourceId); + + // invoke the operation and iterate over the result + await foreach (WorkflowExpressionRoot item in workflowRunAction.GetExpressionTracesAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowRunActionScopeRepetitionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowRunActionScopeRepetitionCollection.cs new file mode 100644 index 0000000000000..381c93ad67442 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowRunActionScopeRepetitionCollection.cs @@ -0,0 +1,175 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_WorkflowRunActionScopeRepetitionCollection + { + // List the scoped repetitions + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ListTheScopedRepetitions() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowRunActionScopeRepetitions_List.json + // this example is just showing the usage of "WorkflowRunActionScopeRepetitions_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkflowRunActionResource created on azure + // for more information of creating WorkflowRunActionResource, please refer to the document of WorkflowRunActionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testResourceGroup"; + string name = "test-name"; + string workflowName = "testFlow"; + string runName = "08586776228332053161046300351"; + string actionName = "for_each"; + ResourceIdentifier workflowRunActionResourceId = WorkflowRunActionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, runName, actionName); + WorkflowRunActionResource workflowRunAction = client.GetWorkflowRunActionResource(workflowRunActionResourceId); + + // get the collection of this WorkflowRunActionScopeRepetitionResource + WorkflowRunActionScopeRepetitionCollection collection = workflowRunAction.GetWorkflowRunActionScopeRepetitions(); + + // invoke the operation and iterate over the result + await foreach (WorkflowRunActionScopeRepetitionResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkflowRunActionRepetitionDefinitionData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get a scoped repetition + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetAScopedRepetition() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowRunActionScopeRepetitions_Get.json + // this example is just showing the usage of "WorkflowRunActionScopeRepetitions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkflowRunActionResource created on azure + // for more information of creating WorkflowRunActionResource, please refer to the document of WorkflowRunActionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testResourceGroup"; + string name = "test-name"; + string workflowName = "testFlow"; + string runName = "08586776228332053161046300351"; + string actionName = "for_each"; + ResourceIdentifier workflowRunActionResourceId = WorkflowRunActionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, runName, actionName); + WorkflowRunActionResource workflowRunAction = client.GetWorkflowRunActionResource(workflowRunActionResourceId); + + // get the collection of this WorkflowRunActionScopeRepetitionResource + WorkflowRunActionScopeRepetitionCollection collection = workflowRunAction.GetWorkflowRunActionScopeRepetitions(); + + // invoke the operation + string repetitionName = "000000"; + WorkflowRunActionScopeRepetitionResource result = await collection.GetAsync(repetitionName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkflowRunActionRepetitionDefinitionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get a scoped repetition + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetAScopedRepetition() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowRunActionScopeRepetitions_Get.json + // this example is just showing the usage of "WorkflowRunActionScopeRepetitions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkflowRunActionResource created on azure + // for more information of creating WorkflowRunActionResource, please refer to the document of WorkflowRunActionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testResourceGroup"; + string name = "test-name"; + string workflowName = "testFlow"; + string runName = "08586776228332053161046300351"; + string actionName = "for_each"; + ResourceIdentifier workflowRunActionResourceId = WorkflowRunActionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, runName, actionName); + WorkflowRunActionResource workflowRunAction = client.GetWorkflowRunActionResource(workflowRunActionResourceId); + + // get the collection of this WorkflowRunActionScopeRepetitionResource + WorkflowRunActionScopeRepetitionCollection collection = workflowRunAction.GetWorkflowRunActionScopeRepetitions(); + + // invoke the operation + string repetitionName = "000000"; + bool result = await collection.ExistsAsync(repetitionName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Get a scoped repetition + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetAScopedRepetition() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowRunActionScopeRepetitions_Get.json + // this example is just showing the usage of "WorkflowRunActionScopeRepetitions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkflowRunActionResource created on azure + // for more information of creating WorkflowRunActionResource, please refer to the document of WorkflowRunActionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testResourceGroup"; + string name = "test-name"; + string workflowName = "testFlow"; + string runName = "08586776228332053161046300351"; + string actionName = "for_each"; + ResourceIdentifier workflowRunActionResourceId = WorkflowRunActionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, runName, actionName); + WorkflowRunActionResource workflowRunAction = client.GetWorkflowRunActionResource(workflowRunActionResourceId); + + // get the collection of this WorkflowRunActionScopeRepetitionResource + WorkflowRunActionScopeRepetitionCollection collection = workflowRunAction.GetWorkflowRunActionScopeRepetitions(); + + // invoke the operation + string repetitionName = "000000"; + NullableResponse response = await collection.GetIfExistsAsync(repetitionName); + WorkflowRunActionScopeRepetitionResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkflowRunActionRepetitionDefinitionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowRunActionScopeRepetitionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowRunActionScopeRepetitionResource.cs new file mode 100644 index 0000000000000..e29adf7ab3859 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowRunActionScopeRepetitionResource.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_WorkflowRunActionScopeRepetitionResource + { + // Get a scoped repetition + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetAScopedRepetition() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowRunActionScopeRepetitions_Get.json + // this example is just showing the usage of "WorkflowRunActionScopeRepetitions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkflowRunActionScopeRepetitionResource created on azure + // for more information of creating WorkflowRunActionScopeRepetitionResource, please refer to the document of WorkflowRunActionScopeRepetitionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testResourceGroup"; + string name = "test-name"; + string workflowName = "testFlow"; + string runName = "08586776228332053161046300351"; + string actionName = "for_each"; + string repetitionName = "000000"; + ResourceIdentifier workflowRunActionScopeRepetitionResourceId = WorkflowRunActionScopeRepetitionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, runName, actionName, repetitionName); + WorkflowRunActionScopeRepetitionResource workflowRunActionScopeRepetition = client.GetWorkflowRunActionScopeRepetitionResource(workflowRunActionScopeRepetitionResourceId); + + // invoke the operation + WorkflowRunActionScopeRepetitionResource result = await workflowRunActionScopeRepetition.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkflowRunActionRepetitionDefinitionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowRunCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowRunCollection.cs new file mode 100644 index 0000000000000..81f3e81574bf3 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowRunCollection.cs @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_WorkflowRunCollection + { + // List workflow runs + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ListWorkflowRuns() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowRuns_List.json + // this example is just showing the usage of "WorkflowRuns_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-resource-group"; + string name = "test-name"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // get the collection of this WorkflowRunResource + string workflowName = "test-workflow"; + WorkflowRunCollection collection = webSite.GetWorkflowRuns(workflowName); + + // invoke the operation and iterate over the result + await foreach (WorkflowRunResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkflowRunData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get a run for a workflow + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetARunForAWorkflow() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowRuns_Get.json + // this example is just showing the usage of "WorkflowRuns_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-resource-group"; + string name = "test-name"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // get the collection of this WorkflowRunResource + string workflowName = "test-workflow"; + WorkflowRunCollection collection = webSite.GetWorkflowRuns(workflowName); + + // invoke the operation + string runName = "08586676746934337772206998657CU22"; + WorkflowRunResource result = await collection.GetAsync(runName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkflowRunData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get a run for a workflow + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetARunForAWorkflow() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowRuns_Get.json + // this example is just showing the usage of "WorkflowRuns_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-resource-group"; + string name = "test-name"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // get the collection of this WorkflowRunResource + string workflowName = "test-workflow"; + WorkflowRunCollection collection = webSite.GetWorkflowRuns(workflowName); + + // invoke the operation + string runName = "08586676746934337772206998657CU22"; + bool result = await collection.ExistsAsync(runName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Get a run for a workflow + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetARunForAWorkflow() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowRuns_Get.json + // this example is just showing the usage of "WorkflowRuns_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-resource-group"; + string name = "test-name"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // get the collection of this WorkflowRunResource + string workflowName = "test-workflow"; + WorkflowRunCollection collection = webSite.GetWorkflowRuns(workflowName); + + // invoke the operation + string runName = "08586676746934337772206998657CU22"; + NullableResponse response = await collection.GetIfExistsAsync(runName); + WorkflowRunResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkflowRunData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowRunResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowRunResource.cs new file mode 100644 index 0000000000000..5b619006d1d0a --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowRunResource.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_WorkflowRunResource + { + // Get a run for a workflow + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetARunForAWorkflow() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowRuns_Get.json + // this example is just showing the usage of "WorkflowRuns_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkflowRunResource created on azure + // for more information of creating WorkflowRunResource, please refer to the document of WorkflowRunResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-resource-group"; + string name = "test-name"; + string workflowName = "test-workflow"; + string runName = "08586676746934337772206998657CU22"; + ResourceIdentifier workflowRunResourceId = WorkflowRunResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, runName); + WorkflowRunResource workflowRun = client.GetWorkflowRunResource(workflowRunResourceId); + + // invoke the operation + WorkflowRunResource result = await workflowRun.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkflowRunData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Cancel a workflow run + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Cancel_CancelAWorkflowRun() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowRuns_Cancel.json + // this example is just showing the usage of "WorkflowRuns_Cancel" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkflowRunResource created on azure + // for more information of creating WorkflowRunResource, please refer to the document of WorkflowRunResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-resource-group"; + string name = "test-name"; + string workflowName = "test-workflow"; + string runName = "08586676746934337772206998657CU22"; + ResourceIdentifier workflowRunResourceId = WorkflowRunResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, runName); + WorkflowRunResource workflowRun = client.GetWorkflowRunResource(workflowRunResourceId); + + // invoke the operation + await workflowRun.CancelAsync(); + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowTriggerCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowTriggerCollection.cs new file mode 100644 index 0000000000000..502c17035643c --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowTriggerCollection.cs @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_WorkflowTriggerCollection + { + // List workflow triggers + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ListWorkflowTriggers() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowTriggers_List.json + // this example is just showing the usage of "WorkflowTriggers_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-resource-group"; + string name = "test-name"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // get the collection of this WorkflowTriggerResource + string workflowName = "test-workflow"; + WorkflowTriggerCollection collection = webSite.GetWorkflowTriggers(workflowName); + + // invoke the operation and iterate over the result + await foreach (WorkflowTriggerResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkflowTriggerData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get a workflow trigger + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetAWorkflowTrigger() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowTriggers_Get.json + // this example is just showing the usage of "WorkflowTriggers_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-resource-group"; + string name = "test-name"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // get the collection of this WorkflowTriggerResource + string workflowName = "test-workflow"; + WorkflowTriggerCollection collection = webSite.GetWorkflowTriggers(workflowName); + + // invoke the operation + string triggerName = "manual"; + WorkflowTriggerResource result = await collection.GetAsync(triggerName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkflowTriggerData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get a workflow trigger + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetAWorkflowTrigger() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowTriggers_Get.json + // this example is just showing the usage of "WorkflowTriggers_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-resource-group"; + string name = "test-name"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // get the collection of this WorkflowTriggerResource + string workflowName = "test-workflow"; + WorkflowTriggerCollection collection = webSite.GetWorkflowTriggers(workflowName); + + // invoke the operation + string triggerName = "manual"; + bool result = await collection.ExistsAsync(triggerName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Get a workflow trigger + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetAWorkflowTrigger() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowTriggers_Get.json + // this example is just showing the usage of "WorkflowTriggers_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-resource-group"; + string name = "test-name"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // get the collection of this WorkflowTriggerResource + string workflowName = "test-workflow"; + WorkflowTriggerCollection collection = webSite.GetWorkflowTriggers(workflowName); + + // invoke the operation + string triggerName = "manual"; + NullableResponse response = await collection.GetIfExistsAsync(triggerName); + WorkflowTriggerResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkflowTriggerData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowTriggerHistoryCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowTriggerHistoryCollection.cs new file mode 100644 index 0000000000000..7dec98f6fdb7e --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowTriggerHistoryCollection.cs @@ -0,0 +1,171 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_WorkflowTriggerHistoryCollection + { + // List a workflow trigger history + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ListAWorkflowTriggerHistory() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowTriggerHistories_List.json + // this example is just showing the usage of "WorkflowTriggerHistories_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkflowTriggerResource created on azure + // for more information of creating WorkflowTriggerResource, please refer to the document of WorkflowTriggerResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testResourceGroup"; + string name = "test-name"; + string workflowName = "testWorkflowName"; + string triggerName = "testTriggerName"; + ResourceIdentifier workflowTriggerResourceId = WorkflowTriggerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, triggerName); + WorkflowTriggerResource workflowTrigger = client.GetWorkflowTriggerResource(workflowTriggerResourceId); + + // get the collection of this WorkflowTriggerHistoryResource + WorkflowTriggerHistoryCollection collection = workflowTrigger.GetWorkflowTriggerHistories(); + + // invoke the operation and iterate over the result + await foreach (WorkflowTriggerHistoryResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkflowTriggerHistoryData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get a workflow trigger history + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetAWorkflowTriggerHistory() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowTriggerHistories_Get.json + // this example is just showing the usage of "WorkflowTriggerHistories_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkflowTriggerResource created on azure + // for more information of creating WorkflowTriggerResource, please refer to the document of WorkflowTriggerResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testResourceGroup"; + string name = "test-name"; + string workflowName = "testWorkflowName"; + string triggerName = "testTriggerName"; + ResourceIdentifier workflowTriggerResourceId = WorkflowTriggerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, triggerName); + WorkflowTriggerResource workflowTrigger = client.GetWorkflowTriggerResource(workflowTriggerResourceId); + + // get the collection of this WorkflowTriggerHistoryResource + WorkflowTriggerHistoryCollection collection = workflowTrigger.GetWorkflowTriggerHistories(); + + // invoke the operation + string historyName = "08586676746934337772206998657CU22"; + WorkflowTriggerHistoryResource result = await collection.GetAsync(historyName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkflowTriggerHistoryData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get a workflow trigger history + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetAWorkflowTriggerHistory() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowTriggerHistories_Get.json + // this example is just showing the usage of "WorkflowTriggerHistories_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkflowTriggerResource created on azure + // for more information of creating WorkflowTriggerResource, please refer to the document of WorkflowTriggerResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testResourceGroup"; + string name = "test-name"; + string workflowName = "testWorkflowName"; + string triggerName = "testTriggerName"; + ResourceIdentifier workflowTriggerResourceId = WorkflowTriggerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, triggerName); + WorkflowTriggerResource workflowTrigger = client.GetWorkflowTriggerResource(workflowTriggerResourceId); + + // get the collection of this WorkflowTriggerHistoryResource + WorkflowTriggerHistoryCollection collection = workflowTrigger.GetWorkflowTriggerHistories(); + + // invoke the operation + string historyName = "08586676746934337772206998657CU22"; + bool result = await collection.ExistsAsync(historyName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Get a workflow trigger history + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetAWorkflowTriggerHistory() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowTriggerHistories_Get.json + // this example is just showing the usage of "WorkflowTriggerHistories_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkflowTriggerResource created on azure + // for more information of creating WorkflowTriggerResource, please refer to the document of WorkflowTriggerResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testResourceGroup"; + string name = "test-name"; + string workflowName = "testWorkflowName"; + string triggerName = "testTriggerName"; + ResourceIdentifier workflowTriggerResourceId = WorkflowTriggerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, triggerName); + WorkflowTriggerResource workflowTrigger = client.GetWorkflowTriggerResource(workflowTriggerResourceId); + + // get the collection of this WorkflowTriggerHistoryResource + WorkflowTriggerHistoryCollection collection = workflowTrigger.GetWorkflowTriggerHistories(); + + // invoke the operation + string historyName = "08586676746934337772206998657CU22"; + NullableResponse response = await collection.GetIfExistsAsync(historyName); + WorkflowTriggerHistoryResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkflowTriggerHistoryData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowTriggerHistoryResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowTriggerHistoryResource.cs new file mode 100644 index 0000000000000..76ce4b7bc4534 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowTriggerHistoryResource.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_WorkflowTriggerHistoryResource + { + // Get a workflow trigger history + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetAWorkflowTriggerHistory() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowTriggerHistories_Get.json + // this example is just showing the usage of "WorkflowTriggerHistories_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkflowTriggerHistoryResource created on azure + // for more information of creating WorkflowTriggerHistoryResource, please refer to the document of WorkflowTriggerHistoryResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testResourceGroup"; + string name = "test-name"; + string workflowName = "testWorkflowName"; + string triggerName = "testTriggerName"; + string historyName = "08586676746934337772206998657CU22"; + ResourceIdentifier workflowTriggerHistoryResourceId = WorkflowTriggerHistoryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, triggerName, historyName); + WorkflowTriggerHistoryResource workflowTriggerHistory = client.GetWorkflowTriggerHistoryResource(workflowTriggerHistoryResourceId); + + // invoke the operation + WorkflowTriggerHistoryResource result = await workflowTriggerHistory.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkflowTriggerHistoryData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Resubmit a workflow run based on the trigger history + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Resubmit_ResubmitAWorkflowRunBasedOnTheTriggerHistory() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowTriggerHistories_Resubmit.json + // this example is just showing the usage of "WorkflowTriggerHistories_Resubmit" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkflowTriggerHistoryResource created on azure + // for more information of creating WorkflowTriggerHistoryResource, please refer to the document of WorkflowTriggerHistoryResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testResourceGroup"; + string name = "test-name"; + string workflowName = "testWorkflowName"; + string triggerName = "testTriggerName"; + string historyName = "testHistoryName"; + ResourceIdentifier workflowTriggerHistoryResourceId = WorkflowTriggerHistoryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, triggerName, historyName); + WorkflowTriggerHistoryResource workflowTriggerHistory = client.GetWorkflowTriggerHistoryResource(workflowTriggerHistoryResourceId); + + // invoke the operation + await workflowTriggerHistory.ResubmitAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowTriggerResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowTriggerResource.cs new file mode 100644 index 0000000000000..79536e1265a47 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowTriggerResource.cs @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_WorkflowTriggerResource + { + // Get a workflow trigger + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetAWorkflowTrigger() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowTriggers_Get.json + // this example is just showing the usage of "WorkflowTriggers_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkflowTriggerResource created on azure + // for more information of creating WorkflowTriggerResource, please refer to the document of WorkflowTriggerResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-resource-group"; + string name = "test-name"; + string workflowName = "test-workflow"; + string triggerName = "manual"; + ResourceIdentifier workflowTriggerResourceId = WorkflowTriggerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, triggerName); + WorkflowTriggerResource workflowTrigger = client.GetWorkflowTriggerResource(workflowTriggerResourceId); + + // invoke the operation + WorkflowTriggerResource result = await workflowTrigger.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkflowTriggerData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get the callback URL for a trigger + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetCallbackUrl_GetTheCallbackURLForATrigger() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowTriggers_ListCallbackUrl.json + // this example is just showing the usage of "WorkflowTriggers_ListCallbackUrl" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkflowTriggerResource created on azure + // for more information of creating WorkflowTriggerResource, please refer to the document of WorkflowTriggerResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-resource-group"; + string name = "test-name"; + string workflowName = "test-workflow"; + string triggerName = "manual"; + ResourceIdentifier workflowTriggerResourceId = WorkflowTriggerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, triggerName); + WorkflowTriggerResource workflowTrigger = client.GetWorkflowTriggerResource(workflowTriggerResourceId); + + // invoke the operation + WorkflowTriggerCallbackUri result = await workflowTrigger.GetCallbackUrlAsync(); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Run a workflow trigger + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Run_RunAWorkflowTrigger() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowTriggers_Run.json + // this example is just showing the usage of "WorkflowTriggers_Run" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkflowTriggerResource created on azure + // for more information of creating WorkflowTriggerResource, please refer to the document of WorkflowTriggerResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-resource-group"; + string name = "test-name"; + string workflowName = "test-workflow"; + string triggerName = "recurrence"; + ResourceIdentifier workflowTriggerResourceId = WorkflowTriggerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, triggerName); + WorkflowTriggerResource workflowTrigger = client.GetWorkflowTriggerResource(workflowTriggerResourceId); + + // invoke the operation + await workflowTrigger.RunAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + + // Get trigger schema + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetSchemaJson_GetTriggerSchema() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowTriggers_GetSchemaJson.json + // this example is just showing the usage of "WorkflowTriggers_GetSchemaJson" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkflowTriggerResource created on azure + // for more information of creating WorkflowTriggerResource, please refer to the document of WorkflowTriggerResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testResourceGroup"; + string name = "test-name"; + string workflowName = "testWorkflow"; + string triggerName = "testTrigger"; + ResourceIdentifier workflowTriggerResourceId = WorkflowTriggerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, triggerName); + WorkflowTriggerResource workflowTrigger = client.GetWorkflowTriggerResource(workflowTriggerResourceId); + + // invoke the operation + WebAppJsonSchema result = await workflowTrigger.GetSchemaJsonAsync(); + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowVersionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowVersionCollection.cs new file mode 100644 index 0000000000000..a38139e4fc125 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowVersionCollection.cs @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_WorkflowVersionCollection + { + // List a workflows versions + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ListAWorkflowsVersions() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowVersions_List.json + // this example is just showing the usage of "WorkflowVersions_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-resource-group"; + string name = "test-name"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // get the collection of this WorkflowVersionResource + string workflowName = "test-workflow"; + WorkflowVersionCollection collection = webSite.GetWorkflowVersions(workflowName); + + // invoke the operation and iterate over the result + await foreach (WorkflowVersionResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkflowVersionData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get a workflow version + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetAWorkflowVersion() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowVersions_Get.json + // this example is just showing the usage of "WorkflowVersions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-resource-group"; + string name = "test-name"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // get the collection of this WorkflowVersionResource + string workflowName = "test-workflow"; + WorkflowVersionCollection collection = webSite.GetWorkflowVersions(workflowName); + + // invoke the operation + string versionId = "08586676824806722526"; + WorkflowVersionResource result = await collection.GetAsync(versionId); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkflowVersionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get a workflow version + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetAWorkflowVersion() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowVersions_Get.json + // this example is just showing the usage of "WorkflowVersions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-resource-group"; + string name = "test-name"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // get the collection of this WorkflowVersionResource + string workflowName = "test-workflow"; + WorkflowVersionCollection collection = webSite.GetWorkflowVersions(workflowName); + + // invoke the operation + string versionId = "08586676824806722526"; + bool result = await collection.ExistsAsync(versionId); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Get a workflow version + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetAWorkflowVersion() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowVersions_Get.json + // this example is just showing the usage of "WorkflowVersions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-resource-group"; + string name = "test-name"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // get the collection of this WorkflowVersionResource + string workflowName = "test-workflow"; + WorkflowVersionCollection collection = webSite.GetWorkflowVersions(workflowName); + + // invoke the operation + string versionId = "08586676824806722526"; + NullableResponse response = await collection.GetIfExistsAsync(versionId); + WorkflowVersionResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkflowVersionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowVersionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowVersionResource.cs new file mode 100644 index 0000000000000..4bd08632619a7 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowVersionResource.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_WorkflowVersionResource + { + // Get a workflow version + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetAWorkflowVersion() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowVersions_Get.json + // this example is just showing the usage of "WorkflowVersions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkflowVersionResource created on azure + // for more information of creating WorkflowVersionResource, please refer to the document of WorkflowVersionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-resource-group"; + string name = "test-name"; + string workflowName = "test-workflow"; + string versionId = "08586676824806722526"; + ResourceIdentifier workflowVersionResourceId = WorkflowVersionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, versionId); + WorkflowVersionResource workflowVersion = client.GetWorkflowVersionResource(workflowVersionResourceId); + + // invoke the operation + WorkflowVersionResource result = await workflowVersion.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkflowVersionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Azure.ResourceManager.AppService.csproj b/sdk/websites/Azure.ResourceManager.AppService/src/Azure.ResourceManager.AppService.csproj index 2a3d9e1197eca..5ea669422a988 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Azure.ResourceManager.AppService.csproj +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Azure.ResourceManager.AppService.csproj @@ -1,6 +1,6 @@ - 1.1.0-beta.6 + 1.2.0 1.0.2 Azure.ResourceManager.AppService diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Customization/AppServiceEnvironmentResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/AppServiceEnvironmentResource.cs index 843fa6b3a52c5..03d13c97c9529 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Customization/AppServiceEnvironmentResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/AppServiceEnvironmentResource.cs @@ -4,15 +4,9 @@ #nullable disable using System; -using System.Globalization; -using System.Linq; using System.Threading; using System.Threading.Tasks; -using Azure; using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; -using Azure.ResourceManager.AppService.Models; using Azure.ResourceManager.Resources; namespace Azure.ResourceManager.AppService diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Customization/HostNameBindingData.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/HostNameBindingData.cs index 34bf810a410f3..c5ed5e8caaaae 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Customization/HostNameBindingData.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/HostNameBindingData.cs @@ -3,7 +3,6 @@ using System; using System.ComponentModel; -using System.Runtime.CompilerServices; namespace Azure.ResourceManager.AppService { diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Customization/HostingEnvironmentPrivateEndpointConnectionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/HostingEnvironmentPrivateEndpointConnectionCollection.cs new file mode 100644 index 0000000000000..c03bf6087a07c --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/HostingEnvironmentPrivateEndpointConnectionCollection.cs @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Net; +using System.Threading; +using System.Threading.Tasks; +using System.Xml.Linq; +using Azure.Core; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetHostingEnvironmentPrivateEndpointConnections method from an instance of . + /// + public partial class HostingEnvironmentPrivateEndpointConnectionCollection + { + /// + /// Description for Approves or rejects a private endpoint connection + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName} + /// + /// + /// Operation Id + /// AppServiceEnvironments_ApproveOrRejectPrivateEndpointConnection + /// + /// + /// Default Api Version + /// 2021-02-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The to use. + /// The to use. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestInfo info, CancellationToken cancellationToken) + => await CreateOrUpdateAsync(waitUntil, privateEndpointConnectionName, new RemotePrivateEndpointConnectionARMResourceData(info.Id, info.Name, info.ResourceType, info.SystemData, null, null, info.PrivateLinkServiceConnectionState, new List(), info.Kind, null), cancellationToken).ConfigureAwait(false); + + /// + /// Description for Approves or rejects a private endpoint connection + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName} + /// + /// + /// Operation Id + /// AppServiceEnvironments_ApproveOrRejectPrivateEndpointConnection + /// + /// + /// Default Api Version + /// 2021-02-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The to use. + /// The to use. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestInfo info, CancellationToken cancellationToken = default) + => CreateOrUpdate(waitUntil, privateEndpointConnectionName, new RemotePrivateEndpointConnectionARMResourceData(info.Id, info.Name, info.ResourceType, info.SystemData, null, null, info.PrivateLinkServiceConnectionState, new List(), info.Kind, null), cancellationToken); + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Customization/HostingEnvironmentPrivateEndpointConnectionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/HostingEnvironmentPrivateEndpointConnectionResource.cs new file mode 100644 index 0000000000000..a1b8b7b3a0c52 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/HostingEnvironmentPrivateEndpointConnectionResource.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.ComponentModel; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A Class representing a HostingEnvironmentPrivateEndpointConnection along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetHostingEnvironmentPrivateEndpointConnectionResource method. + /// Otherwise you can get one from its parent resource using the GetHostingEnvironmentPrivateEndpointConnection method. + /// + public partial class HostingEnvironmentPrivateEndpointConnectionResource + { + /// + /// Description for Approves or rejects a private endpoint connection + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName} + /// + /// + /// Operation Id + /// AppServiceEnvironments_ApproveOrRejectPrivateEndpointConnection + /// + /// + /// Default Api Version + /// 2021-02-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The to use. + /// The cancellation token to use. + /// is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual async Task> UpdateAsync(WaitUntil waitUntil, PrivateLinkConnectionApprovalRequestInfo info, CancellationToken cancellationToken) + => await UpdateAsync(waitUntil, new RemotePrivateEndpointConnectionARMResourceData(_data.Id, _data.Name, _data.ResourceType, _data.SystemData, _data.ProvisioningState, _data.PrivateEndpoint, info.PrivateLinkServiceConnectionState, _data.IPAddresses, info.Kind, null), cancellationToken).ConfigureAwait(false); + + /// + /// Description for Approves or rejects a private endpoint connection + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName} + /// + /// + /// Operation Id + /// AppServiceEnvironments_ApproveOrRejectPrivateEndpointConnection + /// + /// + /// Default Api Version + /// 2021-02-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The to use. + /// The cancellation token to use. + /// is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual ArmOperation Update(WaitUntil waitUntil, PrivateLinkConnectionApprovalRequestInfo info, CancellationToken cancellationToken) + => Update(waitUntil, new RemotePrivateEndpointConnectionARMResourceData(_data.Id, _data.Name, _data.ResourceType, _data.SystemData, _data.ProvisioningState, _data.PrivateEndpoint, info.PrivateLinkServiceConnectionState, _data.IPAddresses, info.Kind, null), cancellationToken); + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Customization/Models/AppServiceCertificateEmail.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/Models/AppServiceCertificateEmail.cs new file mode 100644 index 0000000000000..aaaaec052d48a --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/Models/AppServiceCertificateEmail.cs @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.ComponentModel; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppService.Models +{ + [CodeGenModel(Usage = new[] { "input" })] + public partial class AppServiceCertificateEmail : ResourceData + { + [EditorBrowsable(EditorBrowsableState.Never)] + public string Kind { get; set; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Customization/Models/AppServiceOperation.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/Models/AppServiceOperation.cs new file mode 100644 index 0000000000000..5d35f53d5833a --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/Models/AppServiceOperation.cs @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// An operation on a resource. + public partial class AppServiceOperation + { + // Remove this customization when this issue is fixed: https://github.com/Azure/autorest.csharp/issues/4798 + /// Any errors associate with the operation. + [WirePath("errors")] + public IReadOnlyList Errors { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Customization/Models/AppServiceSupportedTlsVersion.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/Models/AppServiceSupportedTlsVersion.cs index 25d6d379a06d6..737352371467e 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Customization/Models/AppServiceSupportedTlsVersion.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/Models/AppServiceSupportedTlsVersion.cs @@ -4,7 +4,6 @@ #nullable disable using System; -using System.ComponentModel; using Azure.Core; namespace Azure.ResourceManager.AppService.Models diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Customization/Models/AppServiceTableStorageApplicationLogsConfig.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/Models/AppServiceTableStorageApplicationLogsConfig.cs index 08dbff636ef5a..d74ea1578ff50 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Customization/Models/AppServiceTableStorageApplicationLogsConfig.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/Models/AppServiceTableStorageApplicationLogsConfig.cs @@ -5,7 +5,6 @@ using System; using System.ComponentModel; -using Azure.Core; namespace Azure.ResourceManager.AppService.Models { diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Customization/Models/CertificateOrderAction.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/Models/CertificateOrderAction.cs new file mode 100644 index 0000000000000..f620c6c10fa54 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/Models/CertificateOrderAction.cs @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.ComponentModel; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppService.Models +{ + [CodeGenModel(Usage = new[] { "input" })] + public partial class CertificateOrderAction : ResourceData + { + [EditorBrowsable(EditorBrowsableState.Never)] + public string Kind { get; set; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Customization/Models/CsmDeploymentStatus.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/Models/CsmDeploymentStatus.cs new file mode 100644 index 0000000000000..19be30570f834 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/Models/CsmDeploymentStatus.cs @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class CsmDeploymentStatus + { + // Remove this customization when this issue is fixed: https://github.com/Azure/autorest.csharp/issues/4798 + /// List of errors. + [WirePath("properties.errors")] + public IList Errors { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Customization/Models/CustomHostnameAnalysisResult.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/Models/CustomHostnameAnalysisResult.cs new file mode 100644 index 0000000000000..a5a475a0225b8 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/Models/CustomHostnameAnalysisResult.cs @@ -0,0 +1,15 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class CustomHostnameAnalysisResult + { + // Remove this customization when this issue is fixed: https://github.com/Azure/autorest.csharp/issues/4798 + /// Raw failure information if DNS verification fails. + [WirePath("properties.customDomainVerificationFailureInfo")] + public ResponseError CustomDomainVerificationFailureInfo { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Customization/Models/ResponseMessageEnvelopeRemotePrivateEndpointConnection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/Models/ResponseMessageEnvelopeRemotePrivateEndpointConnection.cs new file mode 100644 index 0000000000000..8842963612a19 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/Models/ResponseMessageEnvelopeRemotePrivateEndpointConnection.cs @@ -0,0 +1,14 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class ResponseMessageEnvelopeRemotePrivateEndpointConnection + { + /// Azure-AsyncOperation Error info. + [WirePath("error")] + public ResponseError Error { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Customization/Models/WorkflowHealth.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/Models/WorkflowHealth.cs new file mode 100644 index 0000000000000..968adadfd88e9 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/Models/WorkflowHealth.cs @@ -0,0 +1,15 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class WorkflowHealth + { + // Remove this customization when this issue is fixed: https://github.com/Azure/autorest.csharp/issues/4798 + /// Gets or sets the workflow error. + [WirePath("error")] + public ResponseError Error { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Customization/RestOperations/WebAppsRestOperations.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/RestOperations/WebAppsRestOperations.cs index 921888ce59ae4..333f6964993a3 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Customization/RestOperations/WebAppsRestOperations.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/RestOperations/WebAppsRestOperations.cs @@ -1,15 +1,12 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. +// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. using System; -using System.Collections.Generic; -using System.Text; -using System.Threading.Tasks; -using System.Threading; -using Azure.ResourceManager.AppService.Models; using System.Text.Json; -using System.ComponentModel; +using System.Threading; +using System.Threading.Tasks; using Azure.Core; +using Azure.ResourceManager.AppService.Models; namespace Azure.ResourceManager.AppService { @@ -157,4 +154,4 @@ public Response ListFunctionKeys(string subsc } } } -} +} \ No newline at end of file diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Customization/SitePrivateEndpointConnectionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/SitePrivateEndpointConnectionCollection.cs new file mode 100644 index 0000000000000..109eb864d5310 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/SitePrivateEndpointConnectionCollection.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Net; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService +{ + public partial class SitePrivateEndpointConnectionCollection + { + /// + /// Description for Approves or rejects a private endpoint connection + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName} + /// + /// + /// Operation Id + /// WebApps_ApproveOrRejectPrivateEndpointConnection + /// + /// + /// Default Api Version + /// 2021-02-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The to use. + /// The to use. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestInfo info, CancellationToken cancellationToken) + => await CreateOrUpdateAsync(waitUntil, privateEndpointConnectionName, new RemotePrivateEndpointConnectionARMResourceData(info.Id, info.Name, info.ResourceType, info.SystemData, null, null, info.PrivateLinkServiceConnectionState, new List(), info.Kind, null), cancellationToken).ConfigureAwait(false); + + /// + /// Description for Approves or rejects a private endpoint connection + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName} + /// + /// + /// Operation Id + /// WebApps_ApproveOrRejectPrivateEndpointConnection + /// + /// + /// Default Api Version + /// 2021-02-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The to use. + /// The to use. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestInfo info, CancellationToken cancellationToken) + => CreateOrUpdate(waitUntil, privateEndpointConnectionName, new RemotePrivateEndpointConnectionARMResourceData(info.Id, info.Name, info.ResourceType, info.SystemData, null, null, info.PrivateLinkServiceConnectionState, new List(), info.Kind, null), cancellationToken); + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Customization/SitePrivateEndpointConnectionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/SitePrivateEndpointConnectionResource.cs new file mode 100644 index 0000000000000..ae247f612f01e --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/SitePrivateEndpointConnectionResource.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.ComponentModel; +using System.Threading; +using System.Threading.Tasks; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService +{ + public partial class SitePrivateEndpointConnectionResource + { + /// + /// Description for Approves or rejects a private endpoint connection + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName} + /// + /// + /// Operation Id + /// WebApps_ApproveOrRejectPrivateEndpointConnection + /// + /// + /// Default Api Version + /// 2021-02-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The to use. + /// The cancellation token to use. + /// is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual async Task> UpdateAsync(WaitUntil waitUntil, PrivateLinkConnectionApprovalRequestInfo info, CancellationToken cancellationToken) + => await UpdateAsync(waitUntil, new RemotePrivateEndpointConnectionARMResourceData(_data.Id, _data.Name, _data.ResourceType, _data.SystemData, _data.ProvisioningState, _data.PrivateEndpoint, info.PrivateLinkServiceConnectionState, _data.IPAddresses, info.Kind, null), cancellationToken).ConfigureAwait(false); + + /// + /// Description for Approves or rejects a private endpoint connection + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName} + /// + /// + /// Operation Id + /// WebApps_ApproveOrRejectPrivateEndpointConnection + /// + /// + /// Default Api Version + /// 2021-02-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The to use. + /// The cancellation token to use. + /// is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual ArmOperation Update(WaitUntil waitUntil, PrivateLinkConnectionApprovalRequestInfo info, CancellationToken cancellationToken) + => Update(waitUntil, new RemotePrivateEndpointConnectionARMResourceData(_data.Id, _data.Name, _data.ResourceType, _data.SystemData, _data.ProvisioningState, _data.PrivateEndpoint, info.PrivateLinkServiceConnectionState, _data.IPAddresses, info.Kind, null), cancellationToken); + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Customization/SiteSlotPrivateEndpointConnectionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/SiteSlotPrivateEndpointConnectionCollection.cs new file mode 100644 index 0000000000000..66e437d6be107 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/SiteSlotPrivateEndpointConnectionCollection.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Net; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService +{ + public partial class SiteSlotPrivateEndpointConnectionCollection + { + /// + /// Description for Approves or rejects a private endpoint connection + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName} + /// + /// + /// Operation Id + /// WebApps_ApproveOrRejectPrivateEndpointConnectionSlot + /// + /// + /// Default Api Version + /// 2021-02-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The to use. + /// The to use. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestInfo info, CancellationToken cancellationToken) + => await CreateOrUpdateAsync(waitUntil, privateEndpointConnectionName, new RemotePrivateEndpointConnectionARMResourceData(info.Id, info.Name, info.ResourceType, info.SystemData, null, null, info.PrivateLinkServiceConnectionState, new List(), info.Kind, null), cancellationToken).ConfigureAwait(false); + + /// + /// Description for Approves or rejects a private endpoint connection + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName} + /// + /// + /// Operation Id + /// WebApps_ApproveOrRejectPrivateEndpointConnectionSlot + /// + /// + /// Default Api Version + /// 2021-02-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The to use. + /// The to use. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestInfo info, CancellationToken cancellationToken) + => CreateOrUpdate(waitUntil, privateEndpointConnectionName, new RemotePrivateEndpointConnectionARMResourceData(info.Id, info.Name, info.ResourceType, info.SystemData, null, null, info.PrivateLinkServiceConnectionState, new List(), info.Kind, null), cancellationToken); + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Customization/SiteSlotPrivateEndpointConnectionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/SiteSlotPrivateEndpointConnectionResource.cs new file mode 100644 index 0000000000000..5a76c376d4219 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/SiteSlotPrivateEndpointConnectionResource.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.ComponentModel; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService +{ + public partial class SiteSlotPrivateEndpointConnectionResource + { + /// + /// Description for Approves or rejects a private endpoint connection + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName} + /// + /// + /// Operation Id + /// WebApps_ApproveOrRejectPrivateEndpointConnectionSlot + /// + /// + /// Default Api Version + /// 2021-02-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The to use. + /// The cancellation token to use. + /// is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual async Task> UpdateAsync(WaitUntil waitUntil, PrivateLinkConnectionApprovalRequestInfo info, CancellationToken cancellationToken) + => await UpdateAsync(waitUntil, new RemotePrivateEndpointConnectionARMResourceData(_data.Id, _data.Name, _data.ResourceType, _data.SystemData, _data.ProvisioningState, _data.PrivateEndpoint, info.PrivateLinkServiceConnectionState, _data.IPAddresses, info.Kind, null), cancellationToken).ConfigureAwait(false); + + /// + /// Description for Approves or rejects a private endpoint connection + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName} + /// + /// + /// Operation Id + /// WebApps_ApproveOrRejectPrivateEndpointConnectionSlot + /// + /// + /// Default Api Version + /// 2021-02-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The to use. + /// The cancellation token to use. + /// is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual ArmOperation Update(WaitUntil waitUntil, PrivateLinkConnectionApprovalRequestInfo info, CancellationToken cancellationToken) + => Update(waitUntil, new RemotePrivateEndpointConnectionARMResourceData(_data.Id, _data.Name, _data.ResourceType, _data.SystemData, _data.ProvisioningState, _data.PrivateEndpoint, info.PrivateLinkServiceConnectionState, _data.IPAddresses, info.Kind, null), cancellationToken); + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Customization/StaticSitePrivateEndpointConnectionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/StaticSitePrivateEndpointConnectionCollection.cs new file mode 100644 index 0000000000000..516912eaf57c1 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/StaticSitePrivateEndpointConnectionCollection.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Net; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService +{ + public partial class StaticSitePrivateEndpointConnectionCollection + { + /// + /// Description for Approves or rejects a private endpoint connection + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName} + /// + /// + /// Operation Id + /// StaticSites_ApproveOrRejectPrivateEndpointConnection + /// + /// + /// Default Api Version + /// 2021-02-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Name of the private endpoint connection. + /// Request body. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestInfo info, CancellationToken cancellationToken) + => await CreateOrUpdateAsync(waitUntil, privateEndpointConnectionName, new RemotePrivateEndpointConnectionARMResourceData(info.Id, info.Name, info.ResourceType, info.SystemData, null, null, info.PrivateLinkServiceConnectionState, new List(), info.Kind, null), cancellationToken).ConfigureAwait(false); + + /// + /// Description for Approves or rejects a private endpoint connection + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName} + /// + /// + /// Operation Id + /// StaticSites_ApproveOrRejectPrivateEndpointConnection + /// + /// + /// Default Api Version + /// 2021-02-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Name of the private endpoint connection. + /// Request body. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestInfo info, CancellationToken cancellationToken) + => CreateOrUpdate(waitUntil, privateEndpointConnectionName, new RemotePrivateEndpointConnectionARMResourceData(info.Id, info.Name, info.ResourceType, info.SystemData, null, null, info.PrivateLinkServiceConnectionState, new List(), info.Kind, null), cancellationToken); + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Customization/StaticSitePrivateEndpointConnectionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/StaticSitePrivateEndpointConnectionResource.cs new file mode 100644 index 0000000000000..32c585f17657c --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/StaticSitePrivateEndpointConnectionResource.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.ComponentModel; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService +{ + public partial class StaticSitePrivateEndpointConnectionResource + { + /// + /// Description for Approves or rejects a private endpoint connection + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName} + /// + /// + /// Operation Id + /// StaticSites_ApproveOrRejectPrivateEndpointConnection + /// + /// + /// Default Api Version + /// 2021-02-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Request body. + /// The cancellation token to use. + /// is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual async Task> UpdateAsync(WaitUntil waitUntil, PrivateLinkConnectionApprovalRequestInfo info, CancellationToken cancellationToken) + => await UpdateAsync(waitUntil, new RemotePrivateEndpointConnectionARMResourceData(_data.Id, _data.Name, _data.ResourceType, _data.SystemData, _data.ProvisioningState, _data.PrivateEndpoint, info.PrivateLinkServiceConnectionState, _data.IPAddresses, info.Kind, null), cancellationToken).ConfigureAwait(false); + + /// + /// Description for Approves or rejects a private endpoint connection + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName} + /// + /// + /// Operation Id + /// StaticSites_ApproveOrRejectPrivateEndpointConnection + /// + /// + /// Default Api Version + /// 2021-02-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Request body. + /// The cancellation token to use. + /// is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual ArmOperation Update(WaitUntil waitUntil, PrivateLinkConnectionApprovalRequestInfo info, CancellationToken cancellationToken) + => Update(waitUntil, new RemotePrivateEndpointConnectionARMResourceData(_data.Id, _data.Name, _data.ResourceType, _data.SystemData, _data.ProvisioningState, _data.PrivateEndpoint, info.PrivateLinkServiceConnectionState, _data.IPAddresses, info.Kind, null), cancellationToken); + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Customization/WebSiteInstanceStatusData.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/WebSiteInstanceStatusData.cs index f1cfefceffcb3..4ba27fa3bf07f 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Customization/WebSiteInstanceStatusData.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/WebSiteInstanceStatusData.cs @@ -2,9 +2,7 @@ // Licensed under the MIT License. using System; -using System.Collections.Generic; using System.ComponentModel; -using System.Text; namespace Azure.ResourceManager.AppService { diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Customization/WebSiteResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/WebSiteResource.cs index 5780a9bae44df..ace4be763970a 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Customization/WebSiteResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/WebSiteResource.cs @@ -4,17 +4,10 @@ #nullable disable using System; -using System.Collections.Generic; using System.ComponentModel; -using System.Globalization; -using System.IO; using System.Threading; using System.Threading.Tasks; -using Azure; using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; -using Azure.ResourceManager.AppService.Models; using Azure.ResourceManager.Resources; namespace Azure.ResourceManager.AppService diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Customization/WebSiteSlotResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/WebSiteSlotResource.cs index 0da91a7f2cf46..5e05b62d4ff9b 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Customization/WebSiteSlotResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/WebSiteSlotResource.cs @@ -4,17 +4,10 @@ #nullable disable using System; -using System.Collections.Generic; using System.ComponentModel; -using System.Globalization; -using System.IO; using System.Threading; using System.Threading.Tasks; -using Azure; using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; -using Azure.ResourceManager.AppService.Models; namespace Azure.ResourceManager.AppService { diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Customization/WebSiteSlotTriggeredWebJobHistoryResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/WebSiteSlotTriggeredWebJobHistoryResource.cs index be6a422cf417a..10e241abf7cc5 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Customization/WebSiteSlotTriggeredWebJobHistoryResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/WebSiteSlotTriggeredWebJobHistoryResource.cs @@ -2,9 +2,6 @@ // Licensed under the MIT License. #nullable disable -using System; -using System.Collections.Generic; -using System.Text; using Azure.Core; namespace Azure.ResourceManager.AppService diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Customization/WebSiteSlotTriggeredWebJobResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/WebSiteSlotTriggeredWebJobResource.cs index f7cdbd7097812..6ff648537e086 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Customization/WebSiteSlotTriggeredWebJobResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/WebSiteSlotTriggeredWebJobResource.cs @@ -4,10 +4,8 @@ #nullable disable using System; -using System.Collections.Generic; -using System.Text; -using System.Threading.Tasks; using System.Threading; +using System.Threading.Tasks; using Azure.Core; namespace Azure.ResourceManager.AppService diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Customization/WebSiteTriggeredWebJobHistoryResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/WebSiteTriggeredWebJobHistoryResource.cs index 211371ac4c6b7..1e62a1a5cb074 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Customization/WebSiteTriggeredWebJobHistoryResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/WebSiteTriggeredWebJobHistoryResource.cs @@ -3,9 +3,6 @@ #nullable disable -using System; -using System.Collections.Generic; -using System.Text; using Azure.Core; namespace Azure.ResourceManager.AppService diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Customization/WebSiteTriggeredwebJobResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/WebSiteTriggeredwebJobResource.cs index 50551889cf7aa..06bd659edaa0c 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Customization/WebSiteTriggeredwebJobResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/WebSiteTriggeredwebJobResource.cs @@ -4,8 +4,6 @@ #nullable disable using System; -using System.Collections.Generic; -using System.Text; using System.Threading; using System.Threading.Tasks; using Azure.Core; diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppCertificateCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppCertificateCollection.cs index ca8f8d5ea11c7..124afe53e70ba 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppCertificateCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppCertificateCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> CreateOrUpdateAs /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -167,7 +167,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wai /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> GetAsync(string name /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual Response Get(string name, CancellationTok /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -287,7 +287,7 @@ public virtual AsyncPageable GetAllAsync(CancellationTok /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -317,7 +317,7 @@ public virtual Pageable GetAll(CancellationToken cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -360,7 +360,7 @@ public virtual async Task> ExistsAsync(string name, CancellationT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -403,7 +403,7 @@ public virtual Response Exists(string name, CancellationToken cancellation /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -448,7 +448,7 @@ public virtual async Task> GetIfExistsA /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppCertificateResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppCertificateResource.cs index ebea65ab843e0..4265b5ba9d317 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppCertificateResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppCertificateResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Cancellatio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken cancellati /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -270,7 +270,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task> UpdateAsync(AppCerti /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceCertificateCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceCertificateCollection.cs index 908ecb0891251..11bbba0cd9e04 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceCertificateCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceCertificateCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrU /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(stri /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string name, Cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(Cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string name, CancellationT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string name, CancellationToken cancellation /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIf /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceCertificateOrderCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceCertificateOrderCollection.cs index ef6623da02946..89412667472f3 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceCertificateOrderCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceCertificateOrderCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> Crea /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(W /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string certifica /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(Can /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string certificateOrderNam /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string certificateOrderName, CancellationTo /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceCertificateOrderResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceCertificateOrderResource.cs index 4ef0df0656c6c..bfdbcf738010a 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceCertificateOrderResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceCertificateOrderResource.cs @@ -110,7 +110,7 @@ public virtual AppServiceCertificateCollection GetAppServiceCertificates() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAppService /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -179,7 +179,7 @@ public virtual CertificateOrderDetectorCollection GetCertificateOrderDetectors() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task> GetCertifi /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -247,7 +247,7 @@ public virtual Response GetCertificateOrderDet /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -287,7 +287,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -327,7 +327,7 @@ public virtual Response Get(CancellationToke /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -371,7 +371,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -415,7 +415,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -457,7 +457,7 @@ public virtual async Task> UpdateAs /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -499,7 +499,7 @@ public virtual Response Update(AppServiceCer /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -541,7 +541,7 @@ public virtual async Task ReissueAsync(ReissueCertificateOrderContent /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -583,7 +583,7 @@ public virtual Response Reissue(ReissueCertificateOrderContent content, Cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -625,7 +625,7 @@ public virtual async Task RenewAsync(RenewCertificateOrderContent cont /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -667,7 +667,7 @@ public virtual Response Renew(RenewCertificateOrderContent content, Cancellation /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -705,7 +705,7 @@ public virtual async Task ResendEmailAsync(CancellationToken cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -743,7 +743,7 @@ public virtual Response ResendEmail(CancellationToken cancellationToken = defaul /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -785,7 +785,7 @@ public virtual async Task ResendRequestEmailsAsync(AppServiceDomainNam /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -827,7 +827,7 @@ public virtual Response ResendRequestEmails(AppServiceDomainNameIdentifier nameI /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -869,7 +869,7 @@ public virtual async Task> RetrieveSiteSealAsync(SiteSealCont /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -911,7 +911,7 @@ public virtual Response RetrieveSiteSeal(SiteSealContent content, Canc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -949,7 +949,7 @@ public virtual async Task VerifyDomainOwnershipAsync(CancellationToken /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -987,7 +987,7 @@ public virtual Response VerifyDomainOwnership(CancellationToken cancellationToke /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1016,7 +1016,7 @@ public virtual AsyncPageable RetrieveCertificateActionsA /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1045,7 +1045,7 @@ public virtual Pageable RetrieveCertificateActions(Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1074,7 +1074,7 @@ public virtual AsyncPageable RetrieveCertificateEmai /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceCertificateResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceCertificateResource.cs index a854272bb62e1..879deb56ea4f8 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceCertificateResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceCertificateResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Canc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken can /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -270,7 +270,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task> UpdateAsync(A /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceDomainCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceDomainCollection.cs index cbb85219f2ac9..b29028c505db7 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceDomainCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceDomainCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdate /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil w /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string do /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string domainName, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(CancellationT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string domainName, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string domainName, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIfExist /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceDomainResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceDomainResource.cs index 2bee5a5425df4..609e66738b11f 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceDomainResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceDomainResource.cs @@ -109,7 +109,7 @@ public virtual DomainOwnershipIdentifierCollection GetDomainOwnershipIdentifiers /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> GetDomain /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -171,7 +171,7 @@ public virtual Response GetDomainOwnershipIde /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync(Cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -251,7 +251,7 @@ public virtual Response Get(CancellationToken cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -296,7 +296,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, bool? f /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -341,7 +341,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, bool? forceHardDeleteDom /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -383,7 +383,7 @@ public virtual async Task> UpdateAsync(AppSer /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -425,7 +425,7 @@ public virtual Response Update(AppServiceDomainPatch p /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -463,7 +463,7 @@ public virtual async Task RenewAsync(CancellationToken cancellationTok /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -487,5 +487,81 @@ public virtual Response Renew(CancellationToken cancellationToken = default) throw; } } + + /// + /// Transfer out domain to another registrar + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/transferOut + /// + /// + /// Operation Id + /// Domains_TransferOut + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> TransferOutAsync(CancellationToken cancellationToken = default) + { + using var scope = _appServiceDomainDomainsClientDiagnostics.CreateScope("AppServiceDomainResource.TransferOut"); + scope.Start(); + try + { + var response = await _appServiceDomainDomainsRestClient.TransferOutAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new AppServiceDomainResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Transfer out domain to another registrar + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/transferOut + /// + /// + /// Operation Id + /// Domains_TransferOut + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response TransferOut(CancellationToken cancellationToken = default) + { + using var scope = _appServiceDomainDomainsClientDiagnostics.CreateScope("AppServiceDomainResource.TransferOut"); + scope.Start(); + try + { + var response = _appServiceDomainDomainsRestClient.TransferOut(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new AppServiceDomainResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceEnvironmentCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceEnvironmentCollection.cs index 22dc6fa11af7e..4da6548c6f9c6 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceEnvironmentCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceEnvironmentCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrU /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(stri /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string name, Cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(Cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string name, CancellationT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string name, CancellationToken cancellation /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIf /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceEnvironmentData.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceEnvironmentData.Serialization.cs index 3f5f1824a7e07..c922d0dee61ab 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceEnvironmentData.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceEnvironmentData.Serialization.cs @@ -150,6 +150,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WritePropertyName("hasLinuxWorkers"u8); writer.WriteBooleanValue(HasLinuxWorkers.Value); } + if (Optional.IsDefined(UpgradePreference)) + { + writer.WritePropertyName("upgradePreference"u8); + writer.WriteStringValue(UpgradePreference.Value.ToString()); + } if (Optional.IsDefined(DedicatedHostCount)) { writer.WritePropertyName("dedicatedHostCount"u8); @@ -160,6 +165,21 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WritePropertyName("zoneRedundant"u8); writer.WriteBooleanValue(IsZoneRedundant.Value); } + if (Optional.IsDefined(CustomDnsSuffixConfiguration)) + { + writer.WritePropertyName("customDnsSuffixConfiguration"u8); + writer.WriteObjectValue(CustomDnsSuffixConfiguration, options); + } + if (Optional.IsDefined(NetworkingConfiguration)) + { + writer.WritePropertyName("networkingConfiguration"u8); + writer.WriteObjectValue(NetworkingConfiguration, options); + } + if (options.Format != "W" && Optional.IsDefined(UpgradeAvailability)) + { + writer.WritePropertyName("upgradeAvailability"u8); + writer.WriteStringValue(UpgradeAvailability.Value.ToString()); + } writer.WriteEndObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -220,8 +240,12 @@ internal static AppServiceEnvironmentData DeserializeAppServiceEnvironmentData(J IList clusterSettings = default; IList userWhitelistedIPRanges = default; bool? hasLinuxWorkers = default; + AppServiceEnvironmentUpgradePreference? upgradePreference = default; int? dedicatedHostCount = default; bool? zoneRedundant = default; + CustomDnsSuffixConfigurationData customDnsSuffixConfiguration = default; + AseV3NetworkingConfigurationData networkingConfiguration = default; + AppServiceEnvironmentUpgradeAvailability? upgradeAvailability = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -411,6 +435,15 @@ internal static AppServiceEnvironmentData DeserializeAppServiceEnvironmentData(J hasLinuxWorkers = property0.Value.GetBoolean(); continue; } + if (property0.NameEquals("upgradePreference"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + upgradePreference = new AppServiceEnvironmentUpgradePreference(property0.Value.GetString()); + continue; + } if (property0.NameEquals("dedicatedHostCount"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -429,6 +462,33 @@ internal static AppServiceEnvironmentData DeserializeAppServiceEnvironmentData(J zoneRedundant = property0.Value.GetBoolean(); continue; } + if (property0.NameEquals("customDnsSuffixConfiguration"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + customDnsSuffixConfiguration = CustomDnsSuffixConfigurationData.DeserializeCustomDnsSuffixConfigurationData(property0.Value, options); + continue; + } + if (property0.NameEquals("networkingConfiguration"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + networkingConfiguration = AseV3NetworkingConfigurationData.DeserializeAseV3NetworkingConfigurationData(property0.Value, options); + continue; + } + if (property0.NameEquals("upgradeAvailability"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + upgradeAvailability = new AppServiceEnvironmentUpgradeAvailability(property0.Value.GetString()); + continue; + } } continue; } @@ -459,8 +519,12 @@ internal static AppServiceEnvironmentData DeserializeAppServiceEnvironmentData(J clusterSettings ?? new ChangeTrackingList(), userWhitelistedIPRanges ?? new ChangeTrackingList(), hasLinuxWorkers, + upgradePreference, dedicatedHostCount, zoneRedundant, + customDnsSuffixConfiguration, + networkingConfiguration, + upgradeAvailability, kind, serializedAdditionalRawData); } @@ -860,6 +924,21 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(UpgradePreference), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" upgradePreference: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(UpgradePreference)) + { + builder.Append(" upgradePreference: "); + builder.AppendLine($"'{UpgradePreference.Value.ToString()}'"); + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DedicatedHostCount), out propertyOverride); if (hasPropertyOverride) { @@ -891,6 +970,51 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CustomDnsSuffixConfiguration), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" customDnsSuffixConfiguration: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CustomDnsSuffixConfiguration)) + { + builder.Append(" customDnsSuffixConfiguration: "); + BicepSerializationHelpers.AppendChildObject(builder, CustomDnsSuffixConfiguration, options, 4, false, " customDnsSuffixConfiguration: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NetworkingConfiguration), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" networkingConfiguration: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NetworkingConfiguration)) + { + builder.Append(" networkingConfiguration: "); + BicepSerializationHelpers.AppendChildObject(builder, NetworkingConfiguration, options, 4, false, " networkingConfiguration: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(UpgradeAvailability), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" upgradeAvailability: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(UpgradeAvailability)) + { + builder.Append(" upgradeAvailability: "); + builder.AppendLine($"'{UpgradeAvailability.Value.ToString()}'"); + } + } + builder.AppendLine(" }"); builder.AppendLine("}"); return BinaryData.FromString(builder.ToString()); diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceEnvironmentData.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceEnvironmentData.cs index 1ef631910c4a8..cdf4c7164e048 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceEnvironmentData.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceEnvironmentData.cs @@ -83,11 +83,15 @@ public AppServiceEnvironmentData(AzureLocation location) : base(location) /// Custom settings for changing the behavior of the App Service Environment. /// User added ip ranges to whitelist on ASE db. /// Flag that displays whether an ASE has linux workers or not. + /// Upgrade Preference. /// Dedicated Host Count. /// Whether or not this App Service Environment is zone-redundant. + /// Full view of the custom domain suffix configuration for ASEv3. + /// Full view of networking configuration for an ASE. + /// Whether an upgrade is available for this App Service Environment. /// Kind of resource. /// Keeps track of any properties unknown to the library. - internal AppServiceEnvironmentData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ProvisioningState? provisioningState, HostingEnvironmentStatus? status, AppServiceVirtualNetworkProfile virtualNetwork, LoadBalancingMode? internalLoadBalancingMode, string multiSize, int? multiRoleCount, int? ipSslAddressCount, string dnsSuffix, int? maximumNumberOfMachines, int? frontEndScaleFactor, bool? isSuspended, IList clusterSettings, IList userWhitelistedIPRanges, bool? hasLinuxWorkers, int? dedicatedHostCount, bool? isZoneRedundant, string kind, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal AppServiceEnvironmentData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ProvisioningState? provisioningState, HostingEnvironmentStatus? status, AppServiceVirtualNetworkProfile virtualNetwork, LoadBalancingMode? internalLoadBalancingMode, string multiSize, int? multiRoleCount, int? ipSslAddressCount, string dnsSuffix, int? maximumNumberOfMachines, int? frontEndScaleFactor, bool? isSuspended, IList clusterSettings, IList userWhitelistedIPRanges, bool? hasLinuxWorkers, AppServiceEnvironmentUpgradePreference? upgradePreference, int? dedicatedHostCount, bool? isZoneRedundant, CustomDnsSuffixConfigurationData customDnsSuffixConfiguration, AseV3NetworkingConfigurationData networkingConfiguration, AppServiceEnvironmentUpgradeAvailability? upgradeAvailability, string kind, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { ProvisioningState = provisioningState; Status = status; @@ -103,8 +107,12 @@ internal AppServiceEnvironmentData(ResourceIdentifier id, string name, ResourceT ClusterSettings = clusterSettings; UserWhitelistedIPRanges = userWhitelistedIPRanges; HasLinuxWorkers = hasLinuxWorkers; + UpgradePreference = upgradePreference; DedicatedHostCount = dedicatedHostCount; IsZoneRedundant = isZoneRedundant; + CustomDnsSuffixConfiguration = customDnsSuffixConfiguration; + NetworkingConfiguration = networkingConfiguration; + UpgradeAvailability = upgradeAvailability; Kind = kind; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -159,12 +167,24 @@ internal AppServiceEnvironmentData() /// Flag that displays whether an ASE has linux workers or not. [WirePath("properties.hasLinuxWorkers")] public bool? HasLinuxWorkers { get; } + /// Upgrade Preference. + [WirePath("properties.upgradePreference")] + public AppServiceEnvironmentUpgradePreference? UpgradePreference { get; set; } /// Dedicated Host Count. [WirePath("properties.dedicatedHostCount")] public int? DedicatedHostCount { get; set; } /// Whether or not this App Service Environment is zone-redundant. [WirePath("properties.zoneRedundant")] public bool? IsZoneRedundant { get; set; } + /// Full view of the custom domain suffix configuration for ASEv3. + [WirePath("properties.customDnsSuffixConfiguration")] + public CustomDnsSuffixConfigurationData CustomDnsSuffixConfiguration { get; set; } + /// Full view of networking configuration for an ASE. + [WirePath("properties.networkingConfiguration")] + public AseV3NetworkingConfigurationData NetworkingConfiguration { get; set; } + /// Whether an upgrade is available for this App Service Environment. + [WirePath("properties.upgradeAvailability")] + public AppServiceEnvironmentUpgradeAvailability? UpgradeAvailability { get; } /// Kind of resource. [WirePath("kind")] public string Kind { get; set; } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceEnvironmentResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceEnvironmentResource.cs index 8fe4c55b7a80f..bd14c278a78df 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceEnvironmentResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceEnvironmentResource.cs @@ -119,7 +119,7 @@ public virtual HostingEnvironmentDetectorCollection GetHostingEnvironmentDetecto /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -153,7 +153,7 @@ public virtual async Task> GetHosti /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -174,6 +174,13 @@ public virtual Response GetHostingEnvironmen return GetHostingEnvironmentDetectors().Get(detectorName, startTime, endTime, timeGrain, cancellationToken); } + /// Gets an object representing a CustomDnsSuffixConfigurationResource along with the instance operations that can be performed on it in the AppServiceEnvironment. + /// Returns a object. + public virtual CustomDnsSuffixConfigurationResource GetCustomDnsSuffixConfiguration() + { + return new CustomDnsSuffixConfigurationResource(Client, Id.AppendChildResource("configurations", "customdnssuffix")); + } + /// Gets an object representing a AseV3NetworkingConfigurationResource along with the instance operations that can be performed on it in the AppServiceEnvironment. /// Returns a object. public virtual AseV3NetworkingConfigurationResource GetAseV3NetworkingConfiguration() @@ -208,7 +215,7 @@ public virtual HostingEnvironmentWorkerPoolCollection GetHostingEnvironmentWorke /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -239,7 +246,7 @@ public virtual async Task> GetHos /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -277,7 +284,7 @@ public virtual HostingEnvironmentPrivateEndpointConnectionCollection GetHostingE /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -308,7 +315,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -346,7 +353,7 @@ public virtual HostingEnvironmentRecommendationCollection GetHostingEnvironmentR /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -379,7 +386,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -412,7 +419,7 @@ public virtual Response GetHostingEnvi /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -452,7 +459,7 @@ public virtual async Task> GetAsync(Canc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -492,7 +499,7 @@ public virtual Response Get(CancellationToken can /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -535,7 +542,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, bool? f /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -578,7 +585,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, bool? forceDelete = null /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -620,7 +627,7 @@ public virtual async Task> UpdateAsync(A /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -662,7 +669,7 @@ public virtual Response Update(AppServiceEnvironm /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -688,7 +695,7 @@ public virtual AsyncPageable GetCapacitiesAsync(CancellationToken /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -714,7 +721,7 @@ public virtual Pageable GetCapacities(CancellationToken cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -748,7 +755,7 @@ public virtual async Task> GetVipIn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -782,7 +789,7 @@ public virtual Response GetVipInfo(Cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -811,7 +818,7 @@ public virtual AsyncPageable GetDiagnosticsAsync( /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -840,7 +847,7 @@ public virtual Pageable GetDiagnostics(Cancellati /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -879,7 +886,7 @@ public virtual async Task> GetDiagnostic /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -918,7 +925,7 @@ public virtual Response GetDiagnosticsItem(string /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -948,7 +955,7 @@ public virtual AsyncPageable GetInboundNetworkDepend /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -965,6 +972,166 @@ public virtual Pageable GetInboundNetworkDependencie return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => InboundEnvironmentEndpoint.DeserializeInboundEnvironmentEndpoint(e), _appServiceEnvironmentClientDiagnostics, Pipeline, "AppServiceEnvironmentResource.GetInboundNetworkDependenciesEndpoints", "value", "nextLink", cancellationToken); } + /// + /// Send a test notification that an upgrade is available for this App Service Environment. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/testUpgradeAvailableNotification + /// + /// + /// Operation Id + /// AppServiceEnvironments_TestUpgradeAvailableNotification + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task TestUpgradeAvailableNotificationAsync(CancellationToken cancellationToken = default) + { + using var scope = _appServiceEnvironmentClientDiagnostics.CreateScope("AppServiceEnvironmentResource.TestUpgradeAvailableNotification"); + scope.Start(); + try + { + var response = await _appServiceEnvironmentRestClient.TestUpgradeAvailableNotificationAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Send a test notification that an upgrade is available for this App Service Environment. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/testUpgradeAvailableNotification + /// + /// + /// Operation Id + /// AppServiceEnvironments_TestUpgradeAvailableNotification + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response TestUpgradeAvailableNotification(CancellationToken cancellationToken = default) + { + using var scope = _appServiceEnvironmentClientDiagnostics.CreateScope("AppServiceEnvironmentResource.TestUpgradeAvailableNotification"); + scope.Start(); + try + { + var response = _appServiceEnvironmentRestClient.TestUpgradeAvailableNotification(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Description for Initiate an upgrade of an App Service Environment if one is available. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/upgrade + /// + /// + /// Operation Id + /// AppServiceEnvironments_Upgrade + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task UpgradeAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _appServiceEnvironmentClientDiagnostics.CreateScope("AppServiceEnvironmentResource.Upgrade"); + scope.Start(); + try + { + var response = await _appServiceEnvironmentRestClient.UpgradeAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new AppServiceArmOperation(_appServiceEnvironmentClientDiagnostics, Pipeline, _appServiceEnvironmentRestClient.CreateUpgradeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Description for Initiate an upgrade of an App Service Environment if one is available. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/upgrade + /// + /// + /// Operation Id + /// AppServiceEnvironments_Upgrade + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Upgrade(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _appServiceEnvironmentClientDiagnostics.CreateScope("AppServiceEnvironmentResource.Upgrade"); + scope.Start(); + try + { + var response = _appServiceEnvironmentRestClient.Upgrade(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new AppServiceArmOperation(_appServiceEnvironmentClientDiagnostics, Pipeline, _appServiceEnvironmentRestClient.CreateUpgradeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + /// /// Description for List all currently running operations on the App Service Environment. /// @@ -978,7 +1145,7 @@ public virtual Pageable GetInboundNetworkDependencie /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1007,7 +1174,7 @@ public virtual AsyncPageable GetOperationsAsync(Cancellatio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1036,7 +1203,7 @@ public virtual Pageable GetOperations(CancellationToken can /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1066,7 +1233,7 @@ public virtual AsyncPageable GetOutboundNetworkDepe /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1096,7 +1263,7 @@ public virtual Pageable GetOutboundNetworkDependenc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1125,7 +1292,7 @@ public virtual AsyncPageable GetPrivateLinkRe /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1154,7 +1321,7 @@ public virtual Pageable GetPrivateLinkResourc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1192,7 +1359,7 @@ public virtual async Task RebootAsync(CancellationToken cancellationTo /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1230,7 +1397,7 @@ public virtual Response Reboot(CancellationToken cancellationToken = default) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1260,7 +1427,7 @@ public virtual AsyncPageable GetAppServicePlansAsync(Can /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1290,7 +1457,7 @@ public virtual Pageable GetAppServicePlans(CancellationT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1321,7 +1488,7 @@ public virtual AsyncPageable GetUsagesAsync(string filter = null, /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1352,7 +1519,7 @@ public virtual Pageable GetUsages(string filter = null, Cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -1380,7 +1547,7 @@ public virtual AsyncPageable GetHistoryForHostingEnvir /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -1408,7 +1575,7 @@ public virtual Pageable GetHistoryForHostingEnvironmen /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1440,7 +1607,7 @@ public virtual AsyncPageable GetRecommendedRulesForHos /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1472,7 +1639,7 @@ public virtual Pageable GetRecommendedRulesForHostingE /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -1510,7 +1677,7 @@ public virtual async Task DisableAllForHostingEnvironmentRecommendatio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -1548,7 +1715,7 @@ public virtual Response DisableAllForHostingEnvironmentRecommendation(string env /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -1586,7 +1753,7 @@ public virtual async Task ResetAllFiltersForHostingEnvironmentRecommen /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanCollection.cs index cc94166be4a02..66e721f83cdbd 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateAs /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wai /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string name /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string name, CancellationTok /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(CancellationTok /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string name, CancellationT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string name, CancellationToken cancellation /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIfExistsA /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanData.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanData.Serialization.cs index 76806472f82df..abc9a3b34e4f8 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanData.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanData.Serialization.cs @@ -113,6 +113,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("maximumNumberOfWorkers"u8); writer.WriteNumberValue(MaximumNumberOfWorkers.Value); } + if (options.Format != "W" && Optional.IsDefined(NumberOfWorkers)) + { + writer.WritePropertyName("numberOfWorkers"u8); + writer.WriteNumberValue(NumberOfWorkers.Value); + } if (options.Format != "W" && Optional.IsDefined(GeoRegion)) { writer.WritePropertyName("geoRegion"u8); @@ -272,6 +277,7 @@ internal static AppServicePlanData DeserializeAppServicePlanData(JsonElement ele string subscription = default; HostingEnvironmentProfile hostingEnvironmentProfile = default; int? maximumNumberOfWorkers = default; + int? numberOfWorkers = default; string geoRegion = default; bool? perSiteScaling = default; bool? elasticScaleEnabled = default; @@ -406,6 +412,15 @@ internal static AppServicePlanData DeserializeAppServicePlanData(JsonElement ele maximumNumberOfWorkers = property0.Value.GetInt32(); continue; } + if (property0.NameEquals("numberOfWorkers"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + numberOfWorkers = property0.Value.GetInt32(); + continue; + } if (property0.NameEquals("geoRegion"u8)) { geoRegion = property0.Value.GetString(); @@ -577,6 +592,7 @@ internal static AppServicePlanData DeserializeAppServicePlanData(JsonElement ele subscription, hostingEnvironmentProfile, maximumNumberOfWorkers, + numberOfWorkers, geoRegion, perSiteScaling, elasticScaleEnabled, @@ -857,6 +873,21 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NumberOfWorkers), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" numberOfWorkers: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NumberOfWorkers)) + { + builder.Append(" numberOfWorkers: "); + builder.AppendLine($"{NumberOfWorkers.Value}"); + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(GeoRegion), out propertyOverride); if (hasPropertyOverride) { diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanData.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanData.cs index 0df390b456421..94d7314af06ff 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanData.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanData.cs @@ -72,6 +72,7 @@ public AppServicePlanData(AzureLocation location) : base(location) /// App Service plan subscription. /// Specification for the App Service Environment to use for the App Service plan. /// Maximum number of instances that can be assigned to this App Service plan. + /// The number of instances that are assigned to this App Service plan. /// Geographical location for the App Service plan. /// /// If <code>true</code>, apps assigned to this App Service plan can be scaled independently. @@ -97,7 +98,7 @@ public AppServicePlanData(AzureLocation location) : base(location) /// /// Kind of resource. /// Keeps track of any properties unknown to the library. - internal AppServicePlanData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, AppServiceSkuDescription sku, ExtendedLocation extendedLocation, string workerTierName, AppServicePlanStatus? status, string subscription, HostingEnvironmentProfile hostingEnvironmentProfile, int? maximumNumberOfWorkers, string geoRegion, bool? isPerSiteScaling, bool? isElasticScaleEnabled, int? maximumElasticWorkerCount, int? numberOfSites, bool? isSpot, DateTimeOffset? spotExpireOn, DateTimeOffset? freeOfferExpireOn, string resourceGroup, bool? isReserved, bool? isXenon, bool? isHyperV, int? targetWorkerCount, int? targetWorkerSizeId, ProvisioningState? provisioningState, KubeEnvironmentProfile kubeEnvironmentProfile, bool? isZoneRedundant, string kind, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal AppServicePlanData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, AppServiceSkuDescription sku, ExtendedLocation extendedLocation, string workerTierName, AppServicePlanStatus? status, string subscription, HostingEnvironmentProfile hostingEnvironmentProfile, int? maximumNumberOfWorkers, int? numberOfWorkers, string geoRegion, bool? isPerSiteScaling, bool? isElasticScaleEnabled, int? maximumElasticWorkerCount, int? numberOfSites, bool? isSpot, DateTimeOffset? spotExpireOn, DateTimeOffset? freeOfferExpireOn, string resourceGroup, bool? isReserved, bool? isXenon, bool? isHyperV, int? targetWorkerCount, int? targetWorkerSizeId, ProvisioningState? provisioningState, KubeEnvironmentProfile kubeEnvironmentProfile, bool? isZoneRedundant, string kind, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { Sku = sku; ExtendedLocation = extendedLocation; @@ -106,6 +107,7 @@ internal AppServicePlanData(ResourceIdentifier id, string name, ResourceType res Subscription = subscription; HostingEnvironmentProfile = hostingEnvironmentProfile; MaximumNumberOfWorkers = maximumNumberOfWorkers; + NumberOfWorkers = numberOfWorkers; GeoRegion = geoRegion; IsPerSiteScaling = isPerSiteScaling; IsElasticScaleEnabled = isElasticScaleEnabled; @@ -153,6 +155,9 @@ internal AppServicePlanData() /// Maximum number of instances that can be assigned to this App Service plan. [WirePath("properties.maximumNumberOfWorkers")] public int? MaximumNumberOfWorkers { get; } + /// The number of instances that are assigned to this App Service plan. + [WirePath("properties.numberOfWorkers")] + public int? NumberOfWorkers { get; } /// Geographical location for the App Service plan. [WirePath("properties.geoRegion")] public string GeoRegion { get; } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanHybridConnectionNamespaceRelayCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanHybridConnectionNamespaceRelayCollection.cs index 830e99597febb..290ca8e989799 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanHybridConnectionNamespaceRelayCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanHybridConnectionNamespaceRelayCollection.cs @@ -61,7 +61,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -108,7 +108,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -155,7 +155,7 @@ public virtual Response Ge /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -200,7 +200,7 @@ public virtual async Task> ExistsAsync(string namespaceName, stri /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -245,7 +245,7 @@ public virtual Response Exists(string namespaceName, string relayName, Can /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -292,7 +292,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanHybridConnectionNamespaceRelayResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanHybridConnectionNamespaceRelayResource.cs index d8d211613afbc..00c83143576d6 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanHybridConnectionNamespaceRelayResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanHybridConnectionNamespaceRelayResource.cs @@ -104,7 +104,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -144,7 +144,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual Response Ge /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -228,7 +228,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -272,7 +272,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -310,7 +310,7 @@ public virtual async Task> GetHybridConnectionKeys /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -348,7 +348,7 @@ public virtual Response GetHybridConnectionKeys(Cancellatio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -378,7 +378,7 @@ public virtual AsyncPageable GetWebAppsByHybridConnectionAsync(Cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanResource.cs index 30b75cb4ce6c1..cfcc57bff0d85 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanResource.cs @@ -110,7 +110,7 @@ public virtual AppServicePlanHybridConnectionNamespaceRelayCollection GetAppServ /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -188,7 +188,7 @@ public virtual AppServicePlanVirtualNetworkConnectionCollection GetAppServicePla /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -219,7 +219,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -250,7 +250,7 @@ public virtual Response GetAppSe /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -290,7 +290,7 @@ public virtual async Task> GetAsync(Cancellatio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -330,7 +330,7 @@ public virtual Response Get(CancellationToken cancellati /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -374,7 +374,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -418,7 +418,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -460,7 +460,7 @@ public virtual async Task> UpdateAsync(AppServi /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -502,7 +502,7 @@ public virtual Response Update(AppServicePlanPatch patch /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -531,7 +531,7 @@ public virtual AsyncPageable GetCapabilitiesAsync(Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -560,7 +560,7 @@ public virtual Pageable GetCapabilities(CancellationTok /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -590,7 +590,7 @@ public virtual AsyncPageable GetHybridConnectionRelaysAsyn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -620,7 +620,7 @@ public virtual Pageable GetHybridConnectionRelays(Cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -659,7 +659,7 @@ public virtual async Task RestartWebAppsAsync(bool? softRestart = null /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -698,7 +698,7 @@ public virtual Response RestartWebApps(bool? softRestart = null, CancellationTok /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -731,7 +731,7 @@ public virtual AsyncPageable GetWebAppsAsync(string skipToken = nul /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -764,7 +764,7 @@ public virtual Pageable GetWebApps(string skipToken = null, string /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -802,7 +802,7 @@ public virtual async Task> GetServerFarmSkusAsync(Cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -840,7 +840,7 @@ public virtual Response GetServerFarmSkus(CancellationToken cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -871,7 +871,7 @@ public virtual AsyncPageable GetUsagesAsync(string filter = null, /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -902,7 +902,7 @@ public virtual Pageable GetUsages(string filter = null, Cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -941,7 +941,7 @@ public virtual async Task RebootWorkerAsync(string workerName, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanVirtualNetworkConnectionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanVirtualNetworkConnectionCollection.cs index a7d865f88448a..c714f30d98e98 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanVirtualNetworkConnectionCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanVirtualNetworkConnectionCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(stri /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual AsyncPageable Get /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -212,7 +212,7 @@ public virtual Pageable GetAll(C /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -255,7 +255,7 @@ public virtual async Task> ExistsAsync(string vnetName, Cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -298,7 +298,7 @@ public virtual Response Exists(string vnetName, CancellationToken cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -343,7 +343,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanVirtualNetworkConnectionGatewayCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanVirtualNetworkConnectionGatewayCollection.cs index fbe4f13d37bd0..fdc34281472b3 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanVirtualNetworkConnectionGatewayCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanVirtualNetworkConnectionGatewayCollection.cs @@ -61,7 +61,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -112,7 +112,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response G /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -296,7 +296,7 @@ public virtual async Task> ExistsAsync(string gatewayName, Cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -339,7 +339,7 @@ public virtual Response Exists(string gatewayName, CancellationToken cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -384,7 +384,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanVirtualNetworkConnectionGatewayResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanVirtualNetworkConnectionGatewayResource.cs index c133f49d82759..aa4545a382fca 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanVirtualNetworkConnectionGatewayResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanVirtualNetworkConnectionGatewayResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response G /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -230,7 +230,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanVirtualNetworkConnectionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanVirtualNetworkConnectionResource.cs index f9f6ab2791811..72951fc87981d 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanVirtualNetworkConnectionResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanVirtualNetworkConnectionResource.cs @@ -110,7 +110,7 @@ public virtual AppServicePlanVirtualNetworkConnectionGatewayCollection GetAppSer /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -172,7 +172,7 @@ public virtual Response G /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(Canc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -281,7 +281,7 @@ public virtual AsyncPageable GetRoutesForVnetAsyn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -310,7 +310,7 @@ public virtual Pageable GetRoutesForVnet(Cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -351,7 +351,7 @@ public virtual async Task> CreateOrUpdat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -392,7 +392,7 @@ public virtual Response CreateOrUpdateVnetRoute(s /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -431,7 +431,7 @@ public virtual async Task DeleteVnetRouteAsync(string routeName, Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -470,7 +470,7 @@ public virtual Response DeleteVnetRoute(string routeName, CancellationToken canc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -511,7 +511,7 @@ public virtual async Task> UpdateVnetRou /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceSourceControlCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceSourceControlCollection.cs index d28eb31fe3d54..132de37450d7c 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceSourceControlCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceSourceControlCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> CreateO /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -167,7 +167,7 @@ public virtual ArmOperation CreateOrUpdate(Wait /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> GetAsync(st /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual Response Get(string sourceContro /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -287,7 +287,7 @@ public virtual AsyncPageable GetAllAsync(Cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -317,7 +317,7 @@ public virtual Pageable GetAll(CancellationToke /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -360,7 +360,7 @@ public virtual async Task> ExistsAsync(string sourceControlType, /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -403,7 +403,7 @@ public virtual Response Exists(string sourceControlType, CancellationToken /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -448,7 +448,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceSourceControlResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceSourceControlResource.cs index fe8c2b25d8ea5..97c794c217391 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceSourceControlResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceSourceControlResource.cs @@ -99,7 +99,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -139,7 +139,7 @@ public virtual async Task> GetAsync(Ca /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -179,7 +179,7 @@ public virtual Response Get(CancellationToken c /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task> UpdateA /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/ArmAppServiceModelFactory.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/ArmAppServiceModelFactory.cs index aac85ad334168..5a5807e66e9fb 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/ArmAppServiceModelFactory.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/ArmAppServiceModelFactory.cs @@ -311,9 +311,8 @@ public static SiteSeal SiteSeal(string html = null) /// The systemData. /// Action type. /// Time at which the certificate action was performed. - /// Kind of resource. /// A new instance for mocking. - public static CertificateOrderAction CertificateOrderAction(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, CertificateOrderActionType? actionType = null, DateTimeOffset? createdOn = null, string kind = null) + public static CertificateOrderAction CertificateOrderAction(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, CertificateOrderActionType? actionType = null, DateTimeOffset? createdOn = null) { return new CertificateOrderAction( id, @@ -322,7 +321,6 @@ public static CertificateOrderAction CertificateOrderAction(ResourceIdentifier i systemData, actionType, createdOn, - kind, serializedAdditionalRawData: null); } @@ -333,9 +331,8 @@ public static CertificateOrderAction CertificateOrderAction(ResourceIdentifier i /// The systemData. /// Email id. /// Time stamp. - /// Kind of resource. /// A new instance for mocking. - public static AppServiceCertificateEmail AppServiceCertificateEmail(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string emailId = null, DateTimeOffset? timeStamp = null, string kind = null) + public static AppServiceCertificateEmail AppServiceCertificateEmail(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string emailId = null, DateTimeOffset? timeStamp = null) { return new AppServiceCertificateEmail( id, @@ -344,7 +341,6 @@ public static AppServiceCertificateEmail AppServiceCertificateEmail(ResourceIden systemData, emailId, timeStamp, - kind, serializedAdditionalRawData: null); } @@ -808,11 +804,15 @@ public static TldLegalAgreement TldLegalAgreement(string agreementKey = null, st /// Custom settings for changing the behavior of the App Service Environment. /// User added ip ranges to whitelist on ASE db. /// Flag that displays whether an ASE has linux workers or not. + /// Upgrade Preference. /// Dedicated Host Count. /// Whether or not this App Service Environment is zone-redundant. + /// Full view of the custom domain suffix configuration for ASEv3. + /// Full view of networking configuration for an ASE. + /// Whether an upgrade is available for this App Service Environment. /// Kind of resource. /// A new instance for mocking. - public static AppServiceEnvironmentData AppServiceEnvironmentData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ProvisioningState? provisioningState = null, HostingEnvironmentStatus? status = null, AppServiceVirtualNetworkProfile virtualNetwork = null, LoadBalancingMode? internalLoadBalancingMode = null, string multiSize = null, int? multiRoleCount = null, int? ipSslAddressCount = null, string dnsSuffix = null, int? maximumNumberOfMachines = null, int? frontEndScaleFactor = null, bool? isSuspended = null, IEnumerable clusterSettings = null, IEnumerable userWhitelistedIPRanges = null, bool? hasLinuxWorkers = null, int? dedicatedHostCount = null, bool? isZoneRedundant = null, string kind = null) + public static AppServiceEnvironmentData AppServiceEnvironmentData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ProvisioningState? provisioningState = null, HostingEnvironmentStatus? status = null, AppServiceVirtualNetworkProfile virtualNetwork = null, LoadBalancingMode? internalLoadBalancingMode = null, string multiSize = null, int? multiRoleCount = null, int? ipSslAddressCount = null, string dnsSuffix = null, int? maximumNumberOfMachines = null, int? frontEndScaleFactor = null, bool? isSuspended = null, IEnumerable clusterSettings = null, IEnumerable userWhitelistedIPRanges = null, bool? hasLinuxWorkers = null, AppServiceEnvironmentUpgradePreference? upgradePreference = null, int? dedicatedHostCount = null, bool? isZoneRedundant = null, CustomDnsSuffixConfigurationData customDnsSuffixConfiguration = null, AseV3NetworkingConfigurationData networkingConfiguration = null, AppServiceEnvironmentUpgradeAvailability? upgradeAvailability = null, string kind = null) { tags ??= new Dictionary(); clusterSettings ??= new List(); @@ -839,8 +839,12 @@ public static AppServiceEnvironmentData AppServiceEnvironmentData(ResourceIdenti clusterSettings?.ToList(), userWhitelistedIPRanges?.ToList(), hasLinuxWorkers, + upgradePreference, dedicatedHostCount, isZoneRedundant, + customDnsSuffixConfiguration, + networkingConfiguration, + upgradeAvailability, kind, serializedAdditionalRawData: null); } @@ -863,10 +867,14 @@ public static AppServiceEnvironmentData AppServiceEnvironmentData(ResourceIdenti /// Custom settings for changing the behavior of the App Service Environment. /// User added ip ranges to whitelist on ASE db. /// Flag that displays whether an ASE has linux workers or not. + /// Upgrade Preference. /// Dedicated Host Count. /// Whether or not this App Service Environment is zone-redundant. + /// Full view of the custom domain suffix configuration for ASEv3. + /// Full view of networking configuration for an ASE. + /// Whether an upgrade is available for this App Service Environment. /// A new instance for mocking. - public static AppServiceEnvironmentProperties AppServiceEnvironmentProperties(ProvisioningState? provisioningState = null, HostingEnvironmentStatus? status = null, AppServiceVirtualNetworkProfile virtualNetwork = null, LoadBalancingMode? internalLoadBalancingMode = null, string multiSize = null, int? multiRoleCount = null, int? ipSslAddressCount = null, string dnsSuffix = null, int? maximumNumberOfMachines = null, int? frontEndScaleFactor = null, bool? isSuspended = null, IEnumerable clusterSettings = null, IEnumerable userWhitelistedIPRanges = null, bool? hasLinuxWorkers = null, int? dedicatedHostCount = null, bool? isZoneRedundant = null) + public static AppServiceEnvironmentProperties AppServiceEnvironmentProperties(ProvisioningState? provisioningState = null, HostingEnvironmentStatus? status = null, AppServiceVirtualNetworkProfile virtualNetwork = null, LoadBalancingMode? internalLoadBalancingMode = null, string multiSize = null, int? multiRoleCount = null, int? ipSslAddressCount = null, string dnsSuffix = null, int? maximumNumberOfMachines = null, int? frontEndScaleFactor = null, bool? isSuspended = null, IEnumerable clusterSettings = null, IEnumerable userWhitelistedIPRanges = null, bool? hasLinuxWorkers = null, AppServiceEnvironmentUpgradePreference? upgradePreference = null, int? dedicatedHostCount = null, bool? isZoneRedundant = null, CustomDnsSuffixConfigurationData customDnsSuffixConfiguration = null, AseV3NetworkingConfigurationData networkingConfiguration = null, AppServiceEnvironmentUpgradeAvailability? upgradeAvailability = null) { clusterSettings ??= new List(); userWhitelistedIPRanges ??= new List(); @@ -886,8 +894,12 @@ public static AppServiceEnvironmentProperties AppServiceEnvironmentProperties(Pr clusterSettings?.ToList(), userWhitelistedIPRanges?.ToList(), hasLinuxWorkers, + upgradePreference, dedicatedHostCount, isZoneRedundant, + customDnsSuffixConfiguration, + networkingConfiguration, + upgradeAvailability, serializedAdditionalRawData: null); } @@ -902,6 +914,73 @@ public static AppServiceVirtualNetworkProfile AppServiceVirtualNetworkProfile(Re return new AppServiceVirtualNetworkProfile(id, name, resourceType, subnet, serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// + /// + /// The default custom domain suffix to use for all sites deployed on the ASE. + /// The URL referencing the Azure Key Vault certificate secret that should be used as the default SSL/TLS certificate for sites with the custom domain suffix. + /// The user-assigned identity to use for resolving the key vault certificate reference. If not specified, the system-assigned ASE identity will be used if available. + /// Kind of resource. + /// A new instance for mocking. + public static CustomDnsSuffixConfigurationData CustomDnsSuffixConfigurationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, CustomDnsSuffixProvisioningState? provisioningState = null, string provisioningDetails = null, string dnsSuffix = null, Uri certificateUri = null, string keyVaultReferenceIdentity = null, string kind = null) + { + return new CustomDnsSuffixConfigurationData( + id, + name, + resourceType, + systemData, + provisioningState, + provisioningDetails, + dnsSuffix, + certificateUri, + keyVaultReferenceIdentity, + kind, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// + /// + /// + /// + /// Property to enable and disable new private endpoint connection creation on ASE. + /// Property to enable and disable FTP on ASEV3. + /// Property to enable and disable Remote Debug on ASEV3. + /// Customer provided Inbound IP Address. Only able to be set on Ase create. + /// Kind of resource. + /// A new instance for mocking. + public static AseV3NetworkingConfigurationData AseV3NetworkingConfigurationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IEnumerable windowsOutboundIPAddresses = null, IEnumerable linuxOutboundIPAddresses = null, IEnumerable externalInboundIPAddresses = null, IEnumerable internalInboundIPAddresses = null, bool? allowNewPrivateEndpointConnections = null, bool? isFtpEnabled = null, bool? isRemoteDebugEnabled = null, string inboundIPAddressOverride = null, string kind = null) + { + windowsOutboundIPAddresses ??= new List(); + linuxOutboundIPAddresses ??= new List(); + externalInboundIPAddresses ??= new List(); + internalInboundIPAddresses ??= new List(); + + return new AseV3NetworkingConfigurationData( + id, + name, + resourceType, + systemData, + windowsOutboundIPAddresses?.ToList(), + linuxOutboundIPAddresses?.ToList(), + externalInboundIPAddresses?.ToList(), + internalInboundIPAddresses?.ToList(), + allowNewPrivateEndpointConnections, + isFtpEnabled, + isRemoteDebugEnabled, + inboundIPAddressOverride, + kind, + serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The id. /// The name. @@ -924,11 +1003,15 @@ public static AppServiceVirtualNetworkProfile AppServiceVirtualNetworkProfile(Re /// Custom settings for changing the behavior of the App Service Environment. /// User added ip ranges to whitelist on ASE db. /// Flag that displays whether an ASE has linux workers or not. + /// Upgrade Preference. /// Dedicated Host Count. /// Whether or not this App Service Environment is zone-redundant. + /// Full view of the custom domain suffix configuration for ASEv3. + /// Full view of networking configuration for an ASE. + /// Whether an upgrade is available for this App Service Environment. /// Kind of resource. /// A new instance for mocking. - public static AppServiceEnvironmentPatch AppServiceEnvironmentPatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ProvisioningState? provisioningState = null, HostingEnvironmentStatus? status = null, AppServiceVirtualNetworkProfile virtualNetwork = null, LoadBalancingMode? internalLoadBalancingMode = null, string multiSize = null, int? multiRoleCount = null, int? ipSslAddressCount = null, string dnsSuffix = null, int? maximumNumberOfMachines = null, int? frontEndScaleFactor = null, bool? isSuspended = null, IEnumerable clusterSettings = null, IEnumerable userWhitelistedIPRanges = null, bool? hasLinuxWorkers = null, int? dedicatedHostCount = null, bool? isZoneRedundant = null, string kind = null) + public static AppServiceEnvironmentPatch AppServiceEnvironmentPatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ProvisioningState? provisioningState = null, HostingEnvironmentStatus? status = null, AppServiceVirtualNetworkProfile virtualNetwork = null, LoadBalancingMode? internalLoadBalancingMode = null, string multiSize = null, int? multiRoleCount = null, int? ipSslAddressCount = null, string dnsSuffix = null, int? maximumNumberOfMachines = null, int? frontEndScaleFactor = null, bool? isSuspended = null, IEnumerable clusterSettings = null, IEnumerable userWhitelistedIPRanges = null, bool? hasLinuxWorkers = null, AppServiceEnvironmentUpgradePreference? upgradePreference = null, int? dedicatedHostCount = null, bool? isZoneRedundant = null, CustomDnsSuffixConfigurationData customDnsSuffixConfiguration = null, AseV3NetworkingConfigurationData networkingConfiguration = null, AppServiceEnvironmentUpgradeAvailability? upgradeAvailability = null, string kind = null) { clusterSettings ??= new List(); userWhitelistedIPRanges ??= new List(); @@ -952,8 +1035,12 @@ public static AppServiceEnvironmentPatch AppServiceEnvironmentPatch(ResourceIden clusterSettings?.ToList(), userWhitelistedIPRanges?.ToList(), hasLinuxWorkers, + upgradePreference, dedicatedHostCount, isZoneRedundant, + customDnsSuffixConfiguration, + networkingConfiguration, + upgradeAvailability, kind, serializedAdditionalRawData: null); } @@ -1025,39 +1112,6 @@ public static AppServiceEnvironmentAddressResult AppServiceEnvironmentAddressRes serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// - /// - /// - /// - /// Property to enable and disable new private endpoint connection creation on ASE. - /// Kind of resource. - /// A new instance for mocking. - public static AseV3NetworkingConfigurationData AseV3NetworkingConfigurationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IEnumerable windowsOutboundIPAddresses = null, IEnumerable linuxOutboundIPAddresses = null, IEnumerable externalInboundIPAddresses = null, IEnumerable internalInboundIPAddresses = null, bool? allowNewPrivateEndpointConnections = null, string kind = null) - { - windowsOutboundIPAddresses ??= new List(); - linuxOutboundIPAddresses ??= new List(); - externalInboundIPAddresses ??= new List(); - internalInboundIPAddresses ??= new List(); - - return new AseV3NetworkingConfigurationData( - id, - name, - resourceType, - systemData, - windowsOutboundIPAddresses?.ToList(), - linuxOutboundIPAddresses?.ToList(), - externalInboundIPAddresses?.ToList(), - internalInboundIPAddresses?.ToList(), - allowNewPrivateEndpointConnections, - kind, - serializedAdditionalRawData: null); - } - /// Initializes a new instance of . /// Name/identifier of the diagnostics. /// Diagnostics output. @@ -1283,26 +1337,6 @@ public static RemotePrivateEndpointConnectionARMResourceData RemotePrivateEndpoi serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The state of a private link connection. - /// Kind of resource. - /// A new instance for mocking. - public static PrivateLinkConnectionApprovalRequestInfo PrivateLinkConnectionApprovalRequestInfo(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, PrivateLinkConnectionState privateLinkServiceConnectionState = null, string kind = null) - { - return new PrivateLinkConnectionApprovalRequestInfo( - id, - name, - resourceType, - systemData, - privateLinkServiceConnectionState, - kind, - serializedAdditionalRawData: null); - } - /// Initializes a new instance of . /// The id. /// The name. @@ -1348,6 +1382,7 @@ public static AppServicePrivateLinkResourceProperties AppServicePrivateLinkResou /// App Service plan subscription. /// Specification for the App Service Environment to use for the App Service plan. /// Maximum number of instances that can be assigned to this App Service plan. + /// The number of instances that are assigned to this App Service plan. /// Geographical location for the App Service plan. /// /// If <code>true</code>, apps assigned to this App Service plan can be scaled independently. @@ -1373,7 +1408,7 @@ public static AppServicePrivateLinkResourceProperties AppServicePrivateLinkResou /// /// Kind of resource. /// A new instance for mocking. - public static AppServicePlanData AppServicePlanData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, AppServiceSkuDescription sku = null, ExtendedLocation extendedLocation = null, string workerTierName = null, AppServicePlanStatus? status = null, string subscription = null, HostingEnvironmentProfile hostingEnvironmentProfile = null, int? maximumNumberOfWorkers = null, string geoRegion = null, bool? isPerSiteScaling = null, bool? isElasticScaleEnabled = null, int? maximumElasticWorkerCount = null, int? numberOfSites = null, bool? isSpot = null, DateTimeOffset? spotExpireOn = null, DateTimeOffset? freeOfferExpireOn = null, string resourceGroup = null, bool? isReserved = null, bool? isXenon = null, bool? isHyperV = null, int? targetWorkerCount = null, int? targetWorkerSizeId = null, ProvisioningState? provisioningState = null, KubeEnvironmentProfile kubeEnvironmentProfile = null, bool? isZoneRedundant = null, string kind = null) + public static AppServicePlanData AppServicePlanData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, AppServiceSkuDescription sku = null, ExtendedLocation extendedLocation = null, string workerTierName = null, AppServicePlanStatus? status = null, string subscription = null, HostingEnvironmentProfile hostingEnvironmentProfile = null, int? maximumNumberOfWorkers = null, int? numberOfWorkers = null, string geoRegion = null, bool? isPerSiteScaling = null, bool? isElasticScaleEnabled = null, int? maximumElasticWorkerCount = null, int? numberOfSites = null, bool? isSpot = null, DateTimeOffset? spotExpireOn = null, DateTimeOffset? freeOfferExpireOn = null, string resourceGroup = null, bool? isReserved = null, bool? isXenon = null, bool? isHyperV = null, int? targetWorkerCount = null, int? targetWorkerSizeId = null, ProvisioningState? provisioningState = null, KubeEnvironmentProfile kubeEnvironmentProfile = null, bool? isZoneRedundant = null, string kind = null) { tags ??= new Dictionary(); @@ -1391,6 +1426,7 @@ public static AppServicePlanData AppServicePlanData(ResourceIdentifier id = null subscription, hostingEnvironmentProfile, maximumNumberOfWorkers, + numberOfWorkers, geoRegion, isPerSiteScaling, isElasticScaleEnabled, @@ -1457,7 +1493,16 @@ public static KubeEnvironmentProfile KubeEnvironmentProfile(ResourceIdentifier i /// Obsolete: Hyper-V sandbox. /// Hyper-V sandbox. /// Last time the app was modified, in UTC. Read-only. + /// Property to configure various DNS related settings for a site. + /// Virtual Network Route All enabled. This causes all outbound traffic to have Virtual Network Security Groups and User Defined Routes applied. + /// To enable pulling image over Virtual Network. + /// To enable accessing content over virtual network. + /// To enable Backup and Restore operations over virtual network. /// Configuration of the app. + /// Configuration specific of the Azure Function app. + /// Dapr configuration of the app. + /// Workload profile name for function app to execute on. + /// Function app resource requirements. /// Azure Traffic Manager hostnames associated with the app. Read-only. /// <code>true</code> to stop SCM (KUDU) site when the app is stopped; otherwise, <code>false</code>. The default is <code>false</code>. /// Specifies which deployment slot this app will swap into. Read-only. @@ -1496,15 +1541,17 @@ public static KubeEnvironmentProfile KubeEnvironmentProfile(ResourceIdentifier i /// /// Site redundancy mode. /// Specifies an operation id if this site has a pending operation. + /// Property to allow or block all public traffic. Allowed Values: 'Enabled', 'Disabled' or an empty string. /// Checks if Customer provided storage account is required. /// Identity to use for Key Vault Reference authentication. /// /// Azure Resource Manager ID of the Virtual network and subnet to be joined by Regional VNET Integration. /// This must be of the form /subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName} /// + /// Azure Resource Manager ID of the customer's selected Managed Environment on which to host this app. This must be of the form /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName}. /// Kind of resource. /// A new instance for mocking. - public static WebSiteData WebSiteData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, ExtendedLocation extendedLocation = null, string state = null, IEnumerable hostNames = null, string repositorySiteName = null, AppServiceUsageState? usageState = null, bool? isEnabled = null, IEnumerable enabledHostNames = null, WebSiteAvailabilityState? availabilityState = null, IEnumerable hostNameSslStates = null, ResourceIdentifier appServicePlanId = null, bool? isReserved = null, bool? isXenon = null, bool? isHyperV = null, DateTimeOffset? lastModifiedTimeUtc = null, SiteConfigProperties siteConfig = null, IEnumerable trafficManagerHostNames = null, bool? isScmSiteAlsoStopped = null, string targetSwapSlot = null, HostingEnvironmentProfile hostingEnvironmentProfile = null, bool? isClientAffinityEnabled = null, bool? isClientCertEnabled = null, ClientCertMode? clientCertMode = null, string clientCertExclusionPaths = null, bool? isHostNameDisabled = null, string customDomainVerificationId = null, string outboundIPAddresses = null, string possibleOutboundIPAddresses = null, int? containerSize = null, int? dailyMemoryTimeQuota = null, DateTimeOffset? suspendOn = null, int? maxNumberOfWorkers = null, CloningInfo cloningInfo = null, string resourceGroup = null, bool? isDefaultContainer = null, string defaultHostName = null, SlotSwapStatus slotSwapStatus = null, bool? isHttpsOnly = null, RedundancyMode? redundancyMode = null, Guid? inProgressOperationId = null, bool? isStorageAccountRequired = null, string keyVaultReferenceIdentity = null, ResourceIdentifier virtualNetworkSubnetId = null, string kind = null) + public static WebSiteData WebSiteData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, ExtendedLocation extendedLocation = null, string state = null, IEnumerable hostNames = null, string repositorySiteName = null, AppServiceUsageState? usageState = null, bool? isEnabled = null, IEnumerable enabledHostNames = null, WebSiteAvailabilityState? availabilityState = null, IEnumerable hostNameSslStates = null, ResourceIdentifier appServicePlanId = null, bool? isReserved = null, bool? isXenon = null, bool? isHyperV = null, DateTimeOffset? lastModifiedTimeUtc = null, SiteDnsConfig dnsConfiguration = null, bool? isVnetRouteAllEnabled = null, bool? isVnetImagePullEnabled = null, bool? isVnetContentShareEnabled = null, bool? isVnetBackupRestoreEnabled = null, SiteConfigProperties siteConfig = null, FunctionAppConfig functionAppConfig = null, AppDaprConfig daprConfig = null, string workloadProfileName = null, FunctionAppResourceConfig resourceConfig = null, IEnumerable trafficManagerHostNames = null, bool? isScmSiteAlsoStopped = null, string targetSwapSlot = null, HostingEnvironmentProfile hostingEnvironmentProfile = null, bool? isClientAffinityEnabled = null, bool? isClientCertEnabled = null, ClientCertMode? clientCertMode = null, string clientCertExclusionPaths = null, bool? isHostNameDisabled = null, string customDomainVerificationId = null, string outboundIPAddresses = null, string possibleOutboundIPAddresses = null, int? containerSize = null, int? dailyMemoryTimeQuota = null, DateTimeOffset? suspendOn = null, int? maxNumberOfWorkers = null, CloningInfo cloningInfo = null, string resourceGroup = null, bool? isDefaultContainer = null, string defaultHostName = null, SlotSwapStatus slotSwapStatus = null, bool? isHttpsOnly = null, RedundancyMode? redundancyMode = null, Guid? inProgressOperationId = null, string publicNetworkAccess = null, bool? isStorageAccountRequired = null, string keyVaultReferenceIdentity = null, ResourceIdentifier virtualNetworkSubnetId = null, string managedEnvironmentId = null, string kind = null) { tags ??= new Dictionary(); hostNames ??= new List(); @@ -1534,7 +1581,16 @@ public static WebSiteData WebSiteData(ResourceIdentifier id = null, string name isXenon, isHyperV, lastModifiedTimeUtc, + dnsConfiguration, + isVnetRouteAllEnabled, + isVnetImagePullEnabled, + isVnetContentShareEnabled, + isVnetBackupRestoreEnabled, siteConfig, + functionAppConfig, + daprConfig, + workloadProfileName, + resourceConfig, trafficManagerHostNames?.ToList(), isScmSiteAlsoStopped, targetSwapSlot, @@ -1559,13 +1615,37 @@ public static WebSiteData WebSiteData(ResourceIdentifier id = null, string name isHttpsOnly, redundancyMode, inProgressOperationId, + publicNetworkAccess, isStorageAccountRequired, keyVaultReferenceIdentity, virtualNetworkSubnetId, + managedEnvironmentId, kind, serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// List of custom DNS servers to be used by an app for lookups. Maximum 5 dns servers can be set. + /// Alternate DNS server to be used by apps. This property replicates the WEBSITE_DNS_ALT_SERVER app setting. + /// Timeout for a single dns lookup in seconds. Allowed range: 1-30. Default is 3. + /// Total number of retries for dns lookup. Allowed range: 1-5. Default is 3. + /// Custom time for DNS to be cached in seconds. Allowed range: 0-60. Default is 30 seconds. 0 means caching disabled. + /// Indicates that sites using Virtual network custom DNS servers are still sorting the list of DNS servers. Read-Only. + /// A new instance for mocking. + public static SiteDnsConfig SiteDnsConfig(IEnumerable dnsServers = null, string dnsAltServer = null, int? dnsRetryAttemptTimeout = null, int? dnsRetryAttemptCount = null, int? dnsMaxCacheTimeout = null, bool? dnsLegacySortOrder = null) + { + dnsServers ??= new List(); + + return new SiteDnsConfig( + dnsServers?.ToList(), + dnsAltServer, + dnsRetryAttemptTimeout, + dnsRetryAttemptCount, + dnsMaxCacheTimeout, + dnsLegacySortOrder, + serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// Number of workers. /// Default documents. @@ -1587,6 +1667,7 @@ public static WebSiteData WebSiteData(ResourceIdentifier id = null, string name /// <code>true</code> if detailed error logging is enabled; otherwise, <code>false</code>. /// Publishing user name. /// Application settings. + /// Application metadata. This property cannot be retrieved, since it may contain secrets. /// Connection strings. /// Site MachineKey. /// Handler mappings. @@ -1620,10 +1701,13 @@ public static WebSiteData WebSiteData(ResourceIdentifier id = null, string name /// Explicit Managed Service Identity Id. /// Identity to use for Key Vault Reference authentication. /// IP security restrictions for main. + /// Default action for main access restriction if no rules are matched. /// IP security restrictions for scm. + /// Default action for scm access restriction if no rules are matched. /// IP security restrictions for scm to use main. /// Http20Enabled: configures a web site to allow clients to connect over http2.0. /// MinTlsVersion: configures the minimum version of TLS required for SSL requests. + /// The minimum strength TLS cipher suite allowed for an application. /// ScmMinTlsVersion: configures the minimum version of TLS required for SSL requests for SCM site. /// State of FTP / FTPS service. /// @@ -1634,6 +1718,10 @@ public static WebSiteData WebSiteData(ResourceIdentifier id = null, string name /// Maximum number of workers that a site can scale out to. /// This setting only applies to the Consumption and Elastic Premium Plans /// + /// + /// Maximum number of workers that a site can scale out to. + /// This setting only applies to apps in plans where ElasticScaleEnabled is <code>true</code> + /// /// Health check path. /// /// Gets or sets a value indicating whether functions runtime scale monitoring is enabled. When enabled, @@ -1648,10 +1736,11 @@ public static WebSiteData WebSiteData(ResourceIdentifier id = null, string name /// List of Azure Storage Accounts. /// Property to allow or block all public traffic. /// A new instance for mocking. - public static SiteConfigProperties SiteConfigProperties(int? numberOfWorkers = null, IEnumerable defaultDocuments = null, string netFrameworkVersion = null, string phpVersion = null, string pythonVersion = null, string nodeVersion = null, string powerShellVersion = null, string linuxFxVersion = null, string windowsFxVersion = null, bool? isRequestTracingEnabled = null, DateTimeOffset? requestTracingExpirationOn = null, bool? isRemoteDebuggingEnabled = null, string remoteDebuggingVersion = null, bool? isHttpLoggingEnabled = null, bool? useManagedIdentityCreds = null, string acrUserManagedIdentityId = null, int? logsDirectorySizeLimit = null, bool? isDetailedErrorLoggingEnabled = null, string publishingUsername = null, IEnumerable appSettings = null, IEnumerable connectionStrings = null, SiteMachineKey machineKey = null, IEnumerable handlerMappings = null, string documentRoot = null, ScmType? scmType = null, bool? use32BitWorkerProcess = null, bool? isWebSocketsEnabled = null, bool? isAlwaysOn = null, string javaVersion = null, string javaContainer = null, string javaContainerVersion = null, string appCommandLine = null, ManagedPipelineMode? managedPipelineMode = null, IEnumerable virtualApplications = null, SiteLoadBalancing? loadBalancing = null, IEnumerable experimentsRampUpRules = null, SiteLimits limits = null, bool? isAutoHealEnabled = null, AutoHealRules autoHealRules = null, string tracingOptions = null, string vnetName = null, bool? isVnetRouteAllEnabled = null, int? vnetPrivatePortsCount = null, AppServiceCorsSettings cors = null, WebAppPushSettings push = null, Uri apiDefinitionUri = null, string apiManagementConfigId = null, string autoSwapSlotName = null, bool? isLocalMySqlEnabled = null, int? managedServiceIdentityId = null, int? xManagedServiceIdentityId = null, string keyVaultReferenceIdentity = null, IEnumerable ipSecurityRestrictions = null, IEnumerable scmIPSecurityRestrictions = null, bool? allowIPSecurityRestrictionsForScmToUseMain = null, bool? isHttp20Enabled = null, AppServiceSupportedTlsVersion? minTlsVersion = null, AppServiceSupportedTlsVersion? scmMinTlsVersion = null, AppServiceFtpsState? ftpsState = null, int? preWarmedInstanceCount = null, int? functionAppScaleLimit = null, string healthCheckPath = null, bool? isFunctionsRuntimeScaleMonitoringEnabled = null, string websiteTimeZone = null, int? minimumElasticInstanceCount = null, IDictionary azureStorageAccounts = null, string publicNetworkAccess = null) + public static SiteConfigProperties SiteConfigProperties(int? numberOfWorkers = null, IEnumerable defaultDocuments = null, string netFrameworkVersion = null, string phpVersion = null, string pythonVersion = null, string nodeVersion = null, string powerShellVersion = null, string linuxFxVersion = null, string windowsFxVersion = null, bool? isRequestTracingEnabled = null, DateTimeOffset? requestTracingExpirationOn = null, bool? isRemoteDebuggingEnabled = null, string remoteDebuggingVersion = null, bool? isHttpLoggingEnabled = null, bool? useManagedIdentityCreds = null, string acrUserManagedIdentityId = null, int? logsDirectorySizeLimit = null, bool? isDetailedErrorLoggingEnabled = null, string publishingUsername = null, IEnumerable appSettings = null, IEnumerable metadata = null, IEnumerable connectionStrings = null, SiteMachineKey machineKey = null, IEnumerable handlerMappings = null, string documentRoot = null, ScmType? scmType = null, bool? use32BitWorkerProcess = null, bool? isWebSocketsEnabled = null, bool? isAlwaysOn = null, string javaVersion = null, string javaContainer = null, string javaContainerVersion = null, string appCommandLine = null, ManagedPipelineMode? managedPipelineMode = null, IEnumerable virtualApplications = null, SiteLoadBalancing? loadBalancing = null, IEnumerable experimentsRampUpRules = null, SiteLimits limits = null, bool? isAutoHealEnabled = null, AutoHealRules autoHealRules = null, string tracingOptions = null, string vnetName = null, bool? isVnetRouteAllEnabled = null, int? vnetPrivatePortsCount = null, AppServiceCorsSettings cors = null, WebAppPushSettings push = null, Uri apiDefinitionUri = null, string apiManagementConfigId = null, string autoSwapSlotName = null, bool? isLocalMySqlEnabled = null, int? managedServiceIdentityId = null, int? xManagedServiceIdentityId = null, string keyVaultReferenceIdentity = null, IEnumerable ipSecurityRestrictions = null, SiteDefaultAction? ipSecurityRestrictionsDefaultAction = null, IEnumerable scmIPSecurityRestrictions = null, SiteDefaultAction? scmIPSecurityRestrictionsDefaultAction = null, bool? allowIPSecurityRestrictionsForScmToUseMain = null, bool? isHttp20Enabled = null, AppServiceSupportedTlsVersion? minTlsVersion = null, AppServiceTlsCipherSuite? minTlsCipherSuite = null, AppServiceSupportedTlsVersion? scmMinTlsVersion = null, AppServiceFtpsState? ftpsState = null, int? preWarmedInstanceCount = null, int? functionAppScaleLimit = null, int? elasticWebAppScaleLimit = null, string healthCheckPath = null, bool? isFunctionsRuntimeScaleMonitoringEnabled = null, string websiteTimeZone = null, int? minimumElasticInstanceCount = null, IDictionary azureStorageAccounts = null, string publicNetworkAccess = null) { defaultDocuments ??= new List(); appSettings ??= new List(); + metadata ??= new List(); connectionStrings ??= new List(); handlerMappings ??= new List(); virtualApplications ??= new List(); @@ -1681,6 +1770,7 @@ public static SiteConfigProperties SiteConfigProperties(int? numberOfWorkers = n isDetailedErrorLoggingEnabled, publishingUsername, appSettings?.ToList(), + metadata?.ToList(), connectionStrings?.ToList(), machineKey, handlerMappings?.ToList(), @@ -1714,14 +1804,18 @@ public static SiteConfigProperties SiteConfigProperties(int? numberOfWorkers = n xManagedServiceIdentityId, keyVaultReferenceIdentity, ipSecurityRestrictions?.ToList(), + ipSecurityRestrictionsDefaultAction, scmIPSecurityRestrictions?.ToList(), + scmIPSecurityRestrictionsDefaultAction, allowIPSecurityRestrictionsForScmToUseMain, isHttp20Enabled, minTlsVersion, + minTlsCipherSuite, scmMinTlsVersion, ftpsState, preWarmedInstanceCount, functionAppScaleLimit, + elasticWebAppScaleLimit, healthCheckPath, isFunctionsRuntimeScaleMonitoringEnabled, websiteTimeZone, @@ -1780,8 +1874,9 @@ public static WebAppPushSettings WebAppPushSettings(ResourceIdentifier id = null /// Access key for the storage account. /// Path to mount the storage within the site's runtime environment. /// State of the storage account. + /// Mounting protocol to use for the storage account. /// A new instance for mocking. - public static AppServiceStorageAccessInfo AppServiceStorageAccessInfo(AppServiceStorageType? storageType = null, string accountName = null, string shareName = null, string accessKey = null, string mountPath = null, AppServiceStorageAccountState? state = null) + public static AppServiceStorageAccessInfo AppServiceStorageAccessInfo(AppServiceStorageType? storageType = null, string accountName = null, string shareName = null, string accessKey = null, string mountPath = null, AppServiceStorageAccountState? state = null, AppServiceStorageProtocol? protocol = null) { return new AppServiceStorageAccessInfo( storageType, @@ -1790,6 +1885,7 @@ public static AppServiceStorageAccessInfo AppServiceStorageAccessInfo(AppService accessKey, mountPath, state, + protocol, serializedAdditionalRawData: null); } @@ -1840,6 +1936,7 @@ public static LocalizableString LocalizableString(string value = null, string lo /// App Service plan subscription. /// Specification for the App Service Environment to use for the App Service plan. /// Maximum number of instances that can be assigned to this App Service plan. + /// The number of instances that are assigned to this App Service plan. /// Geographical location for the App Service plan. /// /// If <code>true</code>, apps assigned to this App Service plan can be scaled independently. @@ -1865,7 +1962,7 @@ public static LocalizableString LocalizableString(string value = null, string lo /// /// Kind of resource. /// A new instance for mocking. - public static AppServicePlanPatch AppServicePlanPatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string workerTierName = null, AppServicePlanStatus? status = null, string subscription = null, HostingEnvironmentProfile hostingEnvironmentProfile = null, int? maximumNumberOfWorkers = null, string geoRegion = null, bool? isPerSiteScaling = null, bool? isElasticScaleEnabled = null, int? maximumElasticWorkerCount = null, int? numberOfSites = null, bool? isSpot = null, DateTimeOffset? spotExpirationOn = null, DateTimeOffset? freeOfferExpirationOn = null, string resourceGroup = null, bool? isReserved = null, bool? isXenon = null, bool? isHyperV = null, int? targetWorkerCount = null, int? targetWorkerSizeId = null, ProvisioningState? provisioningState = null, KubeEnvironmentProfile kubeEnvironmentProfile = null, bool? isZoneRedundant = null, string kind = null) + public static AppServicePlanPatch AppServicePlanPatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string workerTierName = null, AppServicePlanStatus? status = null, string subscription = null, HostingEnvironmentProfile hostingEnvironmentProfile = null, int? maximumNumberOfWorkers = null, int? numberOfWorkers = null, string geoRegion = null, bool? isPerSiteScaling = null, bool? isElasticScaleEnabled = null, int? maximumElasticWorkerCount = null, int? numberOfSites = null, bool? isSpot = null, DateTimeOffset? spotExpirationOn = null, DateTimeOffset? freeOfferExpirationOn = null, string resourceGroup = null, bool? isReserved = null, bool? isXenon = null, bool? isHyperV = null, int? targetWorkerCount = null, int? targetWorkerSizeId = null, ProvisioningState? provisioningState = null, KubeEnvironmentProfile kubeEnvironmentProfile = null, bool? isZoneRedundant = null, string kind = null) { return new AppServicePlanPatch( id, @@ -1877,6 +1974,7 @@ public static AppServicePlanPatch AppServicePlanPatch(ResourceIdentifier id = nu subscription, hostingEnvironmentProfile, maximumNumberOfWorkers, + numberOfWorkers, geoRegion, isPerSiteScaling, isElasticScaleEnabled, @@ -2439,6 +2537,7 @@ public static AppSnapshot AppSnapshot(ResourceIdentifier id = null, string name /// Only visible within Vnet/Subnet. /// Default Domain Name for the cluster. /// Static IP of the KubeEnvironment. + /// Type of Kubernetes Environment. Only supported for Container App Environments with value as Managed. /// /// Cluster configuration which determines the ARC cluster /// components types. Eg: Choosing between BuildService kind, @@ -2449,10 +2548,11 @@ public static AppSnapshot AppSnapshot(ResourceIdentifier id = null, string name /// app logs to a destination. Currently only "log-analytics" is /// supported /// + /// Cluster configuration for Container Apps Environments to configure Dapr Instrumentation Key and VNET Configuration. /// /// Kind of resource. /// A new instance for mocking. - public static KubeEnvironmentData KubeEnvironmentData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ExtendedLocation extendedLocation = null, KubeEnvironmentProvisioningState? provisioningState = null, string deploymentErrors = null, bool? isInternalLoadBalancerEnabled = null, string defaultDomain = null, string staticIP = null, ArcConfiguration arcConfiguration = null, AppLogsConfiguration appLogsConfiguration = null, ResourceIdentifier aksResourceId = null, string kind = null) + public static KubeEnvironmentData KubeEnvironmentData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ExtendedLocation extendedLocation = null, KubeEnvironmentProvisioningState? provisioningState = null, string deploymentErrors = null, bool? isInternalLoadBalancerEnabled = null, string defaultDomain = null, string staticIP = null, string environmentType = null, ArcConfiguration arcConfiguration = null, AppLogsConfiguration appLogsConfiguration = null, ContainerAppsConfiguration containerAppsConfiguration = null, ResourceIdentifier aksResourceId = null, string kind = null) { tags ??= new Dictionary(); @@ -2469,8 +2569,10 @@ public static KubeEnvironmentData KubeEnvironmentData(ResourceIdentifier id = nu isInternalLoadBalancerEnabled, defaultDomain, staticIP, + environmentType, arcConfiguration, appLogsConfiguration, + containerAppsConfiguration, aksResourceId, kind, serializedAdditionalRawData: null); @@ -2496,10 +2598,11 @@ public static KubeEnvironmentData KubeEnvironmentData(ResourceIdentifier id = nu /// app logs to a destination. Currently only "log-analytics" is /// supported /// + /// Cluster configuration for Container Apps Environments to configure Dapr Instrumentation Key and VNET Configuration. /// /// Kind of resource. /// A new instance for mocking. - public static KubeEnvironmentPatch KubeEnvironmentPatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, KubeEnvironmentProvisioningState? provisioningState = null, string deploymentErrors = null, bool? isInternalLoadBalancerEnabled = null, string defaultDomain = null, string staticIP = null, ArcConfiguration arcConfiguration = null, AppLogsConfiguration appLogsConfiguration = null, ResourceIdentifier aksResourceId = null, string kind = null) + public static KubeEnvironmentPatch KubeEnvironmentPatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, KubeEnvironmentProvisioningState? provisioningState = null, string deploymentErrors = null, bool? isInternalLoadBalancerEnabled = null, string defaultDomain = null, string staticIP = null, ArcConfiguration arcConfiguration = null, AppLogsConfiguration appLogsConfiguration = null, ContainerAppsConfiguration containerAppsConfiguration = null, ResourceIdentifier aksResourceId = null, string kind = null) { return new KubeEnvironmentPatch( id, @@ -2513,6 +2616,7 @@ public static KubeEnvironmentPatch KubeEnvironmentPatch(ResourceIdentifier id = staticIP, arcConfiguration, appLogsConfiguration, + containerAppsConfiguration, aksResourceId, kind, serializedAdditionalRawData: null); @@ -3046,10 +3150,11 @@ public static AppServiceBillingMeter AppServiceBillingMeter(ResourceIdentifier i /// Resource name to verify. /// Resource type used for verification. /// Is fully qualified domain name. + /// Azure Resource Manager ID of the customer's selected Container Apps Environment on which to host the Function app. This must be of the form /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName}. /// A new instance for mocking. - public static ResourceNameAvailabilityContent ResourceNameAvailabilityContent(string name = null, CheckNameResourceType resourceType = default, bool? isFqdn = null) + public static ResourceNameAvailabilityContent ResourceNameAvailabilityContent(string name = null, CheckNameResourceType resourceType = default, bool? isFqdn = null, string environmentId = null) { - return new ResourceNameAvailabilityContent(name, resourceType, isFqdn, serializedAdditionalRawData: null); + return new ResourceNameAvailabilityContent(name, resourceType, isFqdn, environmentId, serializedAdditionalRawData: null); } /// Initializes a new instance of . @@ -3062,6 +3167,52 @@ public static ResourceNameAvailability ResourceNameAvailability(bool? isNameAvai return new ResourceNameAvailability(isNameAvailable, reason, message, serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// + /// + /// + /// Kind of resource. + /// A new instance for mocking. + public static CustomHostnameSites CustomHostnameSites(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string customHostname = null, string region = null, IEnumerable siteResourceIds = null, string kind = null) + { + siteResourceIds ??= new List(); + + return new CustomHostnameSites( + id, + name, + resourceType, + systemData, + customHostname, + region, + siteResourceIds?.ToList(), + kind, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// String representation of the identity. + /// Kind of resource. + /// A new instance for mocking. + public static AppServiceIdentifierData AppServiceIdentifierData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string value = null, string kind = null) + { + return new AppServiceIdentifierData( + id, + name, + resourceType, + systemData, + value, + kind, + serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// Available regions. /// Available App Service Environments with full descriptions of the environments. @@ -3109,22 +3260,35 @@ public static HostingEnvironmentDeploymentInfo HostingEnvironmentDeploymentInfo( return new HostingEnvironmentDeploymentInfo(name, location, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// String representation of the identity. + /// Display name for region. + /// Is region standard. + /// Dedicated host enabled. + /// Zone redundant deployment enabled. + /// Available Skus in region. + /// Available OSs in region. /// Kind of resource. - /// A new instance for mocking. - public static AppServiceIdentifierData AppServiceIdentifierData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string value = null, string kind = null) + /// A new instance for mocking. + public static AppServiceAseRegion AppServiceAseRegion(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string displayName = null, bool? isStandard = null, bool? isDedicatedHostEnabled = null, bool? isZoneRedundantEnabled = null, IEnumerable availableSku = null, IEnumerable availableOS = null, string kind = null) { - return new AppServiceIdentifierData( + availableSku ??= new List(); + availableOS ??= new List(); + + return new AppServiceAseRegion( id, name, resourceType, systemData, - value, + displayName, + isStandard, + isDedicatedHostEnabled, + isZoneRedundantEnabled, + availableSku?.ToList(), + availableOS?.ToList(), kind, serializedAdditionalRawData: null); } @@ -3408,15 +3572,21 @@ public static StaticSitesWorkflowPreview StaticSitesWorkflowPreview(ResourceIden /// The content distribution endpoint for the static site. /// Identity to use for Key Vault Reference authentication. /// User provided function apps registered with the static site. + /// Backends linked to the static side. /// The provider that submitted the last deployment to the primary environment of the static site. + /// State indicating the status of the enterprise grade CDN serving traffic to the static web app. + /// State indicating whether public traffic are allowed or not for a static web app. Allowed Values: 'Enabled', 'Disabled' or an empty string. + /// Database connections for the static site. /// Kind of resource. /// A new instance for mocking. - public static StaticSiteData StaticSiteData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, AppServiceSkuDescription sku = null, ManagedServiceIdentity identity = null, string defaultHostname = null, Uri repositoryUri = null, string branch = null, IEnumerable customDomains = null, string repositoryToken = null, StaticSiteBuildProperties buildProperties = null, IEnumerable privateEndpointConnections = null, StagingEnvironmentPolicy? stagingEnvironmentPolicy = null, bool? allowConfigFileUpdates = null, StaticSiteTemplate templateProperties = null, string contentDistributionEndpoint = null, string keyVaultReferenceIdentity = null, IEnumerable userProvidedFunctionApps = null, string provider = null, string kind = null) + public static StaticSiteData StaticSiteData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, AppServiceSkuDescription sku = null, ManagedServiceIdentity identity = null, string defaultHostname = null, Uri repositoryUri = null, string branch = null, IEnumerable customDomains = null, string repositoryToken = null, StaticSiteBuildProperties buildProperties = null, IEnumerable privateEndpointConnections = null, StagingEnvironmentPolicy? stagingEnvironmentPolicy = null, bool? allowConfigFileUpdates = null, StaticSiteTemplate templateProperties = null, string contentDistributionEndpoint = null, string keyVaultReferenceIdentity = null, IEnumerable userProvidedFunctionApps = null, IEnumerable linkedBackends = null, string provider = null, EnterpriseGradeCdnStatus? enterpriseGradeCdnStatus = null, string publicNetworkAccess = null, IEnumerable databaseConnections = null, string kind = null) { tags ??= new Dictionary(); customDomains ??= new List(); privateEndpointConnections ??= new List(); userProvidedFunctionApps ??= new List(); + linkedBackends ??= new List(); + databaseConnections ??= new List(); return new StaticSiteData( id, @@ -3440,7 +3610,11 @@ public static StaticSiteData StaticSiteData(ResourceIdentifier id = null, string contentDistributionEndpoint, keyVaultReferenceIdentity, userProvidedFunctionApps?.ToList(), + linkedBackends?.ToList(), provider, + enterpriseGradeCdnStatus, + publicNetworkAccess, + databaseConnections?.ToList(), kind, serializedAdditionalRawData: null); } @@ -3552,6 +3726,47 @@ public static StaticSiteUserProvidedFunctionAppData StaticSiteUserProvidedFuncti serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// The resource id of the backend linked to the static site. + /// The region of the backend linked to the static site. + /// The date and time on which the backend was linked to the static site. + /// The provisioning state of the linking process. + /// A new instance for mocking. + public static StaticSiteLinkedBackendInfo StaticSiteLinkedBackendInfo(string backendResourceId = null, string region = null, DateTimeOffset? createdOn = null, string provisioningState = null) + { + return new StaticSiteLinkedBackendInfo(backendResourceId, region, createdOn, provisioningState, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The resource id of the database. + /// If present, the identity is used in conjunction with connection string to connect to the database. Use of the system-assigned managed identity is indicated with the string 'SystemAssigned', while use of a user-assigned managed identity is indicated with the resource id of the managed identity resource. + /// The region of the database resource. + /// A list of configuration files associated with this database connection. + /// If present, the name of this database connection resource. + /// A new instance for mocking. + public static StaticSiteDatabaseConnectionOverview StaticSiteDatabaseConnectionOverview(ResourceIdentifier resourceId = null, string connectionIdentity = null, string region = null, IEnumerable configurationFiles = null, string name = null) + { + configurationFiles ??= new List(); + + return new StaticSiteDatabaseConnectionOverview( + resourceId, + connectionIdentity, + region, + configurationFiles?.ToList(), + name, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The name of the configuration file. + /// The Base64 encoding of the file contents. + /// The type of configuration file. + /// A new instance for mocking. + public static StaticSiteDatabaseConnectionConfigurationFileOverview StaticSiteDatabaseConnectionConfigurationFileOverview(string fileName = null, string contents = null, string staticSiteDatabaseConnectionConfigurationFileOverviewType = null) + { + return new StaticSiteDatabaseConnectionConfigurationFileOverview(fileName, contents, staticSiteDatabaseConnectionConfigurationFileOverviewType, serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The id. /// The name. @@ -3570,14 +3785,20 @@ public static StaticSiteUserProvidedFunctionAppData StaticSiteUserProvidedFuncti /// The content distribution endpoint for the static site. /// Identity to use for Key Vault Reference authentication. /// User provided function apps registered with the static site. + /// Backends linked to the static side. /// The provider that submitted the last deployment to the primary environment of the static site. + /// State indicating the status of the enterprise grade CDN serving traffic to the static web app. + /// State indicating whether public traffic are allowed or not for a static web app. Allowed Values: 'Enabled', 'Disabled' or an empty string. + /// Database connections for the static site. /// Kind of resource. /// A new instance for mocking. - public static StaticSitePatch StaticSitePatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string defaultHostname = null, Uri repositoryUri = null, string branch = null, IEnumerable customDomains = null, string repositoryToken = null, StaticSiteBuildProperties buildProperties = null, IEnumerable privateEndpointConnections = null, StagingEnvironmentPolicy? stagingEnvironmentPolicy = null, bool? allowConfigFileUpdates = null, StaticSiteTemplate templateProperties = null, string contentDistributionEndpoint = null, string keyVaultReferenceIdentity = null, IEnumerable userProvidedFunctionApps = null, string provider = null, string kind = null) + public static StaticSitePatch StaticSitePatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string defaultHostname = null, Uri repositoryUri = null, string branch = null, IEnumerable customDomains = null, string repositoryToken = null, StaticSiteBuildProperties buildProperties = null, IEnumerable privateEndpointConnections = null, StagingEnvironmentPolicy? stagingEnvironmentPolicy = null, bool? allowConfigFileUpdates = null, StaticSiteTemplate templateProperties = null, string contentDistributionEndpoint = null, string keyVaultReferenceIdentity = null, IEnumerable userProvidedFunctionApps = null, IEnumerable linkedBackends = null, string provider = null, EnterpriseGradeCdnStatus? enterpriseGradeCdnStatus = null, string publicNetworkAccess = null, IEnumerable databaseConnections = null, string kind = null) { customDomains ??= new List(); privateEndpointConnections ??= new List(); userProvidedFunctionApps ??= new List(); + linkedBackends ??= new List(); + databaseConnections ??= new List(); return new StaticSitePatch( id, @@ -3597,7 +3818,11 @@ public static StaticSitePatch StaticSitePatch(ResourceIdentifier id = null, stri contentDistributionEndpoint, keyVaultReferenceIdentity, userProvidedFunctionApps?.ToList(), + linkedBackends?.ToList(), provider, + enterpriseGradeCdnStatus, + publicNetworkAccess, + databaseConnections?.ToList(), kind, serializedAdditionalRawData: null); } @@ -3641,11 +3866,15 @@ public static StaticSiteUser StaticSiteUser(ResourceIdentifier id = null, string /// When this build was updated. /// The status of the static site build. /// User provided function apps registered with the static site build. + /// Backends linked to the static side build. + /// Database connections for the static site build. /// Kind of resource. /// A new instance for mocking. - public static StaticSiteBuildData StaticSiteBuildData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string buildId = null, string sourceBranch = null, string pullRequestTitle = null, string hostname = null, DateTimeOffset? createdOn = null, DateTimeOffset? lastUpdatedOn = null, StaticSiteBuildStatus? status = null, IEnumerable userProvidedFunctionApps = null, string kind = null) + public static StaticSiteBuildData StaticSiteBuildData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string buildId = null, string sourceBranch = null, string pullRequestTitle = null, string hostname = null, DateTimeOffset? createdOn = null, DateTimeOffset? lastUpdatedOn = null, StaticSiteBuildStatus? status = null, IEnumerable userProvidedFunctionApps = null, IEnumerable linkedBackends = null, IEnumerable databaseConnections = null, string kind = null) { userProvidedFunctionApps ??= new List(); + linkedBackends ??= new List(); + databaseConnections ??= new List(); return new StaticSiteBuildData( id, @@ -3660,6 +3889,8 @@ public static StaticSiteBuildData StaticSiteBuildData(ResourceIdentifier id = nu lastUpdatedOn, status, userProvidedFunctionApps?.ToList(), + linkedBackends?.ToList(), + databaseConnections?.ToList(), kind, serializedAdditionalRawData: null); } @@ -3686,6 +3917,36 @@ public static AppServiceConfigurationDictionary AppServiceConfigurationDictionar serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource id of the database. + /// If present, the identity is used in conjunction with connection string to connect to the database. Use of the system-assigned managed identity is indicated with the string 'SystemAssigned', while use of a user-assigned managed identity is indicated with the resource id of the managed identity resource. + /// The connection string to use to connect to the database. + /// The region of the database resource. + /// A list of configuration files associated with this database connection. + /// Kind of resource. + /// A new instance for mocking. + public static StaticSiteDatabaseConnectionData StaticSiteDatabaseConnectionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ResourceIdentifier resourceId = null, string connectionIdentity = null, string connectionString = null, string region = null, IEnumerable configurationFiles = null, string kind = null) + { + configurationFiles ??= new List(); + + return new StaticSiteDatabaseConnectionData( + id, + name, + resourceType, + systemData, + resourceId, + connectionIdentity, + connectionString, + region, + configurationFiles?.ToList(), + kind, + serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The id. /// The name. @@ -3736,6 +3997,36 @@ public static StaticSiteZipDeployment StaticSiteZipDeployment(ResourceIdentifier serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The password for basic auth. + /// Url to the secret in Key Vault. + /// State indicating if basic auth is enabled and for what environments it is active. + /// The list of enabled environments for Basic Auth if ApplicableEnvironmentsMode is set to SpecifiedEnvironments. + /// State indicating if basic auth has a secret and what type it is. + /// Kind of resource. + /// A new instance for mocking. + public static StaticSiteBasicAuthPropertyData StaticSiteBasicAuthPropertyData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string password = null, Uri secretUri = null, string applicableEnvironmentsMode = null, IEnumerable environments = null, string secretState = null, string kind = null) + { + environments ??= new List(); + + return new StaticSiteBasicAuthPropertyData( + id, + name, + resourceType, + systemData, + password, + secretUri, + applicableEnvironmentsMode, + environments?.ToList(), + secretState, + kind, + serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The id. /// The name. @@ -3878,6 +4169,32 @@ public static StaticSiteResetContent StaticSiteResetContent(ResourceIdentifier i serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource id of the backend linked to the static site. + /// The region of the backend linked to the static site. + /// The date and time on which the backend was linked to the static site. + /// The provisioning state of the linking process. + /// Kind of resource. + /// A new instance for mocking. + public static StaticSiteLinkedBackendData StaticSiteLinkedBackendData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ResourceIdentifier backendResourceId = null, string region = null, DateTimeOffset? createdOn = null, string provisioningState = null, string kind = null) + { + return new StaticSiteLinkedBackendData( + id, + name, + resourceType, + systemData, + backendResourceId, + region, + createdOn, + provisioningState, + kind, + serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The id. /// The name. @@ -3900,6 +4217,7 @@ public static StaticSiteResetContent StaticSiteResetContent(ResourceIdentifier i /// Obsolete: Hyper-V sandbox. /// Hyper-V sandbox. /// Last time the app was modified, in UTC. Read-only. + /// Property to configure various DNS related settings for a site. /// Configuration of the app. /// Azure Traffic Manager hostnames associated with the app. Read-only. /// <code>true</code> to stop SCM (KUDU) site when the app is stopped; otherwise, <code>false</code>. The default is <code>false</code>. @@ -3947,7 +4265,7 @@ public static StaticSiteResetContent StaticSiteResetContent(ResourceIdentifier i /// /// Kind of resource. /// A new instance for mocking. - public static SitePatchInfo SitePatchInfo(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ManagedServiceIdentity identity = null, string state = null, IEnumerable hostNames = null, string repositorySiteName = null, AppServiceUsageState? usageState = null, bool? isEnabled = null, IEnumerable enabledHostNames = null, WebSiteAvailabilityState? availabilityState = null, IEnumerable hostNameSslStates = null, ResourceIdentifier serverFarmId = null, bool? isReserved = null, bool? isXenon = null, bool? isHyperV = null, DateTimeOffset? lastModifiedOn = null, SiteConfigProperties siteConfig = null, IEnumerable trafficManagerHostNames = null, bool? isScmSiteAlsoStopped = null, string targetSwapSlot = null, HostingEnvironmentProfile hostingEnvironmentProfile = null, bool? isClientAffinityEnabled = null, bool? isClientCertEnabled = null, ClientCertMode? clientCertMode = null, string clientCertExclusionPaths = null, bool? isHostNameDisabled = null, string customDomainVerificationId = null, string outboundIPAddresses = null, string possibleOutboundIPAddresses = null, int? containerSize = null, int? dailyMemoryTimeQuota = null, DateTimeOffset? suspendOn = null, int? maxNumberOfWorkers = null, CloningInfo cloningInfo = null, string resourceGroup = null, bool? isDefaultContainer = null, string defaultHostName = null, SlotSwapStatus slotSwapStatus = null, bool? isHttpsOnly = null, RedundancyMode? redundancyMode = null, Guid? inProgressOperationId = null, bool? isStorageAccountRequired = null, string keyVaultReferenceIdentity = null, ResourceIdentifier virtualNetworkSubnetId = null, string kind = null) + public static SitePatchInfo SitePatchInfo(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ManagedServiceIdentity identity = null, string state = null, IEnumerable hostNames = null, string repositorySiteName = null, AppServiceUsageState? usageState = null, bool? isEnabled = null, IEnumerable enabledHostNames = null, WebSiteAvailabilityState? availabilityState = null, IEnumerable hostNameSslStates = null, ResourceIdentifier serverFarmId = null, bool? isReserved = null, bool? isXenon = null, bool? isHyperV = null, DateTimeOffset? lastModifiedOn = null, SiteDnsConfig dnsConfiguration = null, SiteConfigProperties siteConfig = null, IEnumerable trafficManagerHostNames = null, bool? isScmSiteAlsoStopped = null, string targetSwapSlot = null, HostingEnvironmentProfile hostingEnvironmentProfile = null, bool? isClientAffinityEnabled = null, bool? isClientCertEnabled = null, ClientCertMode? clientCertMode = null, string clientCertExclusionPaths = null, bool? isHostNameDisabled = null, string customDomainVerificationId = null, string outboundIPAddresses = null, string possibleOutboundIPAddresses = null, int? containerSize = null, int? dailyMemoryTimeQuota = null, DateTimeOffset? suspendOn = null, int? maxNumberOfWorkers = null, CloningInfo cloningInfo = null, string resourceGroup = null, bool? isDefaultContainer = null, string defaultHostName = null, SlotSwapStatus slotSwapStatus = null, bool? isHttpsOnly = null, RedundancyMode? redundancyMode = null, Guid? inProgressOperationId = null, bool? isStorageAccountRequired = null, string keyVaultReferenceIdentity = null, ResourceIdentifier virtualNetworkSubnetId = null, string kind = null) { hostNames ??= new List(); enabledHostNames ??= new List(); @@ -3973,6 +4291,7 @@ public static SitePatchInfo SitePatchInfo(ResourceIdentifier id = null, string n isXenon, isHyperV, lastModifiedOn, + dnsConfiguration, siteConfig, trafficManagerHostNames?.ToList(), isScmSiteAlsoStopped, @@ -4239,6 +4558,7 @@ public static CsmPublishingCredentialsPoliciesEntityData CsmPublishingCredential /// <code>true</code> if detailed error logging is enabled; otherwise, <code>false</code>. /// Publishing user name. /// Application settings. + /// Application metadata. This property cannot be retrieved, since it may contain secrets. /// Connection strings. /// Site MachineKey. /// Handler mappings. @@ -4272,10 +4592,13 @@ public static CsmPublishingCredentialsPoliciesEntityData CsmPublishingCredential /// Explicit Managed Service Identity Id. /// Identity to use for Key Vault Reference authentication. /// IP security restrictions for main. + /// Default action for main access restriction if no rules are matched. /// IP security restrictions for scm. + /// Default action for scm access restriction if no rules are matched. /// IP security restrictions for scm to use main. /// Http20Enabled: configures a web site to allow clients to connect over http2.0. /// MinTlsVersion: configures the minimum version of TLS required for SSL requests. + /// The minimum strength TLS cipher suite allowed for an application. /// ScmMinTlsVersion: configures the minimum version of TLS required for SSL requests for SCM site. /// State of FTP / FTPS service. /// @@ -4286,6 +4609,10 @@ public static CsmPublishingCredentialsPoliciesEntityData CsmPublishingCredential /// Maximum number of workers that a site can scale out to. /// This setting only applies to the Consumption and Elastic Premium Plans /// + /// + /// Maximum number of workers that a site can scale out to. + /// This setting only applies to apps in plans where ElasticScaleEnabled is <code>true</code> + /// /// Health check path. /// /// Gets or sets a value indicating whether functions runtime scale monitoring is enabled. When enabled, @@ -4301,10 +4628,11 @@ public static CsmPublishingCredentialsPoliciesEntityData CsmPublishingCredential /// Property to allow or block all public traffic. /// Kind of resource. /// A new instance for mocking. - public static SiteConfigData SiteConfigData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, int? numberOfWorkers = null, IEnumerable defaultDocuments = null, string netFrameworkVersion = null, string phpVersion = null, string pythonVersion = null, string nodeVersion = null, string powerShellVersion = null, string linuxFxVersion = null, string windowsFxVersion = null, bool? isRequestTracingEnabled = null, DateTimeOffset? requestTracingExpirationOn = null, bool? isRemoteDebuggingEnabled = null, string remoteDebuggingVersion = null, bool? isHttpLoggingEnabled = null, bool? useManagedIdentityCreds = null, string acrUserManagedIdentityId = null, int? logsDirectorySizeLimit = null, bool? isDetailedErrorLoggingEnabled = null, string publishingUsername = null, IEnumerable appSettings = null, IEnumerable connectionStrings = null, SiteMachineKey machineKey = null, IEnumerable handlerMappings = null, string documentRoot = null, ScmType? scmType = null, bool? use32BitWorkerProcess = null, bool? isWebSocketsEnabled = null, bool? isAlwaysOn = null, string javaVersion = null, string javaContainer = null, string javaContainerVersion = null, string appCommandLine = null, ManagedPipelineMode? managedPipelineMode = null, IEnumerable virtualApplications = null, SiteLoadBalancing? loadBalancing = null, IEnumerable experimentsRampUpRules = null, SiteLimits limits = null, bool? isAutoHealEnabled = null, AutoHealRules autoHealRules = null, string tracingOptions = null, string vnetName = null, bool? isVnetRouteAllEnabled = null, int? vnetPrivatePortsCount = null, AppServiceCorsSettings cors = null, WebAppPushSettings push = null, Uri apiDefinitionUri = null, string apiManagementConfigId = null, string autoSwapSlotName = null, bool? isLocalMySqlEnabled = null, int? managedServiceIdentityId = null, int? xManagedServiceIdentityId = null, string keyVaultReferenceIdentity = null, IEnumerable ipSecurityRestrictions = null, IEnumerable scmIPSecurityRestrictions = null, bool? allowIPSecurityRestrictionsForScmToUseMain = null, bool? isHttp20Enabled = null, AppServiceSupportedTlsVersion? minTlsVersion = null, AppServiceSupportedTlsVersion? scmMinTlsVersion = null, AppServiceFtpsState? ftpsState = null, int? preWarmedInstanceCount = null, int? functionAppScaleLimit = null, string healthCheckPath = null, bool? isFunctionsRuntimeScaleMonitoringEnabled = null, string websiteTimeZone = null, int? minimumElasticInstanceCount = null, IDictionary azureStorageAccounts = null, string publicNetworkAccess = null, string kind = null) + public static SiteConfigData SiteConfigData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, int? numberOfWorkers = null, IEnumerable defaultDocuments = null, string netFrameworkVersion = null, string phpVersion = null, string pythonVersion = null, string nodeVersion = null, string powerShellVersion = null, string linuxFxVersion = null, string windowsFxVersion = null, bool? isRequestTracingEnabled = null, DateTimeOffset? requestTracingExpirationOn = null, bool? isRemoteDebuggingEnabled = null, string remoteDebuggingVersion = null, bool? isHttpLoggingEnabled = null, bool? useManagedIdentityCreds = null, string acrUserManagedIdentityId = null, int? logsDirectorySizeLimit = null, bool? isDetailedErrorLoggingEnabled = null, string publishingUsername = null, IEnumerable appSettings = null, IEnumerable metadata = null, IEnumerable connectionStrings = null, SiteMachineKey machineKey = null, IEnumerable handlerMappings = null, string documentRoot = null, ScmType? scmType = null, bool? use32BitWorkerProcess = null, bool? isWebSocketsEnabled = null, bool? isAlwaysOn = null, string javaVersion = null, string javaContainer = null, string javaContainerVersion = null, string appCommandLine = null, ManagedPipelineMode? managedPipelineMode = null, IEnumerable virtualApplications = null, SiteLoadBalancing? loadBalancing = null, IEnumerable experimentsRampUpRules = null, SiteLimits limits = null, bool? isAutoHealEnabled = null, AutoHealRules autoHealRules = null, string tracingOptions = null, string vnetName = null, bool? isVnetRouteAllEnabled = null, int? vnetPrivatePortsCount = null, AppServiceCorsSettings cors = null, WebAppPushSettings push = null, Uri apiDefinitionUri = null, string apiManagementConfigId = null, string autoSwapSlotName = null, bool? isLocalMySqlEnabled = null, int? managedServiceIdentityId = null, int? xManagedServiceIdentityId = null, string keyVaultReferenceIdentity = null, IEnumerable ipSecurityRestrictions = null, SiteDefaultAction? ipSecurityRestrictionsDefaultAction = null, IEnumerable scmIPSecurityRestrictions = null, SiteDefaultAction? scmIPSecurityRestrictionsDefaultAction = null, bool? allowIPSecurityRestrictionsForScmToUseMain = null, bool? isHttp20Enabled = null, AppServiceSupportedTlsVersion? minTlsVersion = null, AppServiceTlsCipherSuite? minTlsCipherSuite = null, AppServiceSupportedTlsVersion? scmMinTlsVersion = null, AppServiceFtpsState? ftpsState = null, int? preWarmedInstanceCount = null, int? functionAppScaleLimit = null, int? elasticWebAppScaleLimit = null, string healthCheckPath = null, bool? isFunctionsRuntimeScaleMonitoringEnabled = null, string websiteTimeZone = null, int? minimumElasticInstanceCount = null, IDictionary azureStorageAccounts = null, string publicNetworkAccess = null, string kind = null) { defaultDocuments ??= new List(); appSettings ??= new List(); + metadata ??= new List(); connectionStrings ??= new List(); handlerMappings ??= new List(); virtualApplications ??= new List(); @@ -4338,6 +4666,7 @@ public static SiteConfigData SiteConfigData(ResourceIdentifier id = null, string isDetailedErrorLoggingEnabled, publishingUsername, appSettings?.ToList(), + metadata?.ToList(), connectionStrings?.ToList(), machineKey, handlerMappings?.ToList(), @@ -4371,14 +4700,18 @@ public static SiteConfigData SiteConfigData(ResourceIdentifier id = null, string xManagedServiceIdentityId, keyVaultReferenceIdentity, ipSecurityRestrictions?.ToList(), + ipSecurityRestrictionsDefaultAction, scmIPSecurityRestrictions?.ToList(), + scmIPSecurityRestrictionsDefaultAction, allowIPSecurityRestrictionsForScmToUseMain, isHttp20Enabled, minTlsVersion, + minTlsCipherSuite, scmMinTlsVersion, ftpsState, preWarmedInstanceCount, functionAppScaleLimit, + elasticWebAppScaleLimit, healthCheckPath, isFunctionsRuntimeScaleMonitoringEnabled, websiteTimeZone, @@ -4443,7 +4776,7 @@ public static SiteConfigData SiteConfigData(ResourceIdentifier id = null, string /// /// Gets a value indicating whether the issuer should be a valid HTTPS url and be validated as such. /// - /// Allowed audience values to consider when validating JWTs issued by + /// Allowed audience values to consider when validating JSON Web Tokens issued by /// Azure Active Directory. Note that the <code>ClientID</code> value is always considered an /// allowed audience, regardless of this setting. /// @@ -4831,6 +5164,41 @@ public static ContinuousWebJobData ContinuousWebJobData(ResourceIdentifier id = serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Deployment operation id. + /// Deployment build status. + /// Number of site instances currently being provisioned. + /// Number of site instances provisioned successfully. + /// Number of site instances failed to provision. + /// List of URLs pointing to logs for instances which failed to provision. + /// List of errors. + /// Kind of resource. + /// A new instance for mocking. + public static CsmDeploymentStatus CsmDeploymentStatus(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string deploymentId = null, DeploymentBuildStatus? status = null, int? numberOfInstancesInProgress = null, int? numberOfInstancesSuccessful = null, int? numberOfInstancesFailed = null, IEnumerable failedInstancesLogs = null, IEnumerable errors = null, string kind = null) + { + failedInstancesLogs ??= new List(); + errors ??= new List(); + + return new CsmDeploymentStatus( + id, + name, + resourceType, + systemData, + deploymentId, + status, + numberOfInstancesInProgress, + numberOfInstancesSuccessful, + numberOfInstancesFailed, + failedInstancesLogs?.ToList(), + errors?.ToList(), + kind, + serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The id. /// The name. @@ -5737,20 +6105,65 @@ public static SnapshotRestoreRequest SnapshotRestoreRequest(ResourceIdentifier i serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// Site extension ID. - /// - /// Site extension type. - /// Summary description. - /// Detailed description. - /// Version information. - /// Extension URL. - /// Project URL. - /// Icon URL. + /// Image Name. + /// Target Port. + /// <code>true</code> if the container is the main site container; <code>false</code> otherwise. + /// StartUp Command. + /// Auth Type. + /// User Name. + /// Password Secret. + /// UserManagedIdentity ClientId. + /// Created Time. + /// Last Modified Time. + /// List of volume mounts. + /// List of environment variables. + /// Kind of resource. + /// A new instance for mocking. + public static SiteContainerData SiteContainerData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string image = null, string targetPort = null, bool? isMain = null, string startUpCommand = null, SiteContainerAuthType? authType = null, string userName = null, string passwordSecret = null, string userManagedIdentityClientId = null, DateTimeOffset? createdOn = null, DateTimeOffset? lastModifiedOn = null, IEnumerable volumeMounts = null, IEnumerable environmentVariables = null, string kind = null) + { + volumeMounts ??= new List(); + environmentVariables ??= new List(); + + return new SiteContainerData( + id, + name, + resourceType, + systemData, + image, + targetPort, + isMain, + startUpCommand, + authType, + userName, + passwordSecret, + userManagedIdentityClientId, + createdOn, + lastModifiedOn, + volumeMounts?.ToList(), + environmentVariables?.ToList(), + kind, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Site extension ID. + /// + /// Site extension type. + /// Summary description. + /// Detailed description. + /// Version information. + /// Extension URL. + /// Project URL. + /// Icon URL. /// License URL. /// Feed URL. /// List of authors. @@ -5875,10 +6288,12 @@ public static SiteSourceControlData SiteSourceControlData(ResourceIdentifier id /// Job type. /// Error information. /// Using SDK?. + /// Property to allow or block all public traffic. Allowed Values: 'Enabled', 'Disabled' or an empty string. + /// Checks if Customer provided storage account is required. /// Job settings. /// Kind of resource. /// A new instance for mocking. - public static TriggeredWebJobData TriggeredWebJobData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, TriggeredJobRun latestRun = null, Uri historyUri = null, Uri schedulerLogsUri = null, string runCommand = null, Uri uri = null, Uri extraInfoUri = null, WebJobType? webJobType = null, string error = null, bool? isUsingSdk = null, IDictionary settings = null, string kind = null) + public static TriggeredWebJobData TriggeredWebJobData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, TriggeredJobRun latestRun = null, Uri historyUri = null, Uri schedulerLogsUri = null, string runCommand = null, Uri uri = null, Uri extraInfoUri = null, WebJobType? webJobType = null, string error = null, bool? isUsingSdk = null, string publicNetworkAccess = null, bool? isStorageAccountRequired = null, IDictionary settings = null, string kind = null) { settings ??= new Dictionary(); @@ -5896,6 +6311,8 @@ public static TriggeredWebJobData TriggeredWebJobData(ResourceIdentifier id = nu webJobType, error, isUsingSdk, + publicNetworkAccess, + isStorageAccountRequired, settings, kind, serializedAdditionalRawData: null); @@ -5956,5 +6373,657 @@ public static WebJobData WebJobData(ResourceIdentifier id = null, string name = kind, serializedAdditionalRawData: null); } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource kind. + /// The resource location. + /// Additional workflow properties. + /// A new instance for mocking. + public static WorkflowEnvelopeData WorkflowEnvelopeData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string kind = null, AzureLocation? location = null, WorkflowEnvelopeProperties properties = null) + { + return new WorkflowEnvelopeData( + id, + name, + resourceType, + systemData, + kind, + location, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Gets or sets the files. + /// Gets or sets the state of the workflow. + /// Gets or sets workflow health. + /// A new instance for mocking. + public static WorkflowEnvelopeProperties WorkflowEnvelopeProperties(IReadOnlyDictionary files = null, WorkflowState? flowState = null, WorkflowHealth health = null) + { + files ??= new Dictionary(); + + return new WorkflowEnvelopeProperties(files, flowState, health, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Gets or sets the workflow health state. + /// Gets or sets the workflow error. + /// A new instance for mocking. + public static WorkflowHealth WorkflowHealth(WorkflowHealthState state = default, ResponseError error = null) + { + return new WorkflowHealth(state, error, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Gets the wait end time. + /// Gets the start time. + /// Gets the end time. + /// Gets the status. + /// Gets the code. + /// Gets the error. + /// Gets the correlation id. + /// The run correlation. + /// Gets the reference to workflow version. + /// Gets the fired trigger. + /// Gets the outputs. + /// Gets the response of the flow run. + /// A new instance for mocking. + public static WorkflowRunData WorkflowRunData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DateTimeOffset? waitEndOn = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, WorkflowStatus? status = null, string code = null, BinaryData error = null, string correlationId = null, string correlationClientTrackingId = null, WorkflowResourceReference workflow = null, WorkflowRunTrigger trigger = null, IReadOnlyDictionary outputs = null, WorkflowRunTrigger response = null) + { + outputs ??= new Dictionary(); + + return new WorkflowRunData( + id, + name, + resourceType, + systemData, + waitEndOn, + startOn, + endOn, + status, + code, + error, + correlationId, + correlationClientTrackingId != null ? new Correlation(correlationClientTrackingId, serializedAdditionalRawData: null) : null, + workflow, + trigger, + outputs, + response, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The resource id. + /// Gets the resource name. + /// Gets the resource type. + /// A new instance for mocking. + public static WorkflowResourceReference WorkflowResourceReference(ResourceIdentifier id = null, string name = null, ResourceType? resourceType = null) + { + return new WorkflowResourceReference(id, name, resourceType, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Gets the name. + /// Gets the inputs. + /// Gets the link to inputs. + /// Gets the outputs. + /// Gets the link to outputs. + /// Gets the scheduled time. + /// Gets the start time. + /// Gets the end time. + /// Gets the tracking id. + /// The run correlation. + /// Gets the code. + /// Gets the status. + /// Gets the error. + /// Gets the tracked properties. + /// A new instance for mocking. + public static WorkflowRunTrigger WorkflowRunTrigger(string name = null, BinaryData inputs = null, WebAppContentLink inputsLink = null, BinaryData outputs = null, WebAppContentLink outputsLink = null, DateTimeOffset? scheduledOn = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, string trackingId = null, string correlationClientTrackingId = null, string code = null, WorkflowStatus? status = null, BinaryData error = null, BinaryData trackedProperties = null) + { + return new WorkflowRunTrigger( + name, + inputs, + inputsLink, + outputs, + outputsLink, + scheduledOn, + startOn, + endOn, + trackingId, + correlationClientTrackingId != null ? new Correlation(correlationClientTrackingId, serializedAdditionalRawData: null) : null, + code, + status, + error, + trackedProperties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The content link URI. + /// The content version. + /// The content size. + /// The content hash. + /// The metadata. + /// A new instance for mocking. + public static WebAppContentLink WebAppContentLink(Uri uri = null, string contentVersion = null, long? contentSize = null, WebAppContentHash contentHash = null, BinaryData metadata = null) + { + return new WebAppContentLink( + uri, + contentVersion, + contentSize, + contentHash, + metadata, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The algorithm of the content hash. + /// The value of the content hash. + /// A new instance for mocking. + public static WebAppContentHash WebAppContentHash(string algorithm = null, string value = null) + { + return new WebAppContentHash(algorithm, value, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The type. + /// The value. + /// The metadata. + /// The description. + /// Gets the error. + /// A new instance for mocking. + public static WorkflowOutputContent WorkflowOutputContent(WebAppParameterType? webAppParameterType = null, BinaryData value = null, BinaryData metadata = null, string description = null, BinaryData error = null) + { + return new WorkflowOutputContent( + webAppParameterType, + value, + metadata, + description, + serializedAdditionalRawData: null, + error); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Gets the start time. + /// Gets the end time. + /// Gets the status. + /// Gets the code. + /// Gets the error. + /// Gets the tracking id. + /// The correlation properties. + /// Gets the link to inputs. + /// Gets the link to outputs. + /// Gets the tracked properties. + /// Gets the retry histories. + /// A new instance for mocking. + public static WorkflowRunActionData WorkflowRunActionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, WorkflowStatus? status = null, string code = null, BinaryData error = null, string trackingId = null, WebAppRunActionCorrelation correlation = null, WebAppContentLink inputsLink = null, WebAppContentLink outputsLink = null, BinaryData trackedProperties = null, IEnumerable retryHistory = null) + { + retryHistory ??= new List(); + + return new WorkflowRunActionData( + id, + name, + resourceType, + systemData, + startOn, + endOn, + status, + code, + error, + trackingId, + correlation, + inputsLink, + outputsLink, + trackedProperties, + retryHistory?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The text. + /// Anything. + /// The sub expressions. + /// The azure resource error info. + /// The path. + /// A new instance for mocking. + public static WorkflowExpressionRoot WorkflowExpressionRoot(string text = null, BinaryData value = null, IEnumerable subexpressions = null, WorkflowExpressionResourceErrorInfo error = null, string path = null) + { + subexpressions ??= new List(); + + return new WorkflowExpressionRoot( + text, + value, + subexpressions?.ToList(), + error, + serializedAdditionalRawData: null, + path); + } + + /// Initializes a new instance of . + /// The text. + /// Anything. + /// The sub expressions. + /// The azure resource error info. + /// A new instance for mocking. + public static WorkflowExpression WorkflowExpression(string text = null, BinaryData value = null, IEnumerable subexpressions = null, WorkflowExpressionResourceErrorInfo error = null) + { + subexpressions ??= new List(); + + return new WorkflowExpression(text, value, subexpressions?.ToList(), error, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The error code. + /// The error message. + /// The error details. + /// A new instance for mocking. + public static WorkflowExpressionResourceErrorInfo WorkflowExpressionResourceErrorInfo(string code = null, string message = null, IEnumerable details = null) + { + details ??= new List(); + + return new WorkflowExpressionResourceErrorInfo(code, serializedAdditionalRawData: null, message, details?.ToList()); + } + + /// Initializes a new instance of . + /// The error code. + /// A new instance for mocking. + public static WebAppErrorInfo WebAppErrorInfo(string code = null) + { + return new WebAppErrorInfo(code, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The start time of the workflow scope repetition. + /// The end time of the workflow scope repetition. + /// The correlation properties. + /// The status of the workflow scope repetition. + /// The workflow scope repetition code. + /// Anything. + /// Gets the tracking id. + /// Gets the inputs. + /// Gets the link to inputs. + /// Gets the outputs. + /// Gets the link to outputs. + /// Gets the tracked properties. + /// Gets the retry histories. + /// + /// The repetition indexes. + /// A new instance for mocking. + public static WorkflowRunActionRepetitionDefinitionData WorkflowRunActionRepetitionDefinitionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, WebAppRunActionCorrelation correlation = null, WorkflowStatus? status = null, string code = null, BinaryData error = null, string trackingId = null, BinaryData inputs = null, WebAppContentLink inputsLink = null, BinaryData outputs = null, WebAppContentLink outputsLink = null, BinaryData trackedProperties = null, IEnumerable retryHistory = null, int? iterationCount = null, IEnumerable repetitionIndexes = null) + { + tags ??= new Dictionary(); + retryHistory ??= new List(); + repetitionIndexes ??= new List(); + + return new WorkflowRunActionRepetitionDefinitionData( + id, + name, + resourceType, + systemData, + tags, + location, + startOn, + endOn, + correlation, + status, + code, + error, + trackingId, + inputs, + inputsLink, + outputs, + outputsLink, + trackedProperties, + retryHistory?.ToList(), + iterationCount, + repetitionIndexes?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The request history properties. + /// A new instance for mocking. + public static WebAppRequestHistoryData WebAppRequestHistoryData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, WebAppRequestHistoryProperties properties = null) + { + tags ??= new Dictionary(); + + return new WebAppRequestHistoryData( + id, + name, + resourceType, + systemData, + tags, + location, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Gets the provisioning state. + /// Gets the created time. + /// Gets the changed time. + /// Gets the state. + /// Gets the status. + /// Gets the last execution time. + /// Gets the next execution time. + /// Gets the workflow trigger recurrence. + /// Gets the reference to workflow. + /// A new instance for mocking. + public static WorkflowTriggerData WorkflowTriggerData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, WorkflowTriggerProvisioningState? provisioningState = null, DateTimeOffset? createdOn = null, DateTimeOffset? changedOn = null, WorkflowState? state = null, WorkflowStatus? status = null, DateTimeOffset? lastExecutionOn = null, DateTimeOffset? nextExecutionOn = null, WorkflowTriggerRecurrence recurrence = null, WorkflowResourceReference workflow = null) + { + return new WorkflowTriggerData( + id, + name, + resourceType, + systemData, + provisioningState, + createdOn, + changedOn, + state, + status, + lastExecutionOn, + nextExecutionOn, + recurrence, + workflow, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The frequency. + /// The interval. + /// The start time. + /// The end time. + /// The time zone. + /// The recurrence schedule. + /// A new instance for mocking. + public static WorkflowTriggerRecurrence WorkflowTriggerRecurrence(WorkflowRecurrenceFrequency? frequency = null, int? interval = null, string startTime = null, string endTime = null, string timeZone = null, WorkflowRecurrenceSchedule schedule = null) + { + return new WorkflowTriggerRecurrence( + frequency, + interval, + startTime, + endTime, + timeZone, + schedule, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The minutes. + /// The hours. + /// The days of the week. + /// The month days. + /// The monthly occurrences. + /// A new instance for mocking. + public static WorkflowRecurrenceSchedule WorkflowRecurrenceSchedule(IEnumerable minutes = null, IEnumerable hours = null, IEnumerable weekDays = null, IEnumerable monthDays = null, IEnumerable monthlyOccurrences = null) + { + minutes ??= new List(); + hours ??= new List(); + weekDays ??= new List(); + monthDays ??= new List(); + monthlyOccurrences ??= new List(); + + return new WorkflowRecurrenceSchedule( + minutes?.ToList(), + hours?.ToList(), + weekDays?.ToList(), + monthDays?.ToList(), + monthlyOccurrences?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The day of the week. + /// The occurrence. + /// A new instance for mocking. + public static RecurrenceScheduleOccurrence RecurrenceScheduleOccurrence(WebAppDayOfWeek? day = null, int? occurrence = null) + { + return new RecurrenceScheduleOccurrence(day, occurrence, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Gets the start time. + /// Gets the end time. + /// The scheduled time. + /// Gets the status. + /// Gets the code. + /// Gets the error. + /// Gets the tracking id. + /// The run correlation. + /// Gets the link to input parameters. + /// Gets the link to output parameters. + /// The value indicating whether trigger was fired. + /// Gets the reference to workflow run. + /// A new instance for mocking. + public static WorkflowTriggerHistoryData WorkflowTriggerHistoryData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, DateTimeOffset? scheduledOn = null, WorkflowStatus? status = null, string code = null, BinaryData error = null, string trackingId = null, string correlationClientTrackingId = null, WebAppContentLink inputsLink = null, WebAppContentLink outputsLink = null, bool? isFired = null, WorkflowResourceReference run = null) + { + return new WorkflowTriggerHistoryData( + id, + name, + resourceType, + systemData, + startOn, + endOn, + scheduledOn, + status, + code, + error, + trackingId, + correlationClientTrackingId != null ? new Correlation(correlationClientTrackingId, serializedAdditionalRawData: null) : null, + inputsLink, + outputsLink, + isFired, + run, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Gets the workflow trigger callback URL. + /// Gets the workflow trigger callback URL HTTP method. + /// Gets the workflow trigger callback URL base path. + /// Gets the workflow trigger callback URL relative path. + /// Gets the workflow trigger callback URL relative path parameters. + /// Gets the workflow trigger callback URL query parameters. + /// A new instance for mocking. + public static WorkflowTriggerCallbackUri WorkflowTriggerCallbackUri(string value = null, string method = null, string basePath = null, string relativePath = null, IEnumerable relativePathParameters = null, WorkflowTriggerListCallbackUriQueries queries = null) + { + relativePathParameters ??= new List(); + + return new WorkflowTriggerCallbackUri( + value, + method, + basePath, + relativePath, + relativePathParameters?.ToList(), + queries, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The api version. + /// The SAS permissions. + /// The SAS version. + /// The SAS signature. + /// The SAS timestamp. + /// A new instance for mocking. + public static WorkflowTriggerListCallbackUriQueries WorkflowTriggerListCallbackUriQueries(string apiVersion = null, string sasPermission = null, string sasVersion = null, string sasSignature = null, string sasTimestamp = null) + { + return new WorkflowTriggerListCallbackUriQueries( + apiVersion, + sasPermission, + sasVersion, + sasSignature, + sasTimestamp, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The JSON title. + /// The JSON content. + /// A new instance for mocking. + public static WebAppJsonSchema WebAppJsonSchema(string title = null, string content = null) + { + return new WebAppJsonSchema(title, content, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Managed service identity. + /// Gets the provisioning state. + /// Gets the created time. + /// Gets the changed time. + /// The state. + /// Gets the version. + /// Gets the access endpoint. + /// The endpoints configuration. + /// The access control configuration. + /// The sku. + /// The integration account. + /// The integration service environment. + /// The definition. + /// The parameters. + /// The workflow kind. + /// A new instance for mocking. + public static WorkflowData WorkflowData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, WorkflowProvisioningState? provisioningState = null, DateTimeOffset? createdOn = null, DateTimeOffset? changedOn = null, WorkflowState? state = null, string version = null, string accessEndpoint = null, FlowEndpointsConfiguration endpointsConfiguration = null, FlowAccessControlConfiguration accessControl = null, WorkflowSku sku = null, WorkflowResourceReference integrationAccount = null, WorkflowResourceReference integrationServiceEnvironment = null, BinaryData definition = null, IDictionary parameters = null, AppServiceKind? kind = null) + { + tags ??= new Dictionary(); + parameters ??= new Dictionary(); + + return new WorkflowData( + id, + name, + resourceType, + systemData, + tags, + location, + identity, + provisioningState, + createdOn, + changedOn, + state, + version, + accessEndpoint, + endpointsConfiguration, + accessControl, + sku, + integrationAccount, + integrationServiceEnvironment, + definition, + parameters, + kind, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The name. + /// The reference to plan. + /// A new instance for mocking. + public static WorkflowSku WorkflowSku(WorkflowSkuName name = default, WorkflowResourceReference plan = null) + { + return new WorkflowSku(name, plan, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The provisioning state. + /// Gets the created time. + /// Gets the changed time. + /// The state. + /// Gets the version. + /// Gets the access endpoint. + /// The endpoints configuration. + /// The access control configuration. + /// The sku. + /// The integration account. + /// The definition. + /// The parameters. + /// A new instance for mocking. + public static WorkflowVersionData WorkflowVersionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, WorkflowProvisioningState? provisioningState = null, DateTimeOffset? createdOn = null, DateTimeOffset? changedOn = null, WorkflowState? state = null, string version = null, string accessEndpoint = null, FlowEndpointsConfiguration endpointsConfiguration = null, FlowAccessControlConfiguration accessControl = null, WorkflowSku sku = null, WorkflowResourceReference integrationAccount = null, BinaryData definition = null, IDictionary parameters = null) + { + tags ??= new Dictionary(); + parameters ??= new Dictionary(); + + return new WorkflowVersionData( + id, + name, + resourceType, + systemData, + tags, + location, + provisioningState, + createdOn, + changedOn, + state, + version, + accessEndpoint, + endpointsConfiguration, + accessControl, + sku, + integrationAccount, + definition, + parameters, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The state of a private link connection. + /// Kind of resource. + /// A new instance for mocking. + public static PrivateLinkConnectionApprovalRequestInfo PrivateLinkConnectionApprovalRequestInfo(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, PrivateLinkConnectionState privateLinkServiceConnectionState = null, string kind = null) + { + return new PrivateLinkConnectionApprovalRequestInfo( + id, + name, + resourceType, + systemData, + privateLinkServiceConnectionState, + kind, + serializedAdditionalRawData: null); + } } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AseV3NetworkingConfigurationData.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AseV3NetworkingConfigurationData.Serialization.cs index d60707e10d2af..8cfaf9f3c72be 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AseV3NetworkingConfigurationData.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AseV3NetworkingConfigurationData.Serialization.cs @@ -122,6 +122,21 @@ void IJsonModel.Write(Utf8JsonWriter writer, M writer.WritePropertyName("allowNewPrivateEndpointConnections"u8); writer.WriteBooleanValue(AllowNewPrivateEndpointConnections.Value); } + if (Optional.IsDefined(IsFtpEnabled)) + { + writer.WritePropertyName("ftpEnabled"u8); + writer.WriteBooleanValue(IsFtpEnabled.Value); + } + if (Optional.IsDefined(IsRemoteDebugEnabled)) + { + writer.WritePropertyName("remoteDebugEnabled"u8); + writer.WriteBooleanValue(IsRemoteDebugEnabled.Value); + } + if (Optional.IsDefined(InboundIPAddressOverride)) + { + writer.WritePropertyName("inboundIpAddressOverride"u8); + writer.WriteStringValue(InboundIPAddressOverride); + } writer.WriteEndObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -171,6 +186,9 @@ internal static AseV3NetworkingConfigurationData DeserializeAseV3NetworkingConfi IReadOnlyList externalInboundIPAddresses = default; IReadOnlyList internalInboundIPAddresses = default; bool? allowNewPrivateEndpointConnections = default; + bool? ftpEnabled = default; + bool? remoteDebugEnabled = default; + string inboundIPAddressOverride = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -306,6 +324,29 @@ internal static AseV3NetworkingConfigurationData DeserializeAseV3NetworkingConfi allowNewPrivateEndpointConnections = property0.Value.GetBoolean(); continue; } + if (property0.NameEquals("ftpEnabled"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + ftpEnabled = property0.Value.GetBoolean(); + continue; + } + if (property0.NameEquals("remoteDebugEnabled"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + remoteDebugEnabled = property0.Value.GetBoolean(); + continue; + } + if (property0.NameEquals("inboundIpAddressOverride"u8)) + { + inboundIPAddressOverride = property0.Value.GetString(); + continue; + } } continue; } @@ -325,6 +366,9 @@ internal static AseV3NetworkingConfigurationData DeserializeAseV3NetworkingConfi externalInboundIPAddresses ?? new ChangeTrackingList(), internalInboundIPAddresses ?? new ChangeTrackingList(), allowNewPrivateEndpointConnections, + ftpEnabled, + remoteDebugEnabled, + inboundIPAddressOverride, kind, serializedAdditionalRawData); } @@ -546,6 +590,61 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsFtpEnabled), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" ftpEnabled: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsFtpEnabled)) + { + builder.Append(" ftpEnabled: "); + var boolValue = IsFtpEnabled.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsRemoteDebugEnabled), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" remoteDebugEnabled: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsRemoteDebugEnabled)) + { + builder.Append(" remoteDebugEnabled: "); + var boolValue = IsRemoteDebugEnabled.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(InboundIPAddressOverride), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" inboundIpAddressOverride: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(InboundIPAddressOverride)) + { + builder.Append(" inboundIpAddressOverride: "); + if (InboundIPAddressOverride.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{InboundIPAddressOverride}'''"); + } + else + { + builder.AppendLine($"'{InboundIPAddressOverride}'"); + } + } + } + builder.AppendLine(" }"); builder.AppendLine("}"); return BinaryData.FromString(builder.ToString()); diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AseV3NetworkingConfigurationData.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AseV3NetworkingConfigurationData.cs index 71c38103010a6..bba84f58a6a20 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AseV3NetworkingConfigurationData.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AseV3NetworkingConfigurationData.cs @@ -70,15 +70,21 @@ public AseV3NetworkingConfigurationData() /// /// /// Property to enable and disable new private endpoint connection creation on ASE. + /// Property to enable and disable FTP on ASEV3. + /// Property to enable and disable Remote Debug on ASEV3. + /// Customer provided Inbound IP Address. Only able to be set on Ase create. /// Kind of resource. /// Keeps track of any properties unknown to the library. - internal AseV3NetworkingConfigurationData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IReadOnlyList windowsOutboundIPAddresses, IReadOnlyList linuxOutboundIPAddresses, IReadOnlyList externalInboundIPAddresses, IReadOnlyList internalInboundIPAddresses, bool? allowNewPrivateEndpointConnections, string kind, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal AseV3NetworkingConfigurationData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IReadOnlyList windowsOutboundIPAddresses, IReadOnlyList linuxOutboundIPAddresses, IReadOnlyList externalInboundIPAddresses, IReadOnlyList internalInboundIPAddresses, bool? allowNewPrivateEndpointConnections, bool? isFtpEnabled, bool? isRemoteDebugEnabled, string inboundIPAddressOverride, string kind, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { WindowsOutboundIPAddresses = windowsOutboundIPAddresses; LinuxOutboundIPAddresses = linuxOutboundIPAddresses; ExternalInboundIPAddresses = externalInboundIPAddresses; InternalInboundIPAddresses = internalInboundIPAddresses; AllowNewPrivateEndpointConnections = allowNewPrivateEndpointConnections; + IsFtpEnabled = isFtpEnabled; + IsRemoteDebugEnabled = isRemoteDebugEnabled; + InboundIPAddressOverride = inboundIPAddressOverride; Kind = kind; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -98,6 +104,15 @@ internal AseV3NetworkingConfigurationData(ResourceIdentifier id, string name, Re /// Property to enable and disable new private endpoint connection creation on ASE. [WirePath("properties.allowNewPrivateEndpointConnections")] public bool? AllowNewPrivateEndpointConnections { get; set; } + /// Property to enable and disable FTP on ASEV3. + [WirePath("properties.ftpEnabled")] + public bool? IsFtpEnabled { get; set; } + /// Property to enable and disable Remote Debug on ASEV3. + [WirePath("properties.remoteDebugEnabled")] + public bool? IsRemoteDebugEnabled { get; set; } + /// Customer provided Inbound IP Address. Only able to be set on Ase create. + [WirePath("properties.inboundIpAddressOverride")] + public string InboundIPAddressOverride { get; set; } /// Kind of resource. [WirePath("kind")] public string Kind { get; set; } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AseV3NetworkingConfigurationResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AseV3NetworkingConfigurationResource.cs index 15212fb9c18f7..59bb3aa2de8d8 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AseV3NetworkingConfigurationResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AseV3NetworkingConfigurationResource.cs @@ -100,7 +100,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> GetAsy /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -180,7 +180,7 @@ public virtual Response Get(CancellationTo /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -228,7 +228,7 @@ public virtual async Task> Cr /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/CertificateOrderDetectorCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/CertificateOrderDetectorCollection.cs index 72d574ee225fa..557a49bfb5f4c 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/CertificateOrderDetectorCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/CertificateOrderDetectorCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -112,7 +112,7 @@ public virtual async Task> GetAsync(s /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -160,7 +160,7 @@ public virtual Response Get(string detectorNam /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -190,7 +190,7 @@ public virtual AsyncPageable GetAllAsync(Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -220,7 +220,7 @@ public virtual Pageable GetAll(CancellationTok /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -266,7 +266,7 @@ public virtual async Task> ExistsAsync(string detectorName, DateT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Response Exists(string detectorName, DateTimeOffset? startT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -360,7 +360,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/CertificateOrderDetectorResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/CertificateOrderDetectorResource.cs index d67f546765d73..89e67212d2119 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/CertificateOrderDetectorResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/CertificateOrderDetectorResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -144,7 +144,7 @@ public virtual async Task> GetAsync(D /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/CustomDnsSuffixConfigurationData.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/CustomDnsSuffixConfigurationData.Serialization.cs new file mode 100644 index 0000000000000..43932ebb4871d --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/CustomDnsSuffixConfigurationData.Serialization.cs @@ -0,0 +1,457 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.AppService.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppService +{ + public partial class CustomDnsSuffixConfigurationData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CustomDnsSuffixConfigurationData)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Kind)) + { + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind); + } + if (options.Format != "W") + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (options.Format != "W") + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W") + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(ResourceType); + } + if (options.Format != "W" && Optional.IsDefined(SystemData)) + { + writer.WritePropertyName("systemData"u8); + JsonSerializer.Serialize(writer, SystemData); + } + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToSerialString()); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningDetails)) + { + writer.WritePropertyName("provisioningDetails"u8); + writer.WriteStringValue(ProvisioningDetails); + } + if (Optional.IsDefined(DnsSuffix)) + { + writer.WritePropertyName("dnsSuffix"u8); + writer.WriteStringValue(DnsSuffix); + } + if (Optional.IsDefined(CertificateUri)) + { + writer.WritePropertyName("certificateUrl"u8); + writer.WriteStringValue(CertificateUri.AbsoluteUri); + } + if (Optional.IsDefined(KeyVaultReferenceIdentity)) + { + writer.WritePropertyName("keyVaultReferenceIdentity"u8); + writer.WriteStringValue(KeyVaultReferenceIdentity); + } + writer.WriteEndObject(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + CustomDnsSuffixConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CustomDnsSuffixConfigurationData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCustomDnsSuffixConfigurationData(document.RootElement, options); + } + + internal static CustomDnsSuffixConfigurationData DeserializeCustomDnsSuffixConfigurationData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string kind = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + CustomDnsSuffixProvisioningState? provisioningState = default; + string provisioningDetails = default; + string dnsSuffix = default; + Uri certificateUrl = default; + string keyVaultReferenceIdentity = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("kind"u8)) + { + kind = property.Value.GetString(); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("provisioningState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = property0.Value.GetString().ToCustomDnsSuffixProvisioningState(); + continue; + } + if (property0.NameEquals("provisioningDetails"u8)) + { + provisioningDetails = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("dnsSuffix"u8)) + { + dnsSuffix = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("certificateUrl"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + certificateUrl = new Uri(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("keyVaultReferenceIdentity"u8)) + { + keyVaultReferenceIdentity = property0.Value.GetString(); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CustomDnsSuffixConfigurationData( + id, + name, + type, + systemData, + provisioningState, + provisioningDetails, + dnsSuffix, + certificateUrl, + keyVaultReferenceIdentity, + kind, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Kind), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" kind: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Kind)) + { + builder.Append(" kind: "); + if (Kind.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Kind}'''"); + } + else + { + builder.AppendLine($"'{Kind}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProvisioningState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" provisioningState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ProvisioningState)) + { + builder.Append(" provisioningState: "); + builder.AppendLine($"'{ProvisioningState.Value.ToSerialString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProvisioningDetails), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" provisioningDetails: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ProvisioningDetails)) + { + builder.Append(" provisioningDetails: "); + if (ProvisioningDetails.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ProvisioningDetails}'''"); + } + else + { + builder.AppendLine($"'{ProvisioningDetails}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DnsSuffix), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" dnsSuffix: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DnsSuffix)) + { + builder.Append(" dnsSuffix: "); + if (DnsSuffix.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{DnsSuffix}'''"); + } + else + { + builder.AppendLine($"'{DnsSuffix}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CertificateUri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" certificateUrl: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CertificateUri)) + { + builder.Append(" certificateUrl: "); + builder.AppendLine($"'{CertificateUri.AbsoluteUri}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(KeyVaultReferenceIdentity), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" keyVaultReferenceIdentity: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(KeyVaultReferenceIdentity)) + { + builder.Append(" keyVaultReferenceIdentity: "); + if (KeyVaultReferenceIdentity.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{KeyVaultReferenceIdentity}'''"); + } + else + { + builder.AppendLine($"'{KeyVaultReferenceIdentity}'"); + } + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(CustomDnsSuffixConfigurationData)} does not support writing '{options.Format}' format."); + } + } + + CustomDnsSuffixConfigurationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeCustomDnsSuffixConfigurationData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CustomDnsSuffixConfigurationData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/CustomDnsSuffixConfigurationData.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/CustomDnsSuffixConfigurationData.cs new file mode 100644 index 0000000000000..2f527bad44ca1 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/CustomDnsSuffixConfigurationData.cs @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.AppService.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A class representing the CustomDnsSuffixConfiguration data model. + /// Full view of the custom domain suffix configuration for ASEv3. + /// + public partial class CustomDnsSuffixConfigurationData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public CustomDnsSuffixConfigurationData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// + /// + /// The default custom domain suffix to use for all sites deployed on the ASE. + /// The URL referencing the Azure Key Vault certificate secret that should be used as the default SSL/TLS certificate for sites with the custom domain suffix. + /// The user-assigned identity to use for resolving the key vault certificate reference. If not specified, the system-assigned ASE identity will be used if available. + /// Kind of resource. + /// Keeps track of any properties unknown to the library. + internal CustomDnsSuffixConfigurationData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, CustomDnsSuffixProvisioningState? provisioningState, string provisioningDetails, string dnsSuffix, Uri certificateUri, string keyVaultReferenceIdentity, string kind, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + ProvisioningState = provisioningState; + ProvisioningDetails = provisioningDetails; + DnsSuffix = dnsSuffix; + CertificateUri = certificateUri; + KeyVaultReferenceIdentity = keyVaultReferenceIdentity; + Kind = kind; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets the provisioning state. + [WirePath("properties.provisioningState")] + public CustomDnsSuffixProvisioningState? ProvisioningState { get; } + /// Gets the provisioning details. + [WirePath("properties.provisioningDetails")] + public string ProvisioningDetails { get; } + /// The default custom domain suffix to use for all sites deployed on the ASE. + [WirePath("properties.dnsSuffix")] + public string DnsSuffix { get; set; } + /// The URL referencing the Azure Key Vault certificate secret that should be used as the default SSL/TLS certificate for sites with the custom domain suffix. + [WirePath("properties.certificateUrl")] + public Uri CertificateUri { get; set; } + /// The user-assigned identity to use for resolving the key vault certificate reference. If not specified, the system-assigned ASE identity will be used if available. + [WirePath("properties.keyVaultReferenceIdentity")] + public string KeyVaultReferenceIdentity { get; set; } + /// Kind of resource. + [WirePath("kind")] + public string Kind { get; set; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/CustomDnsSuffixConfigurationResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/CustomDnsSuffixConfigurationResource.Serialization.cs new file mode 100644 index 0000000000000..f0daa40f56ea7 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/CustomDnsSuffixConfigurationResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.AppService +{ + public partial class CustomDnsSuffixConfigurationResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + CustomDnsSuffixConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + CustomDnsSuffixConfigurationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/CustomDnsSuffixConfigurationResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/CustomDnsSuffixConfigurationResource.cs new file mode 100644 index 0000000000000..996a1f23234e8 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/CustomDnsSuffixConfigurationResource.cs @@ -0,0 +1,354 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A Class representing a CustomDnsSuffixConfiguration along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetCustomDnsSuffixConfigurationResource method. + /// Otherwise you can get one from its parent resource using the GetCustomDnsSuffixConfiguration method. + /// + public partial class CustomDnsSuffixConfigurationResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The name. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/customdnssuffix"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _customDnsSuffixConfigurationAppServiceEnvironmentsClientDiagnostics; + private readonly AppServiceEnvironmentsRestOperations _customDnsSuffixConfigurationAppServiceEnvironmentsRestClient; + private readonly CustomDnsSuffixConfigurationData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Web/hostingEnvironments/configurations"; + + /// Initializes a new instance of the class for mocking. + protected CustomDnsSuffixConfigurationResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal CustomDnsSuffixConfigurationResource(ArmClient client, CustomDnsSuffixConfigurationData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal CustomDnsSuffixConfigurationResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _customDnsSuffixConfigurationAppServiceEnvironmentsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppService", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string customDnsSuffixConfigurationAppServiceEnvironmentsApiVersion); + _customDnsSuffixConfigurationAppServiceEnvironmentsRestClient = new AppServiceEnvironmentsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, customDnsSuffixConfigurationAppServiceEnvironmentsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual CustomDnsSuffixConfigurationData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get Custom Dns Suffix configuration of an App Service Environment + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/customdnssuffix + /// + /// + /// Operation Id + /// AppServiceEnvironments_GetAseCustomDnsSuffixConfiguration + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _customDnsSuffixConfigurationAppServiceEnvironmentsClientDiagnostics.CreateScope("CustomDnsSuffixConfigurationResource.Get"); + scope.Start(); + try + { + var response = await _customDnsSuffixConfigurationAppServiceEnvironmentsRestClient.GetAseCustomDnsSuffixConfigurationAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new CustomDnsSuffixConfigurationResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get Custom Dns Suffix configuration of an App Service Environment + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/customdnssuffix + /// + /// + /// Operation Id + /// AppServiceEnvironments_GetAseCustomDnsSuffixConfiguration + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _customDnsSuffixConfigurationAppServiceEnvironmentsClientDiagnostics.CreateScope("CustomDnsSuffixConfigurationResource.Get"); + scope.Start(); + try + { + var response = _customDnsSuffixConfigurationAppServiceEnvironmentsRestClient.GetAseCustomDnsSuffixConfiguration(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new CustomDnsSuffixConfigurationResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete Custom Dns Suffix configuration of an App Service Environment + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/customdnssuffix + /// + /// + /// Operation Id + /// AppServiceEnvironments_DeleteAseCustomDnsSuffixConfiguration + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task> DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _customDnsSuffixConfigurationAppServiceEnvironmentsClientDiagnostics.CreateScope("CustomDnsSuffixConfigurationResource.Delete"); + scope.Start(); + try + { + var response = await _customDnsSuffixConfigurationAppServiceEnvironmentsRestClient.DeleteAseCustomDnsSuffixConfigurationAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, cancellationToken).ConfigureAwait(false); + var uri = _customDnsSuffixConfigurationAppServiceEnvironmentsRestClient.CreateDeleteAseCustomDnsSuffixConfigurationRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppServiceArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete Custom Dns Suffix configuration of an App Service Environment + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/customdnssuffix + /// + /// + /// Operation Id + /// AppServiceEnvironments_DeleteAseCustomDnsSuffixConfiguration + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _customDnsSuffixConfigurationAppServiceEnvironmentsClientDiagnostics.CreateScope("CustomDnsSuffixConfigurationResource.Delete"); + scope.Start(); + try + { + var response = _customDnsSuffixConfigurationAppServiceEnvironmentsRestClient.DeleteAseCustomDnsSuffixConfiguration(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, cancellationToken); + var uri = _customDnsSuffixConfigurationAppServiceEnvironmentsRestClient.CreateDeleteAseCustomDnsSuffixConfigurationRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppServiceArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update Custom Dns Suffix configuration of an App Service Environment + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/customdnssuffix + /// + /// + /// Operation Id + /// AppServiceEnvironments_UpdateAseCustomDnsSuffixConfiguration + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The to use. + /// The cancellation token to use. + /// is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, CustomDnsSuffixConfigurationData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _customDnsSuffixConfigurationAppServiceEnvironmentsClientDiagnostics.CreateScope("CustomDnsSuffixConfigurationResource.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _customDnsSuffixConfigurationAppServiceEnvironmentsRestClient.UpdateAseCustomDnsSuffixConfigurationAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, data, cancellationToken).ConfigureAwait(false); + var uri = _customDnsSuffixConfigurationAppServiceEnvironmentsRestClient.CreateUpdateAseCustomDnsSuffixConfigurationRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppServiceArmOperation(Response.FromValue(new CustomDnsSuffixConfigurationResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update Custom Dns Suffix configuration of an App Service Environment + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/customdnssuffix + /// + /// + /// Operation Id + /// AppServiceEnvironments_UpdateAseCustomDnsSuffixConfiguration + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The to use. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, CustomDnsSuffixConfigurationData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _customDnsSuffixConfigurationAppServiceEnvironmentsClientDiagnostics.CreateScope("CustomDnsSuffixConfigurationResource.CreateOrUpdate"); + scope.Start(); + try + { + var response = _customDnsSuffixConfigurationAppServiceEnvironmentsRestClient.UpdateAseCustomDnsSuffixConfiguration(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, data, cancellationToken); + var uri = _customDnsSuffixConfigurationAppServiceEnvironmentsRestClient.CreateUpdateAseCustomDnsSuffixConfigurationRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppServiceArmOperation(Response.FromValue(new CustomDnsSuffixConfigurationResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/DeletedSiteCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/DeletedSiteCollection.cs index 43fd23dd40785..3575a85a3cf4c 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/DeletedSiteCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/DeletedSiteCollection.cs @@ -70,7 +70,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> GetAsync(string deleted /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -160,7 +160,7 @@ public virtual Response Get(string deletedSiteId, Cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -190,7 +190,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -220,7 +220,7 @@ public virtual Pageable GetAll(CancellationToken cancellati /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -263,7 +263,7 @@ public virtual async Task> ExistsAsync(string deletedSiteId, Canc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -306,7 +306,7 @@ public virtual Response Exists(string deletedSiteId, CancellationToken can /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -351,7 +351,7 @@ public virtual async Task> GetIfExistsAsyn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/DeletedSiteResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/DeletedSiteResource.cs index 4ba063204d3a3..6e7842988243d 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/DeletedSiteResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/DeletedSiteResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(CancellationTo /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken cancellationT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual AsyncPageable GetDeletedWebAppSnapshotsAsync(Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/DomainOwnershipIdentifierCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/DomainOwnershipIdentifierCollection.cs index 02162eb430401..6054e6941160a 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/DomainOwnershipIdentifierCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/DomainOwnershipIdentifierCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> Creat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate(Wa /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string name, Canc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -286,7 +286,7 @@ public virtual AsyncPageable GetAllAsync(Canc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -316,7 +316,7 @@ public virtual Pageable GetAll(CancellationTo /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string name, CancellationT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -402,7 +402,7 @@ public virtual Response Exists(string name, CancellationToken cancellation /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -447,7 +447,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/DomainOwnershipIdentifierResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/DomainOwnershipIdentifierResource.cs index a41cc1fbdebc8..be9edaf57b357 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/DomainOwnershipIdentifierResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/DomainOwnershipIdentifierResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -269,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> UpdateAsy /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Extensions/AppServiceExtensions.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Extensions/AppServiceExtensions.cs index 6709a0ca395b4..2b5cf35517da2 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Extensions/AppServiceExtensions.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Extensions/AppServiceExtensions.cs @@ -228,6 +228,25 @@ public static AppServiceEnvironmentResource GetAppServiceEnvironmentResource(thi return GetMockableAppServiceArmClient(client).GetAppServiceEnvironmentResource(id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static CustomDnsSuffixConfigurationResource GetCustomDnsSuffixConfigurationResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableAppServiceArmClient(client).GetCustomDnsSuffixConfigurationResource(id); + } + /// /// Gets an object representing an along with the instance operations that can be performed on it but with no data. /// You can use to create an from its components. @@ -893,6 +912,44 @@ public static StaticSiteBuildResource GetStaticSiteBuildResource(this ArmClient return GetMockableAppServiceArmClient(client).GetStaticSiteBuildResource(id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static StaticSiteBuildDatabaseConnectionResource GetStaticSiteBuildDatabaseConnectionResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableAppServiceArmClient(client).GetStaticSiteBuildDatabaseConnectionResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static StaticSiteDatabaseConnectionResource GetStaticSiteDatabaseConnectionResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableAppServiceArmClient(client).GetStaticSiteDatabaseConnectionResource(id); + } + /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -931,6 +988,25 @@ public static StaticSiteUserProvidedFunctionAppResource GetStaticSiteUserProvide return GetMockableAppServiceArmClient(client).GetStaticSiteUserProvidedFunctionAppResource(id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static StaticSiteBasicAuthPropertyResource GetStaticSiteBasicAuthPropertyResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableAppServiceArmClient(client).GetStaticSiteBasicAuthPropertyResource(id); + } + /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -950,6 +1026,44 @@ public static StaticSiteCustomDomainOverviewResource GetStaticSiteCustomDomainOv return GetMockableAppServiceArmClient(client).GetStaticSiteCustomDomainOverviewResource(id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static StaticSiteLinkedBackendResource GetStaticSiteLinkedBackendResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableAppServiceArmClient(client).GetStaticSiteLinkedBackendResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static StaticSiteBuildLinkedBackendResource GetStaticSiteBuildLinkedBackendResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableAppServiceArmClient(client).GetStaticSiteBuildLinkedBackendResource(id); + } + /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -1957,6 +2071,44 @@ public static WebSiteSlotPublicCertificateResource GetWebSiteSlotPublicCertifica return GetMockableAppServiceArmClient(client).GetWebSiteSlotPublicCertificateResource(id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static SiteContainerResource GetSiteContainerResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableAppServiceArmClient(client).GetSiteContainerResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static SiteSlotSiteContainerResource GetSiteSlotSiteContainerResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableAppServiceArmClient(client).GetSiteSlotSiteContainerResource(id); + } + /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -2109,6 +2261,196 @@ public static WebSiteWebJobResource GetWebSiteWebJobResource(this ArmClient clie return GetMockableAppServiceArmClient(client).GetWebSiteWebJobResource(id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static SiteSlotWorkflowResource GetSiteSlotWorkflowResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableAppServiceArmClient(client).GetSiteSlotWorkflowResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static SiteWorkflowResource GetSiteWorkflowResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableAppServiceArmClient(client).GetSiteWorkflowResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static WorkflowRunResource GetWorkflowRunResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableAppServiceArmClient(client).GetWorkflowRunResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static WorkflowRunActionResource GetWorkflowRunActionResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableAppServiceArmClient(client).GetWorkflowRunActionResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static WorkflowRunActionRepetitionResource GetWorkflowRunActionRepetitionResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableAppServiceArmClient(client).GetWorkflowRunActionRepetitionResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static WorkflowRunActionScopeRepetitionResource GetWorkflowRunActionScopeRepetitionResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableAppServiceArmClient(client).GetWorkflowRunActionScopeRepetitionResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static WebAppRequestHistoryResource GetWebAppRequestHistoryResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableAppServiceArmClient(client).GetWebAppRequestHistoryResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static WorkflowTriggerResource GetWorkflowTriggerResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableAppServiceArmClient(client).GetWorkflowTriggerResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static WorkflowTriggerHistoryResource GetWorkflowTriggerHistoryResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableAppServiceArmClient(client).GetWorkflowTriggerHistoryResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static WorkflowVersionResource GetWorkflowVersionResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableAppServiceArmClient(client).GetWorkflowVersionResource(id); + } + /// /// Gets a collection of AppServiceCertificateOrderResources in the ResourceGroupResource. /// @@ -2139,7 +2481,7 @@ public static AppServiceCertificateOrderCollection GetAppServiceCertificateOrder /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2177,7 +2519,7 @@ public static async Task> GetAppSer /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2232,7 +2574,7 @@ public static AppServiceDomainCollection GetAppServiceDomains(this ResourceGroup /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2270,7 +2612,7 @@ public static async Task> GetAppServiceDomain /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2325,7 +2667,7 @@ public static AppServiceEnvironmentCollection GetAppServiceEnvironments(this Res /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2363,7 +2705,7 @@ public static async Task> GetAppServiceE /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2418,7 +2760,7 @@ public static AppServicePlanCollection GetAppServicePlans(this ResourceGroupReso /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2456,7 +2798,7 @@ public static async Task> GetAppServicePlanAsyn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2511,7 +2853,7 @@ public static AppCertificateCollection GetAppCertificates(this ResourceGroupReso /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2549,7 +2891,7 @@ public static async Task> GetAppCertificateAsyn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2604,7 +2946,7 @@ public static KubeEnvironmentCollection GetKubeEnvironments(this ResourceGroupRe /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2642,7 +2984,7 @@ public static async Task> GetKubeEnvironmentAs /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2697,7 +3039,7 @@ public static StaticSiteCollection GetStaticSites(this ResourceGroupResource res /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2735,7 +3077,7 @@ public static async Task> GetStaticSiteAsync(this R /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2790,7 +3132,7 @@ public static WebSiteCollection GetWebSites(this ResourceGroupResource resourceG /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2828,7 +3170,7 @@ public static async Task> GetWebSiteAsync(this Resourc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2866,7 +3208,7 @@ public static Response GetWebSite(this ResourceGroupResource re /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -2898,7 +3240,7 @@ public static async Task> ValidateAsync(this /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -2947,7 +3289,7 @@ public static TopLevelDomainCollection GetTopLevelDomains(this SubscriptionResou /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2985,7 +3327,7 @@ public static async Task> GetTopLevelDomainAsyn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3040,7 +3382,7 @@ public static DeletedSiteCollection GetDeletedSites(this SubscriptionResource su /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3078,7 +3420,7 @@ public static async Task> GetDeletedSiteAsync(this /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3116,7 +3458,7 @@ public static Response GetDeletedSite(this SubscriptionReso /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3152,7 +3494,7 @@ public static AsyncPageable GetAppServiceCer /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3188,7 +3530,7 @@ public static Pageable GetAppServiceCertific /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -3220,7 +3562,7 @@ public static async Task ValidateAppServiceCertificateOrderPurchaseInf /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -3252,7 +3594,7 @@ public static Response ValidateAppServiceCertificateOrderPurchaseInformation(thi /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -3284,7 +3626,7 @@ public static async Task> CheckAppServic /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -3316,7 +3658,7 @@ public static Response CheckAppServiceDomainRegis /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3352,7 +3694,7 @@ public static AsyncPageable GetAppServiceDomainsAsync( /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3388,7 +3730,7 @@ public static Pageable GetAppServiceDomains(this Subsc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -3419,7 +3761,7 @@ public static async Task> GetControl /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -3450,7 +3792,7 @@ public static Response GetControlCenterSsoReq /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -3483,7 +3825,7 @@ public static AsyncPageable GetAppServiceDomainR /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -3516,7 +3858,7 @@ public static Pageable GetAppServiceDomainRecomm /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3552,7 +3894,7 @@ public static AsyncPageable GetAppServiceEnvironm /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3588,7 +3930,7 @@ public static Pageable GetAppServiceEnvironments( /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3628,7 +3970,7 @@ public static AsyncPageable GetAppServicePlansAsync(this /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3668,7 +4010,7 @@ public static Pageable GetAppServicePlans(this Subscript /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3705,7 +4047,7 @@ public static AsyncPageable GetAppCertificatesAsync(this /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3742,7 +4084,7 @@ public static Pageable GetAppCertificates(this Subscript /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3779,7 +4121,7 @@ public static AsyncPageable GetDeletedSitesByLocationAsync( /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3816,7 +4158,7 @@ public static Pageable GetDeletedSitesByLocation(this Subsc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3854,7 +4196,7 @@ public static async Task> GetDeletedWebAppByLocati /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3892,7 +4234,7 @@ public static Response GetDeletedWebAppByLocationDeletedWeb /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3928,7 +4270,7 @@ public static AsyncPageable GetKubeEnvironmentsAsync(th /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3964,7 +4306,7 @@ public static Pageable GetKubeEnvironments(this Subscri /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -3997,7 +4339,7 @@ public static AsyncPageable GetAvailableStacksOnPremPr /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4030,7 +4372,7 @@ public static Pageable GetAvailableStacksOnPremProvide /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4064,7 +4406,7 @@ public static AsyncPageable GetRecommendationsAsync(th /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4098,7 +4440,7 @@ public static Pageable GetRecommendations(this Subscri /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4129,7 +4471,7 @@ public static async Task ResetAllRecommendationFiltersAsync(this Subsc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4160,7 +4502,7 @@ public static Response ResetAllRecommendationFilters(this SubscriptionResource s /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4193,7 +4535,7 @@ public static async Task DisableAppServiceRecommendationAsync(this Sub /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4226,7 +4568,7 @@ public static Response DisableAppServiceRecommendation(this SubscriptionResource /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4258,7 +4600,7 @@ public static AsyncPageable GetAllResourceHealthMeta /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4290,7 +4632,7 @@ public static Pageable GetAllResourceHealthMetadata( /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4324,7 +4666,7 @@ public static AsyncPageable GetBillingMetersAsync(this S /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4358,7 +4700,7 @@ public static Pageable GetBillingMeters(this Subscriptio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4390,7 +4732,7 @@ public static async Task> CheckAppServiceName /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4409,6 +4751,72 @@ public static Response CheckAppServiceNameAvailability return GetMockableAppServiceSubscriptionResource(subscriptionResource).CheckAppServiceNameAvailability(content, cancellationToken); } + /// + /// Get custom hostnames under this subscription + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Web/customhostnameSites + /// + /// + /// Operation Id + /// ListCustomHostNameSites + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// Specific hostname. + /// The cancellation token to use. + /// is null. + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetCustomHostNameSitesAsync(this SubscriptionResource subscriptionResource, string hostname = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableAppServiceSubscriptionResource(subscriptionResource).GetCustomHostNameSitesAsync(hostname, cancellationToken); + } + + /// + /// Get custom hostnames under this subscription + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Web/customhostnameSites + /// + /// + /// Operation Id + /// ListCustomHostNameSites + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// Specific hostname. + /// The cancellation token to use. + /// is null. + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetCustomHostNameSites(this SubscriptionResource subscriptionResource, string hostname = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableAppServiceSubscriptionResource(subscriptionResource).GetCustomHostNameSites(hostname, cancellationToken); + } + /// /// Description for Gets list of available geo regions plus ministamps /// @@ -4422,7 +4830,7 @@ public static Response CheckAppServiceNameAvailability /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4453,7 +4861,7 @@ public static async Task> GetAppServiceD /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4471,6 +4879,70 @@ public static Response GetAppServiceDeploymentLoc return GetMockableAppServiceSubscriptionResource(subscriptionResource).GetAppServiceDeploymentLocations(cancellationToken); } + /// + /// Description for get a list of available ASE regions and its supported Skus. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Web/aseRegions + /// + /// + /// Operation Id + /// ListAseRegions + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The cancellation token to use. + /// is null. + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetAseRegionsAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableAppServiceSubscriptionResource(subscriptionResource).GetAseRegionsAsync(cancellationToken); + } + + /// + /// Description for get a list of available ASE regions and its supported Skus. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Web/aseRegions + /// + /// + /// Operation Id + /// ListAseRegions + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The cancellation token to use. + /// is null. + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetAseRegions(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableAppServiceSubscriptionResource(subscriptionResource).GetAseRegions(cancellationToken); + } + /// /// Description for Get a list of available geographical regions. /// @@ -4484,7 +4956,7 @@ public static Response GetAppServiceDeploymentLoc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4520,7 +4992,7 @@ public static AsyncPageable GetGeoRegionsAsync(this Subscri /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4556,7 +5028,7 @@ public static Pageable GetGeoRegions(this SubscriptionResou /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4588,7 +5060,7 @@ public static AsyncPageable GetPremierAddOnOffersAsync(this S /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4620,7 +5092,7 @@ public static Pageable GetPremierAddOnOffers(this Subscriptio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4651,7 +5123,7 @@ public static async Task> GetSkusAsync(this Subscr /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4682,7 +5154,7 @@ public static Response GetSkus(this SubscriptionResource su /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4714,7 +5186,7 @@ public static async Task> Verif /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4733,6 +5205,72 @@ public static Response VerifyHostingEnvi return GetMockableAppServiceSubscriptionResource(subscriptionResource).VerifyHostingEnvironmentVnet(content, cancellationToken); } + /// + /// List usages in cores for all skus used by a subscription in a given location, for a specific quota type. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/usages + /// + /// + /// Operation Id + /// GetUsagesInLocation_List + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Azure region. + /// The cancellation token to use. + /// is null. + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetGetUsagesInLocationsAsync(this SubscriptionResource subscriptionResource, AzureLocation location, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableAppServiceSubscriptionResource(subscriptionResource).GetGetUsagesInLocationsAsync(location, cancellationToken); + } + + /// + /// List usages in cores for all skus used by a subscription in a given location, for a specific quota type. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/usages + /// + /// + /// Operation Id + /// GetUsagesInLocation_List + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Azure region. + /// The cancellation token to use. + /// is null. + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetGetUsagesInLocations(this SubscriptionResource subscriptionResource, AzureLocation location, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableAppServiceSubscriptionResource(subscriptionResource).GetGetUsagesInLocations(location, cancellationToken); + } + /// /// Description for Generates a preview workflow file for the static site /// @@ -4746,7 +5284,7 @@ public static Response VerifyHostingEnvi /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4779,7 +5317,7 @@ public static async Task> PreviewStaticSite /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4812,7 +5350,7 @@ public static Response PreviewStaticSiteWorkflow(thi /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -4848,7 +5386,7 @@ public static AsyncPageable GetStaticSitesAsync(this Subscri /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -4884,7 +5422,7 @@ public static Pageable GetStaticSites(this SubscriptionResou /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -4920,7 +5458,7 @@ public static AsyncPageable GetWebSitesAsync(this SubscriptionR /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -4990,7 +5528,7 @@ public static AppServiceSourceControlCollection GetAppServiceSourceControls(this /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -5028,7 +5566,7 @@ public static async Task> GetAppServic /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -5066,7 +5604,7 @@ public static Response GetAppServiceSourceContr /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -5098,7 +5636,7 @@ public static AsyncPageable GetOperationsCertificateReg /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -5130,7 +5668,7 @@ public static Pageable GetOperationsCertificateRegistra /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -5162,7 +5700,7 @@ public static AsyncPageable GetOperationsDomainRegistra /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -5194,7 +5732,7 @@ public static Pageable GetOperationsDomainRegistrationP /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -5227,7 +5765,7 @@ public static AsyncPageable GetAvailableStacksProvider /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -5260,7 +5798,7 @@ public static Pageable GetAvailableStacksProviders(thi /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -5293,7 +5831,7 @@ public static AsyncPageable GetFunctionAppStacksProvidersAsync /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -5326,7 +5864,7 @@ public static Pageable GetFunctionAppStacksProviders(this Tena /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -5360,7 +5898,7 @@ public static AsyncPageable GetFunctionAppStacksForLocationPro /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -5394,7 +5932,7 @@ public static Pageable GetFunctionAppStacksForLocationProvider /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -5428,7 +5966,7 @@ public static AsyncPageable GetWebAppStacksByLocationAsync(this Ten /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -5462,7 +6000,7 @@ public static Pageable GetWebAppStacksByLocation(this TenantResourc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -5494,7 +6032,7 @@ public static AsyncPageable GetOperationsProvidersAsync /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -5526,7 +6064,7 @@ public static Pageable GetOperationsProviders(this Tena /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -5559,7 +6097,7 @@ public static AsyncPageable GetWebAppStacksProvidersAsync(this Tena /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Extensions/MockableAppServiceArmClient.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Extensions/MockableAppServiceArmClient.cs index adb98651f1bb5..e3636bc820a5c 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Extensions/MockableAppServiceArmClient.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Extensions/MockableAppServiceArmClient.cs @@ -154,6 +154,18 @@ public virtual AppServiceEnvironmentResource GetAppServiceEnvironmentResource(Re return new AppServiceEnvironmentResource(Client, id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual CustomDnsSuffixConfigurationResource GetCustomDnsSuffixConfigurationResource(ResourceIdentifier id) + { + CustomDnsSuffixConfigurationResource.ValidateResourceId(id); + return new CustomDnsSuffixConfigurationResource(Client, id); + } + /// /// Gets an object representing an along with the instance operations that can be performed on it but with no data. /// You can use to create an from its components. @@ -574,6 +586,30 @@ public virtual StaticSiteBuildResource GetStaticSiteBuildResource(ResourceIdenti return new StaticSiteBuildResource(Client, id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual StaticSiteBuildDatabaseConnectionResource GetStaticSiteBuildDatabaseConnectionResource(ResourceIdentifier id) + { + StaticSiteBuildDatabaseConnectionResource.ValidateResourceId(id); + return new StaticSiteBuildDatabaseConnectionResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual StaticSiteDatabaseConnectionResource GetStaticSiteDatabaseConnectionResource(ResourceIdentifier id) + { + StaticSiteDatabaseConnectionResource.ValidateResourceId(id); + return new StaticSiteDatabaseConnectionResource(Client, id); + } + /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -598,6 +634,18 @@ public virtual StaticSiteUserProvidedFunctionAppResource GetStaticSiteUserProvid return new StaticSiteUserProvidedFunctionAppResource(Client, id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual StaticSiteBasicAuthPropertyResource GetStaticSiteBasicAuthPropertyResource(ResourceIdentifier id) + { + StaticSiteBasicAuthPropertyResource.ValidateResourceId(id); + return new StaticSiteBasicAuthPropertyResource(Client, id); + } + /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -610,6 +658,30 @@ public virtual StaticSiteCustomDomainOverviewResource GetStaticSiteCustomDomainO return new StaticSiteCustomDomainOverviewResource(Client, id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual StaticSiteLinkedBackendResource GetStaticSiteLinkedBackendResource(ResourceIdentifier id) + { + StaticSiteLinkedBackendResource.ValidateResourceId(id); + return new StaticSiteLinkedBackendResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual StaticSiteBuildLinkedBackendResource GetStaticSiteBuildLinkedBackendResource(ResourceIdentifier id) + { + StaticSiteBuildLinkedBackendResource.ValidateResourceId(id); + return new StaticSiteBuildLinkedBackendResource(Client, id); + } + /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -1246,6 +1318,30 @@ public virtual WebSiteSlotPublicCertificateResource GetWebSiteSlotPublicCertific return new WebSiteSlotPublicCertificateResource(Client, id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual SiteContainerResource GetSiteContainerResource(ResourceIdentifier id) + { + SiteContainerResource.ValidateResourceId(id); + return new SiteContainerResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual SiteSlotSiteContainerResource GetSiteSlotSiteContainerResource(ResourceIdentifier id) + { + SiteSlotSiteContainerResource.ValidateResourceId(id); + return new SiteSlotSiteContainerResource(Client, id); + } + /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -1341,5 +1437,125 @@ public virtual WebSiteWebJobResource GetWebSiteWebJobResource(ResourceIdentifier WebSiteWebJobResource.ValidateResourceId(id); return new WebSiteWebJobResource(Client, id); } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual SiteSlotWorkflowResource GetSiteSlotWorkflowResource(ResourceIdentifier id) + { + SiteSlotWorkflowResource.ValidateResourceId(id); + return new SiteSlotWorkflowResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual SiteWorkflowResource GetSiteWorkflowResource(ResourceIdentifier id) + { + SiteWorkflowResource.ValidateResourceId(id); + return new SiteWorkflowResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual WorkflowRunResource GetWorkflowRunResource(ResourceIdentifier id) + { + WorkflowRunResource.ValidateResourceId(id); + return new WorkflowRunResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual WorkflowRunActionResource GetWorkflowRunActionResource(ResourceIdentifier id) + { + WorkflowRunActionResource.ValidateResourceId(id); + return new WorkflowRunActionResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual WorkflowRunActionRepetitionResource GetWorkflowRunActionRepetitionResource(ResourceIdentifier id) + { + WorkflowRunActionRepetitionResource.ValidateResourceId(id); + return new WorkflowRunActionRepetitionResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual WorkflowRunActionScopeRepetitionResource GetWorkflowRunActionScopeRepetitionResource(ResourceIdentifier id) + { + WorkflowRunActionScopeRepetitionResource.ValidateResourceId(id); + return new WorkflowRunActionScopeRepetitionResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual WebAppRequestHistoryResource GetWebAppRequestHistoryResource(ResourceIdentifier id) + { + WebAppRequestHistoryResource.ValidateResourceId(id); + return new WebAppRequestHistoryResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual WorkflowTriggerResource GetWorkflowTriggerResource(ResourceIdentifier id) + { + WorkflowTriggerResource.ValidateResourceId(id); + return new WorkflowTriggerResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual WorkflowTriggerHistoryResource GetWorkflowTriggerHistoryResource(ResourceIdentifier id) + { + WorkflowTriggerHistoryResource.ValidateResourceId(id); + return new WorkflowTriggerHistoryResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual WorkflowVersionResource GetWorkflowVersionResource(ResourceIdentifier id) + { + WorkflowVersionResource.ValidateResourceId(id); + return new WorkflowVersionResource(Client, id); + } } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Extensions/MockableAppServiceResourceGroupResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Extensions/MockableAppServiceResourceGroupResource.cs index ed705c9a07c91..34262535500e7 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Extensions/MockableAppServiceResourceGroupResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Extensions/MockableAppServiceResourceGroupResource.cs @@ -66,7 +66,7 @@ public virtual AppServiceCertificateOrderCollection GetAppServiceCertificateOrde /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -97,7 +97,7 @@ public virtual async Task> GetAppSe /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -135,7 +135,7 @@ public virtual AppServiceDomainCollection GetAppServiceDomains() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual async Task> GetAppServiceDomai /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -204,7 +204,7 @@ public virtual AppServiceEnvironmentCollection GetAppServiceEnvironments() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -235,7 +235,7 @@ public virtual async Task> GetAppService /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -273,7 +273,7 @@ public virtual AppServicePlanCollection GetAppServicePlans() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -304,7 +304,7 @@ public virtual async Task> GetAppServicePlanAsy /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -342,7 +342,7 @@ public virtual AppCertificateCollection GetAppCertificates() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -373,7 +373,7 @@ public virtual async Task> GetAppCertificateAsy /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -411,7 +411,7 @@ public virtual KubeEnvironmentCollection GetKubeEnvironments() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -442,7 +442,7 @@ public virtual async Task> GetKubeEnvironmentA /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -480,7 +480,7 @@ public virtual StaticSiteCollection GetStaticSites() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -511,7 +511,7 @@ public virtual async Task> GetStaticSiteAsync(strin /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -549,7 +549,7 @@ public virtual WebSiteCollection GetWebSites() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -580,7 +580,7 @@ public virtual async Task> GetWebSiteAsync(string name /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -611,7 +611,7 @@ public virtual Response GetWebSite(string name, CancellationTok /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -649,7 +649,7 @@ public virtual async Task> ValidateAsync(AppS /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Extensions/MockableAppServiceSubscriptionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Extensions/MockableAppServiceSubscriptionResource.cs index 7c387626132f9..755a191dacb19 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Extensions/MockableAppServiceSubscriptionResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Extensions/MockableAppServiceSubscriptionResource.cs @@ -44,6 +44,8 @@ public partial class MockableAppServiceSubscriptionResource : ArmResource private ResourceHealthMetadataRestOperations _resourceHealthMetadataRestClient; private ClientDiagnostics _defaultClientDiagnostics; private WebSiteManagementRestOperations _defaultRestClient; + private ClientDiagnostics _getUsagesInLocationClientDiagnostics; + private GetUsagesInLocationRestOperations _getUsagesInLocationRestClient; private ClientDiagnostics _staticSitesClientDiagnostics; private StaticSitesRestOperations _staticSitesRestClient; private ClientDiagnostics _staticSiteClientDiagnostics; @@ -89,6 +91,8 @@ internal MockableAppServiceSubscriptionResource(ArmClient client, ResourceIdenti private ResourceHealthMetadataRestOperations ResourceHealthMetadataRestClient => _resourceHealthMetadataRestClient ??= new ResourceHealthMetadataRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); private ClientDiagnostics DefaultClientDiagnostics => _defaultClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.AppService", ProviderConstants.DefaultProviderNamespace, Diagnostics); private WebSiteManagementRestOperations DefaultRestClient => _defaultRestClient ??= new WebSiteManagementRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); + private ClientDiagnostics GetUsagesInLocationClientDiagnostics => _getUsagesInLocationClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.AppService", ProviderConstants.DefaultProviderNamespace, Diagnostics); + private GetUsagesInLocationRestOperations GetUsagesInLocationRestClient => _getUsagesInLocationRestClient ??= new GetUsagesInLocationRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); private ClientDiagnostics StaticSitesClientDiagnostics => _staticSitesClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.AppService", ProviderConstants.DefaultProviderNamespace, Diagnostics); private StaticSitesRestOperations StaticSitesRestClient => _staticSitesRestClient ??= new StaticSitesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); private ClientDiagnostics StaticSiteClientDiagnostics => _staticSiteClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.AppService", StaticSiteResource.ResourceType.Namespace, Diagnostics); @@ -122,7 +126,7 @@ public virtual TopLevelDomainCollection GetTopLevelDomains() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -153,7 +157,7 @@ public virtual async Task> GetTopLevelDomainAsy /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -191,7 +195,7 @@ public virtual DeletedSiteCollection GetDeletedSites() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -222,7 +226,7 @@ public virtual async Task> GetDeletedSiteAsync(str /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -253,7 +257,7 @@ public virtual Response GetDeletedSite(string deletedSiteId /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -283,7 +287,7 @@ public virtual AsyncPageable GetAppServiceCe /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -313,7 +317,7 @@ public virtual Pageable GetAppServiceCertifi /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -351,7 +355,7 @@ public virtual async Task ValidateAppServiceCertificateOrderPurchaseIn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -389,7 +393,7 @@ public virtual Response ValidateAppServiceCertificateOrderPurchaseInformation(Ap /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -427,7 +431,7 @@ public virtual async Task> CheckAppServi /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -465,7 +469,7 @@ public virtual Response CheckAppServiceDomainRegi /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -495,7 +499,7 @@ public virtual AsyncPageable GetAppServiceDomainsAsync /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -525,7 +529,7 @@ public virtual Pageable GetAppServiceDomains(Cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -559,7 +563,7 @@ public virtual async Task> GetContro /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -593,7 +597,7 @@ public virtual Response GetControlCenterSsoRe /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -623,7 +627,7 @@ public virtual AsyncPageable GetAppServiceDomain /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -653,7 +657,7 @@ public virtual Pageable GetAppServiceDomainRecom /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -683,7 +687,7 @@ public virtual AsyncPageable GetAppServiceEnviron /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -713,7 +717,7 @@ public virtual Pageable GetAppServiceEnvironments /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -747,7 +751,7 @@ public virtual AsyncPageable GetAppServicePlansAsync(boo /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -781,7 +785,7 @@ public virtual Pageable GetAppServicePlans(bool? detaile /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -812,7 +816,7 @@ public virtual AsyncPageable GetAppCertificatesAsync(str /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -843,7 +847,7 @@ public virtual Pageable GetAppCertificates(string filter /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -874,7 +878,7 @@ public virtual AsyncPageable GetDeletedSitesByLocationAsync /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -905,7 +909,7 @@ public virtual Pageable GetDeletedSitesByLocation(AzureLoca /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -949,7 +953,7 @@ public virtual async Task> GetDeletedWebAppByLocat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -993,7 +997,7 @@ public virtual Response GetDeletedWebAppByLocationDeletedWe /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1023,7 +1027,7 @@ public virtual AsyncPageable GetKubeEnvironmentsAsync(C /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1053,7 +1057,7 @@ public virtual Pageable GetKubeEnvironments(Cancellatio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -1080,7 +1084,7 @@ public virtual AsyncPageable GetAvailableStacksOnPremP /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -1107,7 +1111,7 @@ public virtual Pageable GetAvailableStacksOnPremProvid /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -1135,7 +1139,7 @@ public virtual AsyncPageable GetRecommendationsAsync(b /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -1163,7 +1167,7 @@ public virtual Pageable GetRecommendations(bool? featu /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -1197,7 +1201,7 @@ public virtual async Task ResetAllRecommendationFiltersAsync(Cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -1231,7 +1235,7 @@ public virtual Response ResetAllRecommendationFilters(CancellationToken cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -1270,7 +1274,7 @@ public virtual async Task DisableAppServiceRecommendationAsync(string /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -1309,7 +1313,7 @@ public virtual Response DisableAppServiceRecommendation(string name, Cancellatio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -1335,7 +1339,7 @@ public virtual AsyncPageable GetAllResourceHealthMet /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -1361,7 +1365,7 @@ public virtual Pageable GetAllResourceHealthMetadata /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -1389,7 +1393,7 @@ public virtual AsyncPageable GetBillingMetersAsync(strin /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -1417,7 +1421,7 @@ public virtual Pageable GetBillingMeters(string billingL /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -1455,7 +1459,7 @@ public virtual async Task> CheckAppServiceNam /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -1480,6 +1484,60 @@ public virtual Response CheckAppServiceNameAvailabilit } } + /// + /// Get custom hostnames under this subscription + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Web/customhostnameSites + /// + /// + /// Operation Id + /// ListCustomHostNameSites + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// + /// Specific hostname. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetCustomHostNameSitesAsync(string hostname = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => DefaultRestClient.CreateListCustomHostNameSitesRequest(Id.SubscriptionId, hostname); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DefaultRestClient.CreateListCustomHostNameSitesNextPageRequest(nextLink, Id.SubscriptionId, hostname); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => CustomHostnameSites.DeserializeCustomHostnameSites(e), DefaultClientDiagnostics, Pipeline, "MockableAppServiceSubscriptionResource.GetCustomHostNameSites", "value", "nextLink", cancellationToken); + } + + /// + /// Get custom hostnames under this subscription + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Web/customhostnameSites + /// + /// + /// Operation Id + /// ListCustomHostNameSites + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// + /// Specific hostname. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetCustomHostNameSites(string hostname = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => DefaultRestClient.CreateListCustomHostNameSitesRequest(Id.SubscriptionId, hostname); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DefaultRestClient.CreateListCustomHostNameSitesNextPageRequest(nextLink, Id.SubscriptionId, hostname); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => CustomHostnameSites.DeserializeCustomHostnameSites(e), DefaultClientDiagnostics, Pipeline, "MockableAppServiceSubscriptionResource.GetCustomHostNameSites", "value", "nextLink", cancellationToken); + } + /// /// Description for Gets list of available geo regions plus ministamps /// @@ -1493,7 +1551,7 @@ public virtual Response CheckAppServiceNameAvailabilit /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -1527,7 +1585,7 @@ public virtual async Task> GetAppService /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -1548,6 +1606,58 @@ public virtual Response GetAppServiceDeploymentLo } } + /// + /// Description for get a list of available ASE regions and its supported Skus. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Web/aseRegions + /// + /// + /// Operation Id + /// ListAseRegions + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAseRegionsAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => DefaultRestClient.CreateListAseRegionsRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DefaultRestClient.CreateListAseRegionsNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => AppServiceAseRegion.DeserializeAppServiceAseRegion(e), DefaultClientDiagnostics, Pipeline, "MockableAppServiceSubscriptionResource.GetAseRegions", "value", "nextLink", cancellationToken); + } + + /// + /// Description for get a list of available ASE regions and its supported Skus. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Web/aseRegions + /// + /// + /// Operation Id + /// ListAseRegions + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAseRegions(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => DefaultRestClient.CreateListAseRegionsRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DefaultRestClient.CreateListAseRegionsNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => AppServiceAseRegion.DeserializeAppServiceAseRegion(e), DefaultClientDiagnostics, Pipeline, "MockableAppServiceSubscriptionResource.GetAseRegions", "value", "nextLink", cancellationToken); + } + /// /// Description for Get a list of available geographical regions. /// @@ -1561,7 +1671,7 @@ public virtual Response GetAppServiceDeploymentLo /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -1591,7 +1701,7 @@ public virtual AsyncPageable GetGeoRegionsAsync(AppServiceS /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -1621,7 +1731,7 @@ public virtual Pageable GetGeoRegions(AppServiceSkuName? sk /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -1647,7 +1757,7 @@ public virtual AsyncPageable GetPremierAddOnOffersAsync(Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -1673,7 +1783,7 @@ public virtual Pageable GetPremierAddOnOffers(CancellationTok /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -1707,7 +1817,7 @@ public virtual async Task> GetSkusAsync(Cancellati /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -1741,7 +1851,7 @@ public virtual Response GetSkus(CancellationToken cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -1779,7 +1889,7 @@ public virtual async Task> Veri /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -1804,6 +1914,60 @@ public virtual Response VerifyHostingEnv } } + /// + /// List usages in cores for all skus used by a subscription in a given location, for a specific quota type. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/usages + /// + /// + /// Operation Id + /// GetUsagesInLocation_List + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// + /// The name of the Azure region. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetGetUsagesInLocationsAsync(AzureLocation location, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => GetUsagesInLocationRestClient.CreateListRequest(Id.SubscriptionId, location); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => GetUsagesInLocationRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, location); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => CsmUsageQuota.DeserializeCsmUsageQuota(e), GetUsagesInLocationClientDiagnostics, Pipeline, "MockableAppServiceSubscriptionResource.GetGetUsagesInLocations", "value", "nextLink", cancellationToken); + } + + /// + /// List usages in cores for all skus used by a subscription in a given location, for a specific quota type. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/usages + /// + /// + /// Operation Id + /// GetUsagesInLocation_List + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// + /// The name of the Azure region. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetGetUsagesInLocations(AzureLocation location, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => GetUsagesInLocationRestClient.CreateListRequest(Id.SubscriptionId, location); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => GetUsagesInLocationRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, location); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => CsmUsageQuota.DeserializeCsmUsageQuota(e), GetUsagesInLocationClientDiagnostics, Pipeline, "MockableAppServiceSubscriptionResource.GetGetUsagesInLocations", "value", "nextLink", cancellationToken); + } + /// /// Description for Generates a preview workflow file for the static site /// @@ -1817,7 +1981,7 @@ public virtual Response VerifyHostingEnv /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -1856,7 +2020,7 @@ public virtual async Task> PreviewStaticSit /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -1895,7 +2059,7 @@ public virtual Response PreviewStaticSiteWorkflow(Az /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1925,7 +2089,7 @@ public virtual AsyncPageable GetStaticSitesAsync(Cancellatio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1955,7 +2119,7 @@ public virtual Pageable GetStaticSites(CancellationToken can /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1985,7 +2149,7 @@ public virtual AsyncPageable GetWebSitesAsync(CancellationToken /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Extensions/MockableAppServiceTenantResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Extensions/MockableAppServiceTenantResource.cs index b703e2ab27ccf..71fbb1b1274bc 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Extensions/MockableAppServiceTenantResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Extensions/MockableAppServiceTenantResource.cs @@ -77,7 +77,7 @@ public virtual AppServiceSourceControlCollection GetAppServiceSourceControls() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -108,7 +108,7 @@ public virtual async Task> GetAppServi /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -139,7 +139,7 @@ public virtual Response GetAppServiceSourceCont /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -165,7 +165,7 @@ public virtual AsyncPageable GetOperationsCertificateRe /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -191,7 +191,7 @@ public virtual Pageable GetOperationsCertificateRegistr /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -217,7 +217,7 @@ public virtual AsyncPageable GetOperationsDomainRegistr /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -243,7 +243,7 @@ public virtual Pageable GetOperationsDomainRegistration /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -270,7 +270,7 @@ public virtual AsyncPageable GetAvailableStacksProvide /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -297,7 +297,7 @@ public virtual Pageable GetAvailableStacksProviders(Pr /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -324,7 +324,7 @@ public virtual AsyncPageable GetFunctionAppStacksProvidersAsyn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -351,7 +351,7 @@ public virtual Pageable GetFunctionAppStacksProviders(Provider /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -379,7 +379,7 @@ public virtual AsyncPageable GetFunctionAppStacksForLocationPr /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -407,7 +407,7 @@ public virtual Pageable GetFunctionAppStacksForLocationProvide /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -435,7 +435,7 @@ public virtual AsyncPageable GetWebAppStacksByLocationAsync(AzureLo /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -463,7 +463,7 @@ public virtual Pageable GetWebAppStacksByLocation(AzureLocation loc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -489,7 +489,7 @@ public virtual AsyncPageable GetOperationsProvidersAsyn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -515,7 +515,7 @@ public virtual Pageable GetOperationsProviders(Cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -542,7 +542,7 @@ public virtual AsyncPageable GetWebAppStacksProvidersAsync(Provider /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentDetectorCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentDetectorCollection.cs index b95fbd4ceb00a..972a2801f0b70 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentDetectorCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentDetectorCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -112,7 +112,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -160,7 +160,7 @@ public virtual Response Get(string detectorN /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -190,7 +190,7 @@ public virtual AsyncPageable GetAllAsync(Can /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -220,7 +220,7 @@ public virtual Pageable GetAll(CancellationT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -266,7 +266,7 @@ public virtual async Task> ExistsAsync(string detectorName, DateT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Response Exists(string detectorName, DateTimeOffset? startT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -360,7 +360,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentDetectorResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentDetectorResource.cs index afeb4ca2c0868..49391b159af90 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentDetectorResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentDetectorResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -144,7 +144,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentMultiRolePoolResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentMultiRolePoolResource.cs index 63e149c91635a..47fc5984a49a9 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentMultiRolePoolResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentMultiRolePoolResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(Cancellatio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task> Upd /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -266,7 +266,7 @@ public virtual Response Update(AppServi /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -358,7 +358,7 @@ public virtual ArmOperation CreateOrUpd /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -389,7 +389,7 @@ public virtual AsyncPageable GetMultiRolePoolInstanceM /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -420,7 +420,7 @@ public virtual Pageable GetMultiRolePoolInstanceMetric /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -450,7 +450,7 @@ public virtual AsyncPageable GetMultiRoleMetricDefinit /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -480,7 +480,7 @@ public virtual Pageable GetMultiRoleMetricDefinitions( /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -510,7 +510,7 @@ public virtual AsyncPageable GetMultiRolePoolSkusAsync(Ca /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -540,7 +540,7 @@ public virtual Pageable GetMultiRolePoolSkus(Cancellation /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -570,7 +570,7 @@ public virtual AsyncPageable GetMultiRoleUsagesAsync(Cancellati /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentPrivateEndpointConnectionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentPrivateEndpointConnectionCollection.cs index 71365c8fbcdf2..33bd83378f9d5 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentPrivateEndpointConnectionCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentPrivateEndpointConnectionCollection.cs @@ -14,7 +14,6 @@ using Autorest.CSharp.Core; using Azure.Core; using Azure.Core.Pipeline; -using Azure.ResourceManager.AppService.Models; namespace Azure.ResourceManager.AppService { @@ -65,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -75,21 +74,21 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The to use. - /// The to use. + /// The to use. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestInfo info, CancellationToken cancellationToken = default) + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string privateEndpointConnectionName, RemotePrivateEndpointConnectionARMResourceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); - Argument.AssertNotNull(info, nameof(info)); + Argument.AssertNotNull(data, nameof(data)); using var scope = _hostingEnvironmentPrivateEndpointConnectionAppServiceEnvironmentsClientDiagnostics.CreateScope("HostingEnvironmentPrivateEndpointConnectionCollection.CreateOrUpdate"); scope.Start(); try { - var response = await _hostingEnvironmentPrivateEndpointConnectionAppServiceEnvironmentsRestClient.ApproveOrRejectPrivateEndpointConnectionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, info, cancellationToken).ConfigureAwait(false); - var operation = new AppServiceArmOperation(new HostingEnvironmentPrivateEndpointConnectionOperationSource(Client), _hostingEnvironmentPrivateEndpointConnectionAppServiceEnvironmentsClientDiagnostics, Pipeline, _hostingEnvironmentPrivateEndpointConnectionAppServiceEnvironmentsRestClient.CreateApproveOrRejectPrivateEndpointConnectionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, info).Request, response, OperationFinalStateVia.Location); + var response = await _hostingEnvironmentPrivateEndpointConnectionAppServiceEnvironmentsRestClient.ApproveOrRejectPrivateEndpointConnectionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, data, cancellationToken).ConfigureAwait(false); + var operation = new AppServiceArmOperation(new HostingEnvironmentPrivateEndpointConnectionOperationSource(Client), _hostingEnvironmentPrivateEndpointConnectionAppServiceEnvironmentsClientDiagnostics, Pipeline, _hostingEnvironmentPrivateEndpointConnectionAppServiceEnvironmentsRestClient.CreateApproveOrRejectPrivateEndpointConnectionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -114,7 +113,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -124,21 +123,21 @@ public virtual async Task /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The to use. - /// The to use. + /// The to use. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestInfo info, CancellationToken cancellationToken = default) + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string privateEndpointConnectionName, RemotePrivateEndpointConnectionARMResourceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); - Argument.AssertNotNull(info, nameof(info)); + Argument.AssertNotNull(data, nameof(data)); using var scope = _hostingEnvironmentPrivateEndpointConnectionAppServiceEnvironmentsClientDiagnostics.CreateScope("HostingEnvironmentPrivateEndpointConnectionCollection.CreateOrUpdate"); scope.Start(); try { - var response = _hostingEnvironmentPrivateEndpointConnectionAppServiceEnvironmentsRestClient.ApproveOrRejectPrivateEndpointConnection(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, info, cancellationToken); - var operation = new AppServiceArmOperation(new HostingEnvironmentPrivateEndpointConnectionOperationSource(Client), _hostingEnvironmentPrivateEndpointConnectionAppServiceEnvironmentsClientDiagnostics, Pipeline, _hostingEnvironmentPrivateEndpointConnectionAppServiceEnvironmentsRestClient.CreateApproveOrRejectPrivateEndpointConnectionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, info).Request, response, OperationFinalStateVia.Location); + var response = _hostingEnvironmentPrivateEndpointConnectionAppServiceEnvironmentsRestClient.ApproveOrRejectPrivateEndpointConnection(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, data, cancellationToken); + var operation = new AppServiceArmOperation(new HostingEnvironmentPrivateEndpointConnectionOperationSource(Client), _hostingEnvironmentPrivateEndpointConnectionAppServiceEnvironmentsClientDiagnostics, Pipeline, _hostingEnvironmentPrivateEndpointConnectionAppServiceEnvironmentsRestClient.CreateApproveOrRejectPrivateEndpointConnectionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -163,7 +162,7 @@ public virtual ArmOperation /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -208,7 +207,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -253,7 +252,7 @@ public virtual Response Get /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -283,7 +282,7 @@ public virtual AsyncPageable /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -313,7 +312,7 @@ public virtual Pageable Get /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -356,7 +355,7 @@ public virtual async Task> ExistsAsync(string privateEndpointConn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -399,7 +398,7 @@ public virtual Response Exists(string privateEndpointConnectionName, Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -444,7 +443,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentPrivateEndpointConnectionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentPrivateEndpointConnectionResource.cs index d2f9c8bbe2244..97b3b8769ac56 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentPrivateEndpointConnectionResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentPrivateEndpointConnectionResource.cs @@ -11,7 +11,6 @@ using System.Threading.Tasks; using Azure.Core; using Azure.Core.Pipeline; -using Azure.ResourceManager.AppService.Models; namespace Azure.ResourceManager.AppService { @@ -102,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -142,7 +141,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -182,7 +181,7 @@ public virtual Response Get /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -224,7 +223,7 @@ public virtual async Task> DeleteAsync(WaitUntil waitUn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -266,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, Cancellation /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -275,19 +274,19 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, Cancellation /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The to use. + /// The to use. /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, PrivateLinkConnectionApprovalRequestInfo info, CancellationToken cancellationToken = default) + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, RemotePrivateEndpointConnectionARMResourceData data, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(info, nameof(info)); + Argument.AssertNotNull(data, nameof(data)); using var scope = _hostingEnvironmentPrivateEndpointConnectionAppServiceEnvironmentsClientDiagnostics.CreateScope("HostingEnvironmentPrivateEndpointConnectionResource.Update"); scope.Start(); try { - var response = await _hostingEnvironmentPrivateEndpointConnectionAppServiceEnvironmentsRestClient.ApproveOrRejectPrivateEndpointConnectionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, info, cancellationToken).ConfigureAwait(false); - var operation = new AppServiceArmOperation(new HostingEnvironmentPrivateEndpointConnectionOperationSource(Client), _hostingEnvironmentPrivateEndpointConnectionAppServiceEnvironmentsClientDiagnostics, Pipeline, _hostingEnvironmentPrivateEndpointConnectionAppServiceEnvironmentsRestClient.CreateApproveOrRejectPrivateEndpointConnectionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, info).Request, response, OperationFinalStateVia.Location); + var response = await _hostingEnvironmentPrivateEndpointConnectionAppServiceEnvironmentsRestClient.ApproveOrRejectPrivateEndpointConnectionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new AppServiceArmOperation(new HostingEnvironmentPrivateEndpointConnectionOperationSource(Client), _hostingEnvironmentPrivateEndpointConnectionAppServiceEnvironmentsClientDiagnostics, Pipeline, _hostingEnvironmentPrivateEndpointConnectionAppServiceEnvironmentsRestClient.CreateApproveOrRejectPrivateEndpointConnectionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -312,7 +311,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -321,19 +320,19 @@ public virtual async Task /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The to use. + /// The to use. /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, PrivateLinkConnectionApprovalRequestInfo info, CancellationToken cancellationToken = default) + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, RemotePrivateEndpointConnectionARMResourceData data, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(info, nameof(info)); + Argument.AssertNotNull(data, nameof(data)); using var scope = _hostingEnvironmentPrivateEndpointConnectionAppServiceEnvironmentsClientDiagnostics.CreateScope("HostingEnvironmentPrivateEndpointConnectionResource.Update"); scope.Start(); try { - var response = _hostingEnvironmentPrivateEndpointConnectionAppServiceEnvironmentsRestClient.ApproveOrRejectPrivateEndpointConnection(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, info, cancellationToken); - var operation = new AppServiceArmOperation(new HostingEnvironmentPrivateEndpointConnectionOperationSource(Client), _hostingEnvironmentPrivateEndpointConnectionAppServiceEnvironmentsClientDiagnostics, Pipeline, _hostingEnvironmentPrivateEndpointConnectionAppServiceEnvironmentsRestClient.CreateApproveOrRejectPrivateEndpointConnectionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, info).Request, response, OperationFinalStateVia.Location); + var response = _hostingEnvironmentPrivateEndpointConnectionAppServiceEnvironmentsRestClient.ApproveOrRejectPrivateEndpointConnection(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new AppServiceArmOperation(new HostingEnvironmentPrivateEndpointConnectionOperationSource(Client), _hostingEnvironmentPrivateEndpointConnectionAppServiceEnvironmentsClientDiagnostics, Pipeline, _hostingEnvironmentPrivateEndpointConnectionAppServiceEnvironmentsRestClient.CreateApproveOrRejectPrivateEndpointConnectionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentRecommendationCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentRecommendationCollection.cs index b9ceb07582cb0..5a9c7ea5beec3 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentRecommendationCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentRecommendationCollection.cs @@ -61,7 +61,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -108,7 +108,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -155,7 +155,7 @@ public virtual Response Get(string nam /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -200,7 +200,7 @@ public virtual async Task> ExistsAsync(string name, bool? updateS /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -245,7 +245,7 @@ public virtual Response Exists(string name, bool? updateSeen = null, strin /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -292,7 +292,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentRecommendationResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentRecommendationResource.cs index e7356fa8edea9..6036fac96c847 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentRecommendationResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentRecommendationResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -185,7 +185,7 @@ public virtual Response Get(bool? upda /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DisableRecommendationForHostingEnvironmentAs /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentWorkerPoolCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentWorkerPoolCollection.cs index 6f12ccfdae25a..563013c0867c9 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentWorkerPoolCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentWorkerPoolCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> Cr /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsy /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string workerP /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(C /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(Cancellatio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string workerPoolName, Can /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string workerPoolName, CancellationToken ca /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentWorkerPoolResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentWorkerPoolResource.cs index 95b3bb40b7351..c9aebb1afbebc 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentWorkerPoolResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentWorkerPoolResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsy /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationTo /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task> Update /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -267,7 +267,7 @@ public virtual Response Update(AppServiceW /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -298,7 +298,7 @@ public virtual AsyncPageable GetWorkerPoolInstanceMetr /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -329,7 +329,7 @@ public virtual Pageable GetWorkerPoolInstanceMetricDef /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual AsyncPageable GetWebWorkerMetricDefinit /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -389,7 +389,7 @@ public virtual Pageable GetWebWorkerMetricDefinitions( /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -419,7 +419,7 @@ public virtual AsyncPageable GetWorkerPoolSkusAsync(Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -449,7 +449,7 @@ public virtual Pageable GetWorkerPoolSkus(CancellationTok /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -479,7 +479,7 @@ public virtual AsyncPageable GetWebWorkerUsagesAsync(Cancellati /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HybridConnectionLimitResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HybridConnectionLimitResource.cs index 48a306b7c966d..01d6e67de9726 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HybridConnectionLimitResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HybridConnectionLimitResource.cs @@ -100,7 +100,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> GetAsync(Canc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/KubeEnvironmentCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/KubeEnvironmentCollection.cs index ef866f2c13d9f..bfbc531460cfb 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/KubeEnvironmentCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/KubeEnvironmentCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateA /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wa /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string nam /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string name, CancellationTo /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(CancellationTo /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string name, CancellationT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string name, CancellationToken cancellation /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIfExists /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/KubeEnvironmentData.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/KubeEnvironmentData.Serialization.cs index 0d6f8e9bb50dd..13c0b5d8b2f04 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/KubeEnvironmentData.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/KubeEnvironmentData.Serialization.cs @@ -101,6 +101,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("staticIp"u8); writer.WriteStringValue(StaticIP); } + if (Optional.IsDefined(EnvironmentType)) + { + writer.WritePropertyName("environmentType"u8); + writer.WriteStringValue(EnvironmentType); + } if (Optional.IsDefined(ArcConfiguration)) { writer.WritePropertyName("arcConfiguration"u8); @@ -111,6 +116,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("appLogsConfiguration"u8); writer.WriteObjectValue(AppLogsConfiguration, options); } + if (Optional.IsDefined(ContainerAppsConfiguration)) + { + writer.WritePropertyName("containerAppsConfiguration"u8); + writer.WriteObjectValue(ContainerAppsConfiguration, options); + } if (Optional.IsDefined(AksResourceId)) { writer.WritePropertyName("aksResourceID"u8); @@ -168,8 +178,10 @@ internal static KubeEnvironmentData DeserializeKubeEnvironmentData(JsonElement e bool? internalLoadBalancerEnabled = default; string defaultDomain = default; string staticIP = default; + string environmentType = default; ArcConfiguration arcConfiguration = default; AppLogsConfiguration appLogsConfiguration = default; + ContainerAppsConfiguration containerAppsConfiguration = default; ResourceIdentifier aksResourceId = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -274,6 +286,11 @@ internal static KubeEnvironmentData DeserializeKubeEnvironmentData(JsonElement e staticIP = property0.Value.GetString(); continue; } + if (property0.NameEquals("environmentType"u8)) + { + environmentType = property0.Value.GetString(); + continue; + } if (property0.NameEquals("arcConfiguration"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -292,6 +309,15 @@ internal static KubeEnvironmentData DeserializeKubeEnvironmentData(JsonElement e appLogsConfiguration = AppLogsConfiguration.DeserializeAppLogsConfiguration(property0.Value, options); continue; } + if (property0.NameEquals("containerAppsConfiguration"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + containerAppsConfiguration = ContainerAppsConfiguration.DeserializeContainerAppsConfiguration(property0.Value, options); + continue; + } if (property0.NameEquals("aksResourceID"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -323,8 +349,10 @@ internal static KubeEnvironmentData DeserializeKubeEnvironmentData(JsonElement e internalLoadBalancerEnabled, defaultDomain, staticIP, + environmentType, arcConfiguration, appLogsConfiguration, + containerAppsConfiguration, aksResourceId, kind, serializedAdditionalRawData); @@ -583,6 +611,29 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EnvironmentType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" environmentType: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(EnvironmentType)) + { + builder.Append(" environmentType: "); + if (EnvironmentType.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{EnvironmentType}'''"); + } + else + { + builder.AppendLine($"'{EnvironmentType}'"); + } + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ArcConfiguration), out propertyOverride); if (hasPropertyOverride) { @@ -613,6 +664,21 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ContainerAppsConfiguration), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" containerAppsConfiguration: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ContainerAppsConfiguration)) + { + builder.Append(" containerAppsConfiguration: "); + BicepSerializationHelpers.AppendChildObject(builder, ContainerAppsConfiguration, options, 4, false, " containerAppsConfiguration: "); + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AksResourceId), out propertyOverride); if (hasPropertyOverride) { diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/KubeEnvironmentData.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/KubeEnvironmentData.cs index b0e4ccd0a0b0b..038058c4f08d6 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/KubeEnvironmentData.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/KubeEnvironmentData.cs @@ -71,6 +71,7 @@ public KubeEnvironmentData(AzureLocation location) : base(location) /// Only visible within Vnet/Subnet. /// Default Domain Name for the cluster. /// Static IP of the KubeEnvironment. + /// Type of Kubernetes Environment. Only supported for Container App Environments with value as Managed. /// /// Cluster configuration which determines the ARC cluster /// components types. Eg: Choosing between BuildService kind, @@ -81,10 +82,11 @@ public KubeEnvironmentData(AzureLocation location) : base(location) /// app logs to a destination. Currently only "log-analytics" is /// supported /// + /// Cluster configuration for Container Apps Environments to configure Dapr Instrumentation Key and VNET Configuration. /// /// Kind of resource. /// Keeps track of any properties unknown to the library. - internal KubeEnvironmentData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ExtendedLocation extendedLocation, KubeEnvironmentProvisioningState? provisioningState, string deploymentErrors, bool? isInternalLoadBalancerEnabled, string defaultDomain, string staticIP, ArcConfiguration arcConfiguration, AppLogsConfiguration appLogsConfiguration, ResourceIdentifier aksResourceId, string kind, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal KubeEnvironmentData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ExtendedLocation extendedLocation, KubeEnvironmentProvisioningState? provisioningState, string deploymentErrors, bool? isInternalLoadBalancerEnabled, string defaultDomain, string staticIP, string environmentType, ArcConfiguration arcConfiguration, AppLogsConfiguration appLogsConfiguration, ContainerAppsConfiguration containerAppsConfiguration, ResourceIdentifier aksResourceId, string kind, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { ExtendedLocation = extendedLocation; ProvisioningState = provisioningState; @@ -92,8 +94,10 @@ internal KubeEnvironmentData(ResourceIdentifier id, string name, ResourceType re IsInternalLoadBalancerEnabled = isInternalLoadBalancerEnabled; DefaultDomain = defaultDomain; StaticIP = staticIP; + EnvironmentType = environmentType; ArcConfiguration = arcConfiguration; AppLogsConfiguration = appLogsConfiguration; + ContainerAppsConfiguration = containerAppsConfiguration; AksResourceId = aksResourceId; Kind = kind; _serializedAdditionalRawData = serializedAdditionalRawData; @@ -122,6 +126,9 @@ internal KubeEnvironmentData() /// Static IP of the KubeEnvironment. [WirePath("properties.staticIp")] public string StaticIP { get; set; } + /// Type of Kubernetes Environment. Only supported for Container App Environments with value as Managed. + [WirePath("properties.environmentType")] + public string EnvironmentType { get; set; } /// /// Cluster configuration which determines the ARC cluster /// components types. Eg: Choosing between BuildService kind, @@ -136,6 +143,9 @@ internal KubeEnvironmentData() /// [WirePath("properties.appLogsConfiguration")] public AppLogsConfiguration AppLogsConfiguration { get; set; } + /// Cluster configuration for Container Apps Environments to configure Dapr Instrumentation Key and VNET Configuration. + [WirePath("properties.containerAppsConfiguration")] + public ContainerAppsConfiguration ContainerAppsConfiguration { get; set; } /// Gets or sets the aks resource id. [WirePath("properties.aksResourceID")] public ResourceIdentifier AksResourceId { get; set; } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/KubeEnvironmentResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/KubeEnvironmentResource.cs index 89ee8ce530c32..6226bced4d273 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/KubeEnvironmentResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/KubeEnvironmentResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Cancellati /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -266,7 +266,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -308,7 +308,7 @@ public virtual async Task> UpdateAsync(KubeEnv /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/LogsSiteConfigResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/LogsSiteConfigResource.cs index 4fa107b04d27f..36cf053f2e4ad 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/LogsSiteConfigResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/LogsSiteConfigResource.cs @@ -100,7 +100,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> GetAsync(Cancellatio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -180,7 +180,7 @@ public virtual Response Get(CancellationToken cancellati /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -228,7 +228,7 @@ public virtual async Task> CreateOrUpdateAs /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/LogsSiteSlotConfigResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/LogsSiteSlotConfigResource.cs index a82aac0c52af6..a460baafd4ad4 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/LogsSiteSlotConfigResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/LogsSiteSlotConfigResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -229,7 +229,7 @@ public virtual async Task> CreateOrUpda /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/LongRunningOperation/CsmDeploymentStatusOperationSource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/LongRunningOperation/CsmDeploymentStatusOperationSource.cs new file mode 100644 index 0000000000000..b5307231f02d3 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/LongRunningOperation/CsmDeploymentStatusOperationSource.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService +{ + internal class CsmDeploymentStatusOperationSource : IOperationSource + { + CsmDeploymentStatus IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + return CsmDeploymentStatus.DeserializeCsmDeploymentStatus(document.RootElement); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + return CsmDeploymentStatus.DeserializeCsmDeploymentStatus(document.RootElement); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/LongRunningOperation/StaticSiteBuildLinkedBackendOperationSource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/LongRunningOperation/StaticSiteBuildLinkedBackendOperationSource.cs new file mode 100644 index 0000000000000..feee6efd51057 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/LongRunningOperation/StaticSiteBuildLinkedBackendOperationSource.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.AppService +{ + internal class StaticSiteBuildLinkedBackendOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal StaticSiteBuildLinkedBackendOperationSource(ArmClient client) + { + _client = client; + } + + StaticSiteBuildLinkedBackendResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = StaticSiteLinkedBackendData.DeserializeStaticSiteLinkedBackendData(document.RootElement); + return new StaticSiteBuildLinkedBackendResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = StaticSiteLinkedBackendData.DeserializeStaticSiteLinkedBackendData(document.RootElement); + return new StaticSiteBuildLinkedBackendResource(_client, data); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/LongRunningOperation/StaticSiteLinkedBackendOperationSource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/LongRunningOperation/StaticSiteLinkedBackendOperationSource.cs new file mode 100644 index 0000000000000..d986032d816ea --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/LongRunningOperation/StaticSiteLinkedBackendOperationSource.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.AppService +{ + internal class StaticSiteLinkedBackendOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal StaticSiteLinkedBackendOperationSource(ArmClient client) + { + _client = client; + } + + StaticSiteLinkedBackendResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = StaticSiteLinkedBackendData.DeserializeStaticSiteLinkedBackendData(document.RootElement); + return new StaticSiteLinkedBackendResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = StaticSiteLinkedBackendData.DeserializeStaticSiteLinkedBackendData(document.RootElement); + return new StaticSiteLinkedBackendResource(_client, data); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/MigrateMySqlStatusResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/MigrateMySqlStatusResource.cs index 27581ff51bbd2..5cc7eccb8da19 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/MigrateMySqlStatusResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/MigrateMySqlStatusResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppDaprConfig.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppDaprConfig.Serialization.cs new file mode 100644 index 0000000000000..ba4eeef22c7c8 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppDaprConfig.Serialization.cs @@ -0,0 +1,353 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class AppDaprConfig : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AppDaprConfig)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(IsEnabled)) + { + writer.WritePropertyName("enabled"u8); + writer.WriteBooleanValue(IsEnabled.Value); + } + if (Optional.IsDefined(AppId)) + { + writer.WritePropertyName("appId"u8); + writer.WriteStringValue(AppId); + } + if (Optional.IsDefined(AppPort)) + { + writer.WritePropertyName("appPort"u8); + writer.WriteNumberValue(AppPort.Value); + } + if (Optional.IsDefined(HttpReadBufferSize)) + { + writer.WritePropertyName("httpReadBufferSize"u8); + writer.WriteNumberValue(HttpReadBufferSize.Value); + } + if (Optional.IsDefined(HttpMaxRequestSize)) + { + writer.WritePropertyName("httpMaxRequestSize"u8); + writer.WriteNumberValue(HttpMaxRequestSize.Value); + } + if (Optional.IsDefined(LogLevel)) + { + writer.WritePropertyName("logLevel"u8); + writer.WriteStringValue(LogLevel.Value.ToString()); + } + if (Optional.IsDefined(IsApiLoggingEnabled)) + { + writer.WritePropertyName("enableApiLogging"u8); + writer.WriteBooleanValue(IsApiLoggingEnabled.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + AppDaprConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AppDaprConfig)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAppDaprConfig(document.RootElement, options); + } + + internal static AppDaprConfig DeserializeAppDaprConfig(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool? enabled = default; + string appId = default; + int? appPort = default; + int? httpReadBufferSize = default; + int? httpMaxRequestSize = default; + AppDaprLogLevel? logLevel = default; + bool? enableApiLogging = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("enabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("appId"u8)) + { + appId = property.Value.GetString(); + continue; + } + if (property.NameEquals("appPort"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + appPort = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("httpReadBufferSize"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + httpReadBufferSize = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("httpMaxRequestSize"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + httpMaxRequestSize = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("logLevel"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + logLevel = new AppDaprLogLevel(property.Value.GetString()); + continue; + } + if (property.NameEquals("enableApiLogging"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enableApiLogging = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AppDaprConfig( + enabled, + appId, + appPort, + httpReadBufferSize, + httpMaxRequestSize, + logLevel, + enableApiLogging, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsEnabled), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" enabled: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsEnabled)) + { + builder.Append(" enabled: "); + var boolValue = IsEnabled.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AppId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" appId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AppId)) + { + builder.Append(" appId: "); + if (AppId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{AppId}'''"); + } + else + { + builder.AppendLine($"'{AppId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AppPort), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" appPort: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AppPort)) + { + builder.Append(" appPort: "); + builder.AppendLine($"{AppPort.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(HttpReadBufferSize), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" httpReadBufferSize: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(HttpReadBufferSize)) + { + builder.Append(" httpReadBufferSize: "); + builder.AppendLine($"{HttpReadBufferSize.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(HttpMaxRequestSize), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" httpMaxRequestSize: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(HttpMaxRequestSize)) + { + builder.Append(" httpMaxRequestSize: "); + builder.AppendLine($"{HttpMaxRequestSize.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(LogLevel), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" logLevel: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(LogLevel)) + { + builder.Append(" logLevel: "); + builder.AppendLine($"'{LogLevel.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsApiLoggingEnabled), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" enableApiLogging: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsApiLoggingEnabled)) + { + builder.Append(" enableApiLogging: "); + var boolValue = IsApiLoggingEnabled.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(AppDaprConfig)} does not support writing '{options.Format}' format."); + } + } + + AppDaprConfig IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAppDaprConfig(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AppDaprConfig)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppDaprConfig.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppDaprConfig.cs new file mode 100644 index 0000000000000..d2d5c13e63a67 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppDaprConfig.cs @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// App Dapr configuration. + public partial class AppDaprConfig + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public AppDaprConfig() + { + } + + /// Initializes a new instance of . + /// Boolean indicating if the Dapr side car is enabled. + /// Dapr application identifier. + /// Tells Dapr which port your application is listening on. + /// Dapr max size of http header read buffer in KB to handle when sending multi-KB headers. Default is 65KB. + /// Increasing max size of request body http servers parameter in MB to handle uploading of big files. Default is 4 MB. + /// Sets the log level for the Dapr sidecar. Allowed values are debug, info, warn, error. Default is info. + /// Enables API logging for the Dapr sidecar. + /// Keeps track of any properties unknown to the library. + internal AppDaprConfig(bool? isEnabled, string appId, int? appPort, int? httpReadBufferSize, int? httpMaxRequestSize, AppDaprLogLevel? logLevel, bool? isApiLoggingEnabled, IDictionary serializedAdditionalRawData) + { + IsEnabled = isEnabled; + AppId = appId; + AppPort = appPort; + HttpReadBufferSize = httpReadBufferSize; + HttpMaxRequestSize = httpMaxRequestSize; + LogLevel = logLevel; + IsApiLoggingEnabled = isApiLoggingEnabled; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Boolean indicating if the Dapr side car is enabled. + [WirePath("enabled")] + public bool? IsEnabled { get; set; } + /// Dapr application identifier. + [WirePath("appId")] + public string AppId { get; set; } + /// Tells Dapr which port your application is listening on. + [WirePath("appPort")] + public int? AppPort { get; set; } + /// Dapr max size of http header read buffer in KB to handle when sending multi-KB headers. Default is 65KB. + [WirePath("httpReadBufferSize")] + public int? HttpReadBufferSize { get; set; } + /// Increasing max size of request body http servers parameter in MB to handle uploading of big files. Default is 4 MB. + [WirePath("httpMaxRequestSize")] + public int? HttpMaxRequestSize { get; set; } + /// Sets the log level for the Dapr sidecar. Allowed values are debug, info, warn, error. Default is info. + [WirePath("logLevel")] + public AppDaprLogLevel? LogLevel { get; set; } + /// Enables API logging for the Dapr sidecar. + [WirePath("enableApiLogging")] + public bool? IsApiLoggingEnabled { get; set; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppDaprLogLevel.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppDaprLogLevel.cs new file mode 100644 index 0000000000000..c7cfc02778cd5 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppDaprLogLevel.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.AppService.Models +{ + /// Sets the log level for the Dapr sidecar. Allowed values are debug, info, warn, error. Default is info. + public readonly partial struct AppDaprLogLevel : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AppDaprLogLevel(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string InfoValue = "info"; + private const string DebugValue = "debug"; + private const string WarnValue = "warn"; + private const string ErrorValue = "error"; + + /// info. + public static AppDaprLogLevel Info { get; } = new AppDaprLogLevel(InfoValue); + /// debug. + public static AppDaprLogLevel Debug { get; } = new AppDaprLogLevel(DebugValue); + /// warn. + public static AppDaprLogLevel Warn { get; } = new AppDaprLogLevel(WarnValue); + /// error. + public static AppDaprLogLevel Error { get; } = new AppDaprLogLevel(ErrorValue); + /// Determines if two values are the same. + public static bool operator ==(AppDaprLogLevel left, AppDaprLogLevel right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AppDaprLogLevel left, AppDaprLogLevel right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator AppDaprLogLevel(string value) => new AppDaprLogLevel(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AppDaprLogLevel other && Equals(other); + /// + public bool Equals(AppDaprLogLevel other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceAseRegion.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceAseRegion.Serialization.cs new file mode 100644 index 0000000000000..92318ec073bff --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceAseRegion.Serialization.cs @@ -0,0 +1,545 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class AppServiceAseRegion : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AppServiceAseRegion)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Kind)) + { + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind); + } + if (options.Format != "W") + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (options.Format != "W") + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W") + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(ResourceType); + } + if (options.Format != "W" && Optional.IsDefined(SystemData)) + { + writer.WritePropertyName("systemData"u8); + JsonSerializer.Serialize(writer, SystemData); + } + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsDefined(DisplayName)) + { + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + } + if (options.Format != "W" && Optional.IsDefined(IsStandard)) + { + writer.WritePropertyName("standard"u8); + writer.WriteBooleanValue(IsStandard.Value); + } + if (options.Format != "W" && Optional.IsDefined(IsDedicatedHostEnabled)) + { + writer.WritePropertyName("dedicatedHost"u8); + writer.WriteBooleanValue(IsDedicatedHostEnabled.Value); + } + if (options.Format != "W" && Optional.IsDefined(IsZoneRedundantEnabled)) + { + writer.WritePropertyName("zoneRedundant"u8); + writer.WriteBooleanValue(IsZoneRedundantEnabled.Value); + } + if (Optional.IsCollectionDefined(AvailableSku)) + { + writer.WritePropertyName("availableSku"u8); + writer.WriteStartArray(); + foreach (var item in AvailableSku) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(AvailableOS)) + { + writer.WritePropertyName("availableOS"u8); + writer.WriteStartArray(); + foreach (var item in AvailableOS) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + AppServiceAseRegion IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AppServiceAseRegion)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAppServiceAseRegion(document.RootElement, options); + } + + internal static AppServiceAseRegion DeserializeAppServiceAseRegion(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string kind = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + string displayName = default; + bool? standard = default; + bool? dedicatedHost = default; + bool? zoneRedundant = default; + IList availableSku = default; + IList availableOS = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("kind"u8)) + { + kind = property.Value.GetString(); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("displayName"u8)) + { + displayName = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("standard"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + standard = property0.Value.GetBoolean(); + continue; + } + if (property0.NameEquals("dedicatedHost"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dedicatedHost = property0.Value.GetBoolean(); + continue; + } + if (property0.NameEquals("zoneRedundant"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + zoneRedundant = property0.Value.GetBoolean(); + continue; + } + if (property0.NameEquals("availableSku"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + availableSku = array; + continue; + } + if (property0.NameEquals("availableOS"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + availableOS = array; + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AppServiceAseRegion( + id, + name, + type, + systemData, + displayName, + standard, + dedicatedHost, + zoneRedundant, + availableSku ?? new ChangeTrackingList(), + availableOS ?? new ChangeTrackingList(), + kind, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Kind), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" kind: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Kind)) + { + builder.Append(" kind: "); + if (Kind.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Kind}'''"); + } + else + { + builder.AppendLine($"'{Kind}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DisplayName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" displayName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DisplayName)) + { + builder.Append(" displayName: "); + if (DisplayName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{DisplayName}'''"); + } + else + { + builder.AppendLine($"'{DisplayName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsStandard), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" standard: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsStandard)) + { + builder.Append(" standard: "); + var boolValue = IsStandard.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsDedicatedHostEnabled), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" dedicatedHost: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsDedicatedHostEnabled)) + { + builder.Append(" dedicatedHost: "); + var boolValue = IsDedicatedHostEnabled.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsZoneRedundantEnabled), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" zoneRedundant: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsZoneRedundantEnabled)) + { + builder.Append(" zoneRedundant: "); + var boolValue = IsZoneRedundantEnabled.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AvailableSku), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" availableSku: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(AvailableSku)) + { + if (AvailableSku.Any()) + { + builder.Append(" availableSku: "); + builder.AppendLine("["); + foreach (var item in AvailableSku) + { + if (item == null) + { + builder.Append("null"); + continue; + } + if (item.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item}'''"); + } + else + { + builder.AppendLine($" '{item}'"); + } + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AvailableOS), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" availableOS: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(AvailableOS)) + { + if (AvailableOS.Any()) + { + builder.Append(" availableOS: "); + builder.AppendLine("["); + foreach (var item in AvailableOS) + { + if (item == null) + { + builder.Append("null"); + continue; + } + if (item.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item}'''"); + } + else + { + builder.AppendLine($" '{item}'"); + } + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(AppServiceAseRegion)} does not support writing '{options.Format}' format."); + } + } + + AppServiceAseRegion IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAppServiceAseRegion(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AppServiceAseRegion)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceAseRegion.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceAseRegion.cs new file mode 100644 index 0000000000000..cfc077c2ad92d --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceAseRegion.cs @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppService.Models +{ + /// ASE region. + public partial class AppServiceAseRegion : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public AppServiceAseRegion() + { + AvailableSku = new ChangeTrackingList(); + AvailableOS = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Display name for region. + /// Is region standard. + /// Dedicated host enabled. + /// Zone redundant deployment enabled. + /// Available Skus in region. + /// Available OSs in region. + /// Kind of resource. + /// Keeps track of any properties unknown to the library. + internal AppServiceAseRegion(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string displayName, bool? isStandard, bool? isDedicatedHostEnabled, bool? isZoneRedundantEnabled, IList availableSku, IList availableOS, string kind, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + DisplayName = displayName; + IsStandard = isStandard; + IsDedicatedHostEnabled = isDedicatedHostEnabled; + IsZoneRedundantEnabled = isZoneRedundantEnabled; + AvailableSku = availableSku; + AvailableOS = availableOS; + Kind = kind; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Display name for region. + [WirePath("properties.displayName")] + public string DisplayName { get; } + /// Is region standard. + [WirePath("properties.standard")] + public bool? IsStandard { get; } + /// Dedicated host enabled. + [WirePath("properties.dedicatedHost")] + public bool? IsDedicatedHostEnabled { get; } + /// Zone redundant deployment enabled. + [WirePath("properties.zoneRedundant")] + public bool? IsZoneRedundantEnabled { get; } + /// Available Skus in region. + [WirePath("properties.availableSku")] + public IList AvailableSku { get; } + /// Available OSs in region. + [WirePath("properties.availableOS")] + public IList AvailableOS { get; } + /// Kind of resource. + [WirePath("kind")] + public string Kind { get; set; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceCertificateEmail.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceCertificateEmail.Serialization.cs index cc6d52d5bb21e..ea1dfeae3136c 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceCertificateEmail.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceCertificateEmail.Serialization.cs @@ -28,10 +28,15 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe } writer.WriteStartObject(); - if (Optional.IsDefined(Kind)) + if (Optional.IsDefined(EmailId)) + { + writer.WritePropertyName("emailId"u8); + writer.WriteStringValue(EmailId); + } + if (Optional.IsDefined(TimeStamp)) { - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind); + writer.WritePropertyName("timeStamp"u8); + writer.WriteStringValue(TimeStamp.Value, "O"); } if (options.Format != "W") { @@ -53,19 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WritePropertyName("systemData"u8); JsonSerializer.Serialize(writer, SystemData); } - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(EmailId)) - { - writer.WritePropertyName("emailId"u8); - writer.WriteStringValue(EmailId); - } - if (Optional.IsDefined(TimeStamp)) - { - writer.WritePropertyName("timeStamp"u8); - writer.WriteStringValue(TimeStamp.Value, "O"); - } - writer.WriteEndObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -104,20 +96,28 @@ internal static AppServiceCertificateEmail DeserializeAppServiceCertificateEmail { return null; } - string kind = default; + string emailId = default; + DateTimeOffset? timeStamp = default; ResourceIdentifier id = default; string name = default; ResourceType type = default; SystemData systemData = default; - string emailId = default; - DateTimeOffset? timeStamp = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("kind"u8)) + if (property.NameEquals("emailId"u8)) { - kind = property.Value.GetString(); + emailId = property.Value.GetString(); + continue; + } + if (property.NameEquals("timeStamp"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeStamp = property.Value.GetDateTimeOffset("O"); continue; } if (property.NameEquals("id"u8)) @@ -144,32 +144,6 @@ internal static AppServiceCertificateEmail DeserializeAppServiceCertificateEmail systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); continue; } - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("emailId"u8)) - { - emailId = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("timeStamp"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - timeStamp = property0.Value.GetDateTimeOffset("O"); - continue; - } - } - continue; - } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -183,7 +157,6 @@ internal static AppServiceCertificateEmail DeserializeAppServiceCertificateEmail systemData, emailId, timeStamp, - kind, serializedAdditionalRawData); } @@ -221,101 +194,75 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Kind), out propertyOverride); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EmailId), out propertyOverride); if (hasPropertyOverride) { - builder.Append(" kind: "); + builder.Append(" emailId: "); builder.AppendLine(propertyOverride); } else { - if (Optional.IsDefined(Kind)) + if (Optional.IsDefined(EmailId)) { - builder.Append(" kind: "); - if (Kind.Contains(Environment.NewLine)) + builder.Append(" emailId: "); + if (EmailId.Contains(Environment.NewLine)) { builder.AppendLine("'''"); - builder.AppendLine($"{Kind}'''"); + builder.AppendLine($"{EmailId}'''"); } else { - builder.AppendLine($"'{Kind}'"); + builder.AppendLine($"'{EmailId}'"); } } } - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" id: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Id)) - { - builder.Append(" id: "); - builder.AppendLine($"'{Id.ToString()}'"); - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TimeStamp), out propertyOverride); if (hasPropertyOverride) { - builder.Append(" systemData: "); + builder.Append(" timeStamp: "); builder.AppendLine(propertyOverride); } else { - if (Optional.IsDefined(SystemData)) + if (Optional.IsDefined(TimeStamp)) { - builder.Append(" systemData: "); - builder.AppendLine($"'{SystemData.ToString()}'"); + builder.Append(" timeStamp: "); + var formattedDateTimeString = TypeFormatters.ToString(TimeStamp.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); } } - builder.Append(" properties:"); - builder.AppendLine(" {"); - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EmailId), out propertyOverride); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); if (hasPropertyOverride) { - builder.Append(" emailId: "); + builder.Append(" id: "); builder.AppendLine(propertyOverride); } else { - if (Optional.IsDefined(EmailId)) + if (Optional.IsDefined(Id)) { - builder.Append(" emailId: "); - if (EmailId.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{EmailId}'''"); - } - else - { - builder.AppendLine($"'{EmailId}'"); - } + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); } } - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TimeStamp), out propertyOverride); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); if (hasPropertyOverride) { - builder.Append(" timeStamp: "); + builder.Append(" systemData: "); builder.AppendLine(propertyOverride); } else { - if (Optional.IsDefined(TimeStamp)) + if (Optional.IsDefined(SystemData)) { - builder.Append(" timeStamp: "); - var formattedDateTimeString = TypeFormatters.ToString(TimeStamp.Value, "o"); - builder.AppendLine($"'{formattedDateTimeString}'"); + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); } } - builder.AppendLine(" }"); builder.AppendLine("}"); return BinaryData.FromString(builder.ToString()); } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceCertificateEmail.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceCertificateEmail.cs index c768852aad328..3a4e23b3df939 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceCertificateEmail.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceCertificateEmail.cs @@ -59,24 +59,19 @@ public AppServiceCertificateEmail() /// The systemData. /// Email id. /// Time stamp. - /// Kind of resource. /// Keeps track of any properties unknown to the library. - internal AppServiceCertificateEmail(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string emailId, DateTimeOffset? timeStamp, string kind, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal AppServiceCertificateEmail(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string emailId, DateTimeOffset? timeStamp, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { EmailId = emailId; TimeStamp = timeStamp; - Kind = kind; _serializedAdditionalRawData = serializedAdditionalRawData; } /// Email id. - [WirePath("properties.emailId")] + [WirePath("emailId")] public string EmailId { get; set; } /// Time stamp. - [WirePath("properties.timeStamp")] + [WirePath("timeStamp")] public DateTimeOffset? TimeStamp { get; set; } - /// Kind of resource. - [WirePath("kind")] - public string Kind { get; set; } } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceEnvironmentPatch.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceEnvironmentPatch.Serialization.cs index 4e82be33197ab..a36fea17931a6 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceEnvironmentPatch.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceEnvironmentPatch.Serialization.cs @@ -136,6 +136,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WritePropertyName("hasLinuxWorkers"u8); writer.WriteBooleanValue(HasLinuxWorkers.Value); } + if (Optional.IsDefined(UpgradePreference)) + { + writer.WritePropertyName("upgradePreference"u8); + writer.WriteStringValue(UpgradePreference.Value.ToString()); + } if (Optional.IsDefined(DedicatedHostCount)) { writer.WritePropertyName("dedicatedHostCount"u8); @@ -146,6 +151,21 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WritePropertyName("zoneRedundant"u8); writer.WriteBooleanValue(IsZoneRedundant.Value); } + if (Optional.IsDefined(CustomDnsSuffixConfiguration)) + { + writer.WritePropertyName("customDnsSuffixConfiguration"u8); + writer.WriteObjectValue(CustomDnsSuffixConfiguration, options); + } + if (Optional.IsDefined(NetworkingConfiguration)) + { + writer.WritePropertyName("networkingConfiguration"u8); + writer.WriteObjectValue(NetworkingConfiguration, options); + } + if (options.Format != "W" && Optional.IsDefined(UpgradeAvailability)) + { + writer.WritePropertyName("upgradeAvailability"u8); + writer.WriteStringValue(UpgradeAvailability.Value.ToString()); + } writer.WriteEndObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -204,8 +224,12 @@ internal static AppServiceEnvironmentPatch DeserializeAppServiceEnvironmentPatch IList clusterSettings = default; IList userWhitelistedIPRanges = default; bool? hasLinuxWorkers = default; + AppServiceEnvironmentUpgradePreference? upgradePreference = default; int? dedicatedHostCount = default; bool? zoneRedundant = default; + CustomDnsSuffixConfigurationData customDnsSuffixConfiguration = default; + AseV3NetworkingConfigurationData networkingConfiguration = default; + AppServiceEnvironmentUpgradeAvailability? upgradeAvailability = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -376,6 +400,15 @@ internal static AppServiceEnvironmentPatch DeserializeAppServiceEnvironmentPatch hasLinuxWorkers = property0.Value.GetBoolean(); continue; } + if (property0.NameEquals("upgradePreference"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + upgradePreference = new AppServiceEnvironmentUpgradePreference(property0.Value.GetString()); + continue; + } if (property0.NameEquals("dedicatedHostCount"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -394,6 +427,33 @@ internal static AppServiceEnvironmentPatch DeserializeAppServiceEnvironmentPatch zoneRedundant = property0.Value.GetBoolean(); continue; } + if (property0.NameEquals("customDnsSuffixConfiguration"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + customDnsSuffixConfiguration = CustomDnsSuffixConfigurationData.DeserializeCustomDnsSuffixConfigurationData(property0.Value, options); + continue; + } + if (property0.NameEquals("networkingConfiguration"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + networkingConfiguration = AseV3NetworkingConfigurationData.DeserializeAseV3NetworkingConfigurationData(property0.Value, options); + continue; + } + if (property0.NameEquals("upgradeAvailability"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + upgradeAvailability = new AppServiceEnvironmentUpgradeAvailability(property0.Value.GetString()); + continue; + } } continue; } @@ -422,8 +482,12 @@ internal static AppServiceEnvironmentPatch DeserializeAppServiceEnvironmentPatch clusterSettings ?? new ChangeTrackingList(), userWhitelistedIPRanges ?? new ChangeTrackingList(), hasLinuxWorkers, + upgradePreference, dedicatedHostCount, zoneRedundant, + customDnsSuffixConfiguration, + networkingConfiguration, + upgradeAvailability, kind, serializedAdditionalRawData); } @@ -774,6 +838,21 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(UpgradePreference), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" upgradePreference: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(UpgradePreference)) + { + builder.Append(" upgradePreference: "); + builder.AppendLine($"'{UpgradePreference.Value.ToString()}'"); + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DedicatedHostCount), out propertyOverride); if (hasPropertyOverride) { @@ -805,6 +884,51 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CustomDnsSuffixConfiguration), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" customDnsSuffixConfiguration: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CustomDnsSuffixConfiguration)) + { + builder.Append(" customDnsSuffixConfiguration: "); + BicepSerializationHelpers.AppendChildObject(builder, CustomDnsSuffixConfiguration, options, 4, false, " customDnsSuffixConfiguration: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NetworkingConfiguration), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" networkingConfiguration: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NetworkingConfiguration)) + { + builder.Append(" networkingConfiguration: "); + BicepSerializationHelpers.AppendChildObject(builder, NetworkingConfiguration, options, 4, false, " networkingConfiguration: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(UpgradeAvailability), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" upgradeAvailability: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(UpgradeAvailability)) + { + builder.Append(" upgradeAvailability: "); + builder.AppendLine($"'{UpgradeAvailability.Value.ToString()}'"); + } + } + builder.AppendLine(" }"); builder.AppendLine("}"); return BinaryData.FromString(builder.ToString()); diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceEnvironmentPatch.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceEnvironmentPatch.cs index 1617071c6e01e..b292e4b9e4db8 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceEnvironmentPatch.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceEnvironmentPatch.cs @@ -76,11 +76,15 @@ public AppServiceEnvironmentPatch() /// Custom settings for changing the behavior of the App Service Environment. /// User added ip ranges to whitelist on ASE db. /// Flag that displays whether an ASE has linux workers or not. + /// Upgrade Preference. /// Dedicated Host Count. /// Whether or not this App Service Environment is zone-redundant. + /// Full view of the custom domain suffix configuration for ASEv3. + /// Full view of networking configuration for an ASE. + /// Whether an upgrade is available for this App Service Environment. /// Kind of resource. /// Keeps track of any properties unknown to the library. - internal AppServiceEnvironmentPatch(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ProvisioningState? provisioningState, HostingEnvironmentStatus? status, AppServiceVirtualNetworkProfile virtualNetwork, LoadBalancingMode? internalLoadBalancingMode, string multiSize, int? multiRoleCount, int? ipSslAddressCount, string dnsSuffix, int? maximumNumberOfMachines, int? frontEndScaleFactor, bool? isSuspended, IList clusterSettings, IList userWhitelistedIPRanges, bool? hasLinuxWorkers, int? dedicatedHostCount, bool? isZoneRedundant, string kind, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal AppServiceEnvironmentPatch(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ProvisioningState? provisioningState, HostingEnvironmentStatus? status, AppServiceVirtualNetworkProfile virtualNetwork, LoadBalancingMode? internalLoadBalancingMode, string multiSize, int? multiRoleCount, int? ipSslAddressCount, string dnsSuffix, int? maximumNumberOfMachines, int? frontEndScaleFactor, bool? isSuspended, IList clusterSettings, IList userWhitelistedIPRanges, bool? hasLinuxWorkers, AppServiceEnvironmentUpgradePreference? upgradePreference, int? dedicatedHostCount, bool? isZoneRedundant, CustomDnsSuffixConfigurationData customDnsSuffixConfiguration, AseV3NetworkingConfigurationData networkingConfiguration, AppServiceEnvironmentUpgradeAvailability? upgradeAvailability, string kind, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { ProvisioningState = provisioningState; Status = status; @@ -96,8 +100,12 @@ internal AppServiceEnvironmentPatch(ResourceIdentifier id, string name, Resource ClusterSettings = clusterSettings; UserWhitelistedIPRanges = userWhitelistedIPRanges; HasLinuxWorkers = hasLinuxWorkers; + UpgradePreference = upgradePreference; DedicatedHostCount = dedicatedHostCount; IsZoneRedundant = isZoneRedundant; + CustomDnsSuffixConfiguration = customDnsSuffixConfiguration; + NetworkingConfiguration = networkingConfiguration; + UpgradeAvailability = upgradeAvailability; Kind = kind; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -147,12 +155,24 @@ internal AppServiceEnvironmentPatch(ResourceIdentifier id, string name, Resource /// Flag that displays whether an ASE has linux workers or not. [WirePath("properties.hasLinuxWorkers")] public bool? HasLinuxWorkers { get; } + /// Upgrade Preference. + [WirePath("properties.upgradePreference")] + public AppServiceEnvironmentUpgradePreference? UpgradePreference { get; set; } /// Dedicated Host Count. [WirePath("properties.dedicatedHostCount")] public int? DedicatedHostCount { get; set; } /// Whether or not this App Service Environment is zone-redundant. [WirePath("properties.zoneRedundant")] public bool? IsZoneRedundant { get; set; } + /// Full view of the custom domain suffix configuration for ASEv3. + [WirePath("properties.customDnsSuffixConfiguration")] + public CustomDnsSuffixConfigurationData CustomDnsSuffixConfiguration { get; set; } + /// Full view of networking configuration for an ASE. + [WirePath("properties.networkingConfiguration")] + public AseV3NetworkingConfigurationData NetworkingConfiguration { get; set; } + /// Whether an upgrade is available for this App Service Environment. + [WirePath("properties.upgradeAvailability")] + public AppServiceEnvironmentUpgradeAvailability? UpgradeAvailability { get; } /// Kind of resource. [WirePath("kind")] public string Kind { get; set; } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceEnvironmentProperties.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceEnvironmentProperties.Serialization.cs index 9d93148e6ccdc..e2c2bb6540422 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceEnvironmentProperties.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceEnvironmentProperties.Serialization.cs @@ -105,6 +105,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo writer.WritePropertyName("hasLinuxWorkers"u8); writer.WriteBooleanValue(HasLinuxWorkers.Value); } + if (Optional.IsDefined(UpgradePreference)) + { + writer.WritePropertyName("upgradePreference"u8); + writer.WriteStringValue(UpgradePreference.Value.ToString()); + } if (Optional.IsDefined(DedicatedHostCount)) { writer.WritePropertyName("dedicatedHostCount"u8); @@ -115,6 +120,21 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo writer.WritePropertyName("zoneRedundant"u8); writer.WriteBooleanValue(IsZoneRedundant.Value); } + if (Optional.IsDefined(CustomDnsSuffixConfiguration)) + { + writer.WritePropertyName("customDnsSuffixConfiguration"u8); + writer.WriteObjectValue(CustomDnsSuffixConfiguration, options); + } + if (Optional.IsDefined(NetworkingConfiguration)) + { + writer.WritePropertyName("networkingConfiguration"u8); + writer.WriteObjectValue(NetworkingConfiguration, options); + } + if (options.Format != "W" && Optional.IsDefined(UpgradeAvailability)) + { + writer.WritePropertyName("upgradeAvailability"u8); + writer.WriteStringValue(UpgradeAvailability.Value.ToString()); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -167,8 +187,12 @@ internal static AppServiceEnvironmentProperties DeserializeAppServiceEnvironment IList clusterSettings = default; IList userWhitelistedIPRanges = default; bool? hasLinuxWorkers = default; + AppServiceEnvironmentUpgradePreference? upgradePreference = default; int? dedicatedHostCount = default; bool? zoneRedundant = default; + CustomDnsSuffixConfigurationData customDnsSuffixConfiguration = default; + AseV3NetworkingConfigurationData networkingConfiguration = default; + AppServiceEnvironmentUpgradeAvailability? upgradeAvailability = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -297,6 +321,15 @@ internal static AppServiceEnvironmentProperties DeserializeAppServiceEnvironment hasLinuxWorkers = property.Value.GetBoolean(); continue; } + if (property.NameEquals("upgradePreference"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + upgradePreference = new AppServiceEnvironmentUpgradePreference(property.Value.GetString()); + continue; + } if (property.NameEquals("dedicatedHostCount"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -315,6 +348,33 @@ internal static AppServiceEnvironmentProperties DeserializeAppServiceEnvironment zoneRedundant = property.Value.GetBoolean(); continue; } + if (property.NameEquals("customDnsSuffixConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + customDnsSuffixConfiguration = CustomDnsSuffixConfigurationData.DeserializeCustomDnsSuffixConfigurationData(property.Value, options); + continue; + } + if (property.NameEquals("networkingConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + networkingConfiguration = AseV3NetworkingConfigurationData.DeserializeAseV3NetworkingConfigurationData(property.Value, options); + continue; + } + if (property.NameEquals("upgradeAvailability"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + upgradeAvailability = new AppServiceEnvironmentUpgradeAvailability(property.Value.GetString()); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -336,8 +396,12 @@ internal static AppServiceEnvironmentProperties DeserializeAppServiceEnvironment clusterSettings ?? new ChangeTrackingList(), userWhitelistedIPRanges ?? new ChangeTrackingList(), hasLinuxWorkers, + upgradePreference, dedicatedHostCount, zoneRedundant, + customDnsSuffixConfiguration, + networkingConfiguration, + upgradeAvailability, serializedAdditionalRawData); } @@ -609,6 +673,21 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(UpgradePreference), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" upgradePreference: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(UpgradePreference)) + { + builder.Append(" upgradePreference: "); + builder.AppendLine($"'{UpgradePreference.Value.ToString()}'"); + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DedicatedHostCount), out propertyOverride); if (hasPropertyOverride) { @@ -640,6 +719,51 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CustomDnsSuffixConfiguration), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" customDnsSuffixConfiguration: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CustomDnsSuffixConfiguration)) + { + builder.Append(" customDnsSuffixConfiguration: "); + BicepSerializationHelpers.AppendChildObject(builder, CustomDnsSuffixConfiguration, options, 2, false, " customDnsSuffixConfiguration: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NetworkingConfiguration), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" networkingConfiguration: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NetworkingConfiguration)) + { + builder.Append(" networkingConfiguration: "); + BicepSerializationHelpers.AppendChildObject(builder, NetworkingConfiguration, options, 2, false, " networkingConfiguration: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(UpgradeAvailability), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" upgradeAvailability: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(UpgradeAvailability)) + { + builder.Append(" upgradeAvailability: "); + builder.AppendLine($"'{UpgradeAvailability.Value.ToString()}'"); + } + } + builder.AppendLine("}"); return BinaryData.FromString(builder.ToString()); } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceEnvironmentProperties.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceEnvironmentProperties.cs index fe7e8ea1abbfa..27365bc7c298a 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceEnvironmentProperties.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceEnvironmentProperties.cs @@ -75,10 +75,14 @@ public AppServiceEnvironmentProperties(AppServiceVirtualNetworkProfile virtualNe /// Custom settings for changing the behavior of the App Service Environment. /// User added ip ranges to whitelist on ASE db. /// Flag that displays whether an ASE has linux workers or not. + /// Upgrade Preference. /// Dedicated Host Count. /// Whether or not this App Service Environment is zone-redundant. + /// Full view of the custom domain suffix configuration for ASEv3. + /// Full view of networking configuration for an ASE. + /// Whether an upgrade is available for this App Service Environment. /// Keeps track of any properties unknown to the library. - internal AppServiceEnvironmentProperties(ProvisioningState? provisioningState, HostingEnvironmentStatus? status, AppServiceVirtualNetworkProfile virtualNetwork, LoadBalancingMode? internalLoadBalancingMode, string multiSize, int? multiRoleCount, int? ipSslAddressCount, string dnsSuffix, int? maximumNumberOfMachines, int? frontEndScaleFactor, bool? isSuspended, IList clusterSettings, IList userWhitelistedIPRanges, bool? hasLinuxWorkers, int? dedicatedHostCount, bool? isZoneRedundant, IDictionary serializedAdditionalRawData) + internal AppServiceEnvironmentProperties(ProvisioningState? provisioningState, HostingEnvironmentStatus? status, AppServiceVirtualNetworkProfile virtualNetwork, LoadBalancingMode? internalLoadBalancingMode, string multiSize, int? multiRoleCount, int? ipSslAddressCount, string dnsSuffix, int? maximumNumberOfMachines, int? frontEndScaleFactor, bool? isSuspended, IList clusterSettings, IList userWhitelistedIPRanges, bool? hasLinuxWorkers, AppServiceEnvironmentUpgradePreference? upgradePreference, int? dedicatedHostCount, bool? isZoneRedundant, CustomDnsSuffixConfigurationData customDnsSuffixConfiguration, AseV3NetworkingConfigurationData networkingConfiguration, AppServiceEnvironmentUpgradeAvailability? upgradeAvailability, IDictionary serializedAdditionalRawData) { ProvisioningState = provisioningState; Status = status; @@ -94,8 +98,12 @@ internal AppServiceEnvironmentProperties(ProvisioningState? provisioningState, H ClusterSettings = clusterSettings; UserWhitelistedIPRanges = userWhitelistedIPRanges; HasLinuxWorkers = hasLinuxWorkers; + UpgradePreference = upgradePreference; DedicatedHostCount = dedicatedHostCount; IsZoneRedundant = isZoneRedundant; + CustomDnsSuffixConfiguration = customDnsSuffixConfiguration; + NetworkingConfiguration = networkingConfiguration; + UpgradeAvailability = upgradeAvailability; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -149,11 +157,23 @@ internal AppServiceEnvironmentProperties() /// Flag that displays whether an ASE has linux workers or not. [WirePath("hasLinuxWorkers")] public bool? HasLinuxWorkers { get; } + /// Upgrade Preference. + [WirePath("upgradePreference")] + public AppServiceEnvironmentUpgradePreference? UpgradePreference { get; set; } /// Dedicated Host Count. [WirePath("dedicatedHostCount")] public int? DedicatedHostCount { get; set; } /// Whether or not this App Service Environment is zone-redundant. [WirePath("zoneRedundant")] public bool? IsZoneRedundant { get; set; } + /// Full view of the custom domain suffix configuration for ASEv3. + [WirePath("customDnsSuffixConfiguration")] + public CustomDnsSuffixConfigurationData CustomDnsSuffixConfiguration { get; set; } + /// Full view of networking configuration for an ASE. + [WirePath("networkingConfiguration")] + public AseV3NetworkingConfigurationData NetworkingConfiguration { get; set; } + /// Whether an upgrade is available for this App Service Environment. + [WirePath("upgradeAvailability")] + public AppServiceEnvironmentUpgradeAvailability? UpgradeAvailability { get; } } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceEnvironmentUpgradeAvailability.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceEnvironmentUpgradeAvailability.cs new file mode 100644 index 0000000000000..cdf31ca0089c6 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceEnvironmentUpgradeAvailability.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.AppService.Models +{ + /// Whether an upgrade is available for this App Service Environment. + public readonly partial struct AppServiceEnvironmentUpgradeAvailability : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AppServiceEnvironmentUpgradeAvailability(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NoneValue = "None"; + private const string ReadyValue = "Ready"; + + /// No upgrade is currently available for this App Service Environment. + public static AppServiceEnvironmentUpgradeAvailability None { get; } = new AppServiceEnvironmentUpgradeAvailability(NoneValue); + /// An upgrade is ready to be manually initiated on this App Service Environment. + public static AppServiceEnvironmentUpgradeAvailability Ready { get; } = new AppServiceEnvironmentUpgradeAvailability(ReadyValue); + /// Determines if two values are the same. + public static bool operator ==(AppServiceEnvironmentUpgradeAvailability left, AppServiceEnvironmentUpgradeAvailability right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AppServiceEnvironmentUpgradeAvailability left, AppServiceEnvironmentUpgradeAvailability right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator AppServiceEnvironmentUpgradeAvailability(string value) => new AppServiceEnvironmentUpgradeAvailability(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AppServiceEnvironmentUpgradeAvailability other && Equals(other); + /// + public bool Equals(AppServiceEnvironmentUpgradeAvailability other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceEnvironmentUpgradePreference.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceEnvironmentUpgradePreference.cs new file mode 100644 index 0000000000000..3a56a7209458f --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceEnvironmentUpgradePreference.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.AppService.Models +{ + /// Upgrade Preference. + public readonly partial struct AppServiceEnvironmentUpgradePreference : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AppServiceEnvironmentUpgradePreference(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NoneValue = "None"; + private const string EarlyValue = "Early"; + private const string LateValue = "Late"; + private const string ManualValue = "Manual"; + + /// No preference on when this App Service Environment will be upgraded. + public static AppServiceEnvironmentUpgradePreference None { get; } = new AppServiceEnvironmentUpgradePreference(NoneValue); + /// This App Service Environment will be upgraded before others in the same region that have Upgrade Preference 'Late'. + public static AppServiceEnvironmentUpgradePreference Early { get; } = new AppServiceEnvironmentUpgradePreference(EarlyValue); + /// This App Service Environment will be upgraded after others in the same region that have Upgrade Preference 'Early'. + public static AppServiceEnvironmentUpgradePreference Late { get; } = new AppServiceEnvironmentUpgradePreference(LateValue); + /// ASEv3 only. Once an upgrade is available, this App Service Environment will wait 10 days for the upgrade to be manually initiated. After 10 days the upgrade will begin automatically. + public static AppServiceEnvironmentUpgradePreference Manual { get; } = new AppServiceEnvironmentUpgradePreference(ManualValue); + /// Determines if two values are the same. + public static bool operator ==(AppServiceEnvironmentUpgradePreference left, AppServiceEnvironmentUpgradePreference right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AppServiceEnvironmentUpgradePreference left, AppServiceEnvironmentUpgradePreference right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator AppServiceEnvironmentUpgradePreference(string value) => new AppServiceEnvironmentUpgradePreference(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AppServiceEnvironmentUpgradePreference other && Equals(other); + /// + public bool Equals(AppServiceEnvironmentUpgradePreference other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceKind.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceKind.cs new file mode 100644 index 0000000000000..c374d40533409 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceKind.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The workflow kind. + public readonly partial struct AppServiceKind : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AppServiceKind(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string StatefulValue = "Stateful"; + private const string StatelessValue = "Stateless"; + + /// Stateful. + public static AppServiceKind Stateful { get; } = new AppServiceKind(StatefulValue); + /// Stateless. + public static AppServiceKind Stateless { get; } = new AppServiceKind(StatelessValue); + /// Determines if two values are the same. + public static bool operator ==(AppServiceKind left, AppServiceKind right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AppServiceKind left, AppServiceKind right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator AppServiceKind(string value) => new AppServiceKind(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AppServiceKind other && Equals(other); + /// + public bool Equals(AppServiceKind other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceOperation.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceOperation.Serialization.cs index 8f85055ff01e9..0132e70c048e9 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceOperation.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceOperation.Serialization.cs @@ -49,6 +49,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri writer.WriteStartArray(); foreach (var item in Errors) { + if (item == null) + { + writer.WriteNullValue(); + continue; + } JsonSerializer.Serialize(writer, item); } writer.WriteEndArray(); @@ -151,7 +156,14 @@ internal static AppServiceOperation DeserializeAppServiceOperation(JsonElement e List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(JsonSerializer.Deserialize(item.GetRawText())); + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(JsonSerializer.Deserialize(item.GetRawText())); + } } errors = array; continue; @@ -298,7 +310,12 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) builder.AppendLine("["); foreach (var item in Errors) { - BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " errors: "); + if (item == null) + { + builder.Append("null"); + continue; + } + builder.AppendLine($" '{item.ToString()}'"); } builder.AppendLine(" ]"); } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceOperation.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceOperation.cs index 46d4e57b94b24..58b6ecd6707c7 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceOperation.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceOperation.cs @@ -83,9 +83,6 @@ internal AppServiceOperation(string id, string name, AppServiceOperationStatus? /// The current status of the operation. [WirePath("status")] public AppServiceOperationStatus? Status { get; } - /// Any errors associate with the operation. - [WirePath("errors")] - public IReadOnlyList Errors { get; } /// Time when operation has started. [WirePath("createdTime")] public DateTimeOffset? CreatedOn { get; } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServicePlanPatch.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServicePlanPatch.Serialization.cs index 577ad88732779..035f86eee8a97 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServicePlanPatch.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServicePlanPatch.Serialization.cs @@ -80,6 +80,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("maximumNumberOfWorkers"u8); writer.WriteNumberValue(MaximumNumberOfWorkers.Value); } + if (options.Format != "W" && Optional.IsDefined(NumberOfWorkers)) + { + writer.WritePropertyName("numberOfWorkers"u8); + writer.WriteNumberValue(NumberOfWorkers.Value); + } if (options.Format != "W" && Optional.IsDefined(GeoRegion)) { writer.WritePropertyName("geoRegion"u8); @@ -214,6 +219,7 @@ internal static AppServicePlanPatch DeserializeAppServicePlanPatch(JsonElement e string subscription = default; HostingEnvironmentProfile hostingEnvironmentProfile = default; int? maximumNumberOfWorkers = default; + int? numberOfWorkers = default; string geoRegion = default; bool? perSiteScaling = default; bool? elasticScaleEnabled = default; @@ -310,6 +316,15 @@ internal static AppServicePlanPatch DeserializeAppServicePlanPatch(JsonElement e maximumNumberOfWorkers = property0.Value.GetInt32(); continue; } + if (property0.NameEquals("numberOfWorkers"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + numberOfWorkers = property0.Value.GetInt32(); + continue; + } if (property0.NameEquals("geoRegion"u8)) { geoRegion = property0.Value.GetString(); @@ -474,6 +489,7 @@ internal static AppServicePlanPatch DeserializeAppServicePlanPatch(JsonElement e subscription, hostingEnvironmentProfile, maximumNumberOfWorkers, + numberOfWorkers, geoRegion, perSiteScaling, elasticScaleEnabled, @@ -675,6 +691,21 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NumberOfWorkers), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" numberOfWorkers: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NumberOfWorkers)) + { + builder.Append(" numberOfWorkers: "); + builder.AppendLine($"{NumberOfWorkers.Value}"); + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(GeoRegion), out propertyOverride); if (hasPropertyOverride) { diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServicePlanPatch.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServicePlanPatch.cs index b68b0fc9218c6..a9acd038eafd2 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServicePlanPatch.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServicePlanPatch.cs @@ -62,6 +62,7 @@ public AppServicePlanPatch() /// App Service plan subscription. /// Specification for the App Service Environment to use for the App Service plan. /// Maximum number of instances that can be assigned to this App Service plan. + /// The number of instances that are assigned to this App Service plan. /// Geographical location for the App Service plan. /// /// If <code>true</code>, apps assigned to this App Service plan can be scaled independently. @@ -87,13 +88,14 @@ public AppServicePlanPatch() /// /// Kind of resource. /// Keeps track of any properties unknown to the library. - internal AppServicePlanPatch(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string workerTierName, AppServicePlanStatus? status, string subscription, HostingEnvironmentProfile hostingEnvironmentProfile, int? maximumNumberOfWorkers, string geoRegion, bool? isPerSiteScaling, bool? isElasticScaleEnabled, int? maximumElasticWorkerCount, int? numberOfSites, bool? isSpot, DateTimeOffset? spotExpirationOn, DateTimeOffset? freeOfferExpirationOn, string resourceGroup, bool? isReserved, bool? isXenon, bool? isHyperV, int? targetWorkerCount, int? targetWorkerSizeId, ProvisioningState? provisioningState, KubeEnvironmentProfile kubeEnvironmentProfile, bool? isZoneRedundant, string kind, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal AppServicePlanPatch(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string workerTierName, AppServicePlanStatus? status, string subscription, HostingEnvironmentProfile hostingEnvironmentProfile, int? maximumNumberOfWorkers, int? numberOfWorkers, string geoRegion, bool? isPerSiteScaling, bool? isElasticScaleEnabled, int? maximumElasticWorkerCount, int? numberOfSites, bool? isSpot, DateTimeOffset? spotExpirationOn, DateTimeOffset? freeOfferExpirationOn, string resourceGroup, bool? isReserved, bool? isXenon, bool? isHyperV, int? targetWorkerCount, int? targetWorkerSizeId, ProvisioningState? provisioningState, KubeEnvironmentProfile kubeEnvironmentProfile, bool? isZoneRedundant, string kind, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { WorkerTierName = workerTierName; Status = status; Subscription = subscription; HostingEnvironmentProfile = hostingEnvironmentProfile; MaximumNumberOfWorkers = maximumNumberOfWorkers; + NumberOfWorkers = numberOfWorkers; GeoRegion = geoRegion; IsPerSiteScaling = isPerSiteScaling; IsElasticScaleEnabled = isElasticScaleEnabled; @@ -130,6 +132,9 @@ internal AppServicePlanPatch(ResourceIdentifier id, string name, ResourceType re /// Maximum number of instances that can be assigned to this App Service plan. [WirePath("properties.maximumNumberOfWorkers")] public int? MaximumNumberOfWorkers { get; } + /// The number of instances that are assigned to this App Service plan. + [WirePath("properties.numberOfWorkers")] + public int? NumberOfWorkers { get; } /// Geographical location for the App Service plan. [WirePath("properties.geoRegion")] public string GeoRegion { get; } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceSkuName.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceSkuName.cs index e798b34de2fd0..e0f8208fd85ab 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceSkuName.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceSkuName.cs @@ -35,6 +35,7 @@ public AppServiceSkuName(string value) private const string PremiumContainerValue = "PremiumContainer"; private const string ElasticPremiumValue = "ElasticPremium"; private const string ElasticIsolatedValue = "ElasticIsolated"; + private const string FlexConsumptionValue = "FlexConsumption"; /// Free. public static AppServiceSkuName Free { get; } = new AppServiceSkuName(FreeValue); @@ -62,6 +63,8 @@ public AppServiceSkuName(string value) public static AppServiceSkuName ElasticPremium { get; } = new AppServiceSkuName(ElasticPremiumValue); /// ElasticIsolated. public static AppServiceSkuName ElasticIsolated { get; } = new AppServiceSkuName(ElasticIsolatedValue); + /// FlexConsumption. + public static AppServiceSkuName FlexConsumption { get; } = new AppServiceSkuName(FlexConsumptionValue); /// Determines if two values are the same. public static bool operator ==(AppServiceSkuName left, AppServiceSkuName right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceStorageAccessInfo.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceStorageAccessInfo.Serialization.cs index 7bd0d0f52b942..af218991832ca 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceStorageAccessInfo.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceStorageAccessInfo.Serialization.cs @@ -57,6 +57,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR writer.WritePropertyName("state"u8); writer.WriteStringValue(State.Value.ToSerialString()); } + if (Optional.IsDefined(Protocol)) + { + writer.WritePropertyName("protocol"u8); + writer.WriteStringValue(Protocol.Value.ToString()); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -101,6 +106,7 @@ internal static AppServiceStorageAccessInfo DeserializeAppServiceStorageAccessIn string accessKey = default; string mountPath = default; AppServiceStorageAccountState? state = default; + AppServiceStorageProtocol? protocol = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -143,6 +149,15 @@ internal static AppServiceStorageAccessInfo DeserializeAppServiceStorageAccessIn state = property.Value.GetString().ToAppServiceStorageAccountState(); continue; } + if (property.NameEquals("protocol"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + protocol = new AppServiceStorageProtocol(property.Value.GetString()); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -156,6 +171,7 @@ internal static AppServiceStorageAccessInfo DeserializeAppServiceStorageAccessIn accessKey, mountPath, state, + protocol, serializedAdditionalRawData); } @@ -292,6 +308,21 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Protocol), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" protocol: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Protocol)) + { + builder.Append(" protocol: "); + builder.AppendLine($"'{Protocol.Value.ToString()}'"); + } + } + builder.AppendLine("}"); return BinaryData.FromString(builder.ToString()); } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceStorageAccessInfo.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceStorageAccessInfo.cs index 825ca9507713c..9ce629526b2d6 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceStorageAccessInfo.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceStorageAccessInfo.cs @@ -57,8 +57,9 @@ public AppServiceStorageAccessInfo() /// Access key for the storage account. /// Path to mount the storage within the site's runtime environment. /// State of the storage account. + /// Mounting protocol to use for the storage account. /// Keeps track of any properties unknown to the library. - internal AppServiceStorageAccessInfo(AppServiceStorageType? storageType, string accountName, string shareName, string accessKey, string mountPath, AppServiceStorageAccountState? state, IDictionary serializedAdditionalRawData) + internal AppServiceStorageAccessInfo(AppServiceStorageType? storageType, string accountName, string shareName, string accessKey, string mountPath, AppServiceStorageAccountState? state, AppServiceStorageProtocol? protocol, IDictionary serializedAdditionalRawData) { StorageType = storageType; AccountName = accountName; @@ -66,6 +67,7 @@ internal AppServiceStorageAccessInfo(AppServiceStorageType? storageType, string AccessKey = accessKey; MountPath = mountPath; State = state; + Protocol = protocol; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -87,5 +89,8 @@ internal AppServiceStorageAccessInfo(AppServiceStorageType? storageType, string /// State of the storage account. [WirePath("state")] public AppServiceStorageAccountState? State { get; } + /// Mounting protocol to use for the storage account. + [WirePath("protocol")] + public AppServiceStorageProtocol? Protocol { get; set; } } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceStorageProtocol.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceStorageProtocol.cs new file mode 100644 index 0000000000000..7f99ac5a60fb9 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceStorageProtocol.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.AppService.Models +{ + /// Mounting protocol to use for the storage account. + public readonly partial struct AppServiceStorageProtocol : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AppServiceStorageProtocol(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SmbValue = "Smb"; + private const string HttpValue = "Http"; + private const string NfsValue = "Nfs"; + + /// Smb. + public static AppServiceStorageProtocol Smb { get; } = new AppServiceStorageProtocol(SmbValue); + /// Http. + public static AppServiceStorageProtocol Http { get; } = new AppServiceStorageProtocol(HttpValue); + /// Nfs. + public static AppServiceStorageProtocol Nfs { get; } = new AppServiceStorageProtocol(NfsValue); + /// Determines if two values are the same. + public static bool operator ==(AppServiceStorageProtocol left, AppServiceStorageProtocol right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AppServiceStorageProtocol left, AppServiceStorageProtocol right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator AppServiceStorageProtocol(string value) => new AppServiceStorageProtocol(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AppServiceStorageProtocol other && Equals(other); + /// + public bool Equals(AppServiceStorageProtocol other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceSupportedTlsVersion.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceSupportedTlsVersion.cs index 68fb8f7896801..cff486fc89fa0 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceSupportedTlsVersion.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceSupportedTlsVersion.cs @@ -25,6 +25,9 @@ public AppServiceSupportedTlsVersion(string value) private const string Tls1_0Value = "1.0"; private const string Tls1_1Value = "1.1"; private const string Tls1_2Value = "1.2"; + private const string One3Value = "1.3"; + /// 1.3. + public static AppServiceSupportedTlsVersion One3 { get; } = new AppServiceSupportedTlsVersion(One3Value); /// Determines if two values are the same. public static bool operator ==(AppServiceSupportedTlsVersion left, AppServiceSupportedTlsVersion right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceTlsCipherSuite.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceTlsCipherSuite.cs new file mode 100644 index 0000000000000..e9f9b240407e2 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceTlsCipherSuite.cs @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The minimum strength TLS cipher suite allowed for an application. + public readonly partial struct AppServiceTlsCipherSuite : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AppServiceTlsCipherSuite(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string TlsAes256GcmSha384Value = "TLS_AES_256_GCM_SHA384"; + private const string TlsAes128GcmSha256Value = "TLS_AES_128_GCM_SHA256"; + private const string TlsECDiffieHellmanECDsaWithAes256GcmSha384Value = "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384"; + private const string TlsECDiffieHellmanECDsaWithAes128CbcSha256Value = "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256"; + private const string TlsECDiffieHellmanECDsaWithAes128GcmSha256Value = "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256"; + private const string TlsECDiffieHellmanRsaWithAes256GcmSha384Value = "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384"; + private const string TlsECDiffieHellmanRsaWithAes128GcmSha256Value = "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256"; + private const string TlsECDiffieHellmanRsaWithAes256CbcSha384Value = "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384"; + private const string TlsECDiffieHellmanRsaWithAes128CbcSha256Value = "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256"; + private const string TlsECDiffieHellmanRsaWithAes256CbcShaValue = "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA"; + private const string TlsECDiffieHellmanRsaWithAes128CbcShaValue = "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA"; + private const string TlsRsaWithAes256GcmSha384Value = "TLS_RSA_WITH_AES_256_GCM_SHA384"; + private const string TlsRsaWithAes128GcmSha256Value = "TLS_RSA_WITH_AES_128_GCM_SHA256"; + private const string TlsRsaWithAes256CbcSha256Value = "TLS_RSA_WITH_AES_256_CBC_SHA256"; + private const string TlsRsaWithAes128CbcSha256Value = "TLS_RSA_WITH_AES_128_CBC_SHA256"; + private const string TlsRsaWithAes256CbcShaValue = "TLS_RSA_WITH_AES_256_CBC_SHA"; + private const string TlsRsaWithAes128CbcShaValue = "TLS_RSA_WITH_AES_128_CBC_SHA"; + + /// TLS_AES_256_GCM_SHA384. + public static AppServiceTlsCipherSuite TlsAes256GcmSha384 { get; } = new AppServiceTlsCipherSuite(TlsAes256GcmSha384Value); + /// TLS_AES_128_GCM_SHA256. + public static AppServiceTlsCipherSuite TlsAes128GcmSha256 { get; } = new AppServiceTlsCipherSuite(TlsAes128GcmSha256Value); + /// TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384. + public static AppServiceTlsCipherSuite TlsECDiffieHellmanECDsaWithAes256GcmSha384 { get; } = new AppServiceTlsCipherSuite(TlsECDiffieHellmanECDsaWithAes256GcmSha384Value); + /// TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256. + public static AppServiceTlsCipherSuite TlsECDiffieHellmanECDsaWithAes128CbcSha256 { get; } = new AppServiceTlsCipherSuite(TlsECDiffieHellmanECDsaWithAes128CbcSha256Value); + /// TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256. + public static AppServiceTlsCipherSuite TlsECDiffieHellmanECDsaWithAes128GcmSha256 { get; } = new AppServiceTlsCipherSuite(TlsECDiffieHellmanECDsaWithAes128GcmSha256Value); + /// TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384. + public static AppServiceTlsCipherSuite TlsECDiffieHellmanRsaWithAes256GcmSha384 { get; } = new AppServiceTlsCipherSuite(TlsECDiffieHellmanRsaWithAes256GcmSha384Value); + /// TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256. + public static AppServiceTlsCipherSuite TlsECDiffieHellmanRsaWithAes128GcmSha256 { get; } = new AppServiceTlsCipherSuite(TlsECDiffieHellmanRsaWithAes128GcmSha256Value); + /// TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384. + public static AppServiceTlsCipherSuite TlsECDiffieHellmanRsaWithAes256CbcSha384 { get; } = new AppServiceTlsCipherSuite(TlsECDiffieHellmanRsaWithAes256CbcSha384Value); + /// TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256. + public static AppServiceTlsCipherSuite TlsECDiffieHellmanRsaWithAes128CbcSha256 { get; } = new AppServiceTlsCipherSuite(TlsECDiffieHellmanRsaWithAes128CbcSha256Value); + /// TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA. + public static AppServiceTlsCipherSuite TlsECDiffieHellmanRsaWithAes256CbcSha { get; } = new AppServiceTlsCipherSuite(TlsECDiffieHellmanRsaWithAes256CbcShaValue); + /// TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA. + public static AppServiceTlsCipherSuite TlsECDiffieHellmanRsaWithAes128CbcSha { get; } = new AppServiceTlsCipherSuite(TlsECDiffieHellmanRsaWithAes128CbcShaValue); + /// TLS_RSA_WITH_AES_256_GCM_SHA384. + public static AppServiceTlsCipherSuite TlsRsaWithAes256GcmSha384 { get; } = new AppServiceTlsCipherSuite(TlsRsaWithAes256GcmSha384Value); + /// TLS_RSA_WITH_AES_128_GCM_SHA256. + public static AppServiceTlsCipherSuite TlsRsaWithAes128GcmSha256 { get; } = new AppServiceTlsCipherSuite(TlsRsaWithAes128GcmSha256Value); + /// TLS_RSA_WITH_AES_256_CBC_SHA256. + public static AppServiceTlsCipherSuite TlsRsaWithAes256CbcSha256 { get; } = new AppServiceTlsCipherSuite(TlsRsaWithAes256CbcSha256Value); + /// TLS_RSA_WITH_AES_128_CBC_SHA256. + public static AppServiceTlsCipherSuite TlsRsaWithAes128CbcSha256 { get; } = new AppServiceTlsCipherSuite(TlsRsaWithAes128CbcSha256Value); + /// TLS_RSA_WITH_AES_256_CBC_SHA. + public static AppServiceTlsCipherSuite TlsRsaWithAes256CbcSha { get; } = new AppServiceTlsCipherSuite(TlsRsaWithAes256CbcShaValue); + /// TLS_RSA_WITH_AES_128_CBC_SHA. + public static AppServiceTlsCipherSuite TlsRsaWithAes128CbcSha { get; } = new AppServiceTlsCipherSuite(TlsRsaWithAes128CbcShaValue); + /// Determines if two values are the same. + public static bool operator ==(AppServiceTlsCipherSuite left, AppServiceTlsCipherSuite right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AppServiceTlsCipherSuite left, AppServiceTlsCipherSuite right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator AppServiceTlsCipherSuite(string value) => new AppServiceTlsCipherSuite(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AppServiceTlsCipherSuite other && Equals(other); + /// + public bool Equals(AppServiceTlsCipherSuite other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AseRegionCollection.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AseRegionCollection.Serialization.cs new file mode 100644 index 0000000000000..d79d51957067f --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AseRegionCollection.Serialization.cs @@ -0,0 +1,205 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + internal partial class AseRegionCollection : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AseRegionCollection)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (options.Format != "W" && Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + AseRegionCollection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AseRegionCollection)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAseRegionCollection(document.RootElement, options); + } + + internal static AseRegionCollection DeserializeAseRegionCollection(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + string nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AppServiceAseRegion.DeserializeAppServiceAseRegion(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AseRegionCollection(value, nextLink, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(AseRegionCollection)} does not support writing '{options.Format}' format."); + } + } + + AseRegionCollection IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAseRegionCollection(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AseRegionCollection)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AseRegionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AseRegionCollection.cs new file mode 100644 index 0000000000000..3472ea406358e --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AseRegionCollection.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.AppService.Models +{ + /// Collection of ASE regions. + internal partial class AseRegionCollection + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Collection of resources. + /// is null. + internal AseRegionCollection(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// Collection of resources. + /// Link to next page of resources. + /// Keeps track of any properties unknown to the library. + internal AseRegionCollection(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AseRegionCollection() + { + } + + /// Collection of resources. + public IReadOnlyList Value { get; } + /// Link to next page of resources. + public string NextLink { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CertificateOrderAction.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CertificateOrderAction.Serialization.cs index fef8ef883c631..db136e5e28fb2 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CertificateOrderAction.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CertificateOrderAction.Serialization.cs @@ -28,10 +28,15 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader } writer.WriteStartObject(); - if (Optional.IsDefined(Kind)) + if (options.Format != "W" && Optional.IsDefined(ActionType)) + { + writer.WritePropertyName("actionType"u8); + writer.WriteStringValue(ActionType.Value.ToSerialString()); + } + if (options.Format != "W" && Optional.IsDefined(CreatedOn)) { - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind); + writer.WritePropertyName("createdAt"u8); + writer.WriteStringValue(CreatedOn.Value, "O"); } if (options.Format != "W") { @@ -53,19 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WritePropertyName("systemData"u8); JsonSerializer.Serialize(writer, SystemData); } - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - if (options.Format != "W" && Optional.IsDefined(ActionType)) - { - writer.WritePropertyName("actionType"u8); - writer.WriteStringValue(ActionType.Value.ToSerialString()); - } - if (options.Format != "W" && Optional.IsDefined(CreatedOn)) - { - writer.WritePropertyName("createdAt"u8); - writer.WriteStringValue(CreatedOn.Value, "O"); - } - writer.WriteEndObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -104,20 +96,32 @@ internal static CertificateOrderAction DeserializeCertificateOrderAction(JsonEle { return null; } - string kind = default; + CertificateOrderActionType? actionType = default; + DateTimeOffset? createdAt = default; ResourceIdentifier id = default; string name = default; ResourceType type = default; SystemData systemData = default; - CertificateOrderActionType? actionType = default; - DateTimeOffset? createdAt = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("kind"u8)) + if (property.NameEquals("actionType"u8)) { - kind = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + actionType = property.Value.GetString().ToCertificateOrderActionType(); + continue; + } + if (property.NameEquals("createdAt"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + createdAt = property.Value.GetDateTimeOffset("O"); continue; } if (property.NameEquals("id"u8)) @@ -144,36 +148,6 @@ internal static CertificateOrderAction DeserializeCertificateOrderAction(JsonEle systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); continue; } - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("actionType"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - actionType = property0.Value.GetString().ToCertificateOrderActionType(); - continue; - } - if (property0.NameEquals("createdAt"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - createdAt = property0.Value.GetDateTimeOffset("O"); - continue; - } - } - continue; - } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -187,7 +161,6 @@ internal static CertificateOrderAction DeserializeCertificateOrderAction(JsonEle systemData, actionType, createdAt, - kind, serializedAdditionalRawData); } @@ -225,93 +198,67 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Kind), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" kind: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Kind)) - { - builder.Append(" kind: "); - if (Kind.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{Kind}'''"); - } - else - { - builder.AppendLine($"'{Kind}'"); - } - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ActionType), out propertyOverride); if (hasPropertyOverride) { - builder.Append(" id: "); + builder.Append(" actionType: "); builder.AppendLine(propertyOverride); } else { - if (Optional.IsDefined(Id)) + if (Optional.IsDefined(ActionType)) { - builder.Append(" id: "); - builder.AppendLine($"'{Id.ToString()}'"); + builder.Append(" actionType: "); + builder.AppendLine($"'{ActionType.Value.ToSerialString()}'"); } } - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CreatedOn), out propertyOverride); if (hasPropertyOverride) { - builder.Append(" systemData: "); + builder.Append(" createdAt: "); builder.AppendLine(propertyOverride); } else { - if (Optional.IsDefined(SystemData)) + if (Optional.IsDefined(CreatedOn)) { - builder.Append(" systemData: "); - builder.AppendLine($"'{SystemData.ToString()}'"); + builder.Append(" createdAt: "); + var formattedDateTimeString = TypeFormatters.ToString(CreatedOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); } } - builder.Append(" properties:"); - builder.AppendLine(" {"); - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ActionType), out propertyOverride); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); if (hasPropertyOverride) { - builder.Append(" actionType: "); + builder.Append(" id: "); builder.AppendLine(propertyOverride); } else { - if (Optional.IsDefined(ActionType)) + if (Optional.IsDefined(Id)) { - builder.Append(" actionType: "); - builder.AppendLine($"'{ActionType.Value.ToSerialString()}'"); + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); } } - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CreatedOn), out propertyOverride); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); if (hasPropertyOverride) { - builder.Append(" createdAt: "); + builder.Append(" systemData: "); builder.AppendLine(propertyOverride); } else { - if (Optional.IsDefined(CreatedOn)) + if (Optional.IsDefined(SystemData)) { - builder.Append(" createdAt: "); - var formattedDateTimeString = TypeFormatters.ToString(CreatedOn.Value, "o"); - builder.AppendLine($"'{formattedDateTimeString}'"); + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); } } - builder.AppendLine(" }"); builder.AppendLine("}"); return BinaryData.FromString(builder.ToString()); } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CertificateOrderAction.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CertificateOrderAction.cs index 9d50465b51b08..57b0ee2d63f3f 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CertificateOrderAction.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CertificateOrderAction.cs @@ -59,24 +59,19 @@ public CertificateOrderAction() /// The systemData. /// Action type. /// Time at which the certificate action was performed. - /// Kind of resource. /// Keeps track of any properties unknown to the library. - internal CertificateOrderAction(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, CertificateOrderActionType? actionType, DateTimeOffset? createdOn, string kind, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal CertificateOrderAction(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, CertificateOrderActionType? actionType, DateTimeOffset? createdOn, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { ActionType = actionType; CreatedOn = createdOn; - Kind = kind; _serializedAdditionalRawData = serializedAdditionalRawData; } /// Action type. - [WirePath("properties.actionType")] + [WirePath("actionType")] public CertificateOrderActionType? ActionType { get; } /// Time at which the certificate action was performed. - [WirePath("properties.createdAt")] + [WirePath("createdAt")] public DateTimeOffset? CreatedOn { get; } - /// Kind of resource. - [WirePath("kind")] - public string Kind { get; set; } } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/ContainerAppsConfiguration.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/ContainerAppsConfiguration.Serialization.cs new file mode 100644 index 0000000000000..4b5738584bbbc --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/ContainerAppsConfiguration.Serialization.cs @@ -0,0 +1,340 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class ContainerAppsConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ContainerAppsConfiguration)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(DaprAIInstrumentationKey)) + { + writer.WritePropertyName("daprAIInstrumentationKey"u8); + writer.WriteStringValue(DaprAIInstrumentationKey); + } + if (Optional.IsDefined(PlatformReservedCidr)) + { + writer.WritePropertyName("platformReservedCidr"u8); + writer.WriteStringValue(PlatformReservedCidr); + } + if (Optional.IsDefined(PlatformReservedDnsIP)) + { + writer.WritePropertyName("platformReservedDnsIP"u8); + writer.WriteStringValue(PlatformReservedDnsIP); + } + if (Optional.IsDefined(ControlPlaneSubnetResourceId)) + { + writer.WritePropertyName("controlPlaneSubnetResourceId"u8); + writer.WriteStringValue(ControlPlaneSubnetResourceId); + } + if (Optional.IsDefined(AppSubnetResourceId)) + { + writer.WritePropertyName("appSubnetResourceId"u8); + writer.WriteStringValue(AppSubnetResourceId); + } + if (Optional.IsDefined(DockerBridgeCidr)) + { + writer.WritePropertyName("dockerBridgeCidr"u8); + writer.WriteStringValue(DockerBridgeCidr); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + ContainerAppsConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ContainerAppsConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeContainerAppsConfiguration(document.RootElement, options); + } + + internal static ContainerAppsConfiguration DeserializeContainerAppsConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string daprAIInstrumentationKey = default; + string platformReservedCidr = default; + string platformReservedDnsIP = default; + string controlPlaneSubnetResourceId = default; + string appSubnetResourceId = default; + string dockerBridgeCidr = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("daprAIInstrumentationKey"u8)) + { + daprAIInstrumentationKey = property.Value.GetString(); + continue; + } + if (property.NameEquals("platformReservedCidr"u8)) + { + platformReservedCidr = property.Value.GetString(); + continue; + } + if (property.NameEquals("platformReservedDnsIP"u8)) + { + platformReservedDnsIP = property.Value.GetString(); + continue; + } + if (property.NameEquals("controlPlaneSubnetResourceId"u8)) + { + controlPlaneSubnetResourceId = property.Value.GetString(); + continue; + } + if (property.NameEquals("appSubnetResourceId"u8)) + { + appSubnetResourceId = property.Value.GetString(); + continue; + } + if (property.NameEquals("dockerBridgeCidr"u8)) + { + dockerBridgeCidr = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ContainerAppsConfiguration( + daprAIInstrumentationKey, + platformReservedCidr, + platformReservedDnsIP, + controlPlaneSubnetResourceId, + appSubnetResourceId, + dockerBridgeCidr, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DaprAIInstrumentationKey), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" daprAIInstrumentationKey: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DaprAIInstrumentationKey)) + { + builder.Append(" daprAIInstrumentationKey: "); + if (DaprAIInstrumentationKey.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{DaprAIInstrumentationKey}'''"); + } + else + { + builder.AppendLine($"'{DaprAIInstrumentationKey}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PlatformReservedCidr), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" platformReservedCidr: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PlatformReservedCidr)) + { + builder.Append(" platformReservedCidr: "); + if (PlatformReservedCidr.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{PlatformReservedCidr}'''"); + } + else + { + builder.AppendLine($"'{PlatformReservedCidr}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PlatformReservedDnsIP), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" platformReservedDnsIP: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PlatformReservedDnsIP)) + { + builder.Append(" platformReservedDnsIP: "); + if (PlatformReservedDnsIP.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{PlatformReservedDnsIP}'''"); + } + else + { + builder.AppendLine($"'{PlatformReservedDnsIP}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ControlPlaneSubnetResourceId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" controlPlaneSubnetResourceId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ControlPlaneSubnetResourceId)) + { + builder.Append(" controlPlaneSubnetResourceId: "); + if (ControlPlaneSubnetResourceId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ControlPlaneSubnetResourceId}'''"); + } + else + { + builder.AppendLine($"'{ControlPlaneSubnetResourceId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AppSubnetResourceId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" appSubnetResourceId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AppSubnetResourceId)) + { + builder.Append(" appSubnetResourceId: "); + if (AppSubnetResourceId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{AppSubnetResourceId}'''"); + } + else + { + builder.AppendLine($"'{AppSubnetResourceId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DockerBridgeCidr), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" dockerBridgeCidr: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DockerBridgeCidr)) + { + builder.Append(" dockerBridgeCidr: "); + if (DockerBridgeCidr.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{DockerBridgeCidr}'''"); + } + else + { + builder.AppendLine($"'{DockerBridgeCidr}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(ContainerAppsConfiguration)} does not support writing '{options.Format}' format."); + } + } + + ContainerAppsConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeContainerAppsConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ContainerAppsConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/ContainerAppsConfiguration.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/ContainerAppsConfiguration.cs new file mode 100644 index 0000000000000..670f50ccdef55 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/ContainerAppsConfiguration.cs @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The ContainerAppsConfiguration. + public partial class ContainerAppsConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ContainerAppsConfiguration() + { + } + + /// Initializes a new instance of . + /// Azure Monitor instrumentation key used by Dapr to export Service to Service communication telemetry. + /// IP range in CIDR notation that can be reserved for environment infrastructure IP addresses. It must not overlap with any other Subnet IP ranges. + /// An IP address from the IP range defined by platformReservedCidr that will be reserved for the internal DNS server. + /// Resource ID of a subnet for control plane infrastructure components. This subnet must be in the same VNET as the subnet defined in appSubnetResourceId. Must not overlap with the IP range defined in platformReservedCidr, if defined. + /// Resource ID of a subnet for control plane infrastructure components. This subnet must be in the same VNET as the subnet defined in appSubnetResourceId. Must not overlap with the IP range defined in platformReservedCidr, if defined. + /// CIDR notation IP range assigned to the Docker bridge network. It must not overlap with any Subnet IP ranges or the IP range defined in platformReservedCidr, if defined. + /// Keeps track of any properties unknown to the library. + internal ContainerAppsConfiguration(string daprAIInstrumentationKey, string platformReservedCidr, string platformReservedDnsIP, string controlPlaneSubnetResourceId, string appSubnetResourceId, string dockerBridgeCidr, IDictionary serializedAdditionalRawData) + { + DaprAIInstrumentationKey = daprAIInstrumentationKey; + PlatformReservedCidr = platformReservedCidr; + PlatformReservedDnsIP = platformReservedDnsIP; + ControlPlaneSubnetResourceId = controlPlaneSubnetResourceId; + AppSubnetResourceId = appSubnetResourceId; + DockerBridgeCidr = dockerBridgeCidr; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Azure Monitor instrumentation key used by Dapr to export Service to Service communication telemetry. + [WirePath("daprAIInstrumentationKey")] + public string DaprAIInstrumentationKey { get; set; } + /// IP range in CIDR notation that can be reserved for environment infrastructure IP addresses. It must not overlap with any other Subnet IP ranges. + [WirePath("platformReservedCidr")] + public string PlatformReservedCidr { get; set; } + /// An IP address from the IP range defined by platformReservedCidr that will be reserved for the internal DNS server. + [WirePath("platformReservedDnsIP")] + public string PlatformReservedDnsIP { get; set; } + /// Resource ID of a subnet for control plane infrastructure components. This subnet must be in the same VNET as the subnet defined in appSubnetResourceId. Must not overlap with the IP range defined in platformReservedCidr, if defined. + [WirePath("controlPlaneSubnetResourceId")] + public string ControlPlaneSubnetResourceId { get; set; } + /// Resource ID of a subnet for control plane infrastructure components. This subnet must be in the same VNET as the subnet defined in appSubnetResourceId. Must not overlap with the IP range defined in platformReservedCidr, if defined. + [WirePath("appSubnetResourceId")] + public string AppSubnetResourceId { get; set; } + /// CIDR notation IP range assigned to the Docker bridge network. It must not overlap with any Subnet IP ranges or the IP range defined in platformReservedCidr, if defined. + [WirePath("dockerBridgeCidr")] + public string DockerBridgeCidr { get; set; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/Correlation.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/Correlation.Serialization.cs new file mode 100644 index 0000000000000..01ebb784e5c2b --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/Correlation.Serialization.cs @@ -0,0 +1,163 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + internal partial class Correlation : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(Correlation)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(ClientTrackingId)) + { + writer.WritePropertyName("clientTrackingId"u8); + writer.WriteStringValue(ClientTrackingId); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + Correlation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(Correlation)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCorrelation(document.RootElement, options); + } + + internal static Correlation DeserializeCorrelation(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string clientTrackingId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("clientTrackingId"u8)) + { + clientTrackingId = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new Correlation(clientTrackingId, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ClientTrackingId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" clientTrackingId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ClientTrackingId)) + { + builder.Append(" clientTrackingId: "); + if (ClientTrackingId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ClientTrackingId}'''"); + } + else + { + builder.AppendLine($"'{ClientTrackingId}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(Correlation)} does not support writing '{options.Format}' format."); + } + } + + Correlation IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeCorrelation(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(Correlation)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/Correlation.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/Correlation.cs new file mode 100644 index 0000000000000..d85797096aaa9 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/Correlation.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The correlation property. + internal partial class Correlation + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal Correlation() + { + } + + /// Initializes a new instance of . + /// The client tracking id. + /// Keeps track of any properties unknown to the library. + internal Correlation(string clientTrackingId, IDictionary serializedAdditionalRawData) + { + ClientTrackingId = clientTrackingId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The client tracking id. + [WirePath("clientTrackingId")] + public string ClientTrackingId { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CsmDeploymentStatus.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CsmDeploymentStatus.Serialization.cs new file mode 100644 index 0000000000000..bf25eb32a5dc9 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CsmDeploymentStatus.Serialization.cs @@ -0,0 +1,577 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class CsmDeploymentStatus : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CsmDeploymentStatus)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Kind)) + { + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind); + } + if (options.Format != "W") + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (options.Format != "W") + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W") + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(ResourceType); + } + if (options.Format != "W" && Optional.IsDefined(SystemData)) + { + writer.WritePropertyName("systemData"u8); + JsonSerializer.Serialize(writer, SystemData); + } + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(DeploymentId)) + { + writer.WritePropertyName("deploymentId"u8); + writer.WriteStringValue(DeploymentId); + } + if (Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + if (Optional.IsDefined(NumberOfInstancesInProgress)) + { + writer.WritePropertyName("numberOfInstancesInProgress"u8); + writer.WriteNumberValue(NumberOfInstancesInProgress.Value); + } + if (Optional.IsDefined(NumberOfInstancesSuccessful)) + { + writer.WritePropertyName("numberOfInstancesSuccessful"u8); + writer.WriteNumberValue(NumberOfInstancesSuccessful.Value); + } + if (Optional.IsDefined(NumberOfInstancesFailed)) + { + writer.WritePropertyName("numberOfInstancesFailed"u8); + writer.WriteNumberValue(NumberOfInstancesFailed.Value); + } + if (Optional.IsCollectionDefined(FailedInstancesLogs)) + { + writer.WritePropertyName("failedInstancesLogs"u8); + writer.WriteStartArray(); + foreach (var item in FailedInstancesLogs) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Errors)) + { + writer.WritePropertyName("errors"u8); + writer.WriteStartArray(); + foreach (var item in Errors) + { + if (item == null) + { + writer.WriteNullValue(); + continue; + } + JsonSerializer.Serialize(writer, item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + CsmDeploymentStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CsmDeploymentStatus)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCsmDeploymentStatus(document.RootElement, options); + } + + internal static CsmDeploymentStatus DeserializeCsmDeploymentStatus(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string kind = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + string deploymentId = default; + DeploymentBuildStatus? status = default; + int? numberOfInstancesInProgress = default; + int? numberOfInstancesSuccessful = default; + int? numberOfInstancesFailed = default; + IList failedInstancesLogs = default; + IList errors = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("kind"u8)) + { + kind = property.Value.GetString(); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("deploymentId"u8)) + { + deploymentId = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("status"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = new DeploymentBuildStatus(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("numberOfInstancesInProgress"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + numberOfInstancesInProgress = property0.Value.GetInt32(); + continue; + } + if (property0.NameEquals("numberOfInstancesSuccessful"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + numberOfInstancesSuccessful = property0.Value.GetInt32(); + continue; + } + if (property0.NameEquals("numberOfInstancesFailed"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + numberOfInstancesFailed = property0.Value.GetInt32(); + continue; + } + if (property0.NameEquals("failedInstancesLogs"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + failedInstancesLogs = array; + continue; + } + if (property0.NameEquals("errors"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(JsonSerializer.Deserialize(item.GetRawText())); + } + } + errors = array; + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CsmDeploymentStatus( + id, + name, + type, + systemData, + deploymentId, + status, + numberOfInstancesInProgress, + numberOfInstancesSuccessful, + numberOfInstancesFailed, + failedInstancesLogs ?? new ChangeTrackingList(), + errors ?? new ChangeTrackingList(), + kind, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Kind), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" kind: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Kind)) + { + builder.Append(" kind: "); + if (Kind.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Kind}'''"); + } + else + { + builder.AppendLine($"'{Kind}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DeploymentId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" deploymentId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DeploymentId)) + { + builder.Append(" deploymentId: "); + if (DeploymentId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{DeploymentId}'''"); + } + else + { + builder.AppendLine($"'{DeploymentId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Status), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" status: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Status)) + { + builder.Append(" status: "); + builder.AppendLine($"'{Status.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NumberOfInstancesInProgress), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" numberOfInstancesInProgress: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NumberOfInstancesInProgress)) + { + builder.Append(" numberOfInstancesInProgress: "); + builder.AppendLine($"{NumberOfInstancesInProgress.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NumberOfInstancesSuccessful), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" numberOfInstancesSuccessful: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NumberOfInstancesSuccessful)) + { + builder.Append(" numberOfInstancesSuccessful: "); + builder.AppendLine($"{NumberOfInstancesSuccessful.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NumberOfInstancesFailed), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" numberOfInstancesFailed: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NumberOfInstancesFailed)) + { + builder.Append(" numberOfInstancesFailed: "); + builder.AppendLine($"{NumberOfInstancesFailed.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(FailedInstancesLogs), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" failedInstancesLogs: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(FailedInstancesLogs)) + { + if (FailedInstancesLogs.Any()) + { + builder.Append(" failedInstancesLogs: "); + builder.AppendLine("["); + foreach (var item in FailedInstancesLogs) + { + if (item == null) + { + builder.Append("null"); + continue; + } + if (item.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item}'''"); + } + else + { + builder.AppendLine($" '{item}'"); + } + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Errors), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" errors: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Errors)) + { + if (Errors.Any()) + { + builder.Append(" errors: "); + builder.AppendLine("["); + foreach (var item in Errors) + { + if (item == null) + { + builder.Append("null"); + continue; + } + builder.AppendLine($" '{item.ToString()}'"); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(CsmDeploymentStatus)} does not support writing '{options.Format}' format."); + } + } + + CsmDeploymentStatus IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeCsmDeploymentStatus(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CsmDeploymentStatus)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CsmDeploymentStatus.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CsmDeploymentStatus.cs new file mode 100644 index 0000000000000..f84317febef87 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CsmDeploymentStatus.cs @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppService.Models +{ + /// Deployment status response payload. + public partial class CsmDeploymentStatus : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public CsmDeploymentStatus() + { + FailedInstancesLogs = new ChangeTrackingList(); + Errors = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Deployment operation id. + /// Deployment build status. + /// Number of site instances currently being provisioned. + /// Number of site instances provisioned successfully. + /// Number of site instances failed to provision. + /// List of URLs pointing to logs for instances which failed to provision. + /// List of errors. + /// Kind of resource. + /// Keeps track of any properties unknown to the library. + internal CsmDeploymentStatus(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string deploymentId, DeploymentBuildStatus? status, int? numberOfInstancesInProgress, int? numberOfInstancesSuccessful, int? numberOfInstancesFailed, IList failedInstancesLogs, IList errors, string kind, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + DeploymentId = deploymentId; + Status = status; + NumberOfInstancesInProgress = numberOfInstancesInProgress; + NumberOfInstancesSuccessful = numberOfInstancesSuccessful; + NumberOfInstancesFailed = numberOfInstancesFailed; + FailedInstancesLogs = failedInstancesLogs; + Errors = errors; + Kind = kind; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Deployment operation id. + [WirePath("properties.deploymentId")] + public string DeploymentId { get; set; } + /// Deployment build status. + [WirePath("properties.status")] + public DeploymentBuildStatus? Status { get; set; } + /// Number of site instances currently being provisioned. + [WirePath("properties.numberOfInstancesInProgress")] + public int? NumberOfInstancesInProgress { get; set; } + /// Number of site instances provisioned successfully. + [WirePath("properties.numberOfInstancesSuccessful")] + public int? NumberOfInstancesSuccessful { get; set; } + /// Number of site instances failed to provision. + [WirePath("properties.numberOfInstancesFailed")] + public int? NumberOfInstancesFailed { get; set; } + /// List of URLs pointing to logs for instances which failed to provision. + [WirePath("properties.failedInstancesLogs")] + public IList FailedInstancesLogs { get; } + /// Kind of resource. + [WirePath("kind")] + public string Kind { get; set; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CsmDeploymentStatusCollection.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CsmDeploymentStatusCollection.Serialization.cs new file mode 100644 index 0000000000000..3599b9e6fc7a5 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CsmDeploymentStatusCollection.Serialization.cs @@ -0,0 +1,205 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + internal partial class CsmDeploymentStatusCollection : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CsmDeploymentStatusCollection)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (options.Format != "W" && Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + CsmDeploymentStatusCollection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CsmDeploymentStatusCollection)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCsmDeploymentStatusCollection(document.RootElement, options); + } + + internal static CsmDeploymentStatusCollection DeserializeCsmDeploymentStatusCollection(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + string nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(CsmDeploymentStatus.DeserializeCsmDeploymentStatus(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CsmDeploymentStatusCollection(value, nextLink, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(CsmDeploymentStatusCollection)} does not support writing '{options.Format}' format."); + } + } + + CsmDeploymentStatusCollection IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeCsmDeploymentStatusCollection(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CsmDeploymentStatusCollection)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CsmDeploymentStatusCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CsmDeploymentStatusCollection.cs new file mode 100644 index 0000000000000..8440d1f7f6eda --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CsmDeploymentStatusCollection.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.AppService.Models +{ + /// Deployment status collection ARM resource. + internal partial class CsmDeploymentStatusCollection + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Collection of resources. + /// is null. + internal CsmDeploymentStatusCollection(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// Collection of resources. + /// Link to next page of resources. + /// Keeps track of any properties unknown to the library. + internal CsmDeploymentStatusCollection(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal CsmDeploymentStatusCollection() + { + } + + /// Collection of resources. + public IReadOnlyList Value { get; } + /// Link to next page of resources. + public string NextLink { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CustomDnsSuffixProvisioningState.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CustomDnsSuffixProvisioningState.Serialization.cs new file mode 100644 index 0000000000000..c13df5de71968 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CustomDnsSuffixProvisioningState.Serialization.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.AppService.Models +{ + internal static partial class CustomDnsSuffixProvisioningStateExtensions + { + public static string ToSerialString(this CustomDnsSuffixProvisioningState value) => value switch + { + CustomDnsSuffixProvisioningState.Succeeded => "Succeeded", + CustomDnsSuffixProvisioningState.Failed => "Failed", + CustomDnsSuffixProvisioningState.Degraded => "Degraded", + CustomDnsSuffixProvisioningState.InProgress => "InProgress", + _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown CustomDnsSuffixProvisioningState value.") + }; + + public static CustomDnsSuffixProvisioningState ToCustomDnsSuffixProvisioningState(this string value) + { + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Succeeded")) return CustomDnsSuffixProvisioningState.Succeeded; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Failed")) return CustomDnsSuffixProvisioningState.Failed; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Degraded")) return CustomDnsSuffixProvisioningState.Degraded; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "InProgress")) return CustomDnsSuffixProvisioningState.InProgress; + throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown CustomDnsSuffixProvisioningState value."); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CustomDnsSuffixProvisioningState.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CustomDnsSuffixProvisioningState.cs new file mode 100644 index 0000000000000..4dcdd4d073232 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CustomDnsSuffixProvisioningState.cs @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.AppService.Models +{ + /// The CustomDnsSuffixProvisioningState. + public enum CustomDnsSuffixProvisioningState + { + /// Succeeded. + Succeeded, + /// Failed. + Failed, + /// Degraded. + Degraded, + /// InProgress. + InProgress + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CustomDomainStatus.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CustomDomainStatus.cs index f37c1318dcb12..6cdde79a4c6e4 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CustomDomainStatus.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CustomDomainStatus.cs @@ -28,6 +28,7 @@ public CustomDomainStatus(string value) private const string ReadyValue = "Ready"; private const string FailedValue = "Failed"; private const string DeletingValue = "Deleting"; + private const string UnhealthyValue = "Unhealthy"; /// RetrievingValidationToken. public static CustomDomainStatus RetrievingValidationToken { get; } = new CustomDomainStatus(RetrievingValidationTokenValue); @@ -41,6 +42,8 @@ public CustomDomainStatus(string value) public static CustomDomainStatus Failed { get; } = new CustomDomainStatus(FailedValue); /// Deleting. public static CustomDomainStatus Deleting { get; } = new CustomDomainStatus(DeletingValue); + /// Unhealthy. + public static CustomDomainStatus Unhealthy { get; } = new CustomDomainStatus(UnhealthyValue); /// Determines if two values are the same. public static bool operator ==(CustomDomainStatus left, CustomDomainStatus right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CustomHostnameAnalysisResult.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CustomHostnameAnalysisResult.Serialization.cs index fa141b4b97ad0..2663f2602174b 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CustomHostnameAnalysisResult.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CustomHostnameAnalysisResult.Serialization.cs @@ -513,7 +513,7 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) if (Optional.IsDefined(CustomDomainVerificationFailureInfo)) { builder.Append(" customDomainVerificationFailureInfo: "); - BicepSerializationHelpers.AppendChildObject(builder, CustomDomainVerificationFailureInfo, options, 4, false, " customDomainVerificationFailureInfo: "); + builder.AppendLine($"'{CustomDomainVerificationFailureInfo.ToString()}'"); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CustomHostnameAnalysisResult.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CustomHostnameAnalysisResult.cs index c8587a6012e65..4f7db866748b7 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CustomHostnameAnalysisResult.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CustomHostnameAnalysisResult.cs @@ -98,9 +98,6 @@ internal CustomHostnameAnalysisResult(ResourceIdentifier id, string name, Resour /// DNS verification test result. [WirePath("properties.customDomainVerificationTest")] public DnsVerificationTestResult? CustomDomainVerificationTest { get; } - /// Raw failure information if DNS verification fails. - [WirePath("properties.customDomainVerificationFailureInfo")] - public ResponseError CustomDomainVerificationFailureInfo { get; } /// <code>true</code> if there is a conflict on a scale unit; otherwise, <code>false</code>. [WirePath("properties.hasConflictOnScaleUnit")] public bool? HasConflictOnScaleUnit { get; } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CustomHostnameSites.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CustomHostnameSites.Serialization.cs new file mode 100644 index 0000000000000..88b06e94172a5 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CustomHostnameSites.Serialization.cs @@ -0,0 +1,409 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class CustomHostnameSites : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CustomHostnameSites)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Kind)) + { + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind); + } + if (options.Format != "W") + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (options.Format != "W") + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W") + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(ResourceType); + } + if (options.Format != "W" && Optional.IsDefined(SystemData)) + { + writer.WritePropertyName("systemData"u8); + JsonSerializer.Serialize(writer, SystemData); + } + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(CustomHostname)) + { + writer.WritePropertyName("customHostname"u8); + writer.WriteStringValue(CustomHostname); + } + if (Optional.IsDefined(Region)) + { + writer.WritePropertyName("region"u8); + writer.WriteStringValue(Region); + } + if (Optional.IsCollectionDefined(SiteResourceIds)) + { + writer.WritePropertyName("siteResourceIds"u8); + writer.WriteStartArray(); + foreach (var item in SiteResourceIds) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + CustomHostnameSites IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CustomHostnameSites)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCustomHostnameSites(document.RootElement, options); + } + + internal static CustomHostnameSites DeserializeCustomHostnameSites(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string kind = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + string customHostname = default; + string region = default; + IList siteResourceIds = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("kind"u8)) + { + kind = property.Value.GetString(); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("customHostname"u8)) + { + customHostname = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("region"u8)) + { + region = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("siteResourceIds"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(AppServiceIdentifierData.DeserializeAppServiceIdentifierData(item, options)); + } + siteResourceIds = array; + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CustomHostnameSites( + id, + name, + type, + systemData, + customHostname, + region, + siteResourceIds ?? new ChangeTrackingList(), + kind, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Kind), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" kind: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Kind)) + { + builder.Append(" kind: "); + if (Kind.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Kind}'''"); + } + else + { + builder.AppendLine($"'{Kind}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CustomHostname), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" customHostname: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CustomHostname)) + { + builder.Append(" customHostname: "); + if (CustomHostname.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{CustomHostname}'''"); + } + else + { + builder.AppendLine($"'{CustomHostname}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Region), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" region: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Region)) + { + builder.Append(" region: "); + if (Region.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Region}'''"); + } + else + { + builder.AppendLine($"'{Region}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SiteResourceIds), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" siteResourceIds: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(SiteResourceIds)) + { + if (SiteResourceIds.Any()) + { + builder.Append(" siteResourceIds: "); + builder.AppendLine("["); + foreach (var item in SiteResourceIds) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " siteResourceIds: "); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(CustomHostnameSites)} does not support writing '{options.Format}' format."); + } + } + + CustomHostnameSites IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeCustomHostnameSites(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CustomHostnameSites)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CustomHostnameSites.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CustomHostnameSites.cs new file mode 100644 index 0000000000000..4c9342791aa30 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CustomHostnameSites.cs @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppService.Models +{ + /// A hostname and its assigned sites. + public partial class CustomHostnameSites : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public CustomHostnameSites() + { + SiteResourceIds = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// + /// + /// + /// Kind of resource. + /// Keeps track of any properties unknown to the library. + internal CustomHostnameSites(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string customHostname, string region, IList siteResourceIds, string kind, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + CustomHostname = customHostname; + Region = region; + SiteResourceIds = siteResourceIds; + Kind = kind; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets or sets the custom hostname. + [WirePath("properties.customHostname")] + public string CustomHostname { get; set; } + /// Gets or sets the region. + [WirePath("properties.region")] + public string Region { get; set; } + /// Gets the site resource ids. + [WirePath("properties.siteResourceIds")] + public IList SiteResourceIds { get; } + /// Kind of resource. + [WirePath("kind")] + public string Kind { get; set; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CustomHostnameSitesCollection.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CustomHostnameSitesCollection.Serialization.cs new file mode 100644 index 0000000000000..33736c6e94355 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CustomHostnameSitesCollection.Serialization.cs @@ -0,0 +1,205 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + internal partial class CustomHostnameSitesCollection : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CustomHostnameSitesCollection)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (options.Format != "W" && Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + CustomHostnameSitesCollection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CustomHostnameSitesCollection)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCustomHostnameSitesCollection(document.RootElement, options); + } + + internal static CustomHostnameSitesCollection DeserializeCustomHostnameSitesCollection(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + string nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(CustomHostnameSites.DeserializeCustomHostnameSites(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CustomHostnameSitesCollection(value, nextLink, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(CustomHostnameSitesCollection)} does not support writing '{options.Format}' format."); + } + } + + CustomHostnameSitesCollection IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeCustomHostnameSitesCollection(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CustomHostnameSitesCollection)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CustomHostnameSitesCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CustomHostnameSitesCollection.cs new file mode 100644 index 0000000000000..5273527cf415a --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CustomHostnameSitesCollection.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.AppService.Models +{ + /// Collection of custom hostname sites. + internal partial class CustomHostnameSitesCollection + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Collection of resources. + /// is null. + internal CustomHostnameSitesCollection(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// Collection of resources. + /// Link to next page of resources. + /// Keeps track of any properties unknown to the library. + internal CustomHostnameSitesCollection(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal CustomHostnameSitesCollection() + { + } + + /// Collection of resources. + public IReadOnlyList Value { get; } + /// Link to next page of resources. + public string NextLink { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/DatabaseConnectionCollection.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/DatabaseConnectionCollection.Serialization.cs new file mode 100644 index 0000000000000..fceb1f9e58505 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/DatabaseConnectionCollection.Serialization.cs @@ -0,0 +1,205 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + internal partial class DatabaseConnectionCollection : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DatabaseConnectionCollection)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (options.Format != "W" && Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + DatabaseConnectionCollection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DatabaseConnectionCollection)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDatabaseConnectionCollection(document.RootElement, options); + } + + internal static DatabaseConnectionCollection DeserializeDatabaseConnectionCollection(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + string nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(StaticSiteDatabaseConnectionData.DeserializeStaticSiteDatabaseConnectionData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DatabaseConnectionCollection(value, nextLink, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(DatabaseConnectionCollection)} does not support writing '{options.Format}' format."); + } + } + + DatabaseConnectionCollection IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDatabaseConnectionCollection(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DatabaseConnectionCollection)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/DatabaseConnectionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/DatabaseConnectionCollection.cs new file mode 100644 index 0000000000000..547128c1b2d5b --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/DatabaseConnectionCollection.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.AppService.Models +{ + /// Collection of static site database connections. + internal partial class DatabaseConnectionCollection + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Collection of resources. + /// is null. + internal DatabaseConnectionCollection(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// Collection of resources. + /// Link to next page of resources. + /// Keeps track of any properties unknown to the library. + internal DatabaseConnectionCollection(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DatabaseConnectionCollection() + { + } + + /// Collection of resources. + public IReadOnlyList Value { get; } + /// Link to next page of resources. + public string NextLink { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/DeploymentBuildStatus.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/DeploymentBuildStatus.cs new file mode 100644 index 0000000000000..5d2735293ba21 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/DeploymentBuildStatus.cs @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.AppService.Models +{ + /// Deployment build status. + public readonly partial struct DeploymentBuildStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DeploymentBuildStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string TimedOutValue = "TimedOut"; + private const string RuntimeFailedValue = "RuntimeFailed"; + private const string BuildAbortedValue = "BuildAborted"; + private const string BuildFailedValue = "BuildFailed"; + private const string BuildRequestReceivedValue = "BuildRequestReceived"; + private const string BuildPendingValue = "BuildPending"; + private const string BuildInProgressValue = "BuildInProgress"; + private const string BuildSuccessfulValue = "BuildSuccessful"; + private const string PostBuildRestartRequiredValue = "PostBuildRestartRequired"; + private const string StartPollingValue = "StartPolling"; + private const string StartPollingWithRestartValue = "StartPollingWithRestart"; + private const string RuntimeStartingValue = "RuntimeStarting"; + private const string RuntimeSuccessfulValue = "RuntimeSuccessful"; + + /// TimedOut. + public static DeploymentBuildStatus TimedOut { get; } = new DeploymentBuildStatus(TimedOutValue); + /// RuntimeFailed. + public static DeploymentBuildStatus RuntimeFailed { get; } = new DeploymentBuildStatus(RuntimeFailedValue); + /// BuildAborted. + public static DeploymentBuildStatus BuildAborted { get; } = new DeploymentBuildStatus(BuildAbortedValue); + /// BuildFailed. + public static DeploymentBuildStatus BuildFailed { get; } = new DeploymentBuildStatus(BuildFailedValue); + /// BuildRequestReceived. + public static DeploymentBuildStatus BuildRequestReceived { get; } = new DeploymentBuildStatus(BuildRequestReceivedValue); + /// BuildPending. + public static DeploymentBuildStatus BuildPending { get; } = new DeploymentBuildStatus(BuildPendingValue); + /// BuildInProgress. + public static DeploymentBuildStatus BuildInProgress { get; } = new DeploymentBuildStatus(BuildInProgressValue); + /// BuildSuccessful. + public static DeploymentBuildStatus BuildSuccessful { get; } = new DeploymentBuildStatus(BuildSuccessfulValue); + /// PostBuildRestartRequired. + public static DeploymentBuildStatus PostBuildRestartRequired { get; } = new DeploymentBuildStatus(PostBuildRestartRequiredValue); + /// StartPolling. + public static DeploymentBuildStatus StartPolling { get; } = new DeploymentBuildStatus(StartPollingValue); + /// StartPollingWithRestart. + public static DeploymentBuildStatus StartPollingWithRestart { get; } = new DeploymentBuildStatus(StartPollingWithRestartValue); + /// RuntimeStarting. + public static DeploymentBuildStatus RuntimeStarting { get; } = new DeploymentBuildStatus(RuntimeStartingValue); + /// RuntimeSuccessful. + public static DeploymentBuildStatus RuntimeSuccessful { get; } = new DeploymentBuildStatus(RuntimeSuccessfulValue); + /// Determines if two values are the same. + public static bool operator ==(DeploymentBuildStatus left, DeploymentBuildStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DeploymentBuildStatus left, DeploymentBuildStatus right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator DeploymentBuildStatus(string value) => new DeploymentBuildStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DeploymentBuildStatus other && Equals(other); + /// + public bool Equals(DeploymentBuildStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/EnterpriseGradeCdnStatus.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/EnterpriseGradeCdnStatus.cs new file mode 100644 index 0000000000000..34475b2d12901 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/EnterpriseGradeCdnStatus.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.AppService.Models +{ + /// State indicating the status of the enterprise grade CDN serving traffic to the static web app. + public readonly partial struct EnterpriseGradeCdnStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public EnterpriseGradeCdnStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EnabledValue = "Enabled"; + private const string EnablingValue = "Enabling"; + private const string DisabledValue = "Disabled"; + private const string DisablingValue = "Disabling"; + + /// Enabled. + public static EnterpriseGradeCdnStatus Enabled { get; } = new EnterpriseGradeCdnStatus(EnabledValue); + /// Enabling. + public static EnterpriseGradeCdnStatus Enabling { get; } = new EnterpriseGradeCdnStatus(EnablingValue); + /// Disabled. + public static EnterpriseGradeCdnStatus Disabled { get; } = new EnterpriseGradeCdnStatus(DisabledValue); + /// Disabling. + public static EnterpriseGradeCdnStatus Disabling { get; } = new EnterpriseGradeCdnStatus(DisablingValue); + /// Determines if two values are the same. + public static bool operator ==(EnterpriseGradeCdnStatus left, EnterpriseGradeCdnStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(EnterpriseGradeCdnStatus left, EnterpriseGradeCdnStatus right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator EnterpriseGradeCdnStatus(string value) => new EnterpriseGradeCdnStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is EnterpriseGradeCdnStatus other && Equals(other); + /// + public bool Equals(EnterpriseGradeCdnStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/ExpressionTraces.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/ExpressionTraces.Serialization.cs new file mode 100644 index 0000000000000..84be0f54b681f --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/ExpressionTraces.Serialization.cs @@ -0,0 +1,249 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + internal partial class ExpressionTraces : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExpressionTraces)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Value)) + { + writer.WritePropertyName("value"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Value); +#else + using (JsonDocument document = JsonDocument.Parse(Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + if (Optional.IsCollectionDefined(Inputs)) + { + writer.WritePropertyName("inputs"u8); + writer.WriteStartArray(); + foreach (var item in Inputs) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + ExpressionTraces IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExpressionTraces)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExpressionTraces(document.RootElement, options); + } + + internal static ExpressionTraces DeserializeExpressionTraces(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + BinaryData value = default; + IReadOnlyList inputs = default; + string nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + value = BinaryData.FromString(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("inputs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(WorkflowExpressionRoot.DeserializeWorkflowExpressionRoot(item, options)); + } + inputs = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExpressionTraces(value, inputs ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Value)) + { + builder.Append(" value: "); + builder.AppendLine($"'{Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Inputs), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" inputs: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Inputs)) + { + if (Inputs.Any()) + { + builder.Append(" inputs: "); + builder.AppendLine("["); + foreach (var item in Inputs) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " inputs: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(ExpressionTraces)} does not support writing '{options.Format}' format."); + } + } + + ExpressionTraces IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeExpressionTraces(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExpressionTraces)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/ExpressionTraces.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/ExpressionTraces.cs new file mode 100644 index 0000000000000..9973977999503 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/ExpressionTraces.cs @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The expression traces. + internal partial class ExpressionTraces + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal ExpressionTraces() + { + Inputs = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Anything. + /// + /// The link used to get the next page of recommendations. + /// Keeps track of any properties unknown to the library. + internal ExpressionTraces(BinaryData value, IReadOnlyList inputs, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + Inputs = inputs; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// + /// Anything + /// + /// To assign an object to this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + public BinaryData Value { get; } + /// Gets the inputs. + public IReadOnlyList Inputs { get; } + /// The link used to get the next page of recommendations. + public string NextLink { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FlowAccessControlConfiguration.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FlowAccessControlConfiguration.Serialization.cs new file mode 100644 index 0000000000000..0d24cef279d3a --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FlowAccessControlConfiguration.Serialization.cs @@ -0,0 +1,249 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class FlowAccessControlConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FlowAccessControlConfiguration)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Triggers)) + { + writer.WritePropertyName("triggers"u8); + writer.WriteObjectValue(Triggers, options); + } + if (Optional.IsDefined(Contents)) + { + writer.WritePropertyName("contents"u8); + writer.WriteObjectValue(Contents, options); + } + if (Optional.IsDefined(Actions)) + { + writer.WritePropertyName("actions"u8); + writer.WriteObjectValue(Actions, options); + } + if (Optional.IsDefined(WorkflowManagement)) + { + writer.WritePropertyName("workflowManagement"u8); + writer.WriteObjectValue(WorkflowManagement, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + FlowAccessControlConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FlowAccessControlConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFlowAccessControlConfiguration(document.RootElement, options); + } + + internal static FlowAccessControlConfiguration DeserializeFlowAccessControlConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + FlowAccessControlConfigurationPolicy triggers = default; + FlowAccessControlConfigurationPolicy contents = default; + FlowAccessControlConfigurationPolicy actions = default; + FlowAccessControlConfigurationPolicy workflowManagement = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("triggers"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + triggers = FlowAccessControlConfigurationPolicy.DeserializeFlowAccessControlConfigurationPolicy(property.Value, options); + continue; + } + if (property.NameEquals("contents"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + contents = FlowAccessControlConfigurationPolicy.DeserializeFlowAccessControlConfigurationPolicy(property.Value, options); + continue; + } + if (property.NameEquals("actions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + actions = FlowAccessControlConfigurationPolicy.DeserializeFlowAccessControlConfigurationPolicy(property.Value, options); + continue; + } + if (property.NameEquals("workflowManagement"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + workflowManagement = FlowAccessControlConfigurationPolicy.DeserializeFlowAccessControlConfigurationPolicy(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FlowAccessControlConfiguration(triggers, contents, actions, workflowManagement, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Triggers), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" triggers: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Triggers)) + { + builder.Append(" triggers: "); + BicepSerializationHelpers.AppendChildObject(builder, Triggers, options, 2, false, " triggers: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Contents), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" contents: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Contents)) + { + builder.Append(" contents: "); + BicepSerializationHelpers.AppendChildObject(builder, Contents, options, 2, false, " contents: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Actions), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" actions: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Actions)) + { + builder.Append(" actions: "); + BicepSerializationHelpers.AppendChildObject(builder, Actions, options, 2, false, " actions: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(WorkflowManagement), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" workflowManagement: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(WorkflowManagement)) + { + builder.Append(" workflowManagement: "); + BicepSerializationHelpers.AppendChildObject(builder, WorkflowManagement, options, 2, false, " workflowManagement: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(FlowAccessControlConfiguration)} does not support writing '{options.Format}' format."); + } + } + + FlowAccessControlConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeFlowAccessControlConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FlowAccessControlConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FlowAccessControlConfiguration.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FlowAccessControlConfiguration.cs new file mode 100644 index 0000000000000..183eb5e7c1556 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FlowAccessControlConfiguration.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The access control configuration. + public partial class FlowAccessControlConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public FlowAccessControlConfiguration() + { + } + + /// Initializes a new instance of . + /// The access control configuration for invoking workflow triggers. + /// The access control configuration for accessing workflow run contents. + /// The access control configuration for workflow actions. + /// The access control configuration for workflow management. + /// Keeps track of any properties unknown to the library. + internal FlowAccessControlConfiguration(FlowAccessControlConfigurationPolicy triggers, FlowAccessControlConfigurationPolicy contents, FlowAccessControlConfigurationPolicy actions, FlowAccessControlConfigurationPolicy workflowManagement, IDictionary serializedAdditionalRawData) + { + Triggers = triggers; + Contents = contents; + Actions = actions; + WorkflowManagement = workflowManagement; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The access control configuration for invoking workflow triggers. + [WirePath("triggers")] + public FlowAccessControlConfigurationPolicy Triggers { get; set; } + /// The access control configuration for accessing workflow run contents. + [WirePath("contents")] + public FlowAccessControlConfigurationPolicy Contents { get; set; } + /// The access control configuration for workflow actions. + [WirePath("actions")] + public FlowAccessControlConfigurationPolicy Actions { get; set; } + /// The access control configuration for workflow management. + [WirePath("workflowManagement")] + public FlowAccessControlConfigurationPolicy WorkflowManagement { get; set; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FlowAccessControlConfigurationPolicy.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FlowAccessControlConfigurationPolicy.Serialization.cs new file mode 100644 index 0000000000000..ccf5eade8c3b0 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FlowAccessControlConfigurationPolicy.Serialization.cs @@ -0,0 +1,211 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class FlowAccessControlConfigurationPolicy : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FlowAccessControlConfigurationPolicy)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(AllowedCallerIPAddresses)) + { + writer.WritePropertyName("allowedCallerIpAddresses"u8); + writer.WriteStartArray(); + foreach (var item in AllowedCallerIPAddresses) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(OpenAuthenticationPolicies)) + { + writer.WritePropertyName("openAuthenticationPolicies"u8); + writer.WriteObjectValue(OpenAuthenticationPolicies, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + FlowAccessControlConfigurationPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FlowAccessControlConfigurationPolicy)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFlowAccessControlConfigurationPolicy(document.RootElement, options); + } + + internal static FlowAccessControlConfigurationPolicy DeserializeFlowAccessControlConfigurationPolicy(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList allowedCallerIPAddresses = default; + OpenAuthenticationAccessPolicies openAuthenticationPolicies = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("allowedCallerIpAddresses"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(WebAppIPAddressRange.DeserializeWebAppIPAddressRange(item, options)); + } + allowedCallerIPAddresses = array; + continue; + } + if (property.NameEquals("openAuthenticationPolicies"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + openAuthenticationPolicies = OpenAuthenticationAccessPolicies.DeserializeOpenAuthenticationAccessPolicies(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FlowAccessControlConfigurationPolicy(allowedCallerIPAddresses ?? new ChangeTrackingList(), openAuthenticationPolicies, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AllowedCallerIPAddresses), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" allowedCallerIpAddresses: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(AllowedCallerIPAddresses)) + { + if (AllowedCallerIPAddresses.Any()) + { + builder.Append(" allowedCallerIpAddresses: "); + builder.AppendLine("["); + foreach (var item in AllowedCallerIPAddresses) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " allowedCallerIpAddresses: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("OpenAuthenticationPolicyList", out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" openAuthenticationPolicies: "); + builder.AppendLine("{"); + builder.Append(" policies: "); + builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); + } + else + { + if (Optional.IsDefined(OpenAuthenticationPolicies)) + { + builder.Append(" openAuthenticationPolicies: "); + BicepSerializationHelpers.AppendChildObject(builder, OpenAuthenticationPolicies, options, 2, false, " openAuthenticationPolicies: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(FlowAccessControlConfigurationPolicy)} does not support writing '{options.Format}' format."); + } + } + + FlowAccessControlConfigurationPolicy IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeFlowAccessControlConfigurationPolicy(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FlowAccessControlConfigurationPolicy)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FlowAccessControlConfigurationPolicy.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FlowAccessControlConfigurationPolicy.cs new file mode 100644 index 0000000000000..b50329ade1937 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FlowAccessControlConfigurationPolicy.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The access control configuration policy. + public partial class FlowAccessControlConfigurationPolicy + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public FlowAccessControlConfigurationPolicy() + { + AllowedCallerIPAddresses = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The allowed caller IP address ranges. + /// The authentication policies for workflow. + /// Keeps track of any properties unknown to the library. + internal FlowAccessControlConfigurationPolicy(IList allowedCallerIPAddresses, OpenAuthenticationAccessPolicies openAuthenticationPolicies, IDictionary serializedAdditionalRawData) + { + AllowedCallerIPAddresses = allowedCallerIPAddresses; + OpenAuthenticationPolicies = openAuthenticationPolicies; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The allowed caller IP address ranges. + [WirePath("allowedCallerIpAddresses")] + public IList AllowedCallerIPAddresses { get; } + /// The authentication policies for workflow. + internal OpenAuthenticationAccessPolicies OpenAuthenticationPolicies { get; set; } + /// Open authentication policies. + [WirePath("openAuthenticationPolicies.policies")] + public IDictionary OpenAuthenticationPolicyList + { + get + { + if (OpenAuthenticationPolicies is null) + OpenAuthenticationPolicies = new OpenAuthenticationAccessPolicies(); + return OpenAuthenticationPolicies.OpenAuthenticationPolicyList; + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FlowEndpoints.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FlowEndpoints.Serialization.cs new file mode 100644 index 0000000000000..afb855ece967c --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FlowEndpoints.Serialization.cs @@ -0,0 +1,226 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class FlowEndpoints : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FlowEndpoints)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(OutgoingIPAddresses)) + { + writer.WritePropertyName("outgoingIpAddresses"u8); + writer.WriteStartArray(); + foreach (var item in OutgoingIPAddresses) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(AccessEndpointIPAddresses)) + { + writer.WritePropertyName("accessEndpointIpAddresses"u8); + writer.WriteStartArray(); + foreach (var item in AccessEndpointIPAddresses) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + FlowEndpoints IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FlowEndpoints)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFlowEndpoints(document.RootElement, options); + } + + internal static FlowEndpoints DeserializeFlowEndpoints(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList outgoingIPAddresses = default; + IList accessEndpointIPAddresses = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("outgoingIpAddresses"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(WebAppIPAddress.DeserializeWebAppIPAddress(item, options)); + } + outgoingIPAddresses = array; + continue; + } + if (property.NameEquals("accessEndpointIpAddresses"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(WebAppIPAddress.DeserializeWebAppIPAddress(item, options)); + } + accessEndpointIPAddresses = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FlowEndpoints(outgoingIPAddresses ?? new ChangeTrackingList(), accessEndpointIPAddresses ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(OutgoingIPAddresses), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" outgoingIpAddresses: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(OutgoingIPAddresses)) + { + if (OutgoingIPAddresses.Any()) + { + builder.Append(" outgoingIpAddresses: "); + builder.AppendLine("["); + foreach (var item in OutgoingIPAddresses) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " outgoingIpAddresses: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AccessEndpointIPAddresses), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" accessEndpointIpAddresses: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(AccessEndpointIPAddresses)) + { + if (AccessEndpointIPAddresses.Any()) + { + builder.Append(" accessEndpointIpAddresses: "); + builder.AppendLine("["); + foreach (var item in AccessEndpointIPAddresses) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " accessEndpointIpAddresses: "); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(FlowEndpoints)} does not support writing '{options.Format}' format."); + } + } + + FlowEndpoints IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeFlowEndpoints(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FlowEndpoints)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FlowEndpoints.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FlowEndpoints.cs new file mode 100644 index 0000000000000..752a877ee0411 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FlowEndpoints.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The flow endpoints configuration. + public partial class FlowEndpoints + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public FlowEndpoints() + { + OutgoingIPAddresses = new ChangeTrackingList(); + AccessEndpointIPAddresses = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The outgoing ip address. + /// The access endpoint ip address. + /// Keeps track of any properties unknown to the library. + internal FlowEndpoints(IList outgoingIPAddresses, IList accessEndpointIPAddresses, IDictionary serializedAdditionalRawData) + { + OutgoingIPAddresses = outgoingIPAddresses; + AccessEndpointIPAddresses = accessEndpointIPAddresses; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The outgoing ip address. + [WirePath("outgoingIpAddresses")] + public IList OutgoingIPAddresses { get; } + /// The access endpoint ip address. + [WirePath("accessEndpointIpAddresses")] + public IList AccessEndpointIPAddresses { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FlowEndpointsConfiguration.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FlowEndpointsConfiguration.Serialization.cs new file mode 100644 index 0000000000000..34ed980e3e06d --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FlowEndpointsConfiguration.Serialization.cs @@ -0,0 +1,189 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class FlowEndpointsConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FlowEndpointsConfiguration)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Workflow)) + { + writer.WritePropertyName("workflow"u8); + writer.WriteObjectValue(Workflow, options); + } + if (Optional.IsDefined(Connector)) + { + writer.WritePropertyName("connector"u8); + writer.WriteObjectValue(Connector, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + FlowEndpointsConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FlowEndpointsConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFlowEndpointsConfiguration(document.RootElement, options); + } + + internal static FlowEndpointsConfiguration DeserializeFlowEndpointsConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + FlowEndpoints workflow = default; + FlowEndpoints connector = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("workflow"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + workflow = FlowEndpoints.DeserializeFlowEndpoints(property.Value, options); + continue; + } + if (property.NameEquals("connector"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connector = FlowEndpoints.DeserializeFlowEndpoints(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FlowEndpointsConfiguration(workflow, connector, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Workflow), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" workflow: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Workflow)) + { + builder.Append(" workflow: "); + BicepSerializationHelpers.AppendChildObject(builder, Workflow, options, 2, false, " workflow: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Connector), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" connector: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Connector)) + { + builder.Append(" connector: "); + BicepSerializationHelpers.AppendChildObject(builder, Connector, options, 2, false, " connector: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(FlowEndpointsConfiguration)} does not support writing '{options.Format}' format."); + } + } + + FlowEndpointsConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeFlowEndpointsConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FlowEndpointsConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FlowEndpointsConfiguration.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FlowEndpointsConfiguration.cs new file mode 100644 index 0000000000000..723b65a645e39 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FlowEndpointsConfiguration.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The endpoints configuration. + public partial class FlowEndpointsConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public FlowEndpointsConfiguration() + { + } + + /// Initializes a new instance of . + /// The workflow endpoints. + /// The connector endpoints. + /// Keeps track of any properties unknown to the library. + internal FlowEndpointsConfiguration(FlowEndpoints workflow, FlowEndpoints connector, IDictionary serializedAdditionalRawData) + { + Workflow = workflow; + Connector = connector; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The workflow endpoints. + [WirePath("workflow")] + public FlowEndpoints Workflow { get; set; } + /// The connector endpoints. + [WirePath("connector")] + public FlowEndpoints Connector { get; set; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppAlwaysReadyConfig.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppAlwaysReadyConfig.Serialization.cs new file mode 100644 index 0000000000000..97ff94d59c1e6 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppAlwaysReadyConfig.Serialization.cs @@ -0,0 +1,193 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class FunctionAppAlwaysReadyConfig : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FunctionAppAlwaysReadyConfig)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(InstanceCount)) + { + writer.WritePropertyName("instanceCount"u8); + writer.WriteNumberValue(InstanceCount.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + FunctionAppAlwaysReadyConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FunctionAppAlwaysReadyConfig)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFunctionAppAlwaysReadyConfig(document.RootElement, options); + } + + internal static FunctionAppAlwaysReadyConfig DeserializeFunctionAppAlwaysReadyConfig(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + float? instanceCount = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("instanceCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + instanceCount = property.Value.GetSingle(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FunctionAppAlwaysReadyConfig(name, instanceCount, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(InstanceCount), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" instanceCount: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(InstanceCount)) + { + builder.Append(" instanceCount: "); + builder.AppendLine($"'{InstanceCount.Value.ToString()}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(FunctionAppAlwaysReadyConfig)} does not support writing '{options.Format}' format."); + } + } + + FunctionAppAlwaysReadyConfig IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeFunctionAppAlwaysReadyConfig(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FunctionAppAlwaysReadyConfig)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppAlwaysReadyConfig.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppAlwaysReadyConfig.cs new file mode 100644 index 0000000000000..2d4c4cc33edbb --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppAlwaysReadyConfig.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// Sets the number of 'Always Ready' instances for a function group or a specific function. + public partial class FunctionAppAlwaysReadyConfig + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public FunctionAppAlwaysReadyConfig() + { + } + + /// Initializes a new instance of . + /// Either a function group or a function name is required. For additional information see https://aka.ms/flexconsumption/alwaysready. + /// Sets the number of 'Always Ready' instances for a given function group or a specific function. For additional information see https://aka.ms/flexconsumption/alwaysready. + /// Keeps track of any properties unknown to the library. + internal FunctionAppAlwaysReadyConfig(string name, float? instanceCount, IDictionary serializedAdditionalRawData) + { + Name = name; + InstanceCount = instanceCount; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Either a function group or a function name is required. For additional information see https://aka.ms/flexconsumption/alwaysready. + [WirePath("name")] + public string Name { get; set; } + /// Sets the number of 'Always Ready' instances for a given function group or a specific function. For additional information see https://aka.ms/flexconsumption/alwaysready. + [WirePath("instanceCount")] + public float? InstanceCount { get; set; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppConfig.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppConfig.Serialization.cs new file mode 100644 index 0000000000000..d768e7576d703 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppConfig.Serialization.cs @@ -0,0 +1,222 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class FunctionAppConfig : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FunctionAppConfig)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Deployment)) + { + writer.WritePropertyName("deployment"u8); + writer.WriteObjectValue(Deployment, options); + } + if (Optional.IsDefined(Runtime)) + { + writer.WritePropertyName("runtime"u8); + writer.WriteObjectValue(Runtime, options); + } + if (Optional.IsDefined(ScaleAndConcurrency)) + { + writer.WritePropertyName("scaleAndConcurrency"u8); + writer.WriteObjectValue(ScaleAndConcurrency, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + FunctionAppConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FunctionAppConfig)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFunctionAppConfig(document.RootElement, options); + } + + internal static FunctionAppConfig DeserializeFunctionAppConfig(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + FunctionsDeployment deployment = default; + FunctionAppRuntime runtime = default; + FunctionAppScaleAndConcurrency scaleAndConcurrency = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("deployment"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + deployment = FunctionsDeployment.DeserializeFunctionsDeployment(property.Value, options); + continue; + } + if (property.NameEquals("runtime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + runtime = FunctionAppRuntime.DeserializeFunctionAppRuntime(property.Value, options); + continue; + } + if (property.NameEquals("scaleAndConcurrency"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + scaleAndConcurrency = FunctionAppScaleAndConcurrency.DeserializeFunctionAppScaleAndConcurrency(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FunctionAppConfig(deployment, runtime, scaleAndConcurrency, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("DeploymentStorage", out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" deployment: "); + builder.AppendLine("{"); + builder.Append(" storage: "); + builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); + } + else + { + if (Optional.IsDefined(Deployment)) + { + builder.Append(" deployment: "); + BicepSerializationHelpers.AppendChildObject(builder, Deployment, options, 2, false, " deployment: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Runtime), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" runtime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Runtime)) + { + builder.Append(" runtime: "); + BicepSerializationHelpers.AppendChildObject(builder, Runtime, options, 2, false, " runtime: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ScaleAndConcurrency), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" scaleAndConcurrency: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ScaleAndConcurrency)) + { + builder.Append(" scaleAndConcurrency: "); + BicepSerializationHelpers.AppendChildObject(builder, ScaleAndConcurrency, options, 2, false, " scaleAndConcurrency: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(FunctionAppConfig)} does not support writing '{options.Format}' format."); + } + } + + FunctionAppConfig IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeFunctionAppConfig(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FunctionAppConfig)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppConfig.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppConfig.cs new file mode 100644 index 0000000000000..78a5c2ec6f8a3 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppConfig.cs @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// Function app configuration. + public partial class FunctionAppConfig + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public FunctionAppConfig() + { + } + + /// Initializes a new instance of . + /// Function app deployment configuration. + /// Function app runtime settings. + /// Function app scale and concurrency settings. + /// Keeps track of any properties unknown to the library. + internal FunctionAppConfig(FunctionsDeployment deployment, FunctionAppRuntime runtime, FunctionAppScaleAndConcurrency scaleAndConcurrency, IDictionary serializedAdditionalRawData) + { + Deployment = deployment; + Runtime = runtime; + ScaleAndConcurrency = scaleAndConcurrency; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Function app deployment configuration. + internal FunctionsDeployment Deployment { get; set; } + /// Storage for deployed package used by the function app. + [WirePath("deployment.storage")] + public FunctionAppStorage DeploymentStorage + { + get => Deployment is null ? default : Deployment.Storage; + set + { + if (Deployment is null) + Deployment = new FunctionsDeployment(); + Deployment.Storage = value; + } + } + + /// Function app runtime settings. + [WirePath("runtime")] + public FunctionAppRuntime Runtime { get; set; } + /// Function app scale and concurrency settings. + [WirePath("scaleAndConcurrency")] + public FunctionAppScaleAndConcurrency ScaleAndConcurrency { get; set; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppResourceConfig.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppResourceConfig.Serialization.cs new file mode 100644 index 0000000000000..67b0120a16b5f --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppResourceConfig.Serialization.cs @@ -0,0 +1,193 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class FunctionAppResourceConfig : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FunctionAppResourceConfig)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Cpu)) + { + writer.WritePropertyName("cpu"u8); + writer.WriteNumberValue(Cpu.Value); + } + if (Optional.IsDefined(Memory)) + { + writer.WritePropertyName("memory"u8); + writer.WriteStringValue(Memory); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + FunctionAppResourceConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FunctionAppResourceConfig)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFunctionAppResourceConfig(document.RootElement, options); + } + + internal static FunctionAppResourceConfig DeserializeFunctionAppResourceConfig(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + double? cpu = default; + string memory = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("cpu"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + cpu = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("memory"u8)) + { + memory = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FunctionAppResourceConfig(cpu, memory, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Cpu), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" cpu: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Cpu)) + { + builder.Append(" cpu: "); + builder.AppendLine($"'{Cpu.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Memory), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" memory: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Memory)) + { + builder.Append(" memory: "); + if (Memory.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Memory}'''"); + } + else + { + builder.AppendLine($"'{Memory}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(FunctionAppResourceConfig)} does not support writing '{options.Format}' format."); + } + } + + FunctionAppResourceConfig IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeFunctionAppResourceConfig(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FunctionAppResourceConfig)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppResourceConfig.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppResourceConfig.cs new file mode 100644 index 0000000000000..f2117cea9fc31 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppResourceConfig.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// Function app resource requirements. + public partial class FunctionAppResourceConfig + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public FunctionAppResourceConfig() + { + } + + /// Initializes a new instance of . + /// Required CPU in cores, e.g. 0.5. + /// Required memory, e.g. "1Gi". + /// Keeps track of any properties unknown to the library. + internal FunctionAppResourceConfig(double? cpu, string memory, IDictionary serializedAdditionalRawData) + { + Cpu = cpu; + Memory = memory; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Required CPU in cores, e.g. 0.5. + [WirePath("cpu")] + public double? Cpu { get; set; } + /// Required memory, e.g. "1Gi". + [WirePath("memory")] + public string Memory { get; set; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppRuntime.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppRuntime.Serialization.cs new file mode 100644 index 0000000000000..1e9b80919235b --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppRuntime.Serialization.cs @@ -0,0 +1,205 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class FunctionAppRuntime : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FunctionAppRuntime)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name.Value.ToString()); + } + if (Optional.IsDefined(Version)) + { + if (Version != null) + { + writer.WritePropertyName("version"u8); + writer.WriteStringValue(Version); + } + else + { + writer.WriteNull("version"); + } + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + FunctionAppRuntime IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FunctionAppRuntime)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFunctionAppRuntime(document.RootElement, options); + } + + internal static FunctionAppRuntime DeserializeFunctionAppRuntime(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + FunctionAppRuntimeName? name = default; + string version = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + name = new FunctionAppRuntimeName(property.Value.GetString()); + continue; + } + if (property.NameEquals("version"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + version = null; + continue; + } + version = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FunctionAppRuntime(name, version, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + builder.AppendLine($"'{Name.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Version), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" version: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Version)) + { + builder.Append(" version: "); + if (Version.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Version}'''"); + } + else + { + builder.AppendLine($"'{Version}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(FunctionAppRuntime)} does not support writing '{options.Format}' format."); + } + } + + FunctionAppRuntime IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeFunctionAppRuntime(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FunctionAppRuntime)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppRuntime.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppRuntime.cs new file mode 100644 index 0000000000000..9256113196f54 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppRuntime.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// Function app runtime name and version. + public partial class FunctionAppRuntime + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public FunctionAppRuntime() + { + } + + /// Initializes a new instance of . + /// Function app runtime name. Available options: dotnet-isolated, node, java, powershell, python, custom. + /// Function app runtime version. Example: 8 (for dotnet-isolated). + /// Keeps track of any properties unknown to the library. + internal FunctionAppRuntime(FunctionAppRuntimeName? name, string version, IDictionary serializedAdditionalRawData) + { + Name = name; + Version = version; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Function app runtime name. Available options: dotnet-isolated, node, java, powershell, python, custom. + [WirePath("name")] + public FunctionAppRuntimeName? Name { get; set; } + /// Function app runtime version. Example: 8 (for dotnet-isolated). + [WirePath("version")] + public string Version { get; set; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppRuntimeName.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppRuntimeName.cs new file mode 100644 index 0000000000000..48dbc0741cc0f --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppRuntimeName.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.AppService.Models +{ + /// Function app runtime name. Available options: dotnet-isolated, node, java, powershell, python, custom. + public readonly partial struct FunctionAppRuntimeName : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public FunctionAppRuntimeName(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DotnetIsolatedValue = "dotnet-isolated"; + private const string NodeValue = "node"; + private const string JavaValue = "java"; + private const string PowershellValue = "powershell"; + private const string PythonValue = "python"; + private const string CustomValue = "custom"; + + /// dotnet-isolated. + public static FunctionAppRuntimeName DotnetIsolated { get; } = new FunctionAppRuntimeName(DotnetIsolatedValue); + /// node. + public static FunctionAppRuntimeName Node { get; } = new FunctionAppRuntimeName(NodeValue); + /// java. + public static FunctionAppRuntimeName Java { get; } = new FunctionAppRuntimeName(JavaValue); + /// powershell. + public static FunctionAppRuntimeName Powershell { get; } = new FunctionAppRuntimeName(PowershellValue); + /// python. + public static FunctionAppRuntimeName Python { get; } = new FunctionAppRuntimeName(PythonValue); + /// custom. + public static FunctionAppRuntimeName Custom { get; } = new FunctionAppRuntimeName(CustomValue); + /// Determines if two values are the same. + public static bool operator ==(FunctionAppRuntimeName left, FunctionAppRuntimeName right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(FunctionAppRuntimeName left, FunctionAppRuntimeName right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator FunctionAppRuntimeName(string value) => new FunctionAppRuntimeName(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is FunctionAppRuntimeName other && Equals(other); + /// + public bool Equals(FunctionAppRuntimeName other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppScaleAndConcurrency.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppScaleAndConcurrency.Serialization.cs new file mode 100644 index 0000000000000..3a7caaa98a043 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppScaleAndConcurrency.Serialization.cs @@ -0,0 +1,273 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class FunctionAppScaleAndConcurrency : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FunctionAppScaleAndConcurrency)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(AlwaysReady)) + { + writer.WritePropertyName("alwaysReady"u8); + writer.WriteStartArray(); + foreach (var item in AlwaysReady) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(MaximumInstanceCount)) + { + writer.WritePropertyName("maximumInstanceCount"u8); + writer.WriteNumberValue(MaximumInstanceCount.Value); + } + if (Optional.IsDefined(InstanceMemoryMB)) + { + writer.WritePropertyName("instanceMemoryMB"u8); + writer.WriteNumberValue(InstanceMemoryMB.Value); + } + if (Optional.IsDefined(Triggers)) + { + writer.WritePropertyName("triggers"u8); + writer.WriteObjectValue(Triggers, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + FunctionAppScaleAndConcurrency IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FunctionAppScaleAndConcurrency)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFunctionAppScaleAndConcurrency(document.RootElement, options); + } + + internal static FunctionAppScaleAndConcurrency DeserializeFunctionAppScaleAndConcurrency(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList alwaysReady = default; + float? maximumInstanceCount = default; + float? instanceMemoryMB = default; + FunctionsScaleAndConcurrencyTriggers triggers = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("alwaysReady"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(FunctionAppAlwaysReadyConfig.DeserializeFunctionAppAlwaysReadyConfig(item, options)); + } + alwaysReady = array; + continue; + } + if (property.NameEquals("maximumInstanceCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + maximumInstanceCount = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("instanceMemoryMB"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + instanceMemoryMB = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("triggers"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + triggers = FunctionsScaleAndConcurrencyTriggers.DeserializeFunctionsScaleAndConcurrencyTriggers(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FunctionAppScaleAndConcurrency(alwaysReady ?? new ChangeTrackingList(), maximumInstanceCount, instanceMemoryMB, triggers, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AlwaysReady), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" alwaysReady: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(AlwaysReady)) + { + if (AlwaysReady.Any()) + { + builder.Append(" alwaysReady: "); + builder.AppendLine("["); + foreach (var item in AlwaysReady) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " alwaysReady: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(MaximumInstanceCount), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" maximumInstanceCount: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(MaximumInstanceCount)) + { + builder.Append(" maximumInstanceCount: "); + builder.AppendLine($"'{MaximumInstanceCount.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(InstanceMemoryMB), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" instanceMemoryMB: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(InstanceMemoryMB)) + { + builder.Append(" instanceMemoryMB: "); + builder.AppendLine($"'{InstanceMemoryMB.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("HttpPerInstanceConcurrency", out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" triggers: "); + builder.AppendLine("{"); + builder.AppendLine(" http: {"); + builder.Append(" perInstanceConcurrency: "); + builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); + builder.AppendLine(" }"); + } + else + { + if (Optional.IsDefined(Triggers)) + { + builder.Append(" triggers: "); + BicepSerializationHelpers.AppendChildObject(builder, Triggers, options, 2, false, " triggers: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(FunctionAppScaleAndConcurrency)} does not support writing '{options.Format}' format."); + } + } + + FunctionAppScaleAndConcurrency IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeFunctionAppScaleAndConcurrency(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FunctionAppScaleAndConcurrency)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppScaleAndConcurrency.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppScaleAndConcurrency.cs new file mode 100644 index 0000000000000..f2329273c9d0a --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppScaleAndConcurrency.cs @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// Scale and concurrency settings for the function app. + public partial class FunctionAppScaleAndConcurrency + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public FunctionAppScaleAndConcurrency() + { + AlwaysReady = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// 'Always Ready' configuration for the function app. + /// The maximum number of instances for the function app. + /// Set the amount of memory allocated to each instance of the function app in MB. CPU and network bandwidth are allocated proportionally. + /// Scale and concurrency settings for the function app triggers. + /// Keeps track of any properties unknown to the library. + internal FunctionAppScaleAndConcurrency(IList alwaysReady, float? maximumInstanceCount, float? instanceMemoryMB, FunctionsScaleAndConcurrencyTriggers triggers, IDictionary serializedAdditionalRawData) + { + AlwaysReady = alwaysReady; + MaximumInstanceCount = maximumInstanceCount; + InstanceMemoryMB = instanceMemoryMB; + Triggers = triggers; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// 'Always Ready' configuration for the function app. + [WirePath("alwaysReady")] + public IList AlwaysReady { get; } + /// The maximum number of instances for the function app. + [WirePath("maximumInstanceCount")] + public float? MaximumInstanceCount { get; set; } + /// Set the amount of memory allocated to each instance of the function app in MB. CPU and network bandwidth are allocated proportionally. + [WirePath("instanceMemoryMB")] + public float? InstanceMemoryMB { get; set; } + /// Scale and concurrency settings for the function app triggers. + internal FunctionsScaleAndConcurrencyTriggers Triggers { get; set; } + /// The maximum number of concurrent HTTP trigger invocations per instance. + [WirePath("triggers.http.perInstanceConcurrency")] + public float? HttpPerInstanceConcurrency + { + get => Triggers is null ? default : Triggers.HttpPerInstanceConcurrency; + set + { + if (Triggers is null) + Triggers = new FunctionsScaleAndConcurrencyTriggers(); + Triggers.HttpPerInstanceConcurrency = value; + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppStorage.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppStorage.Serialization.cs new file mode 100644 index 0000000000000..f1b6a97f001a5 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppStorage.Serialization.cs @@ -0,0 +1,219 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class FunctionAppStorage : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FunctionAppStorage)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(StorageType)) + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(StorageType.Value.ToString()); + } + if (Optional.IsDefined(Value)) + { + writer.WritePropertyName("value"u8); + writer.WriteStringValue(Value.AbsoluteUri); + } + if (Optional.IsDefined(Authentication)) + { + writer.WritePropertyName("authentication"u8); + writer.WriteObjectValue(Authentication, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + FunctionAppStorage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FunctionAppStorage)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFunctionAppStorage(document.RootElement, options); + } + + internal static FunctionAppStorage DeserializeFunctionAppStorage(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + FunctionAppStorageType? type = default; + Uri value = default; + FunctionAppStorageAuthentication authentication = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + type = new FunctionAppStorageType(property.Value.GetString()); + continue; + } + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + value = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("authentication"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + authentication = FunctionAppStorageAuthentication.DeserializeFunctionAppStorageAuthentication(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FunctionAppStorage(type, value, authentication, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(StorageType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" type: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(StorageType)) + { + builder.Append(" type: "); + builder.AppendLine($"'{StorageType.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Value)) + { + builder.Append(" value: "); + builder.AppendLine($"'{Value.AbsoluteUri}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Authentication), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" authentication: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Authentication)) + { + builder.Append(" authentication: "); + BicepSerializationHelpers.AppendChildObject(builder, Authentication, options, 2, false, " authentication: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(FunctionAppStorage)} does not support writing '{options.Format}' format."); + } + } + + FunctionAppStorage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeFunctionAppStorage(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FunctionAppStorage)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppStorage.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppStorage.cs new file mode 100644 index 0000000000000..83adf690ba4ce --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppStorage.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// Storage for deployed package used by the function app. + public partial class FunctionAppStorage + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public FunctionAppStorage() + { + } + + /// Initializes a new instance of . + /// Property to select Azure Storage type. Available options: blobContainer. + /// Property to set the URL for the selected Azure Storage type. Example: For blobContainer, the value could be https://<storageAccountName>.blob.core.windows.net/<containerName>. + /// Authentication method to access the storage account for deployment. + /// Keeps track of any properties unknown to the library. + internal FunctionAppStorage(FunctionAppStorageType? storageType, Uri value, FunctionAppStorageAuthentication authentication, IDictionary serializedAdditionalRawData) + { + StorageType = storageType; + Value = value; + Authentication = authentication; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Property to select Azure Storage type. Available options: blobContainer. + [WirePath("type")] + public FunctionAppStorageType? StorageType { get; set; } + /// Property to set the URL for the selected Azure Storage type. Example: For blobContainer, the value could be https://<storageAccountName>.blob.core.windows.net/<containerName>. + [WirePath("value")] + public Uri Value { get; set; } + /// Authentication method to access the storage account for deployment. + [WirePath("authentication")] + public FunctionAppStorageAuthentication Authentication { get; set; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppStorageAccountAuthenticationType.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppStorageAccountAuthenticationType.cs new file mode 100644 index 0000000000000..57607a6231047 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppStorageAccountAuthenticationType.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.AppService.Models +{ + /// Property to select authentication type to access the selected storage account. Available options: SystemAssignedIdentity, UserAssignedIdentity, StorageAccountConnectionString. + public readonly partial struct FunctionAppStorageAccountAuthenticationType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public FunctionAppStorageAccountAuthenticationType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SystemAssignedIdentityValue = "SystemAssignedIdentity"; + private const string UserAssignedIdentityValue = "UserAssignedIdentity"; + private const string StorageAccountConnectionStringValue = "StorageAccountConnectionString"; + + /// SystemAssignedIdentity. + public static FunctionAppStorageAccountAuthenticationType SystemAssignedIdentity { get; } = new FunctionAppStorageAccountAuthenticationType(SystemAssignedIdentityValue); + /// UserAssignedIdentity. + public static FunctionAppStorageAccountAuthenticationType UserAssignedIdentity { get; } = new FunctionAppStorageAccountAuthenticationType(UserAssignedIdentityValue); + /// StorageAccountConnectionString. + public static FunctionAppStorageAccountAuthenticationType StorageAccountConnectionString { get; } = new FunctionAppStorageAccountAuthenticationType(StorageAccountConnectionStringValue); + /// Determines if two values are the same. + public static bool operator ==(FunctionAppStorageAccountAuthenticationType left, FunctionAppStorageAccountAuthenticationType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(FunctionAppStorageAccountAuthenticationType left, FunctionAppStorageAccountAuthenticationType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator FunctionAppStorageAccountAuthenticationType(string value) => new FunctionAppStorageAccountAuthenticationType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is FunctionAppStorageAccountAuthenticationType other && Equals(other); + /// + public bool Equals(FunctionAppStorageAccountAuthenticationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppStorageAuthentication.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppStorageAuthentication.Serialization.cs new file mode 100644 index 0000000000000..62e538180164e --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppStorageAuthentication.Serialization.cs @@ -0,0 +1,227 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class FunctionAppStorageAuthentication : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FunctionAppStorageAuthentication)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(AuthenticationType)) + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(AuthenticationType.Value.ToString()); + } + if (Optional.IsDefined(UserAssignedIdentityResourceId)) + { + writer.WritePropertyName("userAssignedIdentityResourceId"u8); + writer.WriteStringValue(UserAssignedIdentityResourceId); + } + if (Optional.IsDefined(StorageAccountConnectionStringName)) + { + writer.WritePropertyName("storageAccountConnectionStringName"u8); + writer.WriteStringValue(StorageAccountConnectionStringName); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + FunctionAppStorageAuthentication IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FunctionAppStorageAuthentication)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFunctionAppStorageAuthentication(document.RootElement, options); + } + + internal static FunctionAppStorageAuthentication DeserializeFunctionAppStorageAuthentication(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + FunctionAppStorageAccountAuthenticationType? type = default; + string userAssignedIdentityResourceId = default; + string storageAccountConnectionStringName = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + type = new FunctionAppStorageAccountAuthenticationType(property.Value.GetString()); + continue; + } + if (property.NameEquals("userAssignedIdentityResourceId"u8)) + { + userAssignedIdentityResourceId = property.Value.GetString(); + continue; + } + if (property.NameEquals("storageAccountConnectionStringName"u8)) + { + storageAccountConnectionStringName = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FunctionAppStorageAuthentication(type, userAssignedIdentityResourceId, storageAccountConnectionStringName, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AuthenticationType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" type: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AuthenticationType)) + { + builder.Append(" type: "); + builder.AppendLine($"'{AuthenticationType.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(UserAssignedIdentityResourceId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" userAssignedIdentityResourceId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(UserAssignedIdentityResourceId)) + { + builder.Append(" userAssignedIdentityResourceId: "); + if (UserAssignedIdentityResourceId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{UserAssignedIdentityResourceId}'''"); + } + else + { + builder.AppendLine($"'{UserAssignedIdentityResourceId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(StorageAccountConnectionStringName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" storageAccountConnectionStringName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(StorageAccountConnectionStringName)) + { + builder.Append(" storageAccountConnectionStringName: "); + if (StorageAccountConnectionStringName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{StorageAccountConnectionStringName}'''"); + } + else + { + builder.AppendLine($"'{StorageAccountConnectionStringName}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(FunctionAppStorageAuthentication)} does not support writing '{options.Format}' format."); + } + } + + FunctionAppStorageAuthentication IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeFunctionAppStorageAuthentication(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FunctionAppStorageAuthentication)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppStorageAuthentication.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppStorageAuthentication.cs new file mode 100644 index 0000000000000..ec4fa9f9af517 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppStorageAuthentication.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// Authentication method to access the storage account for deployment. + public partial class FunctionAppStorageAuthentication + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public FunctionAppStorageAuthentication() + { + } + + /// Initializes a new instance of . + /// Property to select authentication type to access the selected storage account. Available options: SystemAssignedIdentity, UserAssignedIdentity, StorageAccountConnectionString. + /// Use this property for UserAssignedIdentity. Set the resource ID of the identity. Do not set a value for this property when using other authentication type. + /// Use this property for StorageAccountConnectionString. Set the name of the app setting that has the storage account connection string. Do not set a value for this property when using other authentication type. + /// Keeps track of any properties unknown to the library. + internal FunctionAppStorageAuthentication(FunctionAppStorageAccountAuthenticationType? authenticationType, string userAssignedIdentityResourceId, string storageAccountConnectionStringName, IDictionary serializedAdditionalRawData) + { + AuthenticationType = authenticationType; + UserAssignedIdentityResourceId = userAssignedIdentityResourceId; + StorageAccountConnectionStringName = storageAccountConnectionStringName; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Property to select authentication type to access the selected storage account. Available options: SystemAssignedIdentity, UserAssignedIdentity, StorageAccountConnectionString. + [WirePath("type")] + public FunctionAppStorageAccountAuthenticationType? AuthenticationType { get; set; } + /// Use this property for UserAssignedIdentity. Set the resource ID of the identity. Do not set a value for this property when using other authentication type. + [WirePath("userAssignedIdentityResourceId")] + public string UserAssignedIdentityResourceId { get; set; } + /// Use this property for StorageAccountConnectionString. Set the name of the app setting that has the storage account connection string. Do not set a value for this property when using other authentication type. + [WirePath("storageAccountConnectionStringName")] + public string StorageAccountConnectionStringName { get; set; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppStorageType.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppStorageType.cs new file mode 100644 index 0000000000000..e040beb0719fc --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppStorageType.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.AppService.Models +{ + /// Property to select Azure Storage type. Available options: blobContainer. + public readonly partial struct FunctionAppStorageType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public FunctionAppStorageType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string BlobContainerValue = "blobContainer"; + + /// blobContainer. + public static FunctionAppStorageType BlobContainer { get; } = new FunctionAppStorageType(BlobContainerValue); + /// Determines if two values are the same. + public static bool operator ==(FunctionAppStorageType left, FunctionAppStorageType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(FunctionAppStorageType left, FunctionAppStorageType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator FunctionAppStorageType(string value) => new FunctionAppStorageType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is FunctionAppStorageType other && Equals(other); + /// + public bool Equals(FunctionAppStorageType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionsDeployment.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionsDeployment.Serialization.cs new file mode 100644 index 0000000000000..4c8b050f7a358 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionsDeployment.Serialization.cs @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + internal partial class FunctionsDeployment : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FunctionsDeployment)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Storage)) + { + writer.WritePropertyName("storage"u8); + writer.WriteObjectValue(Storage, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + FunctionsDeployment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FunctionsDeployment)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFunctionsDeployment(document.RootElement, options); + } + + internal static FunctionsDeployment DeserializeFunctionsDeployment(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + FunctionAppStorage storage = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("storage"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + storage = FunctionAppStorage.DeserializeFunctionAppStorage(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FunctionsDeployment(storage, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Storage), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" storage: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Storage)) + { + builder.Append(" storage: "); + BicepSerializationHelpers.AppendChildObject(builder, Storage, options, 2, false, " storage: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(FunctionsDeployment)} does not support writing '{options.Format}' format."); + } + } + + FunctionsDeployment IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeFunctionsDeployment(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FunctionsDeployment)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionsDeployment.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionsDeployment.cs new file mode 100644 index 0000000000000..e8f6b2a9f3c2e --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionsDeployment.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// Configuration section for the function app deployment. + internal partial class FunctionsDeployment + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public FunctionsDeployment() + { + } + + /// Initializes a new instance of . + /// Storage for deployed package used by the function app. + /// Keeps track of any properties unknown to the library. + internal FunctionsDeployment(FunctionAppStorage storage, IDictionary serializedAdditionalRawData) + { + Storage = storage; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Storage for deployed package used by the function app. + [WirePath("storage")] + public FunctionAppStorage Storage { get; set; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionsScaleAndConcurrencyTriggers.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionsScaleAndConcurrencyTriggers.Serialization.cs new file mode 100644 index 0000000000000..8b581cbbc4848 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionsScaleAndConcurrencyTriggers.Serialization.cs @@ -0,0 +1,162 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + internal partial class FunctionsScaleAndConcurrencyTriggers : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FunctionsScaleAndConcurrencyTriggers)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Http)) + { + writer.WritePropertyName("http"u8); + writer.WriteObjectValue(Http, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + FunctionsScaleAndConcurrencyTriggers IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FunctionsScaleAndConcurrencyTriggers)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFunctionsScaleAndConcurrencyTriggers(document.RootElement, options); + } + + internal static FunctionsScaleAndConcurrencyTriggers DeserializeFunctionsScaleAndConcurrencyTriggers(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + FunctionsScaleAndConcurrencyTriggersHttp http = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("http"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + http = FunctionsScaleAndConcurrencyTriggersHttp.DeserializeFunctionsScaleAndConcurrencyTriggersHttp(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FunctionsScaleAndConcurrencyTriggers(http, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("HttpPerInstanceConcurrency", out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" http: "); + builder.AppendLine("{"); + builder.Append(" perInstanceConcurrency: "); + builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); + } + else + { + if (Optional.IsDefined(Http)) + { + builder.Append(" http: "); + BicepSerializationHelpers.AppendChildObject(builder, Http, options, 2, false, " http: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(FunctionsScaleAndConcurrencyTriggers)} does not support writing '{options.Format}' format."); + } + } + + FunctionsScaleAndConcurrencyTriggers IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeFunctionsScaleAndConcurrencyTriggers(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FunctionsScaleAndConcurrencyTriggers)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionsScaleAndConcurrencyTriggers.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionsScaleAndConcurrencyTriggers.cs new file mode 100644 index 0000000000000..ff97cda7d66b1 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionsScaleAndConcurrencyTriggers.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// Scale and concurrency settings for the function app triggers. + internal partial class FunctionsScaleAndConcurrencyTriggers + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public FunctionsScaleAndConcurrencyTriggers() + { + } + + /// Initializes a new instance of . + /// Scale and concurrency settings for the HTTP trigger. + /// Keeps track of any properties unknown to the library. + internal FunctionsScaleAndConcurrencyTriggers(FunctionsScaleAndConcurrencyTriggersHttp http, IDictionary serializedAdditionalRawData) + { + Http = http; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Scale and concurrency settings for the HTTP trigger. + internal FunctionsScaleAndConcurrencyTriggersHttp Http { get; set; } + /// The maximum number of concurrent HTTP trigger invocations per instance. + [WirePath("http.perInstanceConcurrency")] + public float? HttpPerInstanceConcurrency + { + get => Http is null ? default : Http.PerInstanceConcurrency; + set + { + if (Http is null) + Http = new FunctionsScaleAndConcurrencyTriggersHttp(); + Http.PerInstanceConcurrency = value; + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionsScaleAndConcurrencyTriggersHttp.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionsScaleAndConcurrencyTriggersHttp.Serialization.cs new file mode 100644 index 0000000000000..4466a5bb90bbe --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionsScaleAndConcurrencyTriggersHttp.Serialization.cs @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + internal partial class FunctionsScaleAndConcurrencyTriggersHttp : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FunctionsScaleAndConcurrencyTriggersHttp)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(PerInstanceConcurrency)) + { + writer.WritePropertyName("perInstanceConcurrency"u8); + writer.WriteNumberValue(PerInstanceConcurrency.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + FunctionsScaleAndConcurrencyTriggersHttp IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FunctionsScaleAndConcurrencyTriggersHttp)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFunctionsScaleAndConcurrencyTriggersHttp(document.RootElement, options); + } + + internal static FunctionsScaleAndConcurrencyTriggersHttp DeserializeFunctionsScaleAndConcurrencyTriggersHttp(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + float? perInstanceConcurrency = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("perInstanceConcurrency"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + perInstanceConcurrency = property.Value.GetSingle(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FunctionsScaleAndConcurrencyTriggersHttp(perInstanceConcurrency, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PerInstanceConcurrency), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" perInstanceConcurrency: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PerInstanceConcurrency)) + { + builder.Append(" perInstanceConcurrency: "); + builder.AppendLine($"'{PerInstanceConcurrency.Value.ToString()}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(FunctionsScaleAndConcurrencyTriggersHttp)} does not support writing '{options.Format}' format."); + } + } + + FunctionsScaleAndConcurrencyTriggersHttp IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeFunctionsScaleAndConcurrencyTriggersHttp(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FunctionsScaleAndConcurrencyTriggersHttp)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionsScaleAndConcurrencyTriggersHttp.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionsScaleAndConcurrencyTriggersHttp.cs new file mode 100644 index 0000000000000..1ea3a501e0f67 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionsScaleAndConcurrencyTriggersHttp.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// Scale and concurrency settings for the HTTP trigger. + internal partial class FunctionsScaleAndConcurrencyTriggersHttp + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public FunctionsScaleAndConcurrencyTriggersHttp() + { + } + + /// Initializes a new instance of . + /// The maximum number of concurrent HTTP trigger invocations per instance. + /// Keeps track of any properties unknown to the library. + internal FunctionsScaleAndConcurrencyTriggersHttp(float? perInstanceConcurrency, IDictionary serializedAdditionalRawData) + { + PerInstanceConcurrency = perInstanceConcurrency; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The maximum number of concurrent HTTP trigger invocations per instance. + [WirePath("perInstanceConcurrency")] + public float? PerInstanceConcurrency { get; set; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/KubeEnvironmentPatch.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/KubeEnvironmentPatch.Serialization.cs index b0b647b9c1c28..f9a4c55cc225c 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/KubeEnvironmentPatch.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/KubeEnvironmentPatch.Serialization.cs @@ -90,6 +90,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WritePropertyName("appLogsConfiguration"u8); writer.WriteObjectValue(AppLogsConfiguration, options); } + if (Optional.IsDefined(ContainerAppsConfiguration)) + { + writer.WritePropertyName("containerAppsConfiguration"u8); + writer.WriteObjectValue(ContainerAppsConfiguration, options); + } if (Optional.IsDefined(AksResourceId)) { writer.WritePropertyName("aksResourceID"u8); @@ -146,6 +151,7 @@ internal static KubeEnvironmentPatch DeserializeKubeEnvironmentPatch(JsonElement string staticIP = default; ArcConfiguration arcConfiguration = default; AppLogsConfiguration appLogsConfiguration = default; + ContainerAppsConfiguration containerAppsConfiguration = default; ResourceIdentifier aksResourceId = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -240,6 +246,15 @@ internal static KubeEnvironmentPatch DeserializeKubeEnvironmentPatch(JsonElement appLogsConfiguration = AppLogsConfiguration.DeserializeAppLogsConfiguration(property0.Value, options); continue; } + if (property0.NameEquals("containerAppsConfiguration"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + containerAppsConfiguration = ContainerAppsConfiguration.DeserializeContainerAppsConfiguration(property0.Value, options); + continue; + } if (property0.NameEquals("aksResourceID"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -270,6 +285,7 @@ internal static KubeEnvironmentPatch DeserializeKubeEnvironmentPatch(JsonElement staticIP, arcConfiguration, appLogsConfiguration, + containerAppsConfiguration, aksResourceId, kind, serializedAdditionalRawData); @@ -494,6 +510,21 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ContainerAppsConfiguration), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" containerAppsConfiguration: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ContainerAppsConfiguration)) + { + builder.Append(" containerAppsConfiguration: "); + BicepSerializationHelpers.AppendChildObject(builder, ContainerAppsConfiguration, options, 4, false, " containerAppsConfiguration: "); + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AksResourceId), out propertyOverride); if (hasPropertyOverride) { diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/KubeEnvironmentPatch.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/KubeEnvironmentPatch.cs index 0d97e15f9587d..4da93740195ac 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/KubeEnvironmentPatch.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/KubeEnvironmentPatch.cs @@ -72,10 +72,11 @@ public KubeEnvironmentPatch() /// app logs to a destination. Currently only "log-analytics" is /// supported /// + /// Cluster configuration for Container Apps Environments to configure Dapr Instrumentation Key and VNET Configuration. /// /// Kind of resource. /// Keeps track of any properties unknown to the library. - internal KubeEnvironmentPatch(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, KubeEnvironmentProvisioningState? provisioningState, string deploymentErrors, bool? isInternalLoadBalancerEnabled, string defaultDomain, string staticIP, ArcConfiguration arcConfiguration, AppLogsConfiguration appLogsConfiguration, ResourceIdentifier aksResourceId, string kind, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal KubeEnvironmentPatch(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, KubeEnvironmentProvisioningState? provisioningState, string deploymentErrors, bool? isInternalLoadBalancerEnabled, string defaultDomain, string staticIP, ArcConfiguration arcConfiguration, AppLogsConfiguration appLogsConfiguration, ContainerAppsConfiguration containerAppsConfiguration, ResourceIdentifier aksResourceId, string kind, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { ProvisioningState = provisioningState; DeploymentErrors = deploymentErrors; @@ -84,6 +85,7 @@ internal KubeEnvironmentPatch(ResourceIdentifier id, string name, ResourceType r StaticIP = staticIP; ArcConfiguration = arcConfiguration; AppLogsConfiguration = appLogsConfiguration; + ContainerAppsConfiguration = containerAppsConfiguration; AksResourceId = aksResourceId; Kind = kind; _serializedAdditionalRawData = serializedAdditionalRawData; @@ -118,6 +120,9 @@ internal KubeEnvironmentPatch(ResourceIdentifier id, string name, ResourceType r /// [WirePath("properties.appLogsConfiguration")] public AppLogsConfiguration AppLogsConfiguration { get; set; } + /// Cluster configuration for Container Apps Environments to configure Dapr Instrumentation Key and VNET Configuration. + [WirePath("properties.containerAppsConfiguration")] + public ContainerAppsConfiguration ContainerAppsConfiguration { get; set; } /// Gets or sets the aks resource id. [WirePath("properties.aksResourceID")] public ResourceIdentifier AksResourceId { get; set; } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/OpenAuthenticationAccessPolicies.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/OpenAuthenticationAccessPolicies.Serialization.cs new file mode 100644 index 0000000000000..515d8d60d7000 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/OpenAuthenticationAccessPolicies.Serialization.cs @@ -0,0 +1,180 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + internal partial class OpenAuthenticationAccessPolicies : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OpenAuthenticationAccessPolicies)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(OpenAuthenticationPolicyList)) + { + writer.WritePropertyName("policies"u8); + writer.WriteStartObject(); + foreach (var item in OpenAuthenticationPolicyList) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + OpenAuthenticationAccessPolicies IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OpenAuthenticationAccessPolicies)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeOpenAuthenticationAccessPolicies(document.RootElement, options); + } + + internal static OpenAuthenticationAccessPolicies DeserializeOpenAuthenticationAccessPolicies(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary policies = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("policies"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, OpenAuthenticationAccessPolicy.DeserializeOpenAuthenticationAccessPolicy(property0.Value, options)); + } + policies = dictionary; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new OpenAuthenticationAccessPolicies(policies ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(OpenAuthenticationPolicyList), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" policies: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(OpenAuthenticationPolicyList)) + { + if (OpenAuthenticationPolicyList.Any()) + { + builder.Append(" policies: "); + builder.AppendLine("{"); + foreach (var item in OpenAuthenticationPolicyList) + { + builder.Append($" '{item.Key}': "); + BicepSerializationHelpers.AppendChildObject(builder, item.Value, options, 4, false, " policies: "); + } + builder.AppendLine(" }"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(OpenAuthenticationAccessPolicies)} does not support writing '{options.Format}' format."); + } + } + + OpenAuthenticationAccessPolicies IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeOpenAuthenticationAccessPolicies(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(OpenAuthenticationAccessPolicies)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/OpenAuthenticationAccessPolicies.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/OpenAuthenticationAccessPolicies.cs new file mode 100644 index 0000000000000..84ef11c6064c8 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/OpenAuthenticationAccessPolicies.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// AuthenticationPolicy of type Open. + internal partial class OpenAuthenticationAccessPolicies + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public OpenAuthenticationAccessPolicies() + { + OpenAuthenticationPolicyList = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// Open authentication policies. + /// Keeps track of any properties unknown to the library. + internal OpenAuthenticationAccessPolicies(IDictionary openAuthenticationPolicyList, IDictionary serializedAdditionalRawData) + { + OpenAuthenticationPolicyList = openAuthenticationPolicyList; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Open authentication policies. + [WirePath("policies")] + public IDictionary OpenAuthenticationPolicyList { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/OpenAuthenticationAccessPolicy.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/OpenAuthenticationAccessPolicy.Serialization.cs new file mode 100644 index 0000000000000..390a25a69d445 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/OpenAuthenticationAccessPolicy.Serialization.cs @@ -0,0 +1,208 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class OpenAuthenticationAccessPolicy : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OpenAuthenticationAccessPolicy)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(ProviderType)) + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(ProviderType.Value.ToString()); + } + if (Optional.IsCollectionDefined(Claims)) + { + writer.WritePropertyName("claims"u8); + writer.WriteStartArray(); + foreach (var item in Claims) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + OpenAuthenticationAccessPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OpenAuthenticationAccessPolicy)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeOpenAuthenticationAccessPolicy(document.RootElement, options); + } + + internal static OpenAuthenticationAccessPolicy DeserializeOpenAuthenticationAccessPolicy(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + OpenAuthenticationProviderType? type = default; + IList claims = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + type = new OpenAuthenticationProviderType(property.Value.GetString()); + continue; + } + if (property.NameEquals("claims"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(OpenAuthenticationPolicyClaim.DeserializeOpenAuthenticationPolicyClaim(item, options)); + } + claims = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new OpenAuthenticationAccessPolicy(type, claims ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProviderType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" type: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ProviderType)) + { + builder.Append(" type: "); + builder.AppendLine($"'{ProviderType.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Claims), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" claims: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Claims)) + { + if (Claims.Any()) + { + builder.Append(" claims: "); + builder.AppendLine("["); + foreach (var item in Claims) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " claims: "); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(OpenAuthenticationAccessPolicy)} does not support writing '{options.Format}' format."); + } + } + + OpenAuthenticationAccessPolicy IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeOpenAuthenticationAccessPolicy(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(OpenAuthenticationAccessPolicy)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/OpenAuthenticationAccessPolicy.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/OpenAuthenticationAccessPolicy.cs new file mode 100644 index 0000000000000..0b2fc6b015898 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/OpenAuthenticationAccessPolicy.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// Open authentication access policy defined by user. + public partial class OpenAuthenticationAccessPolicy + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public OpenAuthenticationAccessPolicy() + { + Claims = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Type of provider for OAuth. + /// The access policy claims. + /// Keeps track of any properties unknown to the library. + internal OpenAuthenticationAccessPolicy(OpenAuthenticationProviderType? providerType, IList claims, IDictionary serializedAdditionalRawData) + { + ProviderType = providerType; + Claims = claims; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Type of provider for OAuth. + [WirePath("type")] + public OpenAuthenticationProviderType? ProviderType { get; set; } + /// The access policy claims. + [WirePath("claims")] + public IList Claims { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/OpenAuthenticationPolicyClaim.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/OpenAuthenticationPolicyClaim.Serialization.cs new file mode 100644 index 0000000000000..a4520e9a2071f --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/OpenAuthenticationPolicyClaim.Serialization.cs @@ -0,0 +1,197 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class OpenAuthenticationPolicyClaim : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OpenAuthenticationPolicyClaim)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(Value)) + { + writer.WritePropertyName("value"u8); + writer.WriteStringValue(Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + OpenAuthenticationPolicyClaim IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OpenAuthenticationPolicyClaim)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeOpenAuthenticationPolicyClaim(document.RootElement, options); + } + + internal static OpenAuthenticationPolicyClaim DeserializeOpenAuthenticationPolicyClaim(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + string value = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("value"u8)) + { + value = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new OpenAuthenticationPolicyClaim(name, value, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Value)) + { + builder.Append(" value: "); + if (Value.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Value}'''"); + } + else + { + builder.AppendLine($"'{Value}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(OpenAuthenticationPolicyClaim)} does not support writing '{options.Format}' format."); + } + } + + OpenAuthenticationPolicyClaim IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeOpenAuthenticationPolicyClaim(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(OpenAuthenticationPolicyClaim)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/OpenAuthenticationPolicyClaim.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/OpenAuthenticationPolicyClaim.cs new file mode 100644 index 0000000000000..ebd32ac6add08 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/OpenAuthenticationPolicyClaim.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// Open authentication policy claim. + public partial class OpenAuthenticationPolicyClaim + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public OpenAuthenticationPolicyClaim() + { + } + + /// Initializes a new instance of . + /// The name of the claim. + /// The value of the claim. + /// Keeps track of any properties unknown to the library. + internal OpenAuthenticationPolicyClaim(string name, string value, IDictionary serializedAdditionalRawData) + { + Name = name; + Value = value; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The name of the claim. + [WirePath("name")] + public string Name { get; set; } + /// The value of the claim. + [WirePath("value")] + public string Value { get; set; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/OpenAuthenticationProviderType.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/OpenAuthenticationProviderType.cs new file mode 100644 index 0000000000000..33ca4da368601 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/OpenAuthenticationProviderType.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.AppService.Models +{ + /// Open authentication policy provider type. + public readonly partial struct OpenAuthenticationProviderType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public OpenAuthenticationProviderType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AADValue = "AAD"; + + /// AAD. + public static OpenAuthenticationProviderType AAD { get; } = new OpenAuthenticationProviderType(AADValue); + /// Determines if two values are the same. + public static bool operator ==(OpenAuthenticationProviderType left, OpenAuthenticationProviderType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(OpenAuthenticationProviderType left, OpenAuthenticationProviderType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator OpenAuthenticationProviderType(string value) => new OpenAuthenticationProviderType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is OpenAuthenticationProviderType other && Equals(other); + /// + public bool Equals(OpenAuthenticationProviderType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/RecurrenceScheduleOccurrence.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/RecurrenceScheduleOccurrence.Serialization.cs new file mode 100644 index 0000000000000..779aa0990a2f1 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/RecurrenceScheduleOccurrence.Serialization.cs @@ -0,0 +1,189 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class RecurrenceScheduleOccurrence : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RecurrenceScheduleOccurrence)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Day)) + { + writer.WritePropertyName("day"u8); + writer.WriteStringValue(Day.Value.ToSerialString()); + } + if (Optional.IsDefined(Occurrence)) + { + writer.WritePropertyName("occurrence"u8); + writer.WriteNumberValue(Occurrence.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + RecurrenceScheduleOccurrence IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RecurrenceScheduleOccurrence)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeRecurrenceScheduleOccurrence(document.RootElement, options); + } + + internal static RecurrenceScheduleOccurrence DeserializeRecurrenceScheduleOccurrence(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + WebAppDayOfWeek? day = default; + int? occurrence = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("day"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + day = property.Value.GetString().ToWebAppDayOfWeek(); + continue; + } + if (property.NameEquals("occurrence"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + occurrence = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new RecurrenceScheduleOccurrence(day, occurrence, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Day), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" day: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Day)) + { + builder.Append(" day: "); + builder.AppendLine($"'{Day.Value.ToSerialString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Occurrence), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" occurrence: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Occurrence)) + { + builder.Append(" occurrence: "); + builder.AppendLine($"{Occurrence.Value}"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(RecurrenceScheduleOccurrence)} does not support writing '{options.Format}' format."); + } + } + + RecurrenceScheduleOccurrence IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeRecurrenceScheduleOccurrence(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(RecurrenceScheduleOccurrence)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/RecurrenceScheduleOccurrence.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/RecurrenceScheduleOccurrence.cs new file mode 100644 index 0000000000000..93dab7f46cc89 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/RecurrenceScheduleOccurrence.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The recurrence schedule occurrence. + public partial class RecurrenceScheduleOccurrence + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal RecurrenceScheduleOccurrence() + { + } + + /// Initializes a new instance of . + /// The day of the week. + /// The occurrence. + /// Keeps track of any properties unknown to the library. + internal RecurrenceScheduleOccurrence(WebAppDayOfWeek? day, int? occurrence, IDictionary serializedAdditionalRawData) + { + Day = day; + Occurrence = occurrence; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The day of the week. + [WirePath("day")] + public WebAppDayOfWeek? Day { get; } + /// The occurrence. + [WirePath("occurrence")] + public int? Occurrence { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/RequestHistoryListResult.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/RequestHistoryListResult.Serialization.cs new file mode 100644 index 0000000000000..f7702dcd586b6 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/RequestHistoryListResult.Serialization.cs @@ -0,0 +1,212 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + internal partial class RequestHistoryListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RequestHistoryListResult)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Value)) + { + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + RequestHistoryListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RequestHistoryListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeRequestHistoryListResult(document.RootElement, options); + } + + internal static RequestHistoryListResult DeserializeRequestHistoryListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + string nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(WebAppRequestHistoryData.DeserializeWebAppRequestHistoryData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new RequestHistoryListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(RequestHistoryListResult)} does not support writing '{options.Format}' format."); + } + } + + RequestHistoryListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeRequestHistoryListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(RequestHistoryListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/RequestHistoryListResult.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/RequestHistoryListResult.cs new file mode 100644 index 0000000000000..ec11970a2b1b2 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/RequestHistoryListResult.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The list of workflow request histories. + internal partial class RequestHistoryListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal RequestHistoryListResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// A list of workflow request histories. + /// The URL to get the next set of results. + /// Keeps track of any properties unknown to the library. + internal RequestHistoryListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// A list of workflow request histories. + public IReadOnlyList Value { get; } + /// The URL to get the next set of results. + public string NextLink { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/ResourceNameAvailabilityContent.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/ResourceNameAvailabilityContent.Serialization.cs index a3714d6688482..0b5b974e2b759 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/ResourceNameAvailabilityContent.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/ResourceNameAvailabilityContent.Serialization.cs @@ -35,6 +35,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo writer.WritePropertyName("isFqdn"u8); writer.WriteBooleanValue(IsFqdn.Value); } + if (Optional.IsDefined(EnvironmentId)) + { + writer.WritePropertyName("environmentId"u8); + writer.WriteStringValue(EnvironmentId); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -76,6 +81,7 @@ internal static ResourceNameAvailabilityContent DeserializeResourceNameAvailabil string name = default; CheckNameResourceType type = default; bool? isFqdn = default; + string environmentId = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -99,13 +105,18 @@ internal static ResourceNameAvailabilityContent DeserializeResourceNameAvailabil isFqdn = property.Value.GetBoolean(); continue; } + if (property.NameEquals("environmentId"u8)) + { + environmentId = property.Value.GetString(); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new ResourceNameAvailabilityContent(name, type, isFqdn, serializedAdditionalRawData); + return new ResourceNameAvailabilityContent(name, type, isFqdn, environmentId, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/ResourceNameAvailabilityContent.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/ResourceNameAvailabilityContent.cs index 273d646be9be8..2dfe44ed08c32 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/ResourceNameAvailabilityContent.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/ResourceNameAvailabilityContent.cs @@ -61,12 +61,14 @@ public ResourceNameAvailabilityContent(string name, CheckNameResourceType resour /// Resource name to verify. /// Resource type used for verification. /// Is fully qualified domain name. + /// Azure Resource Manager ID of the customer's selected Container Apps Environment on which to host the Function app. This must be of the form /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName}. /// Keeps track of any properties unknown to the library. - internal ResourceNameAvailabilityContent(string name, CheckNameResourceType resourceType, bool? isFqdn, IDictionary serializedAdditionalRawData) + internal ResourceNameAvailabilityContent(string name, CheckNameResourceType resourceType, bool? isFqdn, string environmentId, IDictionary serializedAdditionalRawData) { Name = name; ResourceType = resourceType; IsFqdn = isFqdn; + EnvironmentId = environmentId; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -84,5 +86,8 @@ internal ResourceNameAvailabilityContent() /// Is fully qualified domain name. [WirePath("isFqdn")] public bool? IsFqdn { get; set; } + /// Azure Resource Manager ID of the customer's selected Container Apps Environment on which to host the Function app. This must be of the form /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName}. + [WirePath("environmentId")] + public string EnvironmentId { get; set; } } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/ResponseMessageEnvelopeRemotePrivateEndpointConnection.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/ResponseMessageEnvelopeRemotePrivateEndpointConnection.Serialization.cs index 0c7bd20aa8401..7319982a922c1 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/ResponseMessageEnvelopeRemotePrivateEndpointConnection.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/ResponseMessageEnvelopeRemotePrivateEndpointConnection.Serialization.cs @@ -459,7 +459,7 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) if (Optional.IsDefined(Error)) { builder.Append(" error: "); - BicepSerializationHelpers.AppendChildObject(builder, Error, options, 2, false, " error: "); + builder.AppendLine($"'{Error.ToString()}'"); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/ResponseMessageEnvelopeRemotePrivateEndpointConnection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/ResponseMessageEnvelopeRemotePrivateEndpointConnection.cs index 8c9b608a16286..f06782dd50c21 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/ResponseMessageEnvelopeRemotePrivateEndpointConnection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/ResponseMessageEnvelopeRemotePrivateEndpointConnection.cs @@ -101,9 +101,6 @@ internal ResponseMessageEnvelopeRemotePrivateEndpointConnection(ResourceIdentifi /// Azure-AsyncOperation Status info. [WirePath("status")] public string Status { get; } - /// Azure-AsyncOperation Error info. - [WirePath("error")] - public ResponseError Error { get; } /// MSI resource. [WirePath("identity")] public ManagedServiceIdentity Identity { get; } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteAuthSettings.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteAuthSettings.cs index 6b5fbbbaddb01..43ef6b8d9e830 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteAuthSettings.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteAuthSettings.cs @@ -113,7 +113,7 @@ public SiteAuthSettings() /// /// Gets a value indicating whether the issuer should be a valid HTTPS url and be validated as such. /// - /// Allowed audience values to consider when validating JWTs issued by + /// Allowed audience values to consider when validating JSON Web Tokens issued by /// Azure Active Directory. Note that the <code>ClientID</code> value is always considered an /// allowed audience, regardless of this setting. /// @@ -339,7 +339,7 @@ internal SiteAuthSettings(ResourceIdentifier id, string name, ResourceType resou [WirePath("properties.validateIssuer")] public bool? ValidateIssuer { get; set; } /// - /// Allowed audience values to consider when validating JWTs issued by + /// Allowed audience values to consider when validating JSON Web Tokens issued by /// Azure Active Directory. Note that the <code>ClientID</code> value is always considered an /// allowed audience, regardless of this setting. /// diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteConfigProperties.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteConfigProperties.Serialization.cs index ea73c6537fdf9..10b4297c8d1c3 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteConfigProperties.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteConfigProperties.Serialization.cs @@ -278,6 +278,23 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WriteNull("appSettings"); } } + if (Optional.IsCollectionDefined(Metadata)) + { + if (Metadata != null) + { + writer.WritePropertyName("metadata"u8); + writer.WriteStartArray(); + foreach (var item in Metadata) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + else + { + writer.WriteNull("metadata"); + } + } if (Optional.IsCollectionDefined(ConnectionStrings)) { if (ConnectionStrings != null) @@ -694,6 +711,18 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WriteNull("ipSecurityRestrictions"); } } + if (Optional.IsDefined(IPSecurityRestrictionsDefaultAction)) + { + if (IPSecurityRestrictionsDefaultAction != null) + { + writer.WritePropertyName("ipSecurityRestrictionsDefaultAction"u8); + writer.WriteStringValue(IPSecurityRestrictionsDefaultAction.Value.ToString()); + } + else + { + writer.WriteNull("ipSecurityRestrictionsDefaultAction"); + } + } if (Optional.IsCollectionDefined(ScmIPSecurityRestrictions)) { if (ScmIPSecurityRestrictions != null) @@ -711,6 +740,18 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WriteNull("scmIpSecurityRestrictions"); } } + if (Optional.IsDefined(ScmIPSecurityRestrictionsDefaultAction)) + { + if (ScmIPSecurityRestrictionsDefaultAction != null) + { + writer.WritePropertyName("scmIpSecurityRestrictionsDefaultAction"u8); + writer.WriteStringValue(ScmIPSecurityRestrictionsDefaultAction.Value.ToString()); + } + else + { + writer.WriteNull("scmIpSecurityRestrictionsDefaultAction"); + } + } if (Optional.IsDefined(AllowIPSecurityRestrictionsForScmToUseMain)) { if (AllowIPSecurityRestrictionsForScmToUseMain != null) @@ -747,6 +788,18 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WriteNull("minTlsVersion"); } } + if (Optional.IsDefined(MinTlsCipherSuite)) + { + if (MinTlsCipherSuite != null) + { + writer.WritePropertyName("minTlsCipherSuite"u8); + writer.WriteStringValue(MinTlsCipherSuite.Value.ToString()); + } + else + { + writer.WriteNull("minTlsCipherSuite"); + } + } if (Optional.IsDefined(ScmMinTlsVersion)) { if (ScmMinTlsVersion != null) @@ -795,6 +848,18 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WriteNull("functionAppScaleLimit"); } } + if (Optional.IsDefined(ElasticWebAppScaleLimit)) + { + if (ElasticWebAppScaleLimit != null) + { + writer.WritePropertyName("elasticWebAppScaleLimit"u8); + writer.WriteNumberValue(ElasticWebAppScaleLimit.Value); + } + else + { + writer.WriteNull("elasticWebAppScaleLimit"); + } + } if (Optional.IsDefined(HealthCheckPath)) { if (HealthCheckPath != null) @@ -931,6 +996,7 @@ internal static SiteConfigProperties DeserializeSiteConfigProperties(JsonElement bool? detailedErrorLoggingEnabled = default; string publishingUsername = default; IList appSettings = default; + IList metadata = default; IList connectionStrings = default; SiteMachineKey machineKey = default; IList handlerMappings = default; @@ -964,14 +1030,18 @@ internal static SiteConfigProperties DeserializeSiteConfigProperties(JsonElement int? xManagedServiceIdentityId = default; string keyVaultReferenceIdentity = default; IList ipSecurityRestrictions = default; + SiteDefaultAction? ipSecurityRestrictionsDefaultAction = default; IList scmIPSecurityRestrictions = default; + SiteDefaultAction? scmIPSecurityRestrictionsDefaultAction = default; bool? scmIPSecurityRestrictionsUseMain = default; bool? http20Enabled = default; AppServiceSupportedTlsVersion? minTlsVersion = default; + AppServiceTlsCipherSuite? minTlsCipherSuite = default; AppServiceSupportedTlsVersion? scmMinTlsVersion = default; AppServiceFtpsState? ftpsState = default; int? preWarmedInstanceCount = default; int? functionAppScaleLimit = default; + int? elasticWebAppScaleLimit = default; string healthCheckPath = default; bool? functionsRuntimeScaleMonitoringEnabled = default; string websiteTimeZone = default; @@ -1192,6 +1262,21 @@ internal static SiteConfigProperties DeserializeSiteConfigProperties(JsonElement appSettings = array; continue; } + if (property.NameEquals("metadata"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + metadata = null; + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AppServiceNameValuePair.DeserializeAppServiceNameValuePair(item, options)); + } + metadata = array; + continue; + } if (property.NameEquals("connectionStrings"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -1542,6 +1627,16 @@ internal static SiteConfigProperties DeserializeSiteConfigProperties(JsonElement ipSecurityRestrictions = array; continue; } + if (property.NameEquals("ipSecurityRestrictionsDefaultAction"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + ipSecurityRestrictionsDefaultAction = null; + continue; + } + ipSecurityRestrictionsDefaultAction = new SiteDefaultAction(property.Value.GetString()); + continue; + } if (property.NameEquals("scmIpSecurityRestrictions"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -1557,6 +1652,16 @@ internal static SiteConfigProperties DeserializeSiteConfigProperties(JsonElement scmIPSecurityRestrictions = array; continue; } + if (property.NameEquals("scmIpSecurityRestrictionsDefaultAction"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + scmIPSecurityRestrictionsDefaultAction = null; + continue; + } + scmIPSecurityRestrictionsDefaultAction = new SiteDefaultAction(property.Value.GetString()); + continue; + } if (property.NameEquals("scmIpSecurityRestrictionsUseMain"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -1587,6 +1692,16 @@ internal static SiteConfigProperties DeserializeSiteConfigProperties(JsonElement minTlsVersion = new AppServiceSupportedTlsVersion(property.Value.GetString()); continue; } + if (property.NameEquals("minTlsCipherSuite"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + minTlsCipherSuite = null; + continue; + } + minTlsCipherSuite = new AppServiceTlsCipherSuite(property.Value.GetString()); + continue; + } if (property.NameEquals("scmMinTlsVersion"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -1627,6 +1742,16 @@ internal static SiteConfigProperties DeserializeSiteConfigProperties(JsonElement functionAppScaleLimit = property.Value.GetInt32(); continue; } + if (property.NameEquals("elasticWebAppScaleLimit"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + elasticWebAppScaleLimit = null; + continue; + } + elasticWebAppScaleLimit = property.Value.GetInt32(); + continue; + } if (property.NameEquals("healthCheckPath"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -1719,6 +1844,7 @@ internal static SiteConfigProperties DeserializeSiteConfigProperties(JsonElement detailedErrorLoggingEnabled, publishingUsername, appSettings ?? new ChangeTrackingList(), + metadata ?? new ChangeTrackingList(), connectionStrings ?? new ChangeTrackingList(), machineKey, handlerMappings ?? new ChangeTrackingList(), @@ -1752,14 +1878,18 @@ internal static SiteConfigProperties DeserializeSiteConfigProperties(JsonElement xManagedServiceIdentityId, keyVaultReferenceIdentity, ipSecurityRestrictions ?? new ChangeTrackingList(), + ipSecurityRestrictionsDefaultAction, scmIPSecurityRestrictions ?? new ChangeTrackingList(), + scmIPSecurityRestrictionsDefaultAction, scmIPSecurityRestrictionsUseMain, http20Enabled, minTlsVersion, + minTlsCipherSuite, scmMinTlsVersion, ftpsState, preWarmedInstanceCount, functionAppScaleLimit, + elasticWebAppScaleLimit, healthCheckPath, functionsRuntimeScaleMonitoringEnabled, websiteTimeZone, @@ -2195,6 +2325,29 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Metadata), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" metadata: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Metadata)) + { + if (Metadata.Any()) + { + builder.Append(" metadata: "); + builder.AppendLine("["); + foreach (var item in Metadata) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " metadata: "); + } + builder.AppendLine(" ]"); + } + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ConnectionStrings), out propertyOverride); if (hasPropertyOverride) { @@ -2809,6 +2962,21 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IPSecurityRestrictionsDefaultAction), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" ipSecurityRestrictionsDefaultAction: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IPSecurityRestrictionsDefaultAction)) + { + builder.Append(" ipSecurityRestrictionsDefaultAction: "); + builder.AppendLine($"'{IPSecurityRestrictionsDefaultAction.Value.ToString()}'"); + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ScmIPSecurityRestrictions), out propertyOverride); if (hasPropertyOverride) { @@ -2832,6 +3000,21 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ScmIPSecurityRestrictionsDefaultAction), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" scmIpSecurityRestrictionsDefaultAction: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ScmIPSecurityRestrictionsDefaultAction)) + { + builder.Append(" scmIpSecurityRestrictionsDefaultAction: "); + builder.AppendLine($"'{ScmIPSecurityRestrictionsDefaultAction.Value.ToString()}'"); + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AllowIPSecurityRestrictionsForScmToUseMain), out propertyOverride); if (hasPropertyOverride) { @@ -2879,6 +3062,21 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(MinTlsCipherSuite), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" minTlsCipherSuite: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(MinTlsCipherSuite)) + { + builder.Append(" minTlsCipherSuite: "); + builder.AppendLine($"'{MinTlsCipherSuite.Value.ToString()}'"); + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ScmMinTlsVersion), out propertyOverride); if (hasPropertyOverride) { @@ -2939,6 +3137,21 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ElasticWebAppScaleLimit), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" elasticWebAppScaleLimit: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ElasticWebAppScaleLimit)) + { + builder.Append(" elasticWebAppScaleLimit: "); + builder.AppendLine($"{ElasticWebAppScaleLimit.Value}"); + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(HealthCheckPath), out propertyOverride); if (hasPropertyOverride) { diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteConfigProperties.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteConfigProperties.cs index 7279f3b43e837..3477cc4e78055 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteConfigProperties.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteConfigProperties.cs @@ -50,6 +50,7 @@ public SiteConfigProperties() { DefaultDocuments = new ChangeTrackingList(); AppSettings = new ChangeTrackingList(); + Metadata = new ChangeTrackingList(); ConnectionStrings = new ChangeTrackingList(); HandlerMappings = new ChangeTrackingList(); VirtualApplications = new ChangeTrackingList(); @@ -79,6 +80,7 @@ public SiteConfigProperties() /// <code>true</code> if detailed error logging is enabled; otherwise, <code>false</code>. /// Publishing user name. /// Application settings. + /// Application metadata. This property cannot be retrieved, since it may contain secrets. /// Connection strings. /// Site MachineKey. /// Handler mappings. @@ -112,10 +114,13 @@ public SiteConfigProperties() /// Explicit Managed Service Identity Id. /// Identity to use for Key Vault Reference authentication. /// IP security restrictions for main. + /// Default action for main access restriction if no rules are matched. /// IP security restrictions for scm. + /// Default action for scm access restriction if no rules are matched. /// IP security restrictions for scm to use main. /// Http20Enabled: configures a web site to allow clients to connect over http2.0. /// MinTlsVersion: configures the minimum version of TLS required for SSL requests. + /// The minimum strength TLS cipher suite allowed for an application. /// ScmMinTlsVersion: configures the minimum version of TLS required for SSL requests for SCM site. /// State of FTP / FTPS service. /// @@ -126,6 +131,10 @@ public SiteConfigProperties() /// Maximum number of workers that a site can scale out to. /// This setting only applies to the Consumption and Elastic Premium Plans /// + /// + /// Maximum number of workers that a site can scale out to. + /// This setting only applies to apps in plans where ElasticScaleEnabled is <code>true</code> + /// /// Health check path. /// /// Gets or sets a value indicating whether functions runtime scale monitoring is enabled. When enabled, @@ -140,7 +149,7 @@ public SiteConfigProperties() /// List of Azure Storage Accounts. /// Property to allow or block all public traffic. /// Keeps track of any properties unknown to the library. - internal SiteConfigProperties(int? numberOfWorkers, IList defaultDocuments, string netFrameworkVersion, string phpVersion, string pythonVersion, string nodeVersion, string powerShellVersion, string linuxFxVersion, string windowsFxVersion, bool? isRequestTracingEnabled, DateTimeOffset? requestTracingExpirationOn, bool? isRemoteDebuggingEnabled, string remoteDebuggingVersion, bool? isHttpLoggingEnabled, bool? useManagedIdentityCreds, string acrUserManagedIdentityId, int? logsDirectorySizeLimit, bool? isDetailedErrorLoggingEnabled, string publishingUsername, IList appSettings, IList connectionStrings, SiteMachineKey machineKey, IList handlerMappings, string documentRoot, ScmType? scmType, bool? use32BitWorkerProcess, bool? isWebSocketsEnabled, bool? isAlwaysOn, string javaVersion, string javaContainer, string javaContainerVersion, string appCommandLine, ManagedPipelineMode? managedPipelineMode, IList virtualApplications, SiteLoadBalancing? loadBalancing, RoutingRuleExperiments experiments, SiteLimits limits, bool? isAutoHealEnabled, AutoHealRules autoHealRules, string tracingOptions, string vnetName, bool? isVnetRouteAllEnabled, int? vnetPrivatePortsCount, AppServiceCorsSettings cors, WebAppPushSettings push, AppServiceApiDefinitionInfo apiDefinition, ApiManagementConfig apiManagementConfig, string autoSwapSlotName, bool? isLocalMySqlEnabled, int? managedServiceIdentityId, int? xManagedServiceIdentityId, string keyVaultReferenceIdentity, IList ipSecurityRestrictions, IList scmIPSecurityRestrictions, bool? allowIPSecurityRestrictionsForScmToUseMain, bool? isHttp20Enabled, AppServiceSupportedTlsVersion? minTlsVersion, AppServiceSupportedTlsVersion? scmMinTlsVersion, AppServiceFtpsState? ftpsState, int? preWarmedInstanceCount, int? functionAppScaleLimit, string healthCheckPath, bool? isFunctionsRuntimeScaleMonitoringEnabled, string websiteTimeZone, int? minimumElasticInstanceCount, IDictionary azureStorageAccounts, string publicNetworkAccess, IDictionary serializedAdditionalRawData) + internal SiteConfigProperties(int? numberOfWorkers, IList defaultDocuments, string netFrameworkVersion, string phpVersion, string pythonVersion, string nodeVersion, string powerShellVersion, string linuxFxVersion, string windowsFxVersion, bool? isRequestTracingEnabled, DateTimeOffset? requestTracingExpirationOn, bool? isRemoteDebuggingEnabled, string remoteDebuggingVersion, bool? isHttpLoggingEnabled, bool? useManagedIdentityCreds, string acrUserManagedIdentityId, int? logsDirectorySizeLimit, bool? isDetailedErrorLoggingEnabled, string publishingUsername, IList appSettings, IList metadata, IList connectionStrings, SiteMachineKey machineKey, IList handlerMappings, string documentRoot, ScmType? scmType, bool? use32BitWorkerProcess, bool? isWebSocketsEnabled, bool? isAlwaysOn, string javaVersion, string javaContainer, string javaContainerVersion, string appCommandLine, ManagedPipelineMode? managedPipelineMode, IList virtualApplications, SiteLoadBalancing? loadBalancing, RoutingRuleExperiments experiments, SiteLimits limits, bool? isAutoHealEnabled, AutoHealRules autoHealRules, string tracingOptions, string vnetName, bool? isVnetRouteAllEnabled, int? vnetPrivatePortsCount, AppServiceCorsSettings cors, WebAppPushSettings push, AppServiceApiDefinitionInfo apiDefinition, ApiManagementConfig apiManagementConfig, string autoSwapSlotName, bool? isLocalMySqlEnabled, int? managedServiceIdentityId, int? xManagedServiceIdentityId, string keyVaultReferenceIdentity, IList ipSecurityRestrictions, SiteDefaultAction? ipSecurityRestrictionsDefaultAction, IList scmIPSecurityRestrictions, SiteDefaultAction? scmIPSecurityRestrictionsDefaultAction, bool? allowIPSecurityRestrictionsForScmToUseMain, bool? isHttp20Enabled, AppServiceSupportedTlsVersion? minTlsVersion, AppServiceTlsCipherSuite? minTlsCipherSuite, AppServiceSupportedTlsVersion? scmMinTlsVersion, AppServiceFtpsState? ftpsState, int? preWarmedInstanceCount, int? functionAppScaleLimit, int? elasticWebAppScaleLimit, string healthCheckPath, bool? isFunctionsRuntimeScaleMonitoringEnabled, string websiteTimeZone, int? minimumElasticInstanceCount, IDictionary azureStorageAccounts, string publicNetworkAccess, IDictionary serializedAdditionalRawData) { NumberOfWorkers = numberOfWorkers; DefaultDocuments = defaultDocuments; @@ -162,6 +171,7 @@ internal SiteConfigProperties(int? numberOfWorkers, IList defaultDocumen IsDetailedErrorLoggingEnabled = isDetailedErrorLoggingEnabled; PublishingUsername = publishingUsername; AppSettings = appSettings; + Metadata = metadata; ConnectionStrings = connectionStrings; MachineKey = machineKey; HandlerMappings = handlerMappings; @@ -195,14 +205,18 @@ internal SiteConfigProperties(int? numberOfWorkers, IList defaultDocumen XManagedServiceIdentityId = xManagedServiceIdentityId; KeyVaultReferenceIdentity = keyVaultReferenceIdentity; IPSecurityRestrictions = ipSecurityRestrictions; + IPSecurityRestrictionsDefaultAction = ipSecurityRestrictionsDefaultAction; ScmIPSecurityRestrictions = scmIPSecurityRestrictions; + ScmIPSecurityRestrictionsDefaultAction = scmIPSecurityRestrictionsDefaultAction; AllowIPSecurityRestrictionsForScmToUseMain = allowIPSecurityRestrictionsForScmToUseMain; IsHttp20Enabled = isHttp20Enabled; MinTlsVersion = minTlsVersion; + MinTlsCipherSuite = minTlsCipherSuite; ScmMinTlsVersion = scmMinTlsVersion; FtpsState = ftpsState; PreWarmedInstanceCount = preWarmedInstanceCount; FunctionAppScaleLimit = functionAppScaleLimit; + ElasticWebAppScaleLimit = elasticWebAppScaleLimit; HealthCheckPath = healthCheckPath; IsFunctionsRuntimeScaleMonitoringEnabled = isFunctionsRuntimeScaleMonitoringEnabled; WebsiteTimeZone = websiteTimeZone; @@ -272,6 +286,9 @@ internal SiteConfigProperties(int? numberOfWorkers, IList defaultDocumen /// Application settings. [WirePath("appSettings")] public IList AppSettings { get; set; } + /// Application metadata. This property cannot be retrieved, since it may contain secrets. + [WirePath("metadata")] + public IList Metadata { get; set; } /// Connection strings. [WirePath("connectionStrings")] public IList ConnectionStrings { get; set; } @@ -406,9 +423,15 @@ public string ApiManagementConfigId /// IP security restrictions for main. [WirePath("ipSecurityRestrictions")] public IList IPSecurityRestrictions { get; set; } + /// Default action for main access restriction if no rules are matched. + [WirePath("ipSecurityRestrictionsDefaultAction")] + public SiteDefaultAction? IPSecurityRestrictionsDefaultAction { get; set; } /// IP security restrictions for scm. [WirePath("scmIpSecurityRestrictions")] public IList ScmIPSecurityRestrictions { get; set; } + /// Default action for scm access restriction if no rules are matched. + [WirePath("scmIpSecurityRestrictionsDefaultAction")] + public SiteDefaultAction? ScmIPSecurityRestrictionsDefaultAction { get; set; } /// IP security restrictions for scm to use main. [WirePath("scmIpSecurityRestrictionsUseMain")] public bool? AllowIPSecurityRestrictionsForScmToUseMain { get; set; } @@ -418,6 +441,9 @@ public string ApiManagementConfigId /// MinTlsVersion: configures the minimum version of TLS required for SSL requests. [WirePath("minTlsVersion")] public AppServiceSupportedTlsVersion? MinTlsVersion { get; set; } + /// The minimum strength TLS cipher suite allowed for an application. + [WirePath("minTlsCipherSuite")] + public AppServiceTlsCipherSuite? MinTlsCipherSuite { get; set; } /// ScmMinTlsVersion: configures the minimum version of TLS required for SSL requests for SCM site. [WirePath("scmMinTlsVersion")] public AppServiceSupportedTlsVersion? ScmMinTlsVersion { get; set; } @@ -436,6 +462,12 @@ public string ApiManagementConfigId /// [WirePath("functionAppScaleLimit")] public int? FunctionAppScaleLimit { get; set; } + /// + /// Maximum number of workers that a site can scale out to. + /// This setting only applies to apps in plans where ElasticScaleEnabled is <code>true</code> + /// + [WirePath("elasticWebAppScaleLimit")] + public int? ElasticWebAppScaleLimit { get; set; } /// Health check path. [WirePath("healthCheckPath")] public string HealthCheckPath { get; set; } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteContainerAuthType.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteContainerAuthType.Serialization.cs new file mode 100644 index 0000000000000..44e55d62d4cfd --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteContainerAuthType.Serialization.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.AppService.Models +{ + internal static partial class SiteContainerAuthTypeExtensions + { + public static string ToSerialString(this SiteContainerAuthType value) => value switch + { + SiteContainerAuthType.Anonymous => "Anonymous", + SiteContainerAuthType.UserCredentials => "UserCredentials", + SiteContainerAuthType.SystemIdentity => "SystemIdentity", + SiteContainerAuthType.UserAssigned => "UserAssigned", + _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown SiteContainerAuthType value.") + }; + + public static SiteContainerAuthType ToSiteContainerAuthType(this string value) + { + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Anonymous")) return SiteContainerAuthType.Anonymous; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "UserCredentials")) return SiteContainerAuthType.UserCredentials; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "SystemIdentity")) return SiteContainerAuthType.SystemIdentity; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "UserAssigned")) return SiteContainerAuthType.UserAssigned; + throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown SiteContainerAuthType value."); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteContainerAuthType.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteContainerAuthType.cs new file mode 100644 index 0000000000000..8d4b027c4077d --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteContainerAuthType.cs @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.AppService.Models +{ + /// Auth Type. + public enum SiteContainerAuthType + { + /// Anonymous. + Anonymous, + /// UserCredentials. + UserCredentials, + /// SystemIdentity. + SystemIdentity, + /// UserAssigned. + UserAssigned + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteContainerCollection.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteContainerCollection.Serialization.cs new file mode 100644 index 0000000000000..b8375ab31b27c --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteContainerCollection.Serialization.cs @@ -0,0 +1,205 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + internal partial class SiteContainerCollection : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SiteContainerCollection)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (options.Format != "W" && Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + SiteContainerCollection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SiteContainerCollection)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSiteContainerCollection(document.RootElement, options); + } + + internal static SiteContainerCollection DeserializeSiteContainerCollection(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + string nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SiteContainerData.DeserializeSiteContainerData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SiteContainerCollection(value, nextLink, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(SiteContainerCollection)} does not support writing '{options.Format}' format."); + } + } + + SiteContainerCollection IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSiteContainerCollection(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SiteContainerCollection)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteContainerCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteContainerCollection.cs new file mode 100644 index 0000000000000..3def47fb38b9e --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteContainerCollection.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.AppService.Models +{ + /// Collection of site containers. + internal partial class SiteContainerCollection + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Collection of resources. + /// is null. + internal SiteContainerCollection(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// Collection of resources. + /// Link to next page of resources. + /// Keeps track of any properties unknown to the library. + internal SiteContainerCollection(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SiteContainerCollection() + { + } + + /// Collection of resources. + public IReadOnlyList Value { get; } + /// Link to next page of resources. + public string NextLink { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteContainerVolumeMount.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteContainerVolumeMount.Serialization.cs new file mode 100644 index 0000000000000..71fd12c6b8be9 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteContainerVolumeMount.Serialization.cs @@ -0,0 +1,256 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class SiteContainerVolumeMount : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SiteContainerVolumeMount)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("volumeSubPath"u8); + writer.WriteStringValue(VolumeSubPath); + writer.WritePropertyName("containerMountPath"u8); + writer.WriteStringValue(ContainerMountPath); + if (Optional.IsDefined(Data)) + { + writer.WritePropertyName("data"u8); + writer.WriteStringValue(Data); + } + if (Optional.IsDefined(IsReadOnly)) + { + writer.WritePropertyName("readOnly"u8); + writer.WriteBooleanValue(IsReadOnly.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + SiteContainerVolumeMount IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SiteContainerVolumeMount)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSiteContainerVolumeMount(document.RootElement, options); + } + + internal static SiteContainerVolumeMount DeserializeSiteContainerVolumeMount(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string volumeSubPath = default; + string containerMountPath = default; + string data = default; + bool? readOnly = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("volumeSubPath"u8)) + { + volumeSubPath = property.Value.GetString(); + continue; + } + if (property.NameEquals("containerMountPath"u8)) + { + containerMountPath = property.Value.GetString(); + continue; + } + if (property.NameEquals("data"u8)) + { + data = property.Value.GetString(); + continue; + } + if (property.NameEquals("readOnly"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + readOnly = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SiteContainerVolumeMount(volumeSubPath, containerMountPath, data, readOnly, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(VolumeSubPath), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" volumeSubPath: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(VolumeSubPath)) + { + builder.Append(" volumeSubPath: "); + if (VolumeSubPath.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{VolumeSubPath}'''"); + } + else + { + builder.AppendLine($"'{VolumeSubPath}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ContainerMountPath), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" containerMountPath: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ContainerMountPath)) + { + builder.Append(" containerMountPath: "); + if (ContainerMountPath.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ContainerMountPath}'''"); + } + else + { + builder.AppendLine($"'{ContainerMountPath}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Data), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" data: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Data)) + { + builder.Append(" data: "); + if (Data.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Data}'''"); + } + else + { + builder.AppendLine($"'{Data}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsReadOnly), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" readOnly: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsReadOnly)) + { + builder.Append(" readOnly: "); + var boolValue = IsReadOnly.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(SiteContainerVolumeMount)} does not support writing '{options.Format}' format."); + } + } + + SiteContainerVolumeMount IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSiteContainerVolumeMount(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SiteContainerVolumeMount)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteContainerVolumeMount.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteContainerVolumeMount.cs new file mode 100644 index 0000000000000..1accded9c6389 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteContainerVolumeMount.cs @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The SiteContainerVolumeMount. + public partial class SiteContainerVolumeMount + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Sub path in the volume where volume is mounted from. + /// Target path on the container where volume is mounted on. + /// or is null. + public SiteContainerVolumeMount(string volumeSubPath, string containerMountPath) + { + Argument.AssertNotNull(volumeSubPath, nameof(volumeSubPath)); + Argument.AssertNotNull(containerMountPath, nameof(containerMountPath)); + + VolumeSubPath = volumeSubPath; + ContainerMountPath = containerMountPath; + } + + /// Initializes a new instance of . + /// Sub path in the volume where volume is mounted from. + /// Target path on the container where volume is mounted on. + /// Config Data to be mounted on the volume. + /// Boolean to specify if the mount is read only on the container. + /// Keeps track of any properties unknown to the library. + internal SiteContainerVolumeMount(string volumeSubPath, string containerMountPath, string data, bool? isReadOnly, IDictionary serializedAdditionalRawData) + { + VolumeSubPath = volumeSubPath; + ContainerMountPath = containerMountPath; + Data = data; + IsReadOnly = isReadOnly; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SiteContainerVolumeMount() + { + } + + /// Sub path in the volume where volume is mounted from. + [WirePath("volumeSubPath")] + public string VolumeSubPath { get; set; } + /// Target path on the container where volume is mounted on. + [WirePath("containerMountPath")] + public string ContainerMountPath { get; set; } + /// Config Data to be mounted on the volume. + [WirePath("data")] + public string Data { get; set; } + /// Boolean to specify if the mount is read only on the container. + [WirePath("readOnly")] + public bool? IsReadOnly { get; set; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteDefaultAction.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteDefaultAction.cs new file mode 100644 index 0000000000000..3b618a5ffb14f --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteDefaultAction.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.AppService.Models +{ + /// Default action for main access restriction if no rules are matched. + public readonly partial struct SiteDefaultAction : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SiteDefaultAction(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AllowValue = "Allow"; + private const string DenyValue = "Deny"; + + /// Allow. + public static SiteDefaultAction Allow { get; } = new SiteDefaultAction(AllowValue); + /// Deny. + public static SiteDefaultAction Deny { get; } = new SiteDefaultAction(DenyValue); + /// Determines if two values are the same. + public static bool operator ==(SiteDefaultAction left, SiteDefaultAction right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SiteDefaultAction left, SiteDefaultAction right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator SiteDefaultAction(string value) => new SiteDefaultAction(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SiteDefaultAction other && Equals(other); + /// + public bool Equals(SiteDefaultAction other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteDnsConfig.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteDnsConfig.Serialization.cs new file mode 100644 index 0000000000000..8c194de2c8d83 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteDnsConfig.Serialization.cs @@ -0,0 +1,353 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class SiteDnsConfig : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SiteDnsConfig)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(DnsServers)) + { + writer.WritePropertyName("dnsServers"u8); + writer.WriteStartArray(); + foreach (var item in DnsServers) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(DnsAltServer)) + { + writer.WritePropertyName("dnsAltServer"u8); + writer.WriteStringValue(DnsAltServer); + } + if (Optional.IsDefined(DnsRetryAttemptTimeout)) + { + writer.WritePropertyName("dnsRetryAttemptTimeout"u8); + writer.WriteNumberValue(DnsRetryAttemptTimeout.Value); + } + if (Optional.IsDefined(DnsRetryAttemptCount)) + { + writer.WritePropertyName("dnsRetryAttemptCount"u8); + writer.WriteNumberValue(DnsRetryAttemptCount.Value); + } + if (Optional.IsDefined(DnsMaxCacheTimeout)) + { + writer.WritePropertyName("dnsMaxCacheTimeout"u8); + writer.WriteNumberValue(DnsMaxCacheTimeout.Value); + } + if (options.Format != "W" && Optional.IsDefined(DnsLegacySortOrder)) + { + writer.WritePropertyName("dnsLegacySortOrder"u8); + writer.WriteBooleanValue(DnsLegacySortOrder.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + SiteDnsConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SiteDnsConfig)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSiteDnsConfig(document.RootElement, options); + } + + internal static SiteDnsConfig DeserializeSiteDnsConfig(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList dnsServers = default; + string dnsAltServer = default; + int? dnsRetryAttemptTimeout = default; + int? dnsRetryAttemptCount = default; + int? dnsMaxCacheTimeout = default; + bool? dnsLegacySortOrder = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("dnsServers"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + dnsServers = array; + continue; + } + if (property.NameEquals("dnsAltServer"u8)) + { + dnsAltServer = property.Value.GetString(); + continue; + } + if (property.NameEquals("dnsRetryAttemptTimeout"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dnsRetryAttemptTimeout = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("dnsRetryAttemptCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dnsRetryAttemptCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("dnsMaxCacheTimeout"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dnsMaxCacheTimeout = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("dnsLegacySortOrder"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dnsLegacySortOrder = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SiteDnsConfig( + dnsServers ?? new ChangeTrackingList(), + dnsAltServer, + dnsRetryAttemptTimeout, + dnsRetryAttemptCount, + dnsMaxCacheTimeout, + dnsLegacySortOrder, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DnsServers), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" dnsServers: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(DnsServers)) + { + if (DnsServers.Any()) + { + builder.Append(" dnsServers: "); + builder.AppendLine("["); + foreach (var item in DnsServers) + { + if (item == null) + { + builder.Append("null"); + continue; + } + if (item.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item}'''"); + } + else + { + builder.AppendLine($" '{item}'"); + } + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DnsAltServer), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" dnsAltServer: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DnsAltServer)) + { + builder.Append(" dnsAltServer: "); + if (DnsAltServer.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{DnsAltServer}'''"); + } + else + { + builder.AppendLine($"'{DnsAltServer}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DnsRetryAttemptTimeout), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" dnsRetryAttemptTimeout: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DnsRetryAttemptTimeout)) + { + builder.Append(" dnsRetryAttemptTimeout: "); + builder.AppendLine($"{DnsRetryAttemptTimeout.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DnsRetryAttemptCount), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" dnsRetryAttemptCount: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DnsRetryAttemptCount)) + { + builder.Append(" dnsRetryAttemptCount: "); + builder.AppendLine($"{DnsRetryAttemptCount.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DnsMaxCacheTimeout), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" dnsMaxCacheTimeout: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DnsMaxCacheTimeout)) + { + builder.Append(" dnsMaxCacheTimeout: "); + builder.AppendLine($"{DnsMaxCacheTimeout.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DnsLegacySortOrder), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" dnsLegacySortOrder: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DnsLegacySortOrder)) + { + builder.Append(" dnsLegacySortOrder: "); + var boolValue = DnsLegacySortOrder.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(SiteDnsConfig)} does not support writing '{options.Format}' format."); + } + } + + SiteDnsConfig IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSiteDnsConfig(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SiteDnsConfig)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteDnsConfig.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteDnsConfig.cs new file mode 100644 index 0000000000000..9d472159cbf55 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteDnsConfig.cs @@ -0,0 +1,92 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The SiteDnsConfig. + public partial class SiteDnsConfig + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public SiteDnsConfig() + { + DnsServers = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// List of custom DNS servers to be used by an app for lookups. Maximum 5 dns servers can be set. + /// Alternate DNS server to be used by apps. This property replicates the WEBSITE_DNS_ALT_SERVER app setting. + /// Timeout for a single dns lookup in seconds. Allowed range: 1-30. Default is 3. + /// Total number of retries for dns lookup. Allowed range: 1-5. Default is 3. + /// Custom time for DNS to be cached in seconds. Allowed range: 0-60. Default is 30 seconds. 0 means caching disabled. + /// Indicates that sites using Virtual network custom DNS servers are still sorting the list of DNS servers. Read-Only. + /// Keeps track of any properties unknown to the library. + internal SiteDnsConfig(IList dnsServers, string dnsAltServer, int? dnsRetryAttemptTimeout, int? dnsRetryAttemptCount, int? dnsMaxCacheTimeout, bool? dnsLegacySortOrder, IDictionary serializedAdditionalRawData) + { + DnsServers = dnsServers; + DnsAltServer = dnsAltServer; + DnsRetryAttemptTimeout = dnsRetryAttemptTimeout; + DnsRetryAttemptCount = dnsRetryAttemptCount; + DnsMaxCacheTimeout = dnsMaxCacheTimeout; + DnsLegacySortOrder = dnsLegacySortOrder; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// List of custom DNS servers to be used by an app for lookups. Maximum 5 dns servers can be set. + [WirePath("dnsServers")] + public IList DnsServers { get; } + /// Alternate DNS server to be used by apps. This property replicates the WEBSITE_DNS_ALT_SERVER app setting. + [WirePath("dnsAltServer")] + public string DnsAltServer { get; set; } + /// Timeout for a single dns lookup in seconds. Allowed range: 1-30. Default is 3. + [WirePath("dnsRetryAttemptTimeout")] + public int? DnsRetryAttemptTimeout { get; set; } + /// Total number of retries for dns lookup. Allowed range: 1-5. Default is 3. + [WirePath("dnsRetryAttemptCount")] + public int? DnsRetryAttemptCount { get; set; } + /// Custom time for DNS to be cached in seconds. Allowed range: 0-60. Default is 30 seconds. 0 means caching disabled. + [WirePath("dnsMaxCacheTimeout")] + public int? DnsMaxCacheTimeout { get; set; } + /// Indicates that sites using Virtual network custom DNS servers are still sorting the list of DNS servers. Read-Only. + [WirePath("dnsLegacySortOrder")] + public bool? DnsLegacySortOrder { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SitePatchInfo.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SitePatchInfo.Serialization.cs index 52f2db0769ec7..350b7da3c95e4 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SitePatchInfo.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SitePatchInfo.Serialization.cs @@ -141,6 +141,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt writer.WritePropertyName("lastModifiedTimeUtc"u8); writer.WriteStringValue(LastModifiedOn.Value, "O"); } + if (Optional.IsDefined(DnsConfiguration)) + { + writer.WritePropertyName("dnsConfiguration"u8); + writer.WriteObjectValue(DnsConfiguration, options); + } if (Optional.IsDefined(SiteConfig)) { writer.WritePropertyName("siteConfig"u8); @@ -344,6 +349,7 @@ internal static SitePatchInfo DeserializeSitePatchInfo(JsonElement element, Mode bool? isXenon = default; bool? hyperV = default; DateTimeOffset? lastModifiedTimeUtc = default; + SiteDnsConfig dnsConfiguration = default; SiteConfigProperties siteConfig = default; IReadOnlyList trafficManagerHostNames = default; bool? scmSiteAlsoStopped = default; @@ -547,6 +553,15 @@ internal static SitePatchInfo DeserializeSitePatchInfo(JsonElement element, Mode lastModifiedTimeUtc = property0.Value.GetDateTimeOffset("O"); continue; } + if (property0.NameEquals("dnsConfiguration"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dnsConfiguration = SiteDnsConfig.DeserializeSiteDnsConfig(property0.Value, options); + continue; + } if (property0.NameEquals("siteConfig"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -800,6 +815,7 @@ internal static SitePatchInfo DeserializeSitePatchInfo(JsonElement element, Mode isXenon, hyperV, lastModifiedTimeUtc, + dnsConfiguration, siteConfig, trafficManagerHostNames ?? new ChangeTrackingList(), scmSiteAlsoStopped, @@ -1202,6 +1218,21 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DnsConfiguration), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" dnsConfiguration: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DnsConfiguration)) + { + builder.Append(" dnsConfiguration: "); + BicepSerializationHelpers.AppendChildObject(builder, DnsConfiguration, options, 4, false, " dnsConfiguration: "); + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SiteConfig), out propertyOverride); if (hasPropertyOverride) { diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SitePatchInfo.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SitePatchInfo.cs index 1e83277912077..a8dfcea222233 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SitePatchInfo.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SitePatchInfo.cs @@ -78,6 +78,7 @@ public SitePatchInfo() /// Obsolete: Hyper-V sandbox. /// Hyper-V sandbox. /// Last time the app was modified, in UTC. Read-only. + /// Property to configure various DNS related settings for a site. /// Configuration of the app. /// Azure Traffic Manager hostnames associated with the app. Read-only. /// <code>true</code> to stop SCM (KUDU) site when the app is stopped; otherwise, <code>false</code>. The default is <code>false</code>. @@ -125,7 +126,7 @@ public SitePatchInfo() /// /// Kind of resource. /// Keeps track of any properties unknown to the library. - internal SitePatchInfo(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ManagedServiceIdentity identity, string state, IReadOnlyList hostNames, string repositorySiteName, AppServiceUsageState? usageState, bool? isEnabled, IReadOnlyList enabledHostNames, WebSiteAvailabilityState? availabilityState, IList hostNameSslStates, ResourceIdentifier serverFarmId, bool? isReserved, bool? isXenon, bool? isHyperV, DateTimeOffset? lastModifiedOn, SiteConfigProperties siteConfig, IReadOnlyList trafficManagerHostNames, bool? isScmSiteAlsoStopped, string targetSwapSlot, HostingEnvironmentProfile hostingEnvironmentProfile, bool? isClientAffinityEnabled, bool? isClientCertEnabled, ClientCertMode? clientCertMode, string clientCertExclusionPaths, bool? isHostNameDisabled, string customDomainVerificationId, string outboundIPAddresses, string possibleOutboundIPAddresses, int? containerSize, int? dailyMemoryTimeQuota, DateTimeOffset? suspendOn, int? maxNumberOfWorkers, CloningInfo cloningInfo, string resourceGroup, bool? isDefaultContainer, string defaultHostName, SlotSwapStatus slotSwapStatus, bool? isHttpsOnly, RedundancyMode? redundancyMode, Guid? inProgressOperationId, bool? isStorageAccountRequired, string keyVaultReferenceIdentity, ResourceIdentifier virtualNetworkSubnetId, string kind, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal SitePatchInfo(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ManagedServiceIdentity identity, string state, IReadOnlyList hostNames, string repositorySiteName, AppServiceUsageState? usageState, bool? isEnabled, IReadOnlyList enabledHostNames, WebSiteAvailabilityState? availabilityState, IList hostNameSslStates, ResourceIdentifier serverFarmId, bool? isReserved, bool? isXenon, bool? isHyperV, DateTimeOffset? lastModifiedOn, SiteDnsConfig dnsConfiguration, SiteConfigProperties siteConfig, IReadOnlyList trafficManagerHostNames, bool? isScmSiteAlsoStopped, string targetSwapSlot, HostingEnvironmentProfile hostingEnvironmentProfile, bool? isClientAffinityEnabled, bool? isClientCertEnabled, ClientCertMode? clientCertMode, string clientCertExclusionPaths, bool? isHostNameDisabled, string customDomainVerificationId, string outboundIPAddresses, string possibleOutboundIPAddresses, int? containerSize, int? dailyMemoryTimeQuota, DateTimeOffset? suspendOn, int? maxNumberOfWorkers, CloningInfo cloningInfo, string resourceGroup, bool? isDefaultContainer, string defaultHostName, SlotSwapStatus slotSwapStatus, bool? isHttpsOnly, RedundancyMode? redundancyMode, Guid? inProgressOperationId, bool? isStorageAccountRequired, string keyVaultReferenceIdentity, ResourceIdentifier virtualNetworkSubnetId, string kind, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { Identity = identity; State = state; @@ -141,6 +142,7 @@ internal SitePatchInfo(ResourceIdentifier id, string name, ResourceType resource IsXenon = isXenon; IsHyperV = isHyperV; LastModifiedOn = lastModifiedOn; + DnsConfiguration = dnsConfiguration; SiteConfig = siteConfig; TrafficManagerHostNames = trafficManagerHostNames; IsScmSiteAlsoStopped = isScmSiteAlsoStopped; @@ -218,6 +220,9 @@ internal SitePatchInfo(ResourceIdentifier id, string name, ResourceType resource /// Last time the app was modified, in UTC. Read-only. [WirePath("properties.lastModifiedTimeUtc")] public DateTimeOffset? LastModifiedOn { get; } + /// Property to configure various DNS related settings for a site. + [WirePath("properties.dnsConfiguration")] + public SiteDnsConfig DnsConfiguration { get; set; } /// Configuration of the app. [WirePath("properties.siteConfig")] public SiteConfigProperties SiteConfig { get; set; } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteBasicAuthName.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteBasicAuthName.cs new file mode 100644 index 0000000000000..82e2f2864f616 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteBasicAuthName.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The StaticSiteBasicAuthName. + public readonly partial struct StaticSiteBasicAuthName : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public StaticSiteBasicAuthName(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DefaultValue = "default"; + + /// default. + public static StaticSiteBasicAuthName Default { get; } = new StaticSiteBasicAuthName(DefaultValue); + /// Determines if two values are the same. + public static bool operator ==(StaticSiteBasicAuthName left, StaticSiteBasicAuthName right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(StaticSiteBasicAuthName left, StaticSiteBasicAuthName right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator StaticSiteBasicAuthName(string value) => new StaticSiteBasicAuthName(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is StaticSiteBasicAuthName other && Equals(other); + /// + public bool Equals(StaticSiteBasicAuthName other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteBasicAuthPropertiesCollection.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteBasicAuthPropertiesCollection.Serialization.cs new file mode 100644 index 0000000000000..1b182d3a1048e --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteBasicAuthPropertiesCollection.Serialization.cs @@ -0,0 +1,205 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + internal partial class StaticSiteBasicAuthPropertiesCollection : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(StaticSiteBasicAuthPropertiesCollection)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (options.Format != "W" && Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + StaticSiteBasicAuthPropertiesCollection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(StaticSiteBasicAuthPropertiesCollection)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeStaticSiteBasicAuthPropertiesCollection(document.RootElement, options); + } + + internal static StaticSiteBasicAuthPropertiesCollection DeserializeStaticSiteBasicAuthPropertiesCollection(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + string nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(StaticSiteBasicAuthPropertyData.DeserializeStaticSiteBasicAuthPropertyData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new StaticSiteBasicAuthPropertiesCollection(value, nextLink, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(StaticSiteBasicAuthPropertiesCollection)} does not support writing '{options.Format}' format."); + } + } + + StaticSiteBasicAuthPropertiesCollection IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeStaticSiteBasicAuthPropertiesCollection(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(StaticSiteBasicAuthPropertiesCollection)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteBasicAuthPropertiesCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteBasicAuthPropertiesCollection.cs new file mode 100644 index 0000000000000..ff8b7d7c23283 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteBasicAuthPropertiesCollection.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.AppService.Models +{ + /// Collection of static site basic auth. + internal partial class StaticSiteBasicAuthPropertiesCollection + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Collection of resources. + /// is null. + internal StaticSiteBasicAuthPropertiesCollection(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// Collection of resources. + /// Link to next page of resources. + /// Keeps track of any properties unknown to the library. + internal StaticSiteBasicAuthPropertiesCollection(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal StaticSiteBasicAuthPropertiesCollection() + { + } + + /// Collection of resources. + public IReadOnlyList Value { get; } + /// Link to next page of resources. + public string NextLink { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteDatabaseConnectionConfigurationFileOverview.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteDatabaseConnectionConfigurationFileOverview.Serialization.cs new file mode 100644 index 0000000000000..d366fb946f2f1 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteDatabaseConnectionConfigurationFileOverview.Serialization.cs @@ -0,0 +1,231 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class StaticSiteDatabaseConnectionConfigurationFileOverview : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(StaticSiteDatabaseConnectionConfigurationFileOverview)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsDefined(FileName)) + { + writer.WritePropertyName("fileName"u8); + writer.WriteStringValue(FileName); + } + if (options.Format != "W" && Optional.IsDefined(Contents)) + { + writer.WritePropertyName("contents"u8); + writer.WriteStringValue(Contents); + } + if (options.Format != "W" && Optional.IsDefined(StaticSiteDatabaseConnectionConfigurationFileOverviewType)) + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(StaticSiteDatabaseConnectionConfigurationFileOverviewType); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + StaticSiteDatabaseConnectionConfigurationFileOverview IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(StaticSiteDatabaseConnectionConfigurationFileOverview)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeStaticSiteDatabaseConnectionConfigurationFileOverview(document.RootElement, options); + } + + internal static StaticSiteDatabaseConnectionConfigurationFileOverview DeserializeStaticSiteDatabaseConnectionConfigurationFileOverview(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string fileName = default; + string contents = default; + string type = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("fileName"u8)) + { + fileName = property.Value.GetString(); + continue; + } + if (property.NameEquals("contents"u8)) + { + contents = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new StaticSiteDatabaseConnectionConfigurationFileOverview(fileName, contents, type, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(FileName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" fileName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(FileName)) + { + builder.Append(" fileName: "); + if (FileName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{FileName}'''"); + } + else + { + builder.AppendLine($"'{FileName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Contents), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" contents: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Contents)) + { + builder.Append(" contents: "); + if (Contents.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Contents}'''"); + } + else + { + builder.AppendLine($"'{Contents}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(StaticSiteDatabaseConnectionConfigurationFileOverviewType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" type: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(StaticSiteDatabaseConnectionConfigurationFileOverviewType)) + { + builder.Append(" type: "); + if (StaticSiteDatabaseConnectionConfigurationFileOverviewType.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{StaticSiteDatabaseConnectionConfigurationFileOverviewType}'''"); + } + else + { + builder.AppendLine($"'{StaticSiteDatabaseConnectionConfigurationFileOverviewType}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(StaticSiteDatabaseConnectionConfigurationFileOverview)} does not support writing '{options.Format}' format."); + } + } + + StaticSiteDatabaseConnectionConfigurationFileOverview IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeStaticSiteDatabaseConnectionConfigurationFileOverview(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(StaticSiteDatabaseConnectionConfigurationFileOverview)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteDatabaseConnectionConfigurationFileOverview.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteDatabaseConnectionConfigurationFileOverview.cs new file mode 100644 index 0000000000000..348e653f803ca --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteDatabaseConnectionConfigurationFileOverview.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// A database connection configuration file. + public partial class StaticSiteDatabaseConnectionConfigurationFileOverview + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal StaticSiteDatabaseConnectionConfigurationFileOverview() + { + } + + /// Initializes a new instance of . + /// The name of the configuration file. + /// The Base64 encoding of the file contents. + /// The type of configuration file. + /// Keeps track of any properties unknown to the library. + internal StaticSiteDatabaseConnectionConfigurationFileOverview(string fileName, string contents, string staticSiteDatabaseConnectionConfigurationFileOverviewType, IDictionary serializedAdditionalRawData) + { + FileName = fileName; + Contents = contents; + StaticSiteDatabaseConnectionConfigurationFileOverviewType = staticSiteDatabaseConnectionConfigurationFileOverviewType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The name of the configuration file. + [WirePath("fileName")] + public string FileName { get; } + /// The Base64 encoding of the file contents. + [WirePath("contents")] + public string Contents { get; } + /// The type of configuration file. + [WirePath("type")] + public string StaticSiteDatabaseConnectionConfigurationFileOverviewType { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteDatabaseConnectionOverview.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteDatabaseConnectionOverview.Serialization.cs new file mode 100644 index 0000000000000..171a2d42af6fd --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteDatabaseConnectionOverview.Serialization.cs @@ -0,0 +1,316 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class StaticSiteDatabaseConnectionOverview : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(StaticSiteDatabaseConnectionOverview)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsDefined(ResourceId)) + { + writer.WritePropertyName("resourceId"u8); + writer.WriteStringValue(ResourceId); + } + if (options.Format != "W" && Optional.IsDefined(ConnectionIdentity)) + { + writer.WritePropertyName("connectionIdentity"u8); + writer.WriteStringValue(ConnectionIdentity); + } + if (options.Format != "W" && Optional.IsDefined(Region)) + { + writer.WritePropertyName("region"u8); + writer.WriteStringValue(Region); + } + if (options.Format != "W" && Optional.IsCollectionDefined(ConfigurationFiles)) + { + writer.WritePropertyName("configurationFiles"u8); + writer.WriteStartArray(); + foreach (var item in ConfigurationFiles) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + StaticSiteDatabaseConnectionOverview IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(StaticSiteDatabaseConnectionOverview)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeStaticSiteDatabaseConnectionOverview(document.RootElement, options); + } + + internal static StaticSiteDatabaseConnectionOverview DeserializeStaticSiteDatabaseConnectionOverview(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier resourceId = default; + string connectionIdentity = default; + string region = default; + IReadOnlyList configurationFiles = default; + string name = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("resourceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("connectionIdentity"u8)) + { + connectionIdentity = property.Value.GetString(); + continue; + } + if (property.NameEquals("region"u8)) + { + region = property.Value.GetString(); + continue; + } + if (property.NameEquals("configurationFiles"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(StaticSiteDatabaseConnectionConfigurationFileOverview.DeserializeStaticSiteDatabaseConnectionConfigurationFileOverview(item, options)); + } + configurationFiles = array; + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new StaticSiteDatabaseConnectionOverview( + resourceId, + connectionIdentity, + region, + configurationFiles ?? new ChangeTrackingList(), + name, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ResourceId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" resourceId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ResourceId)) + { + builder.Append(" resourceId: "); + builder.AppendLine($"'{ResourceId.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ConnectionIdentity), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" connectionIdentity: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ConnectionIdentity)) + { + builder.Append(" connectionIdentity: "); + if (ConnectionIdentity.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ConnectionIdentity}'''"); + } + else + { + builder.AppendLine($"'{ConnectionIdentity}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Region), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" region: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Region)) + { + builder.Append(" region: "); + if (Region.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Region}'''"); + } + else + { + builder.AppendLine($"'{Region}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ConfigurationFiles), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" configurationFiles: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(ConfigurationFiles)) + { + if (ConfigurationFiles.Any()) + { + builder.Append(" configurationFiles: "); + builder.AppendLine("["); + foreach (var item in ConfigurationFiles) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " configurationFiles: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(StaticSiteDatabaseConnectionOverview)} does not support writing '{options.Format}' format."); + } + } + + StaticSiteDatabaseConnectionOverview IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeStaticSiteDatabaseConnectionOverview(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(StaticSiteDatabaseConnectionOverview)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteDatabaseConnectionOverview.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteDatabaseConnectionOverview.cs new file mode 100644 index 0000000000000..ba5711c578162 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteDatabaseConnectionOverview.cs @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + /// Static Site Database Connection overview. + public partial class StaticSiteDatabaseConnectionOverview + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal StaticSiteDatabaseConnectionOverview() + { + ConfigurationFiles = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The resource id of the database. + /// If present, the identity is used in conjunction with connection string to connect to the database. Use of the system-assigned managed identity is indicated with the string 'SystemAssigned', while use of a user-assigned managed identity is indicated with the resource id of the managed identity resource. + /// The region of the database resource. + /// A list of configuration files associated with this database connection. + /// If present, the name of this database connection resource. + /// Keeps track of any properties unknown to the library. + internal StaticSiteDatabaseConnectionOverview(ResourceIdentifier resourceId, string connectionIdentity, string region, IReadOnlyList configurationFiles, string name, IDictionary serializedAdditionalRawData) + { + ResourceId = resourceId; + ConnectionIdentity = connectionIdentity; + Region = region; + ConfigurationFiles = configurationFiles; + Name = name; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource id of the database. + [WirePath("resourceId")] + public ResourceIdentifier ResourceId { get; } + /// If present, the identity is used in conjunction with connection string to connect to the database. Use of the system-assigned managed identity is indicated with the string 'SystemAssigned', while use of a user-assigned managed identity is indicated with the resource id of the managed identity resource. + [WirePath("connectionIdentity")] + public string ConnectionIdentity { get; } + /// The region of the database resource. + [WirePath("region")] + public string Region { get; } + /// A list of configuration files associated with this database connection. + [WirePath("configurationFiles")] + public IReadOnlyList ConfigurationFiles { get; } + /// If present, the name of this database connection resource. + [WirePath("name")] + public string Name { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteDatabaseConnectionPatchContent.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteDatabaseConnectionPatchContent.Serialization.cs new file mode 100644 index 0000000000000..87eaf285bc521 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteDatabaseConnectionPatchContent.Serialization.cs @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class StaticSiteDatabaseConnectionPatchContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(StaticSiteDatabaseConnectionPatchContent)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(ResourceId)) + { + writer.WritePropertyName("resourceId"u8); + writer.WriteStringValue(ResourceId); + } + if (Optional.IsDefined(ConnectionIdentity)) + { + writer.WritePropertyName("connectionIdentity"u8); + writer.WriteStringValue(ConnectionIdentity); + } + if (Optional.IsDefined(ConnectionString)) + { + writer.WritePropertyName("connectionString"u8); + writer.WriteStringValue(ConnectionString); + } + if (Optional.IsDefined(Region)) + { + writer.WritePropertyName("region"u8); + writer.WriteStringValue(Region); + } + writer.WriteEndObject(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + StaticSiteDatabaseConnectionPatchContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(StaticSiteDatabaseConnectionPatchContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeStaticSiteDatabaseConnectionPatchContent(document.RootElement, options); + } + + internal static StaticSiteDatabaseConnectionPatchContent DeserializeStaticSiteDatabaseConnectionPatchContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier resourceId = default; + string connectionIdentity = default; + string connectionString = default; + string region = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("resourceId"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resourceId = new ResourceIdentifier(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("connectionIdentity"u8)) + { + connectionIdentity = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("connectionString"u8)) + { + connectionString = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("region"u8)) + { + region = property0.Value.GetString(); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new StaticSiteDatabaseConnectionPatchContent(resourceId, connectionIdentity, connectionString, region, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(StaticSiteDatabaseConnectionPatchContent)} does not support writing '{options.Format}' format."); + } + } + + StaticSiteDatabaseConnectionPatchContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeStaticSiteDatabaseConnectionPatchContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(StaticSiteDatabaseConnectionPatchContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteDatabaseConnectionPatchContent.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteDatabaseConnectionPatchContent.cs new file mode 100644 index 0000000000000..1963d8a95971d --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteDatabaseConnectionPatchContent.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + /// Static Site Database Connection Request Properties resource when patching. + public partial class StaticSiteDatabaseConnectionPatchContent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public StaticSiteDatabaseConnectionPatchContent() + { + } + + /// Initializes a new instance of . + /// The resource id of the database. + /// If present, the identity is used in conjunction with connection string to connect to the database. Use of the system-assigned managed identity is indicated with the string 'SystemAssigned', while use of a user-assigned managed identity is indicated with the resource id of the managed identity resource. + /// The connection string to use to connect to the database. + /// The region of the database resource. + /// Keeps track of any properties unknown to the library. + internal StaticSiteDatabaseConnectionPatchContent(ResourceIdentifier resourceId, string connectionIdentity, string connectionString, string region, IDictionary serializedAdditionalRawData) + { + ResourceId = resourceId; + ConnectionIdentity = connectionIdentity; + ConnectionString = connectionString; + Region = region; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource id of the database. + [WirePath("properties.resourceId")] + public ResourceIdentifier ResourceId { get; set; } + /// If present, the identity is used in conjunction with connection string to connect to the database. Use of the system-assigned managed identity is indicated with the string 'SystemAssigned', while use of a user-assigned managed identity is indicated with the resource id of the managed identity resource. + [WirePath("properties.connectionIdentity")] + public string ConnectionIdentity { get; set; } + /// The connection string to use to connect to the database. + [WirePath("properties.connectionString")] + public string ConnectionString { get; set; } + /// The region of the database resource. + [WirePath("properties.region")] + public string Region { get; set; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteLinkedBackendInfo.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteLinkedBackendInfo.Serialization.cs new file mode 100644 index 0000000000000..ec566bf720a70 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteLinkedBackendInfo.Serialization.cs @@ -0,0 +1,262 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class StaticSiteLinkedBackendInfo : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(StaticSiteLinkedBackendInfo)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(BackendResourceId)) + { + writer.WritePropertyName("backendResourceId"u8); + writer.WriteStringValue(BackendResourceId); + } + if (Optional.IsDefined(Region)) + { + writer.WritePropertyName("region"u8); + writer.WriteStringValue(Region); + } + if (options.Format != "W" && Optional.IsDefined(CreatedOn)) + { + writer.WritePropertyName("createdOn"u8); + writer.WriteStringValue(CreatedOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + StaticSiteLinkedBackendInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(StaticSiteLinkedBackendInfo)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeStaticSiteLinkedBackendInfo(document.RootElement, options); + } + + internal static StaticSiteLinkedBackendInfo DeserializeStaticSiteLinkedBackendInfo(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string backendResourceId = default; + string region = default; + DateTimeOffset? createdOn = default; + string provisioningState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("backendResourceId"u8)) + { + backendResourceId = property.Value.GetString(); + continue; + } + if (property.NameEquals("region"u8)) + { + region = property.Value.GetString(); + continue; + } + if (property.NameEquals("createdOn"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + createdOn = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + provisioningState = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new StaticSiteLinkedBackendInfo(backendResourceId, region, createdOn, provisioningState, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(BackendResourceId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" backendResourceId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(BackendResourceId)) + { + builder.Append(" backendResourceId: "); + if (BackendResourceId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{BackendResourceId}'''"); + } + else + { + builder.AppendLine($"'{BackendResourceId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Region), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" region: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Region)) + { + builder.Append(" region: "); + if (Region.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Region}'''"); + } + else + { + builder.AppendLine($"'{Region}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CreatedOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" createdOn: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CreatedOn)) + { + builder.Append(" createdOn: "); + var formattedDateTimeString = TypeFormatters.ToString(CreatedOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProvisioningState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" provisioningState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ProvisioningState)) + { + builder.Append(" provisioningState: "); + if (ProvisioningState.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ProvisioningState}'''"); + } + else + { + builder.AppendLine($"'{ProvisioningState}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(StaticSiteLinkedBackendInfo)} does not support writing '{options.Format}' format."); + } + } + + StaticSiteLinkedBackendInfo IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeStaticSiteLinkedBackendInfo(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(StaticSiteLinkedBackendInfo)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteLinkedBackendInfo.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteLinkedBackendInfo.cs new file mode 100644 index 0000000000000..a6ff94a5d2d8c --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteLinkedBackendInfo.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// Static Site Linked Backend ARM resource. + public partial class StaticSiteLinkedBackendInfo + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal StaticSiteLinkedBackendInfo() + { + } + + /// Initializes a new instance of . + /// The resource id of the backend linked to the static site. + /// The region of the backend linked to the static site. + /// The date and time on which the backend was linked to the static site. + /// The provisioning state of the linking process. + /// Keeps track of any properties unknown to the library. + internal StaticSiteLinkedBackendInfo(string backendResourceId, string region, DateTimeOffset? createdOn, string provisioningState, IDictionary serializedAdditionalRawData) + { + BackendResourceId = backendResourceId; + Region = region; + CreatedOn = createdOn; + ProvisioningState = provisioningState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource id of the backend linked to the static site. + [WirePath("backendResourceId")] + public string BackendResourceId { get; } + /// The region of the backend linked to the static site. + [WirePath("region")] + public string Region { get; } + /// The date and time on which the backend was linked to the static site. + [WirePath("createdOn")] + public DateTimeOffset? CreatedOn { get; } + /// The provisioning state of the linking process. + [WirePath("provisioningState")] + public string ProvisioningState { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteLinkedBackendsCollection.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteLinkedBackendsCollection.Serialization.cs new file mode 100644 index 0000000000000..3f1283e5336da --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteLinkedBackendsCollection.Serialization.cs @@ -0,0 +1,205 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + internal partial class StaticSiteLinkedBackendsCollection : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(StaticSiteLinkedBackendsCollection)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (options.Format != "W" && Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + StaticSiteLinkedBackendsCollection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(StaticSiteLinkedBackendsCollection)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeStaticSiteLinkedBackendsCollection(document.RootElement, options); + } + + internal static StaticSiteLinkedBackendsCollection DeserializeStaticSiteLinkedBackendsCollection(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + string nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(StaticSiteLinkedBackendData.DeserializeStaticSiteLinkedBackendData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new StaticSiteLinkedBackendsCollection(value, nextLink, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(StaticSiteLinkedBackendsCollection)} does not support writing '{options.Format}' format."); + } + } + + StaticSiteLinkedBackendsCollection IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeStaticSiteLinkedBackendsCollection(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(StaticSiteLinkedBackendsCollection)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteLinkedBackendsCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteLinkedBackendsCollection.cs new file mode 100644 index 0000000000000..8de89d3abfe26 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteLinkedBackendsCollection.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.AppService.Models +{ + /// Collection of static site linked backends. + internal partial class StaticSiteLinkedBackendsCollection + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Collection of resources. + /// is null. + internal StaticSiteLinkedBackendsCollection(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// Collection of resources. + /// Link to next page of resources. + /// Keeps track of any properties unknown to the library. + internal StaticSiteLinkedBackendsCollection(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal StaticSiteLinkedBackendsCollection() + { + } + + /// Collection of resources. + public IReadOnlyList Value { get; } + /// Link to next page of resources. + public string NextLink { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSitePatch.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSitePatch.Serialization.cs index 6d1195f4d8fa0..96a795df915ec 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSitePatch.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSitePatch.Serialization.cs @@ -136,11 +136,41 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO } writer.WriteEndArray(); } - if (options.Format != "W" && Optional.IsDefined(Provider)) + if (options.Format != "W" && Optional.IsCollectionDefined(LinkedBackends)) + { + writer.WritePropertyName("linkedBackends"u8); + writer.WriteStartArray(); + foreach (var item in LinkedBackends) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Provider)) { writer.WritePropertyName("provider"u8); writer.WriteStringValue(Provider); } + if (Optional.IsDefined(EnterpriseGradeCdnStatus)) + { + writer.WritePropertyName("enterpriseGradeCdnStatus"u8); + writer.WriteStringValue(EnterpriseGradeCdnStatus.Value.ToString()); + } + if (Optional.IsDefined(PublicNetworkAccess)) + { + writer.WritePropertyName("publicNetworkAccess"u8); + writer.WriteStringValue(PublicNetworkAccess); + } + if (options.Format != "W" && Optional.IsCollectionDefined(DatabaseConnections)) + { + writer.WritePropertyName("databaseConnections"u8); + writer.WriteStartArray(); + foreach (var item in DatabaseConnections) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } writer.WriteEndObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -198,7 +228,11 @@ internal static StaticSitePatch DeserializeStaticSitePatch(JsonElement element, string contentDistributionEndpoint = default; string keyVaultReferenceIdentity = default; IReadOnlyList userProvidedFunctionApps = default; + IReadOnlyList linkedBackends = default; string provider = default; + EnterpriseGradeCdnStatus? enterpriseGradeCdnStatus = default; + string publicNetworkAccess = default; + IReadOnlyList databaseConnections = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -353,11 +387,53 @@ internal static StaticSitePatch DeserializeStaticSitePatch(JsonElement element, userProvidedFunctionApps = array; continue; } + if (property0.NameEquals("linkedBackends"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(StaticSiteLinkedBackendInfo.DeserializeStaticSiteLinkedBackendInfo(item, options)); + } + linkedBackends = array; + continue; + } if (property0.NameEquals("provider"u8)) { provider = property0.Value.GetString(); continue; } + if (property0.NameEquals("enterpriseGradeCdnStatus"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enterpriseGradeCdnStatus = new EnterpriseGradeCdnStatus(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("publicNetworkAccess"u8)) + { + publicNetworkAccess = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("databaseConnections"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(StaticSiteDatabaseConnectionOverview.DeserializeStaticSiteDatabaseConnectionOverview(item, options)); + } + databaseConnections = array; + continue; + } } continue; } @@ -385,7 +461,11 @@ internal static StaticSitePatch DeserializeStaticSitePatch(JsonElement element, contentDistributionEndpoint, keyVaultReferenceIdentity, userProvidedFunctionApps ?? new ChangeTrackingList(), + linkedBackends ?? new ChangeTrackingList(), provider, + enterpriseGradeCdnStatus, + publicNetworkAccess, + databaseConnections ?? new ChangeTrackingList(), kind, serializedAdditionalRawData); } @@ -752,6 +832,29 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(LinkedBackends), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" linkedBackends: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(LinkedBackends)) + { + if (LinkedBackends.Any()) + { + builder.Append(" linkedBackends: "); + builder.AppendLine("["); + foreach (var item in LinkedBackends) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " linkedBackends: "); + } + builder.AppendLine(" ]"); + } + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Provider), out propertyOverride); if (hasPropertyOverride) { @@ -775,6 +878,67 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EnterpriseGradeCdnStatus), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" enterpriseGradeCdnStatus: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(EnterpriseGradeCdnStatus)) + { + builder.Append(" enterpriseGradeCdnStatus: "); + builder.AppendLine($"'{EnterpriseGradeCdnStatus.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PublicNetworkAccess), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" publicNetworkAccess: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PublicNetworkAccess)) + { + builder.Append(" publicNetworkAccess: "); + if (PublicNetworkAccess.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{PublicNetworkAccess}'''"); + } + else + { + builder.AppendLine($"'{PublicNetworkAccess}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DatabaseConnections), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" databaseConnections: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(DatabaseConnections)) + { + if (DatabaseConnections.Any()) + { + builder.Append(" databaseConnections: "); + builder.AppendLine("["); + foreach (var item in DatabaseConnections) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " databaseConnections: "); + } + builder.AppendLine(" ]"); + } + } + } + builder.AppendLine(" }"); builder.AppendLine("}"); return BinaryData.FromString(builder.ToString()); diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSitePatch.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSitePatch.cs index 827a73fc5057b..30c0ee47b2e3f 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSitePatch.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSitePatch.cs @@ -53,6 +53,8 @@ public StaticSitePatch() CustomDomains = new ChangeTrackingList(); PrivateEndpointConnections = new ChangeTrackingList(); UserProvidedFunctionApps = new ChangeTrackingList(); + LinkedBackends = new ChangeTrackingList(); + DatabaseConnections = new ChangeTrackingList(); } /// Initializes a new instance of . @@ -73,10 +75,14 @@ public StaticSitePatch() /// The content distribution endpoint for the static site. /// Identity to use for Key Vault Reference authentication. /// User provided function apps registered with the static site. + /// Backends linked to the static side. /// The provider that submitted the last deployment to the primary environment of the static site. + /// State indicating the status of the enterprise grade CDN serving traffic to the static web app. + /// State indicating whether public traffic are allowed or not for a static web app. Allowed Values: 'Enabled', 'Disabled' or an empty string. + /// Database connections for the static site. /// Kind of resource. /// Keeps track of any properties unknown to the library. - internal StaticSitePatch(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string defaultHostname, Uri repositoryUri, string branch, IReadOnlyList customDomains, string repositoryToken, StaticSiteBuildProperties buildProperties, IReadOnlyList privateEndpointConnections, StagingEnvironmentPolicy? stagingEnvironmentPolicy, bool? allowConfigFileUpdates, StaticSiteTemplate templateProperties, string contentDistributionEndpoint, string keyVaultReferenceIdentity, IReadOnlyList userProvidedFunctionApps, string provider, string kind, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal StaticSitePatch(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string defaultHostname, Uri repositoryUri, string branch, IReadOnlyList customDomains, string repositoryToken, StaticSiteBuildProperties buildProperties, IReadOnlyList privateEndpointConnections, StagingEnvironmentPolicy? stagingEnvironmentPolicy, bool? allowConfigFileUpdates, StaticSiteTemplate templateProperties, string contentDistributionEndpoint, string keyVaultReferenceIdentity, IReadOnlyList userProvidedFunctionApps, IReadOnlyList linkedBackends, string provider, EnterpriseGradeCdnStatus? enterpriseGradeCdnStatus, string publicNetworkAccess, IReadOnlyList databaseConnections, string kind, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { DefaultHostname = defaultHostname; RepositoryUri = repositoryUri; @@ -91,7 +97,11 @@ internal StaticSitePatch(ResourceIdentifier id, string name, ResourceType resour ContentDistributionEndpoint = contentDistributionEndpoint; KeyVaultReferenceIdentity = keyVaultReferenceIdentity; UserProvidedFunctionApps = userProvidedFunctionApps; + LinkedBackends = linkedBackends; Provider = provider; + EnterpriseGradeCdnStatus = enterpriseGradeCdnStatus; + PublicNetworkAccess = publicNetworkAccess; + DatabaseConnections = databaseConnections; Kind = kind; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -135,9 +145,21 @@ internal StaticSitePatch(ResourceIdentifier id, string name, ResourceType resour /// User provided function apps registered with the static site. [WirePath("properties.userProvidedFunctionApps")] public IReadOnlyList UserProvidedFunctionApps { get; } + /// Backends linked to the static side. + [WirePath("properties.linkedBackends")] + public IReadOnlyList LinkedBackends { get; } /// The provider that submitted the last deployment to the primary environment of the static site. [WirePath("properties.provider")] - public string Provider { get; } + public string Provider { get; set; } + /// State indicating the status of the enterprise grade CDN serving traffic to the static web app. + [WirePath("properties.enterpriseGradeCdnStatus")] + public EnterpriseGradeCdnStatus? EnterpriseGradeCdnStatus { get; set; } + /// State indicating whether public traffic are allowed or not for a static web app. Allowed Values: 'Enabled', 'Disabled' or an empty string. + [WirePath("properties.publicNetworkAccess")] + public string PublicNetworkAccess { get; set; } + /// Database connections for the static site. + [WirePath("properties.databaseConnections")] + public IReadOnlyList DatabaseConnections { get; } /// Kind of resource. [WirePath("kind")] public string Kind { get; set; } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppContentHash.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppContentHash.Serialization.cs new file mode 100644 index 0000000000000..3193339c63299 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppContentHash.Serialization.cs @@ -0,0 +1,197 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class WebAppContentHash : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WebAppContentHash)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Algorithm)) + { + writer.WritePropertyName("algorithm"u8); + writer.WriteStringValue(Algorithm); + } + if (Optional.IsDefined(Value)) + { + writer.WritePropertyName("value"u8); + writer.WriteStringValue(Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WebAppContentHash IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WebAppContentHash)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWebAppContentHash(document.RootElement, options); + } + + internal static WebAppContentHash DeserializeWebAppContentHash(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string algorithm = default; + string value = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("algorithm"u8)) + { + algorithm = property.Value.GetString(); + continue; + } + if (property.NameEquals("value"u8)) + { + value = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WebAppContentHash(algorithm, value, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Algorithm), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" algorithm: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Algorithm)) + { + builder.Append(" algorithm: "); + if (Algorithm.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Algorithm}'''"); + } + else + { + builder.AppendLine($"'{Algorithm}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Value)) + { + builder.Append(" value: "); + if (Value.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Value}'''"); + } + else + { + builder.AppendLine($"'{Value}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WebAppContentHash)} does not support writing '{options.Format}' format."); + } + } + + WebAppContentHash IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWebAppContentHash(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WebAppContentHash)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppContentHash.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppContentHash.cs new file mode 100644 index 0000000000000..d86b03167fdba --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppContentHash.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The content hash. + public partial class WebAppContentHash + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal WebAppContentHash() + { + } + + /// Initializes a new instance of . + /// The algorithm of the content hash. + /// The value of the content hash. + /// Keeps track of any properties unknown to the library. + internal WebAppContentHash(string algorithm, string value, IDictionary serializedAdditionalRawData) + { + Algorithm = algorithm; + Value = value; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The algorithm of the content hash. + [WirePath("algorithm")] + public string Algorithm { get; } + /// The value of the content hash. + [WirePath("value")] + public string Value { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppContentLink.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppContentLink.Serialization.cs new file mode 100644 index 0000000000000..2722517caf2be --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppContentLink.Serialization.cs @@ -0,0 +1,296 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class WebAppContentLink : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WebAppContentLink)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Uri)) + { + writer.WritePropertyName("uri"u8); + writer.WriteStringValue(Uri.AbsoluteUri); + } + if (options.Format != "W" && Optional.IsDefined(ContentVersion)) + { + writer.WritePropertyName("contentVersion"u8); + writer.WriteStringValue(ContentVersion); + } + if (options.Format != "W" && Optional.IsDefined(ContentSize)) + { + writer.WritePropertyName("contentSize"u8); + writer.WriteNumberValue(ContentSize.Value); + } + if (options.Format != "W" && Optional.IsDefined(ContentHash)) + { + writer.WritePropertyName("contentHash"u8); + writer.WriteObjectValue(ContentHash, options); + } + if (options.Format != "W" && Optional.IsDefined(Metadata)) + { + writer.WritePropertyName("metadata"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Metadata); +#else + using (JsonDocument document = JsonDocument.Parse(Metadata)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WebAppContentLink IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WebAppContentLink)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWebAppContentLink(document.RootElement, options); + } + + internal static WebAppContentLink DeserializeWebAppContentLink(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Uri uri = default; + string contentVersion = default; + long? contentSize = default; + WebAppContentHash contentHash = default; + BinaryData metadata = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("uri"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + uri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("contentVersion"u8)) + { + contentVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("contentSize"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + contentSize = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("contentHash"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + contentHash = WebAppContentHash.DeserializeWebAppContentHash(property.Value, options); + continue; + } + if (property.NameEquals("metadata"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + metadata = BinaryData.FromString(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WebAppContentLink( + uri, + contentVersion, + contentSize, + contentHash, + metadata, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Uri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" uri: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Uri)) + { + builder.Append(" uri: "); + builder.AppendLine($"'{Uri.AbsoluteUri}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ContentVersion), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" contentVersion: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ContentVersion)) + { + builder.Append(" contentVersion: "); + if (ContentVersion.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ContentVersion}'''"); + } + else + { + builder.AppendLine($"'{ContentVersion}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ContentSize), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" contentSize: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ContentSize)) + { + builder.Append(" contentSize: "); + builder.AppendLine($"'{ContentSize.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ContentHash), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" contentHash: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ContentHash)) + { + builder.Append(" contentHash: "); + BicepSerializationHelpers.AppendChildObject(builder, ContentHash, options, 2, false, " contentHash: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Metadata), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" metadata: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Metadata)) + { + builder.Append(" metadata: "); + builder.AppendLine($"'{Metadata.ToString()}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WebAppContentLink)} does not support writing '{options.Format}' format."); + } + } + + WebAppContentLink IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWebAppContentLink(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WebAppContentLink)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppContentLink.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppContentLink.cs new file mode 100644 index 0000000000000..811ee1172acd6 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppContentLink.cs @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The content link. + public partial class WebAppContentLink + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public WebAppContentLink() + { + } + + /// Initializes a new instance of . + /// The content link URI. + /// The content version. + /// The content size. + /// The content hash. + /// The metadata. + /// Keeps track of any properties unknown to the library. + internal WebAppContentLink(Uri uri, string contentVersion, long? contentSize, WebAppContentHash contentHash, BinaryData metadata, IDictionary serializedAdditionalRawData) + { + Uri = uri; + ContentVersion = contentVersion; + ContentSize = contentSize; + ContentHash = contentHash; + Metadata = metadata; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The content link URI. + [WirePath("uri")] + public Uri Uri { get; set; } + /// The content version. + [WirePath("contentVersion")] + public string ContentVersion { get; } + /// The content size. + [WirePath("contentSize")] + public long? ContentSize { get; } + /// The content hash. + [WirePath("contentHash")] + public WebAppContentHash ContentHash { get; } + /// + /// The metadata. + /// + /// To assign an object to this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + [WirePath("metadata")] + public BinaryData Metadata { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppDayOfWeek.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppDayOfWeek.Serialization.cs new file mode 100644 index 0000000000000..2a45df0620c59 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppDayOfWeek.Serialization.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.AppService.Models +{ + internal static partial class WebAppDayOfWeekExtensions + { + public static string ToSerialString(this WebAppDayOfWeek value) => value switch + { + WebAppDayOfWeek.Sunday => "Sunday", + WebAppDayOfWeek.Monday => "Monday", + WebAppDayOfWeek.Tuesday => "Tuesday", + WebAppDayOfWeek.Wednesday => "Wednesday", + WebAppDayOfWeek.Thursday => "Thursday", + WebAppDayOfWeek.Friday => "Friday", + WebAppDayOfWeek.Saturday => "Saturday", + _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown WebAppDayOfWeek value.") + }; + + public static WebAppDayOfWeek ToWebAppDayOfWeek(this string value) + { + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Sunday")) return WebAppDayOfWeek.Sunday; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Monday")) return WebAppDayOfWeek.Monday; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Tuesday")) return WebAppDayOfWeek.Tuesday; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Wednesday")) return WebAppDayOfWeek.Wednesday; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Thursday")) return WebAppDayOfWeek.Thursday; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Friday")) return WebAppDayOfWeek.Friday; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Saturday")) return WebAppDayOfWeek.Saturday; + throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown WebAppDayOfWeek value."); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppDayOfWeek.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppDayOfWeek.cs new file mode 100644 index 0000000000000..4154f6f807b90 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppDayOfWeek.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.AppService.Models +{ + /// The day of the week. + public enum WebAppDayOfWeek + { + /// Sunday. + Sunday, + /// Monday. + Monday, + /// Tuesday. + Tuesday, + /// Wednesday. + Wednesday, + /// Thursday. + Thursday, + /// Friday. + Friday, + /// Saturday. + Saturday + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppEnvironmentVariable.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppEnvironmentVariable.Serialization.cs new file mode 100644 index 0000000000000..ba53457e725b3 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppEnvironmentVariable.Serialization.cs @@ -0,0 +1,191 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class WebAppEnvironmentVariable : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WebAppEnvironmentVariable)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + writer.WritePropertyName("value"u8); + writer.WriteStringValue(Value); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WebAppEnvironmentVariable IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WebAppEnvironmentVariable)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWebAppEnvironmentVariable(document.RootElement, options); + } + + internal static WebAppEnvironmentVariable DeserializeWebAppEnvironmentVariable(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + string value = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("value"u8)) + { + value = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WebAppEnvironmentVariable(name, value, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Value)) + { + builder.Append(" value: "); + if (Value.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Value}'''"); + } + else + { + builder.AppendLine($"'{Value}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WebAppEnvironmentVariable)} does not support writing '{options.Format}' format."); + } + } + + WebAppEnvironmentVariable IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWebAppEnvironmentVariable(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WebAppEnvironmentVariable)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppEnvironmentVariable.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppEnvironmentVariable.cs new file mode 100644 index 0000000000000..fbd6793faa545 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppEnvironmentVariable.cs @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The WebAppEnvironmentVariable. + public partial class WebAppEnvironmentVariable + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Environment variable name. + /// Environment variable value. + /// or is null. + public WebAppEnvironmentVariable(string name, string value) + { + Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(value, nameof(value)); + + Name = name; + Value = value; + } + + /// Initializes a new instance of . + /// Environment variable name. + /// Environment variable value. + /// Keeps track of any properties unknown to the library. + internal WebAppEnvironmentVariable(string name, string value, IDictionary serializedAdditionalRawData) + { + Name = name; + Value = value; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal WebAppEnvironmentVariable() + { + } + + /// Environment variable name. + [WirePath("name")] + public string Name { get; set; } + /// Environment variable value. + [WirePath("value")] + public string Value { get; set; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppErrorInfo.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppErrorInfo.Serialization.cs new file mode 100644 index 0000000000000..29b06e387b54e --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppErrorInfo.Serialization.cs @@ -0,0 +1,160 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class WebAppErrorInfo : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WebAppErrorInfo)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("code"u8); + writer.WriteStringValue(Code); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WebAppErrorInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WebAppErrorInfo)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWebAppErrorInfo(document.RootElement, options); + } + + internal static WebAppErrorInfo DeserializeWebAppErrorInfo(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string code = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("code"u8)) + { + code = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WebAppErrorInfo(code, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Code), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" code: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Code)) + { + builder.Append(" code: "); + if (Code.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Code}'''"); + } + else + { + builder.AppendLine($"'{Code}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WebAppErrorInfo)} does not support writing '{options.Format}' format."); + } + } + + WebAppErrorInfo IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWebAppErrorInfo(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WebAppErrorInfo)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppErrorInfo.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppErrorInfo.cs new file mode 100644 index 0000000000000..a193cb924c77c --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppErrorInfo.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The error info. + public partial class WebAppErrorInfo + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The error code. + /// is null. + internal WebAppErrorInfo(string code) + { + Argument.AssertNotNull(code, nameof(code)); + + Code = code; + } + + /// Initializes a new instance of . + /// The error code. + /// Keeps track of any properties unknown to the library. + internal WebAppErrorInfo(string code, IDictionary serializedAdditionalRawData) + { + Code = code; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal WebAppErrorInfo() + { + } + + /// The error code. + [WirePath("code")] + public string Code { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppErrorProperties.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppErrorProperties.Serialization.cs new file mode 100644 index 0000000000000..6286da71dad86 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppErrorProperties.Serialization.cs @@ -0,0 +1,197 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class WebAppErrorProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WebAppErrorProperties)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Code)) + { + writer.WritePropertyName("code"u8); + writer.WriteStringValue(Code); + } + if (Optional.IsDefined(Message)) + { + writer.WritePropertyName("message"u8); + writer.WriteStringValue(Message); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WebAppErrorProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WebAppErrorProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWebAppErrorProperties(document.RootElement, options); + } + + internal static WebAppErrorProperties DeserializeWebAppErrorProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string code = default; + string message = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("code"u8)) + { + code = property.Value.GetString(); + continue; + } + if (property.NameEquals("message"u8)) + { + message = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WebAppErrorProperties(code, message, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Code), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" code: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Code)) + { + builder.Append(" code: "); + if (Code.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Code}'''"); + } + else + { + builder.AppendLine($"'{Code}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Message), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" message: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Message)) + { + builder.Append(" message: "); + if (Message.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Message}'''"); + } + else + { + builder.AppendLine($"'{Message}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WebAppErrorProperties)} does not support writing '{options.Format}' format."); + } + } + + WebAppErrorProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWebAppErrorProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WebAppErrorProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppErrorProperties.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppErrorProperties.cs new file mode 100644 index 0000000000000..9072caf930975 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppErrorProperties.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// Error properties indicate why the Logic service was not able to process the incoming request. The reason is provided in the error message. + public partial class WebAppErrorProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public WebAppErrorProperties() + { + } + + /// Initializes a new instance of . + /// Error code. + /// Error message indicating why the operation failed. + /// Keeps track of any properties unknown to the library. + internal WebAppErrorProperties(string code, string message, IDictionary serializedAdditionalRawData) + { + Code = code; + Message = message; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Error code. + [WirePath("code")] + public string Code { get; set; } + /// Error message indicating why the operation failed. + [WirePath("message")] + public string Message { get; set; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppErrorResponse.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppErrorResponse.Serialization.cs new file mode 100644 index 0000000000000..7bbde4c4a495b --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppErrorResponse.Serialization.cs @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + internal partial class WebAppErrorResponse : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WebAppErrorResponse)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(ErrorInfo)) + { + writer.WritePropertyName("error"u8); + writer.WriteObjectValue(ErrorInfo, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WebAppErrorResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WebAppErrorResponse)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWebAppErrorResponse(document.RootElement, options); + } + + internal static WebAppErrorResponse DeserializeWebAppErrorResponse(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + WebAppErrorProperties error = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("error"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + error = WebAppErrorProperties.DeserializeWebAppErrorProperties(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WebAppErrorResponse(error, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ErrorInfo), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" error: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ErrorInfo)) + { + builder.Append(" error: "); + BicepSerializationHelpers.AppendChildObject(builder, ErrorInfo, options, 2, false, " error: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WebAppErrorResponse)} does not support writing '{options.Format}' format."); + } + } + + WebAppErrorResponse IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWebAppErrorResponse(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WebAppErrorResponse)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppErrorResponse.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppErrorResponse.cs new file mode 100644 index 0000000000000..7083b83389a8d --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppErrorResponse.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// Error response indicates Logic service is not able to process the incoming request. The error property contains the error details. + internal partial class WebAppErrorResponse + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public WebAppErrorResponse() + { + } + + /// Initializes a new instance of . + /// The error properties. + /// Keeps track of any properties unknown to the library. + internal WebAppErrorResponse(WebAppErrorProperties errorInfo, IDictionary serializedAdditionalRawData) + { + ErrorInfo = errorInfo; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The error properties. + [WirePath("error")] + public WebAppErrorProperties ErrorInfo { get; set; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppIPAddress.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppIPAddress.Serialization.cs new file mode 100644 index 0000000000000..ed3f1e54a4bc4 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppIPAddress.Serialization.cs @@ -0,0 +1,163 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class WebAppIPAddress : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WebAppIPAddress)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Address)) + { + writer.WritePropertyName("address"u8); + writer.WriteStringValue(Address); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WebAppIPAddress IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WebAppIPAddress)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWebAppIPAddress(document.RootElement, options); + } + + internal static WebAppIPAddress DeserializeWebAppIPAddress(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string address = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("address"u8)) + { + address = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WebAppIPAddress(address, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Address), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" address: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Address)) + { + builder.Append(" address: "); + if (Address.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Address}'''"); + } + else + { + builder.AppendLine($"'{Address}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WebAppIPAddress)} does not support writing '{options.Format}' format."); + } + } + + WebAppIPAddress IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWebAppIPAddress(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WebAppIPAddress)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppIPAddress.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppIPAddress.cs new file mode 100644 index 0000000000000..7031977fadfe7 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppIPAddress.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The ip address. + public partial class WebAppIPAddress + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public WebAppIPAddress() + { + } + + /// Initializes a new instance of . + /// The address. + /// Keeps track of any properties unknown to the library. + internal WebAppIPAddress(string address, IDictionary serializedAdditionalRawData) + { + Address = address; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The address. + [WirePath("address")] + public string Address { get; set; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppIPAddressRange.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppIPAddressRange.Serialization.cs new file mode 100644 index 0000000000000..0696b32b2c26c --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppIPAddressRange.Serialization.cs @@ -0,0 +1,163 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class WebAppIPAddressRange : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WebAppIPAddressRange)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(AddressRange)) + { + writer.WritePropertyName("addressRange"u8); + writer.WriteStringValue(AddressRange); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WebAppIPAddressRange IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WebAppIPAddressRange)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWebAppIPAddressRange(document.RootElement, options); + } + + internal static WebAppIPAddressRange DeserializeWebAppIPAddressRange(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string addressRange = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("addressRange"u8)) + { + addressRange = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WebAppIPAddressRange(addressRange, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AddressRange), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" addressRange: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AddressRange)) + { + builder.Append(" addressRange: "); + if (AddressRange.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{AddressRange}'''"); + } + else + { + builder.AppendLine($"'{AddressRange}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WebAppIPAddressRange)} does not support writing '{options.Format}' format."); + } + } + + WebAppIPAddressRange IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWebAppIPAddressRange(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WebAppIPAddressRange)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppIPAddressRange.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppIPAddressRange.cs new file mode 100644 index 0000000000000..a3422194d260f --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppIPAddressRange.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The ip address range. + public partial class WebAppIPAddressRange + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public WebAppIPAddressRange() + { + } + + /// Initializes a new instance of . + /// The IP address range. + /// Keeps track of any properties unknown to the library. + internal WebAppIPAddressRange(string addressRange, IDictionary serializedAdditionalRawData) + { + AddressRange = addressRange; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The IP address range. + [WirePath("addressRange")] + public string AddressRange { get; set; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppJsonSchema.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppJsonSchema.Serialization.cs new file mode 100644 index 0000000000000..8f6358f1c7734 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppJsonSchema.Serialization.cs @@ -0,0 +1,197 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class WebAppJsonSchema : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WebAppJsonSchema)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Title)) + { + writer.WritePropertyName("title"u8); + writer.WriteStringValue(Title); + } + if (Optional.IsDefined(Content)) + { + writer.WritePropertyName("content"u8); + writer.WriteStringValue(Content); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WebAppJsonSchema IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WebAppJsonSchema)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWebAppJsonSchema(document.RootElement, options); + } + + internal static WebAppJsonSchema DeserializeWebAppJsonSchema(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string title = default; + string content = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("title"u8)) + { + title = property.Value.GetString(); + continue; + } + if (property.NameEquals("content"u8)) + { + content = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WebAppJsonSchema(title, content, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Title), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" title: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Title)) + { + builder.Append(" title: "); + if (Title.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Title}'''"); + } + else + { + builder.AppendLine($"'{Title}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Content), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" content: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Content)) + { + builder.Append(" content: "); + if (Content.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Content}'''"); + } + else + { + builder.AppendLine($"'{Content}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WebAppJsonSchema)} does not support writing '{options.Format}' format."); + } + } + + WebAppJsonSchema IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWebAppJsonSchema(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WebAppJsonSchema)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppJsonSchema.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppJsonSchema.cs new file mode 100644 index 0000000000000..e60e72629b24b --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppJsonSchema.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The JSON schema. + public partial class WebAppJsonSchema + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal WebAppJsonSchema() + { + } + + /// Initializes a new instance of . + /// The JSON title. + /// The JSON content. + /// Keeps track of any properties unknown to the library. + internal WebAppJsonSchema(string title, string content, IDictionary serializedAdditionalRawData) + { + Title = title; + Content = content; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The JSON title. + [WirePath("title")] + public string Title { get; } + /// The JSON content. + [WirePath("content")] + public string Content { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppKeyType.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppKeyType.cs new file mode 100644 index 0000000000000..c30912db8ed5b --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppKeyType.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The key type. + public readonly partial struct WebAppKeyType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public WebAppKeyType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NotSpecifiedValue = "NotSpecified"; + private const string PrimaryValue = "Primary"; + private const string SecondaryValue = "Secondary"; + + /// NotSpecified. + public static WebAppKeyType NotSpecified { get; } = new WebAppKeyType(NotSpecifiedValue); + /// Primary. + public static WebAppKeyType Primary { get; } = new WebAppKeyType(PrimaryValue); + /// Secondary. + public static WebAppKeyType Secondary { get; } = new WebAppKeyType(SecondaryValue); + /// Determines if two values are the same. + public static bool operator ==(WebAppKeyType left, WebAppKeyType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(WebAppKeyType left, WebAppKeyType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator WebAppKeyType(string value) => new WebAppKeyType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is WebAppKeyType other && Equals(other); + /// + public bool Equals(WebAppKeyType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppParameterType.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppParameterType.cs new file mode 100644 index 0000000000000..abc31f7d82cb7 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppParameterType.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The parameter type. + public readonly partial struct WebAppParameterType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public WebAppParameterType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NotSpecifiedValue = "NotSpecified"; + private const string StringValue = "String"; + private const string SecureStringValue = "SecureString"; + private const string IntValue = "Int"; + private const string FloatValue = "Float"; + private const string BoolValue = "Bool"; + private const string ArrayValue = "Array"; + private const string ObjectValue = "Object"; + private const string SecureObjectValue = "SecureObject"; + + /// NotSpecified. + public static WebAppParameterType NotSpecified { get; } = new WebAppParameterType(NotSpecifiedValue); + /// String. + public static WebAppParameterType String { get; } = new WebAppParameterType(StringValue); + /// SecureString. + public static WebAppParameterType SecureString { get; } = new WebAppParameterType(SecureStringValue); + /// Int. + public static WebAppParameterType Int { get; } = new WebAppParameterType(IntValue); + /// Float. + public static WebAppParameterType Float { get; } = new WebAppParameterType(FloatValue); + /// Bool. + public static WebAppParameterType Bool { get; } = new WebAppParameterType(BoolValue); + /// Array. + public static WebAppParameterType Array { get; } = new WebAppParameterType(ArrayValue); + /// Object. + public static WebAppParameterType Object { get; } = new WebAppParameterType(ObjectValue); + /// SecureObject. + public static WebAppParameterType SecureObject { get; } = new WebAppParameterType(SecureObjectValue); + /// Determines if two values are the same. + public static bool operator ==(WebAppParameterType left, WebAppParameterType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(WebAppParameterType left, WebAppParameterType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator WebAppParameterType(string value) => new WebAppParameterType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is WebAppParameterType other && Equals(other); + /// + public bool Equals(WebAppParameterType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppRequest.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppRequest.Serialization.cs new file mode 100644 index 0000000000000..2e7022a0721c4 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppRequest.Serialization.cs @@ -0,0 +1,230 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class WebAppRequest : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WebAppRequest)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Headers)) + { + writer.WritePropertyName("headers"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Headers); +#else + using (JsonDocument document = JsonDocument.Parse(Headers)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + if (Optional.IsDefined(Uri)) + { + writer.WritePropertyName("uri"u8); + writer.WriteStringValue(Uri.AbsoluteUri); + } + if (Optional.IsDefined(Method)) + { + writer.WritePropertyName("method"u8); + writer.WriteStringValue(Method); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WebAppRequest IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WebAppRequest)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWebAppRequest(document.RootElement, options); + } + + internal static WebAppRequest DeserializeWebAppRequest(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + BinaryData headers = default; + Uri uri = default; + string method = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("headers"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + headers = BinaryData.FromString(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("uri"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + uri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("method"u8)) + { + method = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WebAppRequest(headers, uri, method, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Headers), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" headers: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Headers)) + { + builder.Append(" headers: "); + builder.AppendLine($"'{Headers.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Uri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" uri: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Uri)) + { + builder.Append(" uri: "); + builder.AppendLine($"'{Uri.AbsoluteUri}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Method), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" method: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Method)) + { + builder.Append(" method: "); + if (Method.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Method}'''"); + } + else + { + builder.AppendLine($"'{Method}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WebAppRequest)} does not support writing '{options.Format}' format."); + } + } + + WebAppRequest IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWebAppRequest(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WebAppRequest)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppRequest.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppRequest.cs new file mode 100644 index 0000000000000..b3e7c43ff46da --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppRequest.cs @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// A request. + public partial class WebAppRequest + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public WebAppRequest() + { + } + + /// Initializes a new instance of . + /// A list of all the headers attached to the request. + /// The destination for the request. + /// The HTTP method used for the request. + /// Keeps track of any properties unknown to the library. + internal WebAppRequest(BinaryData headers, Uri uri, string method, IDictionary serializedAdditionalRawData) + { + Headers = headers; + Uri = uri; + Method = method; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// + /// A list of all the headers attached to the request. + /// + /// To assign an object to this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + [WirePath("headers")] + public BinaryData Headers { get; set; } + /// The destination for the request. + [WirePath("uri")] + public Uri Uri { get; set; } + /// The HTTP method used for the request. + [WirePath("method")] + public string Method { get; set; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppRequestHistoryProperties.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppRequestHistoryProperties.Serialization.cs new file mode 100644 index 0000000000000..f7188375dae41 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppRequestHistoryProperties.Serialization.cs @@ -0,0 +1,251 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class WebAppRequestHistoryProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WebAppRequestHistoryProperties)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(StartOn)) + { + writer.WritePropertyName("startTime"u8); + writer.WriteStringValue(StartOn.Value, "O"); + } + if (Optional.IsDefined(EndOn)) + { + writer.WritePropertyName("endTime"u8); + writer.WriteStringValue(EndOn.Value, "O"); + } + if (Optional.IsDefined(Request)) + { + writer.WritePropertyName("request"u8); + writer.WriteObjectValue(Request, options); + } + if (Optional.IsDefined(Response)) + { + writer.WritePropertyName("response"u8); + writer.WriteObjectValue(Response, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WebAppRequestHistoryProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WebAppRequestHistoryProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWebAppRequestHistoryProperties(document.RootElement, options); + } + + internal static WebAppRequestHistoryProperties DeserializeWebAppRequestHistoryProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DateTimeOffset? startTime = default; + DateTimeOffset? endTime = default; + WebAppRequest request = default; + WebAppResponse response = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("startTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + startTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("endTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("request"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + request = WebAppRequest.DeserializeWebAppRequest(property.Value, options); + continue; + } + if (property.NameEquals("response"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + response = WebAppResponse.DeserializeWebAppResponse(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WebAppRequestHistoryProperties(startTime, endTime, request, response, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(StartOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" startTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(StartOn)) + { + builder.Append(" startTime: "); + var formattedDateTimeString = TypeFormatters.ToString(StartOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EndOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" endTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(EndOn)) + { + builder.Append(" endTime: "); + var formattedDateTimeString = TypeFormatters.ToString(EndOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Request), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" request: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Request)) + { + builder.Append(" request: "); + BicepSerializationHelpers.AppendChildObject(builder, Request, options, 2, false, " request: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Response), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" response: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Response)) + { + builder.Append(" response: "); + BicepSerializationHelpers.AppendChildObject(builder, Response, options, 2, false, " response: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WebAppRequestHistoryProperties)} does not support writing '{options.Format}' format."); + } + } + + WebAppRequestHistoryProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWebAppRequestHistoryProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WebAppRequestHistoryProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppRequestHistoryProperties.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppRequestHistoryProperties.cs new file mode 100644 index 0000000000000..9c72b9a0952d2 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppRequestHistoryProperties.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The request history. + public partial class WebAppRequestHistoryProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public WebAppRequestHistoryProperties() + { + } + + /// Initializes a new instance of . + /// The time the request started. + /// The time the request ended. + /// The request. + /// The response. + /// Keeps track of any properties unknown to the library. + internal WebAppRequestHistoryProperties(DateTimeOffset? startOn, DateTimeOffset? endOn, WebAppRequest request, WebAppResponse response, IDictionary serializedAdditionalRawData) + { + StartOn = startOn; + EndOn = endOn; + Request = request; + Response = response; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The time the request started. + [WirePath("startTime")] + public DateTimeOffset? StartOn { get; set; } + /// The time the request ended. + [WirePath("endTime")] + public DateTimeOffset? EndOn { get; set; } + /// The request. + [WirePath("request")] + public WebAppRequest Request { get; set; } + /// The response. + [WirePath("response")] + public WebAppResponse Response { get; set; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppResponse.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppResponse.Serialization.cs new file mode 100644 index 0000000000000..8dab17885f8b4 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppResponse.Serialization.cs @@ -0,0 +1,226 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class WebAppResponse : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WebAppResponse)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Headers)) + { + writer.WritePropertyName("headers"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Headers); +#else + using (JsonDocument document = JsonDocument.Parse(Headers)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + if (Optional.IsDefined(StatusCode)) + { + writer.WritePropertyName("statusCode"u8); + writer.WriteNumberValue(StatusCode.Value); + } + if (Optional.IsDefined(BodyLink)) + { + writer.WritePropertyName("bodyLink"u8); + writer.WriteObjectValue(BodyLink, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WebAppResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WebAppResponse)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWebAppResponse(document.RootElement, options); + } + + internal static WebAppResponse DeserializeWebAppResponse(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + BinaryData headers = default; + int? statusCode = default; + WebAppContentLink bodyLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("headers"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + headers = BinaryData.FromString(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("statusCode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + statusCode = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("bodyLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + bodyLink = WebAppContentLink.DeserializeWebAppContentLink(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WebAppResponse(headers, statusCode, bodyLink, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Headers), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" headers: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Headers)) + { + builder.Append(" headers: "); + builder.AppendLine($"'{Headers.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(StatusCode), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" statusCode: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(StatusCode)) + { + builder.Append(" statusCode: "); + builder.AppendLine($"{StatusCode.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(BodyLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" bodyLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(BodyLink)) + { + builder.Append(" bodyLink: "); + BicepSerializationHelpers.AppendChildObject(builder, BodyLink, options, 2, false, " bodyLink: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WebAppResponse)} does not support writing '{options.Format}' format."); + } + } + + WebAppResponse IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWebAppResponse(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WebAppResponse)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppResponse.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppResponse.cs new file mode 100644 index 0000000000000..e445dff6c7545 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppResponse.cs @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// A response. + public partial class WebAppResponse + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public WebAppResponse() + { + } + + /// Initializes a new instance of . + /// A list of all the headers attached to the response. + /// The status code of the response. + /// Details on the location of the body content. + /// Keeps track of any properties unknown to the library. + internal WebAppResponse(BinaryData headers, int? statusCode, WebAppContentLink bodyLink, IDictionary serializedAdditionalRawData) + { + Headers = headers; + StatusCode = statusCode; + BodyLink = bodyLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// + /// A list of all the headers attached to the response. + /// + /// To assign an object to this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + [WirePath("headers")] + public BinaryData Headers { get; set; } + /// The status code of the response. + [WirePath("statusCode")] + public int? StatusCode { get; set; } + /// Details on the location of the body content. + [WirePath("bodyLink")] + public WebAppContentLink BodyLink { get; set; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppRetryHistory.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppRetryHistory.Serialization.cs new file mode 100644 index 0000000000000..7c6c4ebf61a9f --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppRetryHistory.Serialization.cs @@ -0,0 +1,333 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class WebAppRetryHistory : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WebAppRetryHistory)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(StartOn)) + { + writer.WritePropertyName("startTime"u8); + writer.WriteStringValue(StartOn.Value, "O"); + } + if (Optional.IsDefined(EndOn)) + { + writer.WritePropertyName("endTime"u8); + writer.WriteStringValue(EndOn.Value, "O"); + } + if (Optional.IsDefined(Code)) + { + writer.WritePropertyName("code"u8); + writer.WriteStringValue(Code); + } + if (Optional.IsDefined(ClientRequestId)) + { + writer.WritePropertyName("clientRequestId"u8); + writer.WriteStringValue(ClientRequestId); + } + if (Optional.IsDefined(ServiceRequestId)) + { + writer.WritePropertyName("serviceRequestId"u8); + writer.WriteStringValue(ServiceRequestId); + } + if (Optional.IsDefined(Error)) + { + writer.WritePropertyName("error"u8); + writer.WriteObjectValue(Error, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WebAppRetryHistory IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WebAppRetryHistory)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWebAppRetryHistory(document.RootElement, options); + } + + internal static WebAppRetryHistory DeserializeWebAppRetryHistory(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DateTimeOffset? startTime = default; + DateTimeOffset? endTime = default; + string code = default; + string clientRequestId = default; + string serviceRequestId = default; + WebAppErrorResponse error = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("startTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + startTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("endTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("code"u8)) + { + code = property.Value.GetString(); + continue; + } + if (property.NameEquals("clientRequestId"u8)) + { + clientRequestId = property.Value.GetString(); + continue; + } + if (property.NameEquals("serviceRequestId"u8)) + { + serviceRequestId = property.Value.GetString(); + continue; + } + if (property.NameEquals("error"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + error = WebAppErrorResponse.DeserializeWebAppErrorResponse(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WebAppRetryHistory( + startTime, + endTime, + code, + clientRequestId, + serviceRequestId, + error, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(StartOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" startTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(StartOn)) + { + builder.Append(" startTime: "); + var formattedDateTimeString = TypeFormatters.ToString(StartOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EndOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" endTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(EndOn)) + { + builder.Append(" endTime: "); + var formattedDateTimeString = TypeFormatters.ToString(EndOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Code), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" code: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Code)) + { + builder.Append(" code: "); + if (Code.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Code}'''"); + } + else + { + builder.AppendLine($"'{Code}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ClientRequestId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" clientRequestId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ClientRequestId)) + { + builder.Append(" clientRequestId: "); + if (ClientRequestId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ClientRequestId}'''"); + } + else + { + builder.AppendLine($"'{ClientRequestId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ServiceRequestId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" serviceRequestId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ServiceRequestId)) + { + builder.Append(" serviceRequestId: "); + if (ServiceRequestId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ServiceRequestId}'''"); + } + else + { + builder.AppendLine($"'{ServiceRequestId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("ErrorInfo", out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" error: "); + builder.AppendLine("{"); + builder.Append(" error: "); + builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); + } + else + { + if (Optional.IsDefined(Error)) + { + builder.Append(" error: "); + BicepSerializationHelpers.AppendChildObject(builder, Error, options, 2, false, " error: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WebAppRetryHistory)} does not support writing '{options.Format}' format."); + } + } + + WebAppRetryHistory IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWebAppRetryHistory(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WebAppRetryHistory)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppRetryHistory.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppRetryHistory.cs new file mode 100644 index 0000000000000..499e184739408 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppRetryHistory.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The retry history. + public partial class WebAppRetryHistory + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public WebAppRetryHistory() + { + } + + /// Initializes a new instance of . + /// Gets the start time. + /// Gets the end time. + /// Gets the status code. + /// Gets the client request Id. + /// Gets the service request Id. + /// Gets the error response. + /// Keeps track of any properties unknown to the library. + internal WebAppRetryHistory(DateTimeOffset? startOn, DateTimeOffset? endOn, string code, string clientRequestId, string serviceRequestId, WebAppErrorResponse error, IDictionary serializedAdditionalRawData) + { + StartOn = startOn; + EndOn = endOn; + Code = code; + ClientRequestId = clientRequestId; + ServiceRequestId = serviceRequestId; + Error = error; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets the start time. + [WirePath("startTime")] + public DateTimeOffset? StartOn { get; set; } + /// Gets the end time. + [WirePath("endTime")] + public DateTimeOffset? EndOn { get; set; } + /// Gets the status code. + [WirePath("code")] + public string Code { get; set; } + /// Gets the client request Id. + [WirePath("clientRequestId")] + public string ClientRequestId { get; set; } + /// Gets the service request Id. + [WirePath("serviceRequestId")] + public string ServiceRequestId { get; set; } + /// Gets the error response. + internal WebAppErrorResponse Error { get; set; } + /// The error properties. + [WirePath("error.error")] + public WebAppErrorProperties ErrorInfo + { + get => Error is null ? default : Error.ErrorInfo; + set + { + if (Error is null) + Error = new WebAppErrorResponse(); + Error.ErrorInfo = value; + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppRunActionCorrelation.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppRunActionCorrelation.Serialization.cs new file mode 100644 index 0000000000000..a2b340820bf02 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppRunActionCorrelation.Serialization.cs @@ -0,0 +1,259 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class WebAppRunActionCorrelation : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WebAppRunActionCorrelation)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(ActionTrackingId)) + { + writer.WritePropertyName("actionTrackingId"u8); + writer.WriteStringValue(ActionTrackingId); + } + if (Optional.IsDefined(ClientTrackingId)) + { + writer.WritePropertyName("clientTrackingId"u8); + writer.WriteStringValue(ClientTrackingId); + } + if (Optional.IsCollectionDefined(ClientKeywords)) + { + writer.WritePropertyName("clientKeywords"u8); + writer.WriteStartArray(); + foreach (var item in ClientKeywords) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WebAppRunActionCorrelation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WebAppRunActionCorrelation)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWebAppRunActionCorrelation(document.RootElement, options); + } + + internal static WebAppRunActionCorrelation DeserializeWebAppRunActionCorrelation(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string actionTrackingId = default; + string clientTrackingId = default; + IList clientKeywords = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("actionTrackingId"u8)) + { + actionTrackingId = property.Value.GetString(); + continue; + } + if (property.NameEquals("clientTrackingId"u8)) + { + clientTrackingId = property.Value.GetString(); + continue; + } + if (property.NameEquals("clientKeywords"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + clientKeywords = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WebAppRunActionCorrelation(clientTrackingId, clientKeywords ?? new ChangeTrackingList(), serializedAdditionalRawData, actionTrackingId); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ActionTrackingId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" actionTrackingId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ActionTrackingId)) + { + builder.Append(" actionTrackingId: "); + if (ActionTrackingId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ActionTrackingId}'''"); + } + else + { + builder.AppendLine($"'{ActionTrackingId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ClientTrackingId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" clientTrackingId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ClientTrackingId)) + { + builder.Append(" clientTrackingId: "); + if (ClientTrackingId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ClientTrackingId}'''"); + } + else + { + builder.AppendLine($"'{ClientTrackingId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ClientKeywords), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" clientKeywords: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(ClientKeywords)) + { + if (ClientKeywords.Any()) + { + builder.Append(" clientKeywords: "); + builder.AppendLine("["); + foreach (var item in ClientKeywords) + { + if (item == null) + { + builder.Append("null"); + continue; + } + if (item.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item}'''"); + } + else + { + builder.AppendLine($" '{item}'"); + } + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WebAppRunActionCorrelation)} does not support writing '{options.Format}' format."); + } + } + + WebAppRunActionCorrelation IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWebAppRunActionCorrelation(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WebAppRunActionCorrelation)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppRunActionCorrelation.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppRunActionCorrelation.cs new file mode 100644 index 0000000000000..58612adc12453 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppRunActionCorrelation.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The workflow run action correlation properties. + public partial class WebAppRunActionCorrelation : WebAppRunCorrelation + { + /// Initializes a new instance of . + public WebAppRunActionCorrelation() + { + } + + /// Initializes a new instance of . + /// The client tracking identifier. + /// The client keywords. + /// Keeps track of any properties unknown to the library. + /// The action tracking identifier. + internal WebAppRunActionCorrelation(string clientTrackingId, IList clientKeywords, IDictionary serializedAdditionalRawData, string actionTrackingId) : base(clientTrackingId, clientKeywords, serializedAdditionalRawData) + { + ActionTrackingId = actionTrackingId; + } + + /// The action tracking identifier. + [WirePath("actionTrackingId")] + public string ActionTrackingId { get; set; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppRunCorrelation.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppRunCorrelation.Serialization.cs new file mode 100644 index 0000000000000..cfa05a6b80a16 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppRunCorrelation.Serialization.cs @@ -0,0 +1,225 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class WebAppRunCorrelation : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WebAppRunCorrelation)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(ClientTrackingId)) + { + writer.WritePropertyName("clientTrackingId"u8); + writer.WriteStringValue(ClientTrackingId); + } + if (Optional.IsCollectionDefined(ClientKeywords)) + { + writer.WritePropertyName("clientKeywords"u8); + writer.WriteStartArray(); + foreach (var item in ClientKeywords) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WebAppRunCorrelation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WebAppRunCorrelation)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWebAppRunCorrelation(document.RootElement, options); + } + + internal static WebAppRunCorrelation DeserializeWebAppRunCorrelation(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string clientTrackingId = default; + IList clientKeywords = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("clientTrackingId"u8)) + { + clientTrackingId = property.Value.GetString(); + continue; + } + if (property.NameEquals("clientKeywords"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + clientKeywords = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WebAppRunCorrelation(clientTrackingId, clientKeywords ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ClientTrackingId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" clientTrackingId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ClientTrackingId)) + { + builder.Append(" clientTrackingId: "); + if (ClientTrackingId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ClientTrackingId}'''"); + } + else + { + builder.AppendLine($"'{ClientTrackingId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ClientKeywords), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" clientKeywords: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(ClientKeywords)) + { + if (ClientKeywords.Any()) + { + builder.Append(" clientKeywords: "); + builder.AppendLine("["); + foreach (var item in ClientKeywords) + { + if (item == null) + { + builder.Append("null"); + continue; + } + if (item.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item}'''"); + } + else + { + builder.AppendLine($" '{item}'"); + } + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WebAppRunCorrelation)} does not support writing '{options.Format}' format."); + } + } + + WebAppRunCorrelation IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWebAppRunCorrelation(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WebAppRunCorrelation)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppRunCorrelation.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppRunCorrelation.cs new file mode 100644 index 0000000000000..084a5a7ca1961 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppRunCorrelation.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The correlation properties. + public partial class WebAppRunCorrelation + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public WebAppRunCorrelation() + { + ClientKeywords = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The client tracking identifier. + /// The client keywords. + /// Keeps track of any properties unknown to the library. + internal WebAppRunCorrelation(string clientTrackingId, IList clientKeywords, IDictionary serializedAdditionalRawData) + { + ClientTrackingId = clientTrackingId; + ClientKeywords = clientKeywords; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The client tracking identifier. + [WirePath("clientTrackingId")] + public string ClientTrackingId { get; set; } + /// The client keywords. + [WirePath("clientKeywords")] + public IList ClientKeywords { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowArtifacts.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowArtifacts.Serialization.cs new file mode 100644 index 0000000000000..e9cb8f0e10492 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowArtifacts.Serialization.cs @@ -0,0 +1,203 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class WorkflowArtifacts : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowArtifacts)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(AppSettings)) + { + writer.WritePropertyName("appSettings"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(AppSettings); +#else + using (JsonDocument document = JsonDocument.Parse(AppSettings)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + if (Optional.IsCollectionDefined(Files)) + { + writer.WritePropertyName("files"u8); + writer.WriteStartObject(); + foreach (var item in Files) + { + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + writer.WriteEndObject(); + } + if (Optional.IsCollectionDefined(FilesToDelete)) + { + writer.WritePropertyName("filesToDelete"u8); + writer.WriteStartArray(); + foreach (var item in FilesToDelete) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WorkflowArtifacts IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowArtifacts)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWorkflowArtifacts(document.RootElement, options); + } + + internal static WorkflowArtifacts DeserializeWorkflowArtifacts(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + BinaryData appSettings = default; + IDictionary files = default; + IList filesToDelete = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("appSettings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + appSettings = BinaryData.FromString(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("files"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, BinaryData.FromString(property0.Value.GetRawText())); + } + } + files = dictionary; + continue; + } + if (property.NameEquals("filesToDelete"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + filesToDelete = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WorkflowArtifacts(appSettings, files ?? new ChangeTrackingDictionary(), filesToDelete ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(WorkflowArtifacts)} does not support writing '{options.Format}' format."); + } + } + + WorkflowArtifacts IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWorkflowArtifacts(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WorkflowArtifacts)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowArtifacts.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowArtifacts.cs new file mode 100644 index 0000000000000..ccb3e8b3d5b78 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowArtifacts.cs @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The workflow filter. + public partial class WorkflowArtifacts + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public WorkflowArtifacts() + { + Files = new ChangeTrackingDictionary(); + FilesToDelete = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Application settings of the workflow. + /// Files of the app. + /// Files of the app to delete. + /// Keeps track of any properties unknown to the library. + internal WorkflowArtifacts(BinaryData appSettings, IDictionary files, IList filesToDelete, IDictionary serializedAdditionalRawData) + { + AppSettings = appSettings; + Files = files; + FilesToDelete = filesToDelete; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// + /// Application settings of the workflow. + /// + /// To assign an object to this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + [WirePath("appSettings")] + public BinaryData AppSettings { get; set; } + /// + /// Files of the app. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + [WirePath("files")] + public IDictionary Files { get; } + /// Files of the app to delete. + [WirePath("filesToDelete")] + public IList FilesToDelete { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowContent.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowContent.Serialization.cs new file mode 100644 index 0000000000000..0d770663a1004 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowContent.Serialization.cs @@ -0,0 +1,267 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class WorkflowContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowContent)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(WebAppParameterType)) + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(WebAppParameterType.Value.ToString()); + } + if (Optional.IsDefined(Value)) + { + writer.WritePropertyName("value"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Value); +#else + using (JsonDocument document = JsonDocument.Parse(Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + if (Optional.IsDefined(Metadata)) + { + writer.WritePropertyName("metadata"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Metadata); +#else + using (JsonDocument document = JsonDocument.Parse(Metadata)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WorkflowContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWorkflowContent(document.RootElement, options); + } + + internal static WorkflowContent DeserializeWorkflowContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + WebAppParameterType? type = default; + BinaryData value = default; + BinaryData metadata = default; + string description = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + type = new WebAppParameterType(property.Value.GetString()); + continue; + } + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + value = BinaryData.FromString(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("metadata"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + metadata = BinaryData.FromString(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WorkflowContent(type, value, metadata, description, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(WebAppParameterType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" type: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(WebAppParameterType)) + { + builder.Append(" type: "); + builder.AppendLine($"'{WebAppParameterType.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Value)) + { + builder.Append(" value: "); + builder.AppendLine($"'{Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Metadata), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" metadata: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Metadata)) + { + builder.Append(" metadata: "); + builder.AppendLine($"'{Metadata.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Description), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" description: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Description)) + { + builder.Append(" description: "); + if (Description.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Description}'''"); + } + else + { + builder.AppendLine($"'{Description}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WorkflowContent)} does not support writing '{options.Format}' format."); + } + } + + WorkflowContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWorkflowContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WorkflowContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowContent.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowContent.cs new file mode 100644 index 0000000000000..0c7d0ff584e23 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowContent.cs @@ -0,0 +1,139 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The workflow parameters. + public partial class WorkflowContent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public WorkflowContent() + { + } + + /// Initializes a new instance of . + /// The type. + /// The value. + /// The metadata. + /// The description. + /// Keeps track of any properties unknown to the library. + internal WorkflowContent(WebAppParameterType? webAppParameterType, BinaryData value, BinaryData metadata, string description, IDictionary serializedAdditionalRawData) + { + WebAppParameterType = webAppParameterType; + Value = value; + Metadata = metadata; + Description = description; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The type. + [WirePath("type")] + public WebAppParameterType? WebAppParameterType { get; set; } + /// + /// The value. + /// + /// To assign an object to this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + [WirePath("value")] + public BinaryData Value { get; set; } + /// + /// The metadata. + /// + /// To assign an object to this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + [WirePath("metadata")] + public BinaryData Metadata { get; set; } + /// The description. + [WirePath("description")] + public string Description { get; set; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowData.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowData.Serialization.cs new file mode 100644 index 0000000000000..4d310d3d9adfb --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowData.Serialization.cs @@ -0,0 +1,842 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class WorkflowData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowData)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"u8); + JsonSerializer.Serialize(writer, Identity); + } + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WritePropertyName("location"u8); + writer.WriteStringValue(Location); + if (options.Format != "W") + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (options.Format != "W") + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W") + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(ResourceType); + } + if (options.Format != "W" && Optional.IsDefined(SystemData)) + { + writer.WritePropertyName("systemData"u8); + JsonSerializer.Serialize(writer, SystemData); + } + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(CreatedOn)) + { + writer.WritePropertyName("createdTime"u8); + writer.WriteStringValue(CreatedOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(ChangedOn)) + { + writer.WritePropertyName("changedTime"u8); + writer.WriteStringValue(ChangedOn.Value, "O"); + } + if (Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(Version)) + { + writer.WritePropertyName("version"u8); + writer.WriteStringValue(Version); + } + if (options.Format != "W" && Optional.IsDefined(AccessEndpoint)) + { + writer.WritePropertyName("accessEndpoint"u8); + writer.WriteStringValue(AccessEndpoint); + } + if (Optional.IsDefined(EndpointsConfiguration)) + { + writer.WritePropertyName("endpointsConfiguration"u8); + writer.WriteObjectValue(EndpointsConfiguration, options); + } + if (Optional.IsDefined(AccessControl)) + { + writer.WritePropertyName("accessControl"u8); + writer.WriteObjectValue(AccessControl, options); + } + if (options.Format != "W" && Optional.IsDefined(Sku)) + { + writer.WritePropertyName("sku"u8); + writer.WriteObjectValue(Sku, options); + } + if (Optional.IsDefined(IntegrationAccount)) + { + writer.WritePropertyName("integrationAccount"u8); + writer.WriteObjectValue(IntegrationAccount, options); + } + if (Optional.IsDefined(IntegrationServiceEnvironment)) + { + writer.WritePropertyName("integrationServiceEnvironment"u8); + writer.WriteObjectValue(IntegrationServiceEnvironment, options); + } + if (Optional.IsDefined(Definition)) + { + writer.WritePropertyName("definition"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Definition); +#else + using (JsonDocument document = JsonDocument.Parse(Definition)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + if (Optional.IsCollectionDefined(Parameters)) + { + writer.WritePropertyName("parameters"u8); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(Kind)) + { + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.Value.ToString()); + } + writer.WriteEndObject(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WorkflowData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWorkflowData(document.RootElement, options); + } + + internal static WorkflowData DeserializeWorkflowData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ManagedServiceIdentity identity = default; + IDictionary tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + WorkflowProvisioningState? provisioningState = default; + DateTimeOffset? createdTime = default; + DateTimeOffset? changedTime = default; + WorkflowState? state = default; + string version = default; + string accessEndpoint = default; + FlowEndpointsConfiguration endpointsConfiguration = default; + FlowAccessControlConfiguration accessControl = default; + WorkflowSku sku = default; + WorkflowResourceReference integrationAccount = default; + WorkflowResourceReference integrationServiceEnvironment = default; + BinaryData definition = default; + IDictionary parameters = default; + AppServiceKind? kind = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("identity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + identity = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("location"u8)) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("provisioningState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new WorkflowProvisioningState(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("createdTime"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + createdTime = property0.Value.GetDateTimeOffset("O"); + continue; + } + if (property0.NameEquals("changedTime"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + changedTime = property0.Value.GetDateTimeOffset("O"); + continue; + } + if (property0.NameEquals("state"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + state = new WorkflowState(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("version"u8)) + { + version = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("accessEndpoint"u8)) + { + accessEndpoint = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("endpointsConfiguration"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endpointsConfiguration = FlowEndpointsConfiguration.DeserializeFlowEndpointsConfiguration(property0.Value, options); + continue; + } + if (property0.NameEquals("accessControl"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + accessControl = FlowAccessControlConfiguration.DeserializeFlowAccessControlConfiguration(property0.Value, options); + continue; + } + if (property0.NameEquals("sku"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sku = WorkflowSku.DeserializeWorkflowSku(property0.Value, options); + continue; + } + if (property0.NameEquals("integrationAccount"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + integrationAccount = WorkflowResourceReference.DeserializeWorkflowResourceReference(property0.Value, options); + continue; + } + if (property0.NameEquals("integrationServiceEnvironment"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + integrationServiceEnvironment = WorkflowResourceReference.DeserializeWorkflowResourceReference(property0.Value, options); + continue; + } + if (property0.NameEquals("definition"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + definition = BinaryData.FromString(property0.Value.GetRawText()); + continue; + } + if (property0.NameEquals("parameters"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property1 in property0.Value.EnumerateObject()) + { + dictionary.Add(property1.Name, WorkflowContent.DeserializeWorkflowContent(property1.Value, options)); + } + parameters = dictionary; + continue; + } + if (property0.NameEquals("kind"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + kind = new AppServiceKind(property0.Value.GetString()); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WorkflowData( + id, + name, + type, + systemData, + tags ?? new ChangeTrackingDictionary(), + location, + identity, + provisioningState, + createdTime, + changedTime, + state, + version, + accessEndpoint, + endpointsConfiguration, + accessControl, + sku, + integrationAccount, + integrationServiceEnvironment, + definition, + parameters ?? new ChangeTrackingDictionary(), + kind, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Location), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" location: "); + builder.AppendLine(propertyOverride); + } + else + { + builder.Append(" location: "); + builder.AppendLine($"'{Location.ToString()}'"); + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Tags), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" tags: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Tags)) + { + if (Tags.Any()) + { + builder.Append(" tags: "); + builder.AppendLine("{"); + foreach (var item in Tags) + { + builder.Append($" '{item.Key}': "); + if (item.Value == null) + { + builder.Append("null"); + continue; + } + if (item.Value.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{item.Value}'''"); + } + else + { + builder.AppendLine($"'{item.Value}'"); + } + } + builder.AppendLine(" }"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Identity), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" identity: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Identity)) + { + builder.Append(" identity: "); + BicepSerializationHelpers.AppendChildObject(builder, Identity, options, 2, false, " identity: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProvisioningState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" provisioningState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ProvisioningState)) + { + builder.Append(" provisioningState: "); + builder.AppendLine($"'{ProvisioningState.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CreatedOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" createdTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CreatedOn)) + { + builder.Append(" createdTime: "); + var formattedDateTimeString = TypeFormatters.ToString(CreatedOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ChangedOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" changedTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ChangedOn)) + { + builder.Append(" changedTime: "); + var formattedDateTimeString = TypeFormatters.ToString(ChangedOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(State), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" state: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(State)) + { + builder.Append(" state: "); + builder.AppendLine($"'{State.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Version), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" version: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Version)) + { + builder.Append(" version: "); + if (Version.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Version}'''"); + } + else + { + builder.AppendLine($"'{Version}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AccessEndpoint), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" accessEndpoint: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AccessEndpoint)) + { + builder.Append(" accessEndpoint: "); + if (AccessEndpoint.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{AccessEndpoint}'''"); + } + else + { + builder.AppendLine($"'{AccessEndpoint}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EndpointsConfiguration), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" endpointsConfiguration: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(EndpointsConfiguration)) + { + builder.Append(" endpointsConfiguration: "); + BicepSerializationHelpers.AppendChildObject(builder, EndpointsConfiguration, options, 4, false, " endpointsConfiguration: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AccessControl), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" accessControl: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AccessControl)) + { + builder.Append(" accessControl: "); + BicepSerializationHelpers.AppendChildObject(builder, AccessControl, options, 4, false, " accessControl: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Sku), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" sku: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Sku)) + { + builder.Append(" sku: "); + BicepSerializationHelpers.AppendChildObject(builder, Sku, options, 4, false, " sku: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IntegrationAccount), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" integrationAccount: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IntegrationAccount)) + { + builder.Append(" integrationAccount: "); + BicepSerializationHelpers.AppendChildObject(builder, IntegrationAccount, options, 4, false, " integrationAccount: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IntegrationServiceEnvironment), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" integrationServiceEnvironment: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IntegrationServiceEnvironment)) + { + builder.Append(" integrationServiceEnvironment: "); + BicepSerializationHelpers.AppendChildObject(builder, IntegrationServiceEnvironment, options, 4, false, " integrationServiceEnvironment: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Definition), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" definition: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Definition)) + { + builder.Append(" definition: "); + builder.AppendLine($"'{Definition.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Parameters), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" parameters: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Parameters)) + { + if (Parameters.Any()) + { + builder.Append(" parameters: "); + builder.AppendLine("{"); + foreach (var item in Parameters) + { + builder.Append($" '{item.Key}': "); + BicepSerializationHelpers.AppendChildObject(builder, item.Value, options, 6, false, " parameters: "); + } + builder.AppendLine(" }"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Kind), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" kind: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Kind)) + { + builder.Append(" kind: "); + builder.AppendLine($"'{Kind.Value.ToString()}'"); + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WorkflowData)} does not support writing '{options.Format}' format."); + } + } + + WorkflowData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWorkflowData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WorkflowData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowData.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowData.cs new file mode 100644 index 0000000000000..9009700010418 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowData.cs @@ -0,0 +1,180 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The workflow type. + public partial class WorkflowData : TrackedResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The location. + public WorkflowData(AzureLocation location) : base(location) + { + Parameters = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Managed service identity. + /// Gets the provisioning state. + /// Gets the created time. + /// Gets the changed time. + /// The state. + /// Gets the version. + /// Gets the access endpoint. + /// The endpoints configuration. + /// The access control configuration. + /// The sku. + /// The integration account. + /// The integration service environment. + /// The definition. + /// The parameters. + /// The workflow kind. + /// Keeps track of any properties unknown to the library. + internal WorkflowData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, WorkflowProvisioningState? provisioningState, DateTimeOffset? createdOn, DateTimeOffset? changedOn, WorkflowState? state, string version, string accessEndpoint, FlowEndpointsConfiguration endpointsConfiguration, FlowAccessControlConfiguration accessControl, WorkflowSku sku, WorkflowResourceReference integrationAccount, WorkflowResourceReference integrationServiceEnvironment, BinaryData definition, IDictionary parameters, AppServiceKind? kind, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + { + Identity = identity; + ProvisioningState = provisioningState; + CreatedOn = createdOn; + ChangedOn = changedOn; + State = state; + Version = version; + AccessEndpoint = accessEndpoint; + EndpointsConfiguration = endpointsConfiguration; + AccessControl = accessControl; + Sku = sku; + IntegrationAccount = integrationAccount; + IntegrationServiceEnvironment = integrationServiceEnvironment; + Definition = definition; + Parameters = parameters; + Kind = kind; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal WorkflowData() + { + } + + /// Managed service identity. + [WirePath("identity")] + public ManagedServiceIdentity Identity { get; set; } + /// Gets the provisioning state. + [WirePath("properties.provisioningState")] + public WorkflowProvisioningState? ProvisioningState { get; } + /// Gets the created time. + [WirePath("properties.createdTime")] + public DateTimeOffset? CreatedOn { get; } + /// Gets the changed time. + [WirePath("properties.changedTime")] + public DateTimeOffset? ChangedOn { get; } + /// The state. + [WirePath("properties.state")] + public WorkflowState? State { get; set; } + /// Gets the version. + [WirePath("properties.version")] + public string Version { get; } + /// Gets the access endpoint. + [WirePath("properties.accessEndpoint")] + public string AccessEndpoint { get; } + /// The endpoints configuration. + [WirePath("properties.endpointsConfiguration")] + public FlowEndpointsConfiguration EndpointsConfiguration { get; set; } + /// The access control configuration. + [WirePath("properties.accessControl")] + public FlowAccessControlConfiguration AccessControl { get; set; } + /// The sku. + [WirePath("properties.sku")] + public WorkflowSku Sku { get; } + /// The integration account. + [WirePath("properties.integrationAccount")] + public WorkflowResourceReference IntegrationAccount { get; set; } + /// The integration service environment. + [WirePath("properties.integrationServiceEnvironment")] + public WorkflowResourceReference IntegrationServiceEnvironment { get; set; } + /// + /// The definition. + /// + /// To assign an object to this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + [WirePath("properties.definition")] + public BinaryData Definition { get; set; } + /// The parameters. + [WirePath("properties.parameters")] + public IDictionary Parameters { get; } + /// The workflow kind. + [WirePath("properties.kind")] + public AppServiceKind? Kind { get; set; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowEnvelopeCollection.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowEnvelopeCollection.Serialization.cs new file mode 100644 index 0000000000000..ec2e0edc6cc82 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowEnvelopeCollection.Serialization.cs @@ -0,0 +1,205 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + internal partial class WorkflowEnvelopeCollection : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowEnvelopeCollection)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (options.Format != "W" && Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WorkflowEnvelopeCollection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowEnvelopeCollection)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWorkflowEnvelopeCollection(document.RootElement, options); + } + + internal static WorkflowEnvelopeCollection DeserializeWorkflowEnvelopeCollection(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + string nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(WorkflowEnvelopeData.DeserializeWorkflowEnvelopeData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WorkflowEnvelopeCollection(value, nextLink, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WorkflowEnvelopeCollection)} does not support writing '{options.Format}' format."); + } + } + + WorkflowEnvelopeCollection IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWorkflowEnvelopeCollection(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WorkflowEnvelopeCollection)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowEnvelopeCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowEnvelopeCollection.cs new file mode 100644 index 0000000000000..ea13f067de0dc --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowEnvelopeCollection.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.AppService.Models +{ + /// Collection of Kudu workflow information elements. + internal partial class WorkflowEnvelopeCollection + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Collection of resources. + /// is null. + internal WorkflowEnvelopeCollection(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// Collection of resources. + /// Link to next page of resources. + /// Keeps track of any properties unknown to the library. + internal WorkflowEnvelopeCollection(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal WorkflowEnvelopeCollection() + { + } + + /// Collection of resources. + public IReadOnlyList Value { get; } + /// Link to next page of resources. + public string NextLink { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowEnvelopeProperties.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowEnvelopeProperties.Serialization.cs new file mode 100644 index 0000000000000..80659f6d97295 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowEnvelopeProperties.Serialization.cs @@ -0,0 +1,264 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class WorkflowEnvelopeProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowEnvelopeProperties)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Files)) + { + writer.WritePropertyName("files"u8); + writer.WriteStartObject(); + foreach (var item in Files) + { + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(FlowState)) + { + writer.WritePropertyName("flowState"u8); + writer.WriteStringValue(FlowState.Value.ToString()); + } + if (Optional.IsDefined(Health)) + { + writer.WritePropertyName("health"u8); + writer.WriteObjectValue(Health, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WorkflowEnvelopeProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowEnvelopeProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWorkflowEnvelopeProperties(document.RootElement, options); + } + + internal static WorkflowEnvelopeProperties DeserializeWorkflowEnvelopeProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyDictionary files = default; + WorkflowState? flowState = default; + WorkflowHealth health = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("files"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, BinaryData.FromString(property0.Value.GetRawText())); + } + } + files = dictionary; + continue; + } + if (property.NameEquals("flowState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + flowState = new WorkflowState(property.Value.GetString()); + continue; + } + if (property.NameEquals("health"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + health = WorkflowHealth.DeserializeWorkflowHealth(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WorkflowEnvelopeProperties(files ?? new ChangeTrackingDictionary(), flowState, health, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Files), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" files: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Files)) + { + if (Files.Any()) + { + builder.Append(" files: "); + builder.AppendLine("{"); + foreach (var item in Files) + { + builder.Append($" '{item.Key}': "); + if (item.Value == null) + { + builder.Append("null"); + continue; + } + builder.AppendLine($"'{item.Value.ToString()}'"); + } + builder.AppendLine(" }"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(FlowState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" flowState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(FlowState)) + { + builder.Append(" flowState: "); + builder.AppendLine($"'{FlowState.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Health), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" health: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Health)) + { + builder.Append(" health: "); + BicepSerializationHelpers.AppendChildObject(builder, Health, options, 2, false, " health: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WorkflowEnvelopeProperties)} does not support writing '{options.Format}' format."); + } + } + + WorkflowEnvelopeProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWorkflowEnvelopeProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WorkflowEnvelopeProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowEnvelopeProperties.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowEnvelopeProperties.cs new file mode 100644 index 0000000000000..2ac03fe175437 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowEnvelopeProperties.cs @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// Additional workflow properties. + public partial class WorkflowEnvelopeProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal WorkflowEnvelopeProperties() + { + Files = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// Gets or sets the files. + /// Gets or sets the state of the workflow. + /// Gets or sets workflow health. + /// Keeps track of any properties unknown to the library. + internal WorkflowEnvelopeProperties(IReadOnlyDictionary files, WorkflowState? flowState, WorkflowHealth health, IDictionary serializedAdditionalRawData) + { + Files = files; + FlowState = flowState; + Health = health; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// + /// Gets or sets the files. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + [WirePath("files")] + public IReadOnlyDictionary Files { get; } + /// Gets or sets the state of the workflow. + [WirePath("flowState")] + public WorkflowState? FlowState { get; } + /// Gets or sets workflow health. + [WirePath("health")] + public WorkflowHealth Health { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowExpression.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowExpression.Serialization.cs new file mode 100644 index 0000000000000..5c97641e84ddb --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowExpression.Serialization.cs @@ -0,0 +1,279 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class WorkflowExpression : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowExpression)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Text)) + { + writer.WritePropertyName("text"u8); + writer.WriteStringValue(Text); + } + if (Optional.IsDefined(Value)) + { + writer.WritePropertyName("value"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Value); +#else + using (JsonDocument document = JsonDocument.Parse(Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + if (Optional.IsCollectionDefined(Subexpressions)) + { + writer.WritePropertyName("subexpressions"u8); + writer.WriteStartArray(); + foreach (var item in Subexpressions) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Error)) + { + writer.WritePropertyName("error"u8); + writer.WriteObjectValue(Error, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WorkflowExpression IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowExpression)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWorkflowExpression(document.RootElement, options); + } + + internal static WorkflowExpression DeserializeWorkflowExpression(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string text = default; + BinaryData value = default; + IReadOnlyList subexpressions = default; + WorkflowExpressionResourceErrorInfo error = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("text"u8)) + { + text = property.Value.GetString(); + continue; + } + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + value = BinaryData.FromString(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("subexpressions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DeserializeWorkflowExpression(item, options)); + } + subexpressions = array; + continue; + } + if (property.NameEquals("error"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + error = WorkflowExpressionResourceErrorInfo.DeserializeWorkflowExpressionResourceErrorInfo(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WorkflowExpression(text, value, subexpressions ?? new ChangeTrackingList(), error, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Text), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" text: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Text)) + { + builder.Append(" text: "); + if (Text.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Text}'''"); + } + else + { + builder.AppendLine($"'{Text}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Value)) + { + builder.Append(" value: "); + builder.AppendLine($"'{Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Subexpressions), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" subexpressions: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Subexpressions)) + { + if (Subexpressions.Any()) + { + builder.Append(" subexpressions: "); + builder.AppendLine("["); + foreach (var item in Subexpressions) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " subexpressions: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Error), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" error: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Error)) + { + builder.Append(" error: "); + BicepSerializationHelpers.AppendChildObject(builder, Error, options, 2, false, " error: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WorkflowExpression)} does not support writing '{options.Format}' format."); + } + } + + WorkflowExpression IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWorkflowExpression(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WorkflowExpression)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowExpression.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowExpression.cs new file mode 100644 index 0000000000000..ade94d63413c8 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowExpression.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The expression. + public partial class WorkflowExpression + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal WorkflowExpression() + { + Subexpressions = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The text. + /// Anything. + /// The sub expressions. + /// The azure resource error info. + /// Keeps track of any properties unknown to the library. + internal WorkflowExpression(string text, BinaryData value, IReadOnlyList subexpressions, WorkflowExpressionResourceErrorInfo error, IDictionary serializedAdditionalRawData) + { + Text = text; + Value = value; + Subexpressions = subexpressions; + Error = error; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The text. + [WirePath("text")] + public string Text { get; } + /// + /// Anything + /// + /// To assign an object to this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + [WirePath("value")] + public BinaryData Value { get; } + /// The sub expressions. + [WirePath("subexpressions")] + public IReadOnlyList Subexpressions { get; } + /// The azure resource error info. + [WirePath("error")] + public WorkflowExpressionResourceErrorInfo Error { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowExpressionResourceErrorInfo.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowExpressionResourceErrorInfo.Serialization.cs new file mode 100644 index 0000000000000..ee2dfed8c831b --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowExpressionResourceErrorInfo.Serialization.cs @@ -0,0 +1,240 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class WorkflowExpressionResourceErrorInfo : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowExpressionResourceErrorInfo)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("message"u8); + writer.WriteStringValue(Message); + if (Optional.IsCollectionDefined(Details)) + { + writer.WritePropertyName("details"u8); + writer.WriteStartArray(); + foreach (var item in Details) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("code"u8); + writer.WriteStringValue(Code); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WorkflowExpressionResourceErrorInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowExpressionResourceErrorInfo)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWorkflowExpressionResourceErrorInfo(document.RootElement, options); + } + + internal static WorkflowExpressionResourceErrorInfo DeserializeWorkflowExpressionResourceErrorInfo(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string message = default; + IReadOnlyList details = default; + string code = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("message"u8)) + { + message = property.Value.GetString(); + continue; + } + if (property.NameEquals("details"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DeserializeWorkflowExpressionResourceErrorInfo(item, options)); + } + details = array; + continue; + } + if (property.NameEquals("code"u8)) + { + code = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WorkflowExpressionResourceErrorInfo(code, serializedAdditionalRawData, message, details ?? new ChangeTrackingList()); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Message), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" message: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Message)) + { + builder.Append(" message: "); + if (Message.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Message}'''"); + } + else + { + builder.AppendLine($"'{Message}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Details), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" details: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Details)) + { + if (Details.Any()) + { + builder.Append(" details: "); + builder.AppendLine("["); + foreach (var item in Details) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " details: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Code), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" code: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Code)) + { + builder.Append(" code: "); + if (Code.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Code}'''"); + } + else + { + builder.AppendLine($"'{Code}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WorkflowExpressionResourceErrorInfo)} does not support writing '{options.Format}' format."); + } + } + + WorkflowExpressionResourceErrorInfo IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWorkflowExpressionResourceErrorInfo(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WorkflowExpressionResourceErrorInfo)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowExpressionResourceErrorInfo.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowExpressionResourceErrorInfo.cs new file mode 100644 index 0000000000000..149f518b4d1df --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowExpressionResourceErrorInfo.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The azure resource error info. + public partial class WorkflowExpressionResourceErrorInfo : WebAppErrorInfo + { + /// Initializes a new instance of . + /// The error code. + /// The error message. + /// or is null. + internal WorkflowExpressionResourceErrorInfo(string code, string message) : base(code) + { + Argument.AssertNotNull(code, nameof(code)); + Argument.AssertNotNull(message, nameof(message)); + + Message = message; + Details = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The error code. + /// Keeps track of any properties unknown to the library. + /// The error message. + /// The error details. + internal WorkflowExpressionResourceErrorInfo(string code, IDictionary serializedAdditionalRawData, string message, IReadOnlyList details) : base(code, serializedAdditionalRawData) + { + Message = message; + Details = details; + } + + /// Initializes a new instance of for deserialization. + internal WorkflowExpressionResourceErrorInfo() + { + } + + /// The error message. + [WirePath("message")] + public string Message { get; } + /// The error details. + [WirePath("details")] + public IReadOnlyList Details { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowExpressionRoot.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowExpressionRoot.Serialization.cs new file mode 100644 index 0000000000000..44bfd04854d29 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowExpressionRoot.Serialization.cs @@ -0,0 +1,319 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class WorkflowExpressionRoot : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowExpressionRoot)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Path)) + { + writer.WritePropertyName("path"u8); + writer.WriteStringValue(Path); + } + if (Optional.IsDefined(Text)) + { + writer.WritePropertyName("text"u8); + writer.WriteStringValue(Text); + } + if (Optional.IsDefined(Value)) + { + writer.WritePropertyName("value"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Value); +#else + using (JsonDocument document = JsonDocument.Parse(Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + if (Optional.IsCollectionDefined(Subexpressions)) + { + writer.WritePropertyName("subexpressions"u8); + writer.WriteStartArray(); + foreach (var item in Subexpressions) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Error)) + { + writer.WritePropertyName("error"u8); + writer.WriteObjectValue(Error, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WorkflowExpressionRoot IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowExpressionRoot)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWorkflowExpressionRoot(document.RootElement, options); + } + + internal static WorkflowExpressionRoot DeserializeWorkflowExpressionRoot(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string path = default; + string text = default; + BinaryData value = default; + IReadOnlyList subexpressions = default; + WorkflowExpressionResourceErrorInfo error = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("path"u8)) + { + path = property.Value.GetString(); + continue; + } + if (property.NameEquals("text"u8)) + { + text = property.Value.GetString(); + continue; + } + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + value = BinaryData.FromString(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("subexpressions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DeserializeWorkflowExpression(item, options)); + } + subexpressions = array; + continue; + } + if (property.NameEquals("error"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + error = WorkflowExpressionResourceErrorInfo.DeserializeWorkflowExpressionResourceErrorInfo(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WorkflowExpressionRoot( + text, + value, + subexpressions ?? new ChangeTrackingList(), + error, + serializedAdditionalRawData, + path); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Path), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" path: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Path)) + { + builder.Append(" path: "); + if (Path.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Path}'''"); + } + else + { + builder.AppendLine($"'{Path}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Text), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" text: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Text)) + { + builder.Append(" text: "); + if (Text.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Text}'''"); + } + else + { + builder.AppendLine($"'{Text}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Value)) + { + builder.Append(" value: "); + builder.AppendLine($"'{Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Subexpressions), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" subexpressions: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Subexpressions)) + { + if (Subexpressions.Any()) + { + builder.Append(" subexpressions: "); + builder.AppendLine("["); + foreach (var item in Subexpressions) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " subexpressions: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Error), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" error: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Error)) + { + builder.Append(" error: "); + BicepSerializationHelpers.AppendChildObject(builder, Error, options, 2, false, " error: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WorkflowExpressionRoot)} does not support writing '{options.Format}' format."); + } + } + + WorkflowExpressionRoot IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWorkflowExpressionRoot(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WorkflowExpressionRoot)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowExpressionRoot.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowExpressionRoot.cs new file mode 100644 index 0000000000000..a04037661713e --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowExpressionRoot.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The expression root. + public partial class WorkflowExpressionRoot : WorkflowExpression + { + /// Initializes a new instance of . + internal WorkflowExpressionRoot() + { + } + + /// Initializes a new instance of . + /// The text. + /// Anything. + /// The sub expressions. + /// The azure resource error info. + /// Keeps track of any properties unknown to the library. + /// The path. + internal WorkflowExpressionRoot(string text, BinaryData value, IReadOnlyList subexpressions, WorkflowExpressionResourceErrorInfo error, IDictionary serializedAdditionalRawData, string path) : base(text, value, subexpressions, error, serializedAdditionalRawData) + { + Path = path; + } + + /// The path. + [WirePath("path")] + public string Path { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowHealth.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowHealth.Serialization.cs new file mode 100644 index 0000000000000..d8e009af1c620 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowHealth.Serialization.cs @@ -0,0 +1,179 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class WorkflowHealth : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowHealth)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.ToSerialString()); + if (Optional.IsDefined(Error)) + { + writer.WritePropertyName("error"u8); + JsonSerializer.Serialize(writer, Error); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WorkflowHealth IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowHealth)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWorkflowHealth(document.RootElement, options); + } + + internal static WorkflowHealth DeserializeWorkflowHealth(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + WorkflowHealthState state = default; + ResponseError error = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("state"u8)) + { + state = property.Value.GetString().ToWorkflowHealthState(); + continue; + } + if (property.NameEquals("error"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + error = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WorkflowHealth(state, error, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(State), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" state: "); + builder.AppendLine(propertyOverride); + } + else + { + builder.Append(" state: "); + builder.AppendLine($"'{State.ToSerialString()}'"); + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Error), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" error: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Error)) + { + builder.Append(" error: "); + builder.AppendLine($"'{Error.ToString()}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WorkflowHealth)} does not support writing '{options.Format}' format."); + } + } + + WorkflowHealth IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWorkflowHealth(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WorkflowHealth)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowHealth.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowHealth.cs new file mode 100644 index 0000000000000..34452a6026900 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowHealth.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// Represents the workflow health. + public partial class WorkflowHealth + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Gets or sets the workflow health state. + internal WorkflowHealth(WorkflowHealthState state) + { + State = state; + } + + /// Initializes a new instance of . + /// Gets or sets the workflow health state. + /// Gets or sets the workflow error. + /// Keeps track of any properties unknown to the library. + internal WorkflowHealth(WorkflowHealthState state, ResponseError error, IDictionary serializedAdditionalRawData) + { + State = state; + Error = error; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal WorkflowHealth() + { + } + + /// Gets or sets the workflow health state. + [WirePath("state")] + public WorkflowHealthState State { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowHealthState.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowHealthState.Serialization.cs new file mode 100644 index 0000000000000..970c0d3b638c3 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowHealthState.Serialization.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.AppService.Models +{ + internal static partial class WorkflowHealthStateExtensions + { + public static string ToSerialString(this WorkflowHealthState value) => value switch + { + WorkflowHealthState.Unknown => "Unknown", + WorkflowHealthState.NotSpecified => "NotSpecified", + WorkflowHealthState.Healthy => "Healthy", + WorkflowHealthState.Unhealthy => "Unhealthy", + _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown WorkflowHealthState value.") + }; + + public static WorkflowHealthState ToWorkflowHealthState(this string value) + { + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Unknown")) return WorkflowHealthState.Unknown; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "NotSpecified")) return WorkflowHealthState.NotSpecified; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Healthy")) return WorkflowHealthState.Healthy; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Unhealthy")) return WorkflowHealthState.Unhealthy; + throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown WorkflowHealthState value."); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowHealthState.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowHealthState.cs new file mode 100644 index 0000000000000..fa0f425141d2a --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowHealthState.cs @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.AppService.Models +{ + /// Gets or sets the workflow health state. + public enum WorkflowHealthState + { + /// Unknown. + Unknown, + /// NotSpecified. + NotSpecified, + /// Healthy. + Healthy, + /// Unhealthy. + Unhealthy + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowOutputContent.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowOutputContent.Serialization.cs new file mode 100644 index 0000000000000..12f251bbb8ac6 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowOutputContent.Serialization.cs @@ -0,0 +1,310 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class WorkflowOutputContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowOutputContent)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsDefined(Error)) + { + writer.WritePropertyName("error"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Error); +#else + using (JsonDocument document = JsonDocument.Parse(Error)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + if (Optional.IsDefined(WebAppParameterType)) + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(WebAppParameterType.Value.ToString()); + } + if (Optional.IsDefined(Value)) + { + writer.WritePropertyName("value"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Value); +#else + using (JsonDocument document = JsonDocument.Parse(Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + if (Optional.IsDefined(Metadata)) + { + writer.WritePropertyName("metadata"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Metadata); +#else + using (JsonDocument document = JsonDocument.Parse(Metadata)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WorkflowOutputContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowOutputContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWorkflowOutputContent(document.RootElement, options); + } + + internal static WorkflowOutputContent DeserializeWorkflowOutputContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + BinaryData error = default; + WebAppParameterType? type = default; + BinaryData value = default; + BinaryData metadata = default; + string description = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("error"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + error = BinaryData.FromString(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("type"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + type = new WebAppParameterType(property.Value.GetString()); + continue; + } + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + value = BinaryData.FromString(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("metadata"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + metadata = BinaryData.FromString(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WorkflowOutputContent( + type, + value, + metadata, + description, + serializedAdditionalRawData, + error); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Error), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" error: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Error)) + { + builder.Append(" error: "); + builder.AppendLine($"'{Error.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(WebAppParameterType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" type: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(WebAppParameterType)) + { + builder.Append(" type: "); + builder.AppendLine($"'{WebAppParameterType.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Value)) + { + builder.Append(" value: "); + builder.AppendLine($"'{Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Metadata), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" metadata: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Metadata)) + { + builder.Append(" metadata: "); + builder.AppendLine($"'{Metadata.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Description), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" description: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Description)) + { + builder.Append(" description: "); + if (Description.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Description}'''"); + } + else + { + builder.AppendLine($"'{Description}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WorkflowOutputContent)} does not support writing '{options.Format}' format."); + } + } + + WorkflowOutputContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWorkflowOutputContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WorkflowOutputContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowOutputContent.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowOutputContent.cs new file mode 100644 index 0000000000000..37a2500196ebe --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowOutputContent.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The workflow output parameter. + public partial class WorkflowOutputContent : WorkflowContent + { + /// Initializes a new instance of . + public WorkflowOutputContent() + { + } + + /// Initializes a new instance of . + /// The type. + /// The value. + /// The metadata. + /// The description. + /// Keeps track of any properties unknown to the library. + /// Gets the error. + internal WorkflowOutputContent(WebAppParameterType? webAppParameterType, BinaryData value, BinaryData metadata, string description, IDictionary serializedAdditionalRawData, BinaryData error) : base(webAppParameterType, value, metadata, description, serializedAdditionalRawData) + { + Error = error; + } + + /// + /// Gets the error. + /// + /// To assign an object to this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + [WirePath("error")] + public BinaryData Error { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowProvisioningState.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowProvisioningState.cs new file mode 100644 index 0000000000000..8da83d96372ec --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowProvisioningState.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The workflow provisioning state. + public readonly partial struct WorkflowProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public WorkflowProvisioningState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NotSpecifiedValue = "NotSpecified"; + private const string AcceptedValue = "Accepted"; + private const string RunningValue = "Running"; + private const string ReadyValue = "Ready"; + private const string CreatingValue = "Creating"; + private const string CreatedValue = "Created"; + private const string DeletingValue = "Deleting"; + private const string DeletedValue = "Deleted"; + private const string CanceledValue = "Canceled"; + private const string FailedValue = "Failed"; + private const string SucceededValue = "Succeeded"; + private const string MovingValue = "Moving"; + private const string UpdatingValue = "Updating"; + private const string RegisteringValue = "Registering"; + private const string RegisteredValue = "Registered"; + private const string UnregisteringValue = "Unregistering"; + private const string UnregisteredValue = "Unregistered"; + private const string CompletedValue = "Completed"; + private const string RenewingValue = "Renewing"; + private const string PendingValue = "Pending"; + private const string WaitingValue = "Waiting"; + private const string InProgressValue = "InProgress"; + + /// NotSpecified. + public static WorkflowProvisioningState NotSpecified { get; } = new WorkflowProvisioningState(NotSpecifiedValue); + /// Accepted. + public static WorkflowProvisioningState Accepted { get; } = new WorkflowProvisioningState(AcceptedValue); + /// Running. + public static WorkflowProvisioningState Running { get; } = new WorkflowProvisioningState(RunningValue); + /// Ready. + public static WorkflowProvisioningState Ready { get; } = new WorkflowProvisioningState(ReadyValue); + /// Creating. + public static WorkflowProvisioningState Creating { get; } = new WorkflowProvisioningState(CreatingValue); + /// Created. + public static WorkflowProvisioningState Created { get; } = new WorkflowProvisioningState(CreatedValue); + /// Deleting. + public static WorkflowProvisioningState Deleting { get; } = new WorkflowProvisioningState(DeletingValue); + /// Deleted. + public static WorkflowProvisioningState Deleted { get; } = new WorkflowProvisioningState(DeletedValue); + /// Canceled. + public static WorkflowProvisioningState Canceled { get; } = new WorkflowProvisioningState(CanceledValue); + /// Failed. + public static WorkflowProvisioningState Failed { get; } = new WorkflowProvisioningState(FailedValue); + /// Succeeded. + public static WorkflowProvisioningState Succeeded { get; } = new WorkflowProvisioningState(SucceededValue); + /// Moving. + public static WorkflowProvisioningState Moving { get; } = new WorkflowProvisioningState(MovingValue); + /// Updating. + public static WorkflowProvisioningState Updating { get; } = new WorkflowProvisioningState(UpdatingValue); + /// Registering. + public static WorkflowProvisioningState Registering { get; } = new WorkflowProvisioningState(RegisteringValue); + /// Registered. + public static WorkflowProvisioningState Registered { get; } = new WorkflowProvisioningState(RegisteredValue); + /// Unregistering. + public static WorkflowProvisioningState Unregistering { get; } = new WorkflowProvisioningState(UnregisteringValue); + /// Unregistered. + public static WorkflowProvisioningState Unregistered { get; } = new WorkflowProvisioningState(UnregisteredValue); + /// Completed. + public static WorkflowProvisioningState Completed { get; } = new WorkflowProvisioningState(CompletedValue); + /// Renewing. + public static WorkflowProvisioningState Renewing { get; } = new WorkflowProvisioningState(RenewingValue); + /// Pending. + public static WorkflowProvisioningState Pending { get; } = new WorkflowProvisioningState(PendingValue); + /// Waiting. + public static WorkflowProvisioningState Waiting { get; } = new WorkflowProvisioningState(WaitingValue); + /// InProgress. + public static WorkflowProvisioningState InProgress { get; } = new WorkflowProvisioningState(InProgressValue); + /// Determines if two values are the same. + public static bool operator ==(WorkflowProvisioningState left, WorkflowProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(WorkflowProvisioningState left, WorkflowProvisioningState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator WorkflowProvisioningState(string value) => new WorkflowProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is WorkflowProvisioningState other && Equals(other); + /// + public bool Equals(WorkflowProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRecurrenceFrequency.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRecurrenceFrequency.cs new file mode 100644 index 0000000000000..d95d87b8a6f07 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRecurrenceFrequency.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The recurrence frequency. + public readonly partial struct WorkflowRecurrenceFrequency : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public WorkflowRecurrenceFrequency(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NotSpecifiedValue = "NotSpecified"; + private const string SecondValue = "Second"; + private const string MinuteValue = "Minute"; + private const string HourValue = "Hour"; + private const string DayValue = "Day"; + private const string WeekValue = "Week"; + private const string MonthValue = "Month"; + private const string YearValue = "Year"; + + /// NotSpecified. + public static WorkflowRecurrenceFrequency NotSpecified { get; } = new WorkflowRecurrenceFrequency(NotSpecifiedValue); + /// Second. + public static WorkflowRecurrenceFrequency Second { get; } = new WorkflowRecurrenceFrequency(SecondValue); + /// Minute. + public static WorkflowRecurrenceFrequency Minute { get; } = new WorkflowRecurrenceFrequency(MinuteValue); + /// Hour. + public static WorkflowRecurrenceFrequency Hour { get; } = new WorkflowRecurrenceFrequency(HourValue); + /// Day. + public static WorkflowRecurrenceFrequency Day { get; } = new WorkflowRecurrenceFrequency(DayValue); + /// Week. + public static WorkflowRecurrenceFrequency Week { get; } = new WorkflowRecurrenceFrequency(WeekValue); + /// Month. + public static WorkflowRecurrenceFrequency Month { get; } = new WorkflowRecurrenceFrequency(MonthValue); + /// Year. + public static WorkflowRecurrenceFrequency Year { get; } = new WorkflowRecurrenceFrequency(YearValue); + /// Determines if two values are the same. + public static bool operator ==(WorkflowRecurrenceFrequency left, WorkflowRecurrenceFrequency right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(WorkflowRecurrenceFrequency left, WorkflowRecurrenceFrequency right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator WorkflowRecurrenceFrequency(string value) => new WorkflowRecurrenceFrequency(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is WorkflowRecurrenceFrequency other && Equals(other); + /// + public bool Equals(WorkflowRecurrenceFrequency other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRecurrenceSchedule.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRecurrenceSchedule.Serialization.cs new file mode 100644 index 0000000000000..c60bfb05e2ef8 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRecurrenceSchedule.Serialization.cs @@ -0,0 +1,376 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class WorkflowRecurrenceSchedule : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowRecurrenceSchedule)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Minutes)) + { + writer.WritePropertyName("minutes"u8); + writer.WriteStartArray(); + foreach (var item in Minutes) + { + writer.WriteNumberValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Hours)) + { + writer.WritePropertyName("hours"u8); + writer.WriteStartArray(); + foreach (var item in Hours) + { + writer.WriteNumberValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(WeekDays)) + { + writer.WritePropertyName("weekDays"u8); + writer.WriteStartArray(); + foreach (var item in WeekDays) + { + writer.WriteStringValue(item.ToSerialString()); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(MonthDays)) + { + writer.WritePropertyName("monthDays"u8); + writer.WriteStartArray(); + foreach (var item in MonthDays) + { + writer.WriteNumberValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(MonthlyOccurrences)) + { + writer.WritePropertyName("monthlyOccurrences"u8); + writer.WriteStartArray(); + foreach (var item in MonthlyOccurrences) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WorkflowRecurrenceSchedule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowRecurrenceSchedule)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWorkflowRecurrenceSchedule(document.RootElement, options); + } + + internal static WorkflowRecurrenceSchedule DeserializeWorkflowRecurrenceSchedule(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList minutes = default; + IReadOnlyList hours = default; + IReadOnlyList weekDays = default; + IReadOnlyList monthDays = default; + IReadOnlyList monthlyOccurrences = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("minutes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetInt32()); + } + minutes = array; + continue; + } + if (property.NameEquals("hours"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetInt32()); + } + hours = array; + continue; + } + if (property.NameEquals("weekDays"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString().ToWebAppDayOfWeek()); + } + weekDays = array; + continue; + } + if (property.NameEquals("monthDays"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetInt32()); + } + monthDays = array; + continue; + } + if (property.NameEquals("monthlyOccurrences"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(RecurrenceScheduleOccurrence.DeserializeRecurrenceScheduleOccurrence(item, options)); + } + monthlyOccurrences = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WorkflowRecurrenceSchedule( + minutes ?? new ChangeTrackingList(), + hours ?? new ChangeTrackingList(), + weekDays ?? new ChangeTrackingList(), + monthDays ?? new ChangeTrackingList(), + monthlyOccurrences ?? new ChangeTrackingList(), + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Minutes), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" minutes: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Minutes)) + { + if (Minutes.Any()) + { + builder.Append(" minutes: "); + builder.AppendLine("["); + foreach (var item in Minutes) + { + builder.AppendLine($" {item}"); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Hours), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" hours: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Hours)) + { + if (Hours.Any()) + { + builder.Append(" hours: "); + builder.AppendLine("["); + foreach (var item in Hours) + { + builder.AppendLine($" {item}"); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(WeekDays), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" weekDays: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(WeekDays)) + { + if (WeekDays.Any()) + { + builder.Append(" weekDays: "); + builder.AppendLine("["); + foreach (var item in WeekDays) + { + builder.AppendLine($" '{item.ToSerialString()}'"); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(MonthDays), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" monthDays: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(MonthDays)) + { + if (MonthDays.Any()) + { + builder.Append(" monthDays: "); + builder.AppendLine("["); + foreach (var item in MonthDays) + { + builder.AppendLine($" {item}"); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(MonthlyOccurrences), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" monthlyOccurrences: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(MonthlyOccurrences)) + { + if (MonthlyOccurrences.Any()) + { + builder.Append(" monthlyOccurrences: "); + builder.AppendLine("["); + foreach (var item in MonthlyOccurrences) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " monthlyOccurrences: "); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WorkflowRecurrenceSchedule)} does not support writing '{options.Format}' format."); + } + } + + WorkflowRecurrenceSchedule IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWorkflowRecurrenceSchedule(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WorkflowRecurrenceSchedule)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRecurrenceSchedule.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRecurrenceSchedule.cs new file mode 100644 index 0000000000000..36200ebfbe77a --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRecurrenceSchedule.cs @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The recurrence schedule. + public partial class WorkflowRecurrenceSchedule + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal WorkflowRecurrenceSchedule() + { + Minutes = new ChangeTrackingList(); + Hours = new ChangeTrackingList(); + WeekDays = new ChangeTrackingList(); + MonthDays = new ChangeTrackingList(); + MonthlyOccurrences = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The minutes. + /// The hours. + /// The days of the week. + /// The month days. + /// The monthly occurrences. + /// Keeps track of any properties unknown to the library. + internal WorkflowRecurrenceSchedule(IReadOnlyList minutes, IReadOnlyList hours, IReadOnlyList weekDays, IReadOnlyList monthDays, IReadOnlyList monthlyOccurrences, IDictionary serializedAdditionalRawData) + { + Minutes = minutes; + Hours = hours; + WeekDays = weekDays; + MonthDays = monthDays; + MonthlyOccurrences = monthlyOccurrences; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The minutes. + [WirePath("minutes")] + public IReadOnlyList Minutes { get; } + /// The hours. + [WirePath("hours")] + public IReadOnlyList Hours { get; } + /// The days of the week. + [WirePath("weekDays")] + public IReadOnlyList WeekDays { get; } + /// The month days. + [WirePath("monthDays")] + public IReadOnlyList MonthDays { get; } + /// The monthly occurrences. + [WirePath("monthlyOccurrences")] + public IReadOnlyList MonthlyOccurrences { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRegenerateActionContent.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRegenerateActionContent.Serialization.cs new file mode 100644 index 0000000000000..331b9ae1e8784 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRegenerateActionContent.Serialization.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class WorkflowRegenerateActionContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowRegenerateActionContent)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(KeyType)) + { + writer.WritePropertyName("keyType"u8); + writer.WriteStringValue(KeyType.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WorkflowRegenerateActionContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowRegenerateActionContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWorkflowRegenerateActionContent(document.RootElement, options); + } + + internal static WorkflowRegenerateActionContent DeserializeWorkflowRegenerateActionContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + WebAppKeyType? keyType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("keyType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + keyType = new WebAppKeyType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WorkflowRegenerateActionContent(keyType, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(WorkflowRegenerateActionContent)} does not support writing '{options.Format}' format."); + } + } + + WorkflowRegenerateActionContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWorkflowRegenerateActionContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WorkflowRegenerateActionContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRegenerateActionContent.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRegenerateActionContent.cs new file mode 100644 index 0000000000000..bcf6bf790270a --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRegenerateActionContent.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The access key regenerate action content. + public partial class WorkflowRegenerateActionContent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public WorkflowRegenerateActionContent() + { + } + + /// Initializes a new instance of . + /// The key type. + /// Keeps track of any properties unknown to the library. + internal WorkflowRegenerateActionContent(WebAppKeyType? keyType, IDictionary serializedAdditionalRawData) + { + KeyType = keyType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The key type. + [WirePath("keyType")] + public WebAppKeyType? KeyType { get; set; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowResourceReference.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowResourceReference.Serialization.cs new file mode 100644 index 0000000000000..e5dab9b89c6a5 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowResourceReference.Serialization.cs @@ -0,0 +1,208 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class WorkflowResourceReference : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowResourceReference)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (options.Format != "W" && Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W" && Optional.IsDefined(ResourceType)) + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(ResourceType.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WorkflowResourceReference IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowResourceReference)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWorkflowResourceReference(document.RootElement, options); + } + + internal static WorkflowResourceReference DeserializeWorkflowResourceReference(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier id = default; + string name = default; + ResourceType? type = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + type = new ResourceType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WorkflowResourceReference(id, name, type, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WorkflowResourceReference)} does not support writing '{options.Format}' format."); + } + } + + WorkflowResourceReference IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWorkflowResourceReference(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WorkflowResourceReference)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowResourceReference.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowResourceReference.cs new file mode 100644 index 0000000000000..d8d6494ce2e65 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowResourceReference.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The resource reference. + public partial class WorkflowResourceReference + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public WorkflowResourceReference() + { + } + + /// Initializes a new instance of . + /// The resource id. + /// Gets the resource name. + /// Gets the resource type. + /// Keeps track of any properties unknown to the library. + internal WorkflowResourceReference(ResourceIdentifier id, string name, ResourceType? resourceType, IDictionary serializedAdditionalRawData) + { + Id = id; + Name = name; + ResourceType = resourceType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource id. + [WirePath("id")] + public ResourceIdentifier Id { get; set; } + /// Gets the resource name. + [WirePath("name")] + public string Name { get; } + /// Gets the resource type. + [WirePath("type")] + public ResourceType? ResourceType { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRunActionListResult.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRunActionListResult.Serialization.cs new file mode 100644 index 0000000000000..db593e5601a91 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRunActionListResult.Serialization.cs @@ -0,0 +1,212 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + internal partial class WorkflowRunActionListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowRunActionListResult)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Value)) + { + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WorkflowRunActionListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowRunActionListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWorkflowRunActionListResult(document.RootElement, options); + } + + internal static WorkflowRunActionListResult DeserializeWorkflowRunActionListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + string nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(WorkflowRunActionData.DeserializeWorkflowRunActionData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WorkflowRunActionListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WorkflowRunActionListResult)} does not support writing '{options.Format}' format."); + } + } + + WorkflowRunActionListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWorkflowRunActionListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WorkflowRunActionListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRunActionListResult.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRunActionListResult.cs new file mode 100644 index 0000000000000..f3267563f4ff7 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRunActionListResult.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The list of workflow run actions. + internal partial class WorkflowRunActionListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal WorkflowRunActionListResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// A list of workflow run actions. + /// The URL to get the next set of results. + /// Keeps track of any properties unknown to the library. + internal WorkflowRunActionListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// A list of workflow run actions. + public IReadOnlyList Value { get; } + /// The URL to get the next set of results. + public string NextLink { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRunActionRepetitionDefinitionCollection.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRunActionRepetitionDefinitionCollection.Serialization.cs new file mode 100644 index 0000000000000..a481b47a9d82b --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRunActionRepetitionDefinitionCollection.Serialization.cs @@ -0,0 +1,212 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + internal partial class WorkflowRunActionRepetitionDefinitionCollection : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowRunActionRepetitionDefinitionCollection)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } + if (Optional.IsCollectionDefined(Value)) + { + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WorkflowRunActionRepetitionDefinitionCollection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowRunActionRepetitionDefinitionCollection)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWorkflowRunActionRepetitionDefinitionCollection(document.RootElement, options); + } + + internal static WorkflowRunActionRepetitionDefinitionCollection DeserializeWorkflowRunActionRepetitionDefinitionCollection(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string nextLink = default; + IReadOnlyList value = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(WorkflowRunActionRepetitionDefinitionData.DeserializeWorkflowRunActionRepetitionDefinitionData(item, options)); + } + value = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WorkflowRunActionRepetitionDefinitionCollection(nextLink, value ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WorkflowRunActionRepetitionDefinitionCollection)} does not support writing '{options.Format}' format."); + } + } + + WorkflowRunActionRepetitionDefinitionCollection IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWorkflowRunActionRepetitionDefinitionCollection(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WorkflowRunActionRepetitionDefinitionCollection)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRunActionRepetitionDefinitionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRunActionRepetitionDefinitionCollection.cs new file mode 100644 index 0000000000000..ac1785513f11b --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRunActionRepetitionDefinitionCollection.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// A collection of workflow run action repetitions. + internal partial class WorkflowRunActionRepetitionDefinitionCollection + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal WorkflowRunActionRepetitionDefinitionCollection() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The link used to get the next page of recommendations. + /// + /// Keeps track of any properties unknown to the library. + internal WorkflowRunActionRepetitionDefinitionCollection(string nextLink, IReadOnlyList value, IDictionary serializedAdditionalRawData) + { + NextLink = nextLink; + Value = value; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The link used to get the next page of recommendations. + public string NextLink { get; } + /// Gets the value. + public IReadOnlyList Value { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRunActionRepetitionIndex.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRunActionRepetitionIndex.Serialization.cs new file mode 100644 index 0000000000000..1b879cfe5e6f9 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRunActionRepetitionIndex.Serialization.cs @@ -0,0 +1,183 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class WorkflowRunActionRepetitionIndex : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowRunActionRepetitionIndex)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(ScopeName)) + { + writer.WritePropertyName("scopeName"u8); + writer.WriteStringValue(ScopeName); + } + writer.WritePropertyName("itemIndex"u8); + writer.WriteNumberValue(ItemIndex); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WorkflowRunActionRepetitionIndex IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowRunActionRepetitionIndex)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWorkflowRunActionRepetitionIndex(document.RootElement, options); + } + + internal static WorkflowRunActionRepetitionIndex DeserializeWorkflowRunActionRepetitionIndex(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string scopeName = default; + int itemIndex = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("scopeName"u8)) + { + scopeName = property.Value.GetString(); + continue; + } + if (property.NameEquals("itemIndex"u8)) + { + itemIndex = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WorkflowRunActionRepetitionIndex(scopeName, itemIndex, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ScopeName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" scopeName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ScopeName)) + { + builder.Append(" scopeName: "); + if (ScopeName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ScopeName}'''"); + } + else + { + builder.AppendLine($"'{ScopeName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ItemIndex), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" itemIndex: "); + builder.AppendLine(propertyOverride); + } + else + { + builder.Append(" itemIndex: "); + builder.AppendLine($"{ItemIndex}"); + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WorkflowRunActionRepetitionIndex)} does not support writing '{options.Format}' format."); + } + } + + WorkflowRunActionRepetitionIndex IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWorkflowRunActionRepetitionIndex(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WorkflowRunActionRepetitionIndex)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRunActionRepetitionIndex.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRunActionRepetitionIndex.cs new file mode 100644 index 0000000000000..ae96281d37e81 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRunActionRepetitionIndex.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The workflow run action repetition index. + public partial class WorkflowRunActionRepetitionIndex + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The index. + public WorkflowRunActionRepetitionIndex(int itemIndex) + { + ItemIndex = itemIndex; + } + + /// Initializes a new instance of . + /// The scope. + /// The index. + /// Keeps track of any properties unknown to the library. + internal WorkflowRunActionRepetitionIndex(string scopeName, int itemIndex, IDictionary serializedAdditionalRawData) + { + ScopeName = scopeName; + ItemIndex = itemIndex; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal WorkflowRunActionRepetitionIndex() + { + } + + /// The scope. + [WirePath("scopeName")] + public string ScopeName { get; set; } + /// The index. + [WirePath("itemIndex")] + public int ItemIndex { get; set; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRunListResult.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRunListResult.Serialization.cs new file mode 100644 index 0000000000000..cff22f4b50b9d --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRunListResult.Serialization.cs @@ -0,0 +1,212 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + internal partial class WorkflowRunListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowRunListResult)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Value)) + { + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WorkflowRunListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowRunListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWorkflowRunListResult(document.RootElement, options); + } + + internal static WorkflowRunListResult DeserializeWorkflowRunListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + string nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(WorkflowRunData.DeserializeWorkflowRunData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WorkflowRunListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WorkflowRunListResult)} does not support writing '{options.Format}' format."); + } + } + + WorkflowRunListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWorkflowRunListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WorkflowRunListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRunListResult.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRunListResult.cs new file mode 100644 index 0000000000000..48183ea3d1fdf --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRunListResult.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The list of workflow runs. + internal partial class WorkflowRunListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal WorkflowRunListResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// A list of workflow runs. + /// The URL to get the next set of results. + /// Keeps track of any properties unknown to the library. + internal WorkflowRunListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// A list of workflow runs. + public IReadOnlyList Value { get; } + /// The URL to get the next set of results. + public string NextLink { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRunTrigger.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRunTrigger.Serialization.cs new file mode 100644 index 0000000000000..7c8c46353c0d5 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRunTrigger.Serialization.cs @@ -0,0 +1,610 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class WorkflowRunTrigger : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowRunTrigger)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W" && Optional.IsDefined(Inputs)) + { + writer.WritePropertyName("inputs"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Inputs); +#else + using (JsonDocument document = JsonDocument.Parse(Inputs)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + if (options.Format != "W" && Optional.IsDefined(InputsLink)) + { + writer.WritePropertyName("inputsLink"u8); + writer.WriteObjectValue(InputsLink, options); + } + if (options.Format != "W" && Optional.IsDefined(Outputs)) + { + writer.WritePropertyName("outputs"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Outputs); +#else + using (JsonDocument document = JsonDocument.Parse(Outputs)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + if (options.Format != "W" && Optional.IsDefined(OutputsLink)) + { + writer.WritePropertyName("outputsLink"u8); + writer.WriteObjectValue(OutputsLink, options); + } + if (options.Format != "W" && Optional.IsDefined(ScheduledOn)) + { + writer.WritePropertyName("scheduledTime"u8); + writer.WriteStringValue(ScheduledOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(StartOn)) + { + writer.WritePropertyName("startTime"u8); + writer.WriteStringValue(StartOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(EndOn)) + { + writer.WritePropertyName("endTime"u8); + writer.WriteStringValue(EndOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(TrackingId)) + { + writer.WritePropertyName("trackingId"u8); + writer.WriteStringValue(TrackingId); + } + if (Optional.IsDefined(Correlation)) + { + writer.WritePropertyName("correlation"u8); + writer.WriteObjectValue(Correlation, options); + } + if (options.Format != "W" && Optional.IsDefined(Code)) + { + writer.WritePropertyName("code"u8); + writer.WriteStringValue(Code); + } + if (options.Format != "W" && Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(Error)) + { + writer.WritePropertyName("error"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Error); +#else + using (JsonDocument document = JsonDocument.Parse(Error)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + if (options.Format != "W" && Optional.IsDefined(TrackedProperties)) + { + writer.WritePropertyName("trackedProperties"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(TrackedProperties); +#else + using (JsonDocument document = JsonDocument.Parse(TrackedProperties)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WorkflowRunTrigger IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowRunTrigger)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWorkflowRunTrigger(document.RootElement, options); + } + + internal static WorkflowRunTrigger DeserializeWorkflowRunTrigger(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + BinaryData inputs = default; + WebAppContentLink inputsLink = default; + BinaryData outputs = default; + WebAppContentLink outputsLink = default; + DateTimeOffset? scheduledTime = default; + DateTimeOffset? startTime = default; + DateTimeOffset? endTime = default; + string trackingId = default; + Correlation correlation = default; + string code = default; + WorkflowStatus? status = default; + BinaryData error = default; + BinaryData trackedProperties = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("inputs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + inputs = BinaryData.FromString(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("inputsLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + inputsLink = WebAppContentLink.DeserializeWebAppContentLink(property.Value, options); + continue; + } + if (property.NameEquals("outputs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + outputs = BinaryData.FromString(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("outputsLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + outputsLink = WebAppContentLink.DeserializeWebAppContentLink(property.Value, options); + continue; + } + if (property.NameEquals("scheduledTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + scheduledTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("startTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + startTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("endTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("trackingId"u8)) + { + trackingId = property.Value.GetString(); + continue; + } + if (property.NameEquals("correlation"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + correlation = Correlation.DeserializeCorrelation(property.Value, options); + continue; + } + if (property.NameEquals("code"u8)) + { + code = property.Value.GetString(); + continue; + } + if (property.NameEquals("status"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = new WorkflowStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("error"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + error = BinaryData.FromString(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("trackedProperties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + trackedProperties = BinaryData.FromString(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WorkflowRunTrigger( + name, + inputs, + inputsLink, + outputs, + outputsLink, + scheduledTime, + startTime, + endTime, + trackingId, + correlation, + code, + status, + error, + trackedProperties, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Inputs), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" inputs: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Inputs)) + { + builder.Append(" inputs: "); + builder.AppendLine($"'{Inputs.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(InputsLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" inputsLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(InputsLink)) + { + builder.Append(" inputsLink: "); + BicepSerializationHelpers.AppendChildObject(builder, InputsLink, options, 2, false, " inputsLink: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Outputs), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" outputs: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Outputs)) + { + builder.Append(" outputs: "); + builder.AppendLine($"'{Outputs.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(OutputsLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" outputsLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(OutputsLink)) + { + builder.Append(" outputsLink: "); + BicepSerializationHelpers.AppendChildObject(builder, OutputsLink, options, 2, false, " outputsLink: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ScheduledOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" scheduledTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ScheduledOn)) + { + builder.Append(" scheduledTime: "); + var formattedDateTimeString = TypeFormatters.ToString(ScheduledOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(StartOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" startTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(StartOn)) + { + builder.Append(" startTime: "); + var formattedDateTimeString = TypeFormatters.ToString(StartOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EndOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" endTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(EndOn)) + { + builder.Append(" endTime: "); + var formattedDateTimeString = TypeFormatters.ToString(EndOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TrackingId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" trackingId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TrackingId)) + { + builder.Append(" trackingId: "); + if (TrackingId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{TrackingId}'''"); + } + else + { + builder.AppendLine($"'{TrackingId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("CorrelationClientTrackingId", out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" correlation: "); + builder.AppendLine("{"); + builder.Append(" clientTrackingId: "); + builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); + } + else + { + if (Optional.IsDefined(Correlation)) + { + builder.Append(" correlation: "); + BicepSerializationHelpers.AppendChildObject(builder, Correlation, options, 2, false, " correlation: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Code), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" code: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Code)) + { + builder.Append(" code: "); + if (Code.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Code}'''"); + } + else + { + builder.AppendLine($"'{Code}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Status), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" status: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Status)) + { + builder.Append(" status: "); + builder.AppendLine($"'{Status.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Error), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" error: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Error)) + { + builder.Append(" error: "); + builder.AppendLine($"'{Error.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TrackedProperties), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" trackedProperties: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TrackedProperties)) + { + builder.Append(" trackedProperties: "); + builder.AppendLine($"'{TrackedProperties.ToString()}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WorkflowRunTrigger)} does not support writing '{options.Format}' format."); + } + } + + WorkflowRunTrigger IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWorkflowRunTrigger(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WorkflowRunTrigger)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRunTrigger.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRunTrigger.cs new file mode 100644 index 0000000000000..718461a0f40a5 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRunTrigger.cs @@ -0,0 +1,253 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The workflow run trigger. + public partial class WorkflowRunTrigger + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal WorkflowRunTrigger() + { + } + + /// Initializes a new instance of . + /// Gets the name. + /// Gets the inputs. + /// Gets the link to inputs. + /// Gets the outputs. + /// Gets the link to outputs. + /// Gets the scheduled time. + /// Gets the start time. + /// Gets the end time. + /// Gets the tracking id. + /// The run correlation. + /// Gets the code. + /// Gets the status. + /// Gets the error. + /// Gets the tracked properties. + /// Keeps track of any properties unknown to the library. + internal WorkflowRunTrigger(string name, BinaryData inputs, WebAppContentLink inputsLink, BinaryData outputs, WebAppContentLink outputsLink, DateTimeOffset? scheduledOn, DateTimeOffset? startOn, DateTimeOffset? endOn, string trackingId, Correlation correlation, string code, WorkflowStatus? status, BinaryData error, BinaryData trackedProperties, IDictionary serializedAdditionalRawData) + { + Name = name; + Inputs = inputs; + InputsLink = inputsLink; + Outputs = outputs; + OutputsLink = outputsLink; + ScheduledOn = scheduledOn; + StartOn = startOn; + EndOn = endOn; + TrackingId = trackingId; + Correlation = correlation; + Code = code; + Status = status; + Error = error; + TrackedProperties = trackedProperties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets the name. + [WirePath("name")] + public string Name { get; } + /// + /// Gets the inputs. + /// + /// To assign an object to this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + [WirePath("inputs")] + public BinaryData Inputs { get; } + /// Gets the link to inputs. + [WirePath("inputsLink")] + public WebAppContentLink InputsLink { get; } + /// + /// Gets the outputs. + /// + /// To assign an object to this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + [WirePath("outputs")] + public BinaryData Outputs { get; } + /// Gets the link to outputs. + [WirePath("outputsLink")] + public WebAppContentLink OutputsLink { get; } + /// Gets the scheduled time. + [WirePath("scheduledTime")] + public DateTimeOffset? ScheduledOn { get; } + /// Gets the start time. + [WirePath("startTime")] + public DateTimeOffset? StartOn { get; } + /// Gets the end time. + [WirePath("endTime")] + public DateTimeOffset? EndOn { get; } + /// Gets the tracking id. + [WirePath("trackingId")] + public string TrackingId { get; } + /// The run correlation. + internal Correlation Correlation { get; } + /// The client tracking id. + [WirePath("correlation.clientTrackingId")] + public string CorrelationClientTrackingId + { + get => Correlation?.ClientTrackingId; + } + + /// Gets the code. + [WirePath("code")] + public string Code { get; } + /// Gets the status. + [WirePath("status")] + public WorkflowStatus? Status { get; } + /// + /// Gets the error. + /// + /// To assign an object to this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + [WirePath("error")] + public BinaryData Error { get; } + /// + /// Gets the tracked properties. + /// + /// To assign an object to this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + [WirePath("trackedProperties")] + public BinaryData TrackedProperties { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowSku.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowSku.Serialization.cs new file mode 100644 index 0000000000000..a159e85f2ee2a --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowSku.Serialization.cs @@ -0,0 +1,179 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class WorkflowSku : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowSku)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name.ToString()); + if (Optional.IsDefined(Plan)) + { + writer.WritePropertyName("plan"u8); + writer.WriteObjectValue(Plan, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WorkflowSku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowSku)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWorkflowSku(document.RootElement, options); + } + + internal static WorkflowSku DeserializeWorkflowSku(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + WorkflowSkuName name = default; + WorkflowResourceReference plan = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = new WorkflowSkuName(property.Value.GetString()); + continue; + } + if (property.NameEquals("plan"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + plan = WorkflowResourceReference.DeserializeWorkflowResourceReference(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WorkflowSku(name, plan, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + builder.Append(" name: "); + builder.AppendLine($"'{Name.ToString()}'"); + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Plan), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" plan: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Plan)) + { + builder.Append(" plan: "); + BicepSerializationHelpers.AppendChildObject(builder, Plan, options, 2, false, " plan: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WorkflowSku)} does not support writing '{options.Format}' format."); + } + } + + WorkflowSku IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWorkflowSku(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WorkflowSku)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowSku.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowSku.cs new file mode 100644 index 0000000000000..e0c92ec2fd611 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowSku.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The sku type. + public partial class WorkflowSku + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The name. + internal WorkflowSku(WorkflowSkuName name) + { + Name = name; + } + + /// Initializes a new instance of . + /// The name. + /// The reference to plan. + /// Keeps track of any properties unknown to the library. + internal WorkflowSku(WorkflowSkuName name, WorkflowResourceReference plan, IDictionary serializedAdditionalRawData) + { + Name = name; + Plan = plan; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal WorkflowSku() + { + } + + /// The name. + [WirePath("name")] + public WorkflowSkuName Name { get; } + /// The reference to plan. + [WirePath("plan")] + public WorkflowResourceReference Plan { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowSkuName.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowSkuName.cs new file mode 100644 index 0000000000000..6aa709d9c1acd --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowSkuName.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The sku name. + public readonly partial struct WorkflowSkuName : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public WorkflowSkuName(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NotSpecifiedValue = "NotSpecified"; + private const string FreeValue = "Free"; + private const string SharedValue = "Shared"; + private const string BasicValue = "Basic"; + private const string StandardValue = "Standard"; + private const string PremiumValue = "Premium"; + + /// NotSpecified. + public static WorkflowSkuName NotSpecified { get; } = new WorkflowSkuName(NotSpecifiedValue); + /// Free. + public static WorkflowSkuName Free { get; } = new WorkflowSkuName(FreeValue); + /// Shared. + public static WorkflowSkuName Shared { get; } = new WorkflowSkuName(SharedValue); + /// Basic. + public static WorkflowSkuName Basic { get; } = new WorkflowSkuName(BasicValue); + /// Standard. + public static WorkflowSkuName Standard { get; } = new WorkflowSkuName(StandardValue); + /// Premium. + public static WorkflowSkuName Premium { get; } = new WorkflowSkuName(PremiumValue); + /// Determines if two values are the same. + public static bool operator ==(WorkflowSkuName left, WorkflowSkuName right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(WorkflowSkuName left, WorkflowSkuName right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator WorkflowSkuName(string value) => new WorkflowSkuName(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is WorkflowSkuName other && Equals(other); + /// + public bool Equals(WorkflowSkuName other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowState.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowState.cs new file mode 100644 index 0000000000000..a0abb065a660b --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowState.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The workflow state. + public readonly partial struct WorkflowState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public WorkflowState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NotSpecifiedValue = "NotSpecified"; + private const string CompletedValue = "Completed"; + private const string EnabledValue = "Enabled"; + private const string DisabledValue = "Disabled"; + private const string DeletedValue = "Deleted"; + private const string SuspendedValue = "Suspended"; + + /// NotSpecified. + public static WorkflowState NotSpecified { get; } = new WorkflowState(NotSpecifiedValue); + /// Completed. + public static WorkflowState Completed { get; } = new WorkflowState(CompletedValue); + /// Enabled. + public static WorkflowState Enabled { get; } = new WorkflowState(EnabledValue); + /// Disabled. + public static WorkflowState Disabled { get; } = new WorkflowState(DisabledValue); + /// Deleted. + public static WorkflowState Deleted { get; } = new WorkflowState(DeletedValue); + /// Suspended. + public static WorkflowState Suspended { get; } = new WorkflowState(SuspendedValue); + /// Determines if two values are the same. + public static bool operator ==(WorkflowState left, WorkflowState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(WorkflowState left, WorkflowState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator WorkflowState(string value) => new WorkflowState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is WorkflowState other && Equals(other); + /// + public bool Equals(WorkflowState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowStatus.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowStatus.cs new file mode 100644 index 0000000000000..46130c550be77 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowStatus.cs @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The workflow status. + public readonly partial struct WorkflowStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public WorkflowStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NotSpecifiedValue = "NotSpecified"; + private const string PausedValue = "Paused"; + private const string RunningValue = "Running"; + private const string WaitingValue = "Waiting"; + private const string SucceededValue = "Succeeded"; + private const string SkippedValue = "Skipped"; + private const string SuspendedValue = "Suspended"; + private const string CancelledValue = "Cancelled"; + private const string FailedValue = "Failed"; + private const string FaultedValue = "Faulted"; + private const string TimedOutValue = "TimedOut"; + private const string AbortedValue = "Aborted"; + private const string IgnoredValue = "Ignored"; + + /// NotSpecified. + public static WorkflowStatus NotSpecified { get; } = new WorkflowStatus(NotSpecifiedValue); + /// Paused. + public static WorkflowStatus Paused { get; } = new WorkflowStatus(PausedValue); + /// Running. + public static WorkflowStatus Running { get; } = new WorkflowStatus(RunningValue); + /// Waiting. + public static WorkflowStatus Waiting { get; } = new WorkflowStatus(WaitingValue); + /// Succeeded. + public static WorkflowStatus Succeeded { get; } = new WorkflowStatus(SucceededValue); + /// Skipped. + public static WorkflowStatus Skipped { get; } = new WorkflowStatus(SkippedValue); + /// Suspended. + public static WorkflowStatus Suspended { get; } = new WorkflowStatus(SuspendedValue); + /// Cancelled. + public static WorkflowStatus Cancelled { get; } = new WorkflowStatus(CancelledValue); + /// Failed. + public static WorkflowStatus Failed { get; } = new WorkflowStatus(FailedValue); + /// Faulted. + public static WorkflowStatus Faulted { get; } = new WorkflowStatus(FaultedValue); + /// TimedOut. + public static WorkflowStatus TimedOut { get; } = new WorkflowStatus(TimedOutValue); + /// Aborted. + public static WorkflowStatus Aborted { get; } = new WorkflowStatus(AbortedValue); + /// Ignored. + public static WorkflowStatus Ignored { get; } = new WorkflowStatus(IgnoredValue); + /// Determines if two values are the same. + public static bool operator ==(WorkflowStatus left, WorkflowStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(WorkflowStatus left, WorkflowStatus right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator WorkflowStatus(string value) => new WorkflowStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is WorkflowStatus other && Equals(other); + /// + public bool Equals(WorkflowStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowTriggerCallbackUri.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowTriggerCallbackUri.Serialization.cs new file mode 100644 index 0000000000000..85bf240d197b3 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowTriggerCallbackUri.Serialization.cs @@ -0,0 +1,364 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class WorkflowTriggerCallbackUri : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowTriggerCallbackUri)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsDefined(Value)) + { + writer.WritePropertyName("value"u8); + writer.WriteStringValue(Value); + } + if (options.Format != "W" && Optional.IsDefined(Method)) + { + writer.WritePropertyName("method"u8); + writer.WriteStringValue(Method); + } + if (options.Format != "W" && Optional.IsDefined(BasePath)) + { + writer.WritePropertyName("basePath"u8); + writer.WriteStringValue(BasePath); + } + if (options.Format != "W" && Optional.IsDefined(RelativePath)) + { + writer.WritePropertyName("relativePath"u8); + writer.WriteStringValue(RelativePath); + } + if (Optional.IsCollectionDefined(RelativePathParameters)) + { + writer.WritePropertyName("relativePathParameters"u8); + writer.WriteStartArray(); + foreach (var item in RelativePathParameters) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Queries)) + { + writer.WritePropertyName("queries"u8); + writer.WriteObjectValue(Queries, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WorkflowTriggerCallbackUri IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowTriggerCallbackUri)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWorkflowTriggerCallbackUri(document.RootElement, options); + } + + internal static WorkflowTriggerCallbackUri DeserializeWorkflowTriggerCallbackUri(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string value = default; + string method = default; + string basePath = default; + string relativePath = default; + IReadOnlyList relativePathParameters = default; + WorkflowTriggerListCallbackUriQueries queries = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + value = property.Value.GetString(); + continue; + } + if (property.NameEquals("method"u8)) + { + method = property.Value.GetString(); + continue; + } + if (property.NameEquals("basePath"u8)) + { + basePath = property.Value.GetString(); + continue; + } + if (property.NameEquals("relativePath"u8)) + { + relativePath = property.Value.GetString(); + continue; + } + if (property.NameEquals("relativePathParameters"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + relativePathParameters = array; + continue; + } + if (property.NameEquals("queries"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + queries = WorkflowTriggerListCallbackUriQueries.DeserializeWorkflowTriggerListCallbackUriQueries(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WorkflowTriggerCallbackUri( + value, + method, + basePath, + relativePath, + relativePathParameters ?? new ChangeTrackingList(), + queries, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Value)) + { + builder.Append(" value: "); + if (Value.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Value}'''"); + } + else + { + builder.AppendLine($"'{Value}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Method), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" method: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Method)) + { + builder.Append(" method: "); + if (Method.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Method}'''"); + } + else + { + builder.AppendLine($"'{Method}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(BasePath), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" basePath: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(BasePath)) + { + builder.Append(" basePath: "); + if (BasePath.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{BasePath}'''"); + } + else + { + builder.AppendLine($"'{BasePath}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(RelativePath), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" relativePath: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(RelativePath)) + { + builder.Append(" relativePath: "); + if (RelativePath.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{RelativePath}'''"); + } + else + { + builder.AppendLine($"'{RelativePath}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(RelativePathParameters), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" relativePathParameters: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(RelativePathParameters)) + { + if (RelativePathParameters.Any()) + { + builder.Append(" relativePathParameters: "); + builder.AppendLine("["); + foreach (var item in RelativePathParameters) + { + if (item == null) + { + builder.Append("null"); + continue; + } + if (item.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item}'''"); + } + else + { + builder.AppendLine($" '{item}'"); + } + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Queries), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" queries: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Queries)) + { + builder.Append(" queries: "); + BicepSerializationHelpers.AppendChildObject(builder, Queries, options, 2, false, " queries: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WorkflowTriggerCallbackUri)} does not support writing '{options.Format}' format."); + } + } + + WorkflowTriggerCallbackUri IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWorkflowTriggerCallbackUri(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WorkflowTriggerCallbackUri)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowTriggerCallbackUri.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowTriggerCallbackUri.cs new file mode 100644 index 0000000000000..c50d2eeec6f76 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowTriggerCallbackUri.cs @@ -0,0 +1,92 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The workflow trigger callback URL. + public partial class WorkflowTriggerCallbackUri + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal WorkflowTriggerCallbackUri() + { + RelativePathParameters = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Gets the workflow trigger callback URL. + /// Gets the workflow trigger callback URL HTTP method. + /// Gets the workflow trigger callback URL base path. + /// Gets the workflow trigger callback URL relative path. + /// Gets the workflow trigger callback URL relative path parameters. + /// Gets the workflow trigger callback URL query parameters. + /// Keeps track of any properties unknown to the library. + internal WorkflowTriggerCallbackUri(string value, string method, string basePath, string relativePath, IReadOnlyList relativePathParameters, WorkflowTriggerListCallbackUriQueries queries, IDictionary serializedAdditionalRawData) + { + Value = value; + Method = method; + BasePath = basePath; + RelativePath = relativePath; + RelativePathParameters = relativePathParameters; + Queries = queries; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets the workflow trigger callback URL. + [WirePath("value")] + public string Value { get; } + /// Gets the workflow trigger callback URL HTTP method. + [WirePath("method")] + public string Method { get; } + /// Gets the workflow trigger callback URL base path. + [WirePath("basePath")] + public string BasePath { get; } + /// Gets the workflow trigger callback URL relative path. + [WirePath("relativePath")] + public string RelativePath { get; } + /// Gets the workflow trigger callback URL relative path parameters. + [WirePath("relativePathParameters")] + public IReadOnlyList RelativePathParameters { get; } + /// Gets the workflow trigger callback URL query parameters. + [WirePath("queries")] + public WorkflowTriggerListCallbackUriQueries Queries { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowTriggerHistoryListResult.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowTriggerHistoryListResult.Serialization.cs new file mode 100644 index 0000000000000..ea42a35b65fff --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowTriggerHistoryListResult.Serialization.cs @@ -0,0 +1,212 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + internal partial class WorkflowTriggerHistoryListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowTriggerHistoryListResult)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Value)) + { + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WorkflowTriggerHistoryListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowTriggerHistoryListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWorkflowTriggerHistoryListResult(document.RootElement, options); + } + + internal static WorkflowTriggerHistoryListResult DeserializeWorkflowTriggerHistoryListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + string nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(WorkflowTriggerHistoryData.DeserializeWorkflowTriggerHistoryData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WorkflowTriggerHistoryListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WorkflowTriggerHistoryListResult)} does not support writing '{options.Format}' format."); + } + } + + WorkflowTriggerHistoryListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWorkflowTriggerHistoryListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WorkflowTriggerHistoryListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowTriggerHistoryListResult.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowTriggerHistoryListResult.cs new file mode 100644 index 0000000000000..a995127f50bf2 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowTriggerHistoryListResult.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The list of workflow trigger histories. + internal partial class WorkflowTriggerHistoryListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal WorkflowTriggerHistoryListResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// A list of workflow trigger histories. + /// The URL to get the next set of results. + /// Keeps track of any properties unknown to the library. + internal WorkflowTriggerHistoryListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// A list of workflow trigger histories. + public IReadOnlyList Value { get; } + /// The URL to get the next set of results. + public string NextLink { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowTriggerListCallbackUriQueries.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowTriggerListCallbackUriQueries.Serialization.cs new file mode 100644 index 0000000000000..f960f52e06121 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowTriggerListCallbackUriQueries.Serialization.cs @@ -0,0 +1,305 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class WorkflowTriggerListCallbackUriQueries : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowTriggerListCallbackUriQueries)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(ApiVersion)) + { + writer.WritePropertyName("api-version"u8); + writer.WriteStringValue(ApiVersion); + } + if (Optional.IsDefined(SasPermission)) + { + writer.WritePropertyName("sp"u8); + writer.WriteStringValue(SasPermission); + } + if (Optional.IsDefined(SasVersion)) + { + writer.WritePropertyName("sv"u8); + writer.WriteStringValue(SasVersion); + } + if (Optional.IsDefined(SasSignature)) + { + writer.WritePropertyName("sig"u8); + writer.WriteStringValue(SasSignature); + } + if (Optional.IsDefined(SasTimestamp)) + { + writer.WritePropertyName("se"u8); + writer.WriteStringValue(SasTimestamp); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WorkflowTriggerListCallbackUriQueries IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowTriggerListCallbackUriQueries)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWorkflowTriggerListCallbackUriQueries(document.RootElement, options); + } + + internal static WorkflowTriggerListCallbackUriQueries DeserializeWorkflowTriggerListCallbackUriQueries(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string apiVersion = default; + string sp = default; + string sv = default; + string sig = default; + string se = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("api-version"u8)) + { + apiVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("sp"u8)) + { + sp = property.Value.GetString(); + continue; + } + if (property.NameEquals("sv"u8)) + { + sv = property.Value.GetString(); + continue; + } + if (property.NameEquals("sig"u8)) + { + sig = property.Value.GetString(); + continue; + } + if (property.NameEquals("se"u8)) + { + se = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WorkflowTriggerListCallbackUriQueries( + apiVersion, + sp, + sv, + sig, + se, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiVersion), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" api-version: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiVersion)) + { + builder.Append(" api-version: "); + if (ApiVersion.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ApiVersion}'''"); + } + else + { + builder.AppendLine($"'{ApiVersion}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SasPermission), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" sp: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SasPermission)) + { + builder.Append(" sp: "); + if (SasPermission.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{SasPermission}'''"); + } + else + { + builder.AppendLine($"'{SasPermission}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SasVersion), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" sv: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SasVersion)) + { + builder.Append(" sv: "); + if (SasVersion.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{SasVersion}'''"); + } + else + { + builder.AppendLine($"'{SasVersion}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SasSignature), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" sig: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SasSignature)) + { + builder.Append(" sig: "); + if (SasSignature.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{SasSignature}'''"); + } + else + { + builder.AppendLine($"'{SasSignature}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SasTimestamp), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" se: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SasTimestamp)) + { + builder.Append(" se: "); + if (SasTimestamp.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{SasTimestamp}'''"); + } + else + { + builder.AppendLine($"'{SasTimestamp}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WorkflowTriggerListCallbackUriQueries)} does not support writing '{options.Format}' format."); + } + } + + WorkflowTriggerListCallbackUriQueries IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWorkflowTriggerListCallbackUriQueries(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WorkflowTriggerListCallbackUriQueries)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowTriggerListCallbackUriQueries.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowTriggerListCallbackUriQueries.cs new file mode 100644 index 0000000000000..b3a7e6c83ea75 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowTriggerListCallbackUriQueries.cs @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// Gets the workflow trigger callback URL query parameters. + public partial class WorkflowTriggerListCallbackUriQueries + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal WorkflowTriggerListCallbackUriQueries() + { + } + + /// Initializes a new instance of . + /// The api version. + /// The SAS permissions. + /// The SAS version. + /// The SAS signature. + /// The SAS timestamp. + /// Keeps track of any properties unknown to the library. + internal WorkflowTriggerListCallbackUriQueries(string apiVersion, string sasPermission, string sasVersion, string sasSignature, string sasTimestamp, IDictionary serializedAdditionalRawData) + { + ApiVersion = apiVersion; + SasPermission = sasPermission; + SasVersion = sasVersion; + SasSignature = sasSignature; + SasTimestamp = sasTimestamp; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The api version. + [WirePath("api-version")] + public string ApiVersion { get; } + /// The SAS permissions. + [WirePath("sp")] + public string SasPermission { get; } + /// The SAS version. + [WirePath("sv")] + public string SasVersion { get; } + /// The SAS signature. + [WirePath("sig")] + public string SasSignature { get; } + /// The SAS timestamp. + [WirePath("se")] + public string SasTimestamp { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowTriggerListResult.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowTriggerListResult.Serialization.cs new file mode 100644 index 0000000000000..15d8b58efed1d --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowTriggerListResult.Serialization.cs @@ -0,0 +1,212 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + internal partial class WorkflowTriggerListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowTriggerListResult)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Value)) + { + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WorkflowTriggerListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowTriggerListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWorkflowTriggerListResult(document.RootElement, options); + } + + internal static WorkflowTriggerListResult DeserializeWorkflowTriggerListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + string nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(WorkflowTriggerData.DeserializeWorkflowTriggerData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WorkflowTriggerListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WorkflowTriggerListResult)} does not support writing '{options.Format}' format."); + } + } + + WorkflowTriggerListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWorkflowTriggerListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WorkflowTriggerListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowTriggerListResult.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowTriggerListResult.cs new file mode 100644 index 0000000000000..e5877ddbc0e35 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowTriggerListResult.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The list of workflow triggers. + internal partial class WorkflowTriggerListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal WorkflowTriggerListResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// A list of workflow triggers. + /// The URL to get the next set of results. + /// Keeps track of any properties unknown to the library. + internal WorkflowTriggerListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// A list of workflow triggers. + public IReadOnlyList Value { get; } + /// The URL to get the next set of results. + public string NextLink { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowTriggerProvisioningState.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowTriggerProvisioningState.cs new file mode 100644 index 0000000000000..e9f5a3c542f0c --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowTriggerProvisioningState.cs @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The workflow trigger provisioning state. + public readonly partial struct WorkflowTriggerProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public WorkflowTriggerProvisioningState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NotSpecifiedValue = "NotSpecified"; + private const string AcceptedValue = "Accepted"; + private const string RunningValue = "Running"; + private const string ReadyValue = "Ready"; + private const string CreatingValue = "Creating"; + private const string CreatedValue = "Created"; + private const string DeletingValue = "Deleting"; + private const string DeletedValue = "Deleted"; + private const string CanceledValue = "Canceled"; + private const string FailedValue = "Failed"; + private const string SucceededValue = "Succeeded"; + private const string MovingValue = "Moving"; + private const string UpdatingValue = "Updating"; + private const string RegisteringValue = "Registering"; + private const string RegisteredValue = "Registered"; + private const string UnregisteringValue = "Unregistering"; + private const string UnregisteredValue = "Unregistered"; + private const string CompletedValue = "Completed"; + + /// NotSpecified. + public static WorkflowTriggerProvisioningState NotSpecified { get; } = new WorkflowTriggerProvisioningState(NotSpecifiedValue); + /// Accepted. + public static WorkflowTriggerProvisioningState Accepted { get; } = new WorkflowTriggerProvisioningState(AcceptedValue); + /// Running. + public static WorkflowTriggerProvisioningState Running { get; } = new WorkflowTriggerProvisioningState(RunningValue); + /// Ready. + public static WorkflowTriggerProvisioningState Ready { get; } = new WorkflowTriggerProvisioningState(ReadyValue); + /// Creating. + public static WorkflowTriggerProvisioningState Creating { get; } = new WorkflowTriggerProvisioningState(CreatingValue); + /// Created. + public static WorkflowTriggerProvisioningState Created { get; } = new WorkflowTriggerProvisioningState(CreatedValue); + /// Deleting. + public static WorkflowTriggerProvisioningState Deleting { get; } = new WorkflowTriggerProvisioningState(DeletingValue); + /// Deleted. + public static WorkflowTriggerProvisioningState Deleted { get; } = new WorkflowTriggerProvisioningState(DeletedValue); + /// Canceled. + public static WorkflowTriggerProvisioningState Canceled { get; } = new WorkflowTriggerProvisioningState(CanceledValue); + /// Failed. + public static WorkflowTriggerProvisioningState Failed { get; } = new WorkflowTriggerProvisioningState(FailedValue); + /// Succeeded. + public static WorkflowTriggerProvisioningState Succeeded { get; } = new WorkflowTriggerProvisioningState(SucceededValue); + /// Moving. + public static WorkflowTriggerProvisioningState Moving { get; } = new WorkflowTriggerProvisioningState(MovingValue); + /// Updating. + public static WorkflowTriggerProvisioningState Updating { get; } = new WorkflowTriggerProvisioningState(UpdatingValue); + /// Registering. + public static WorkflowTriggerProvisioningState Registering { get; } = new WorkflowTriggerProvisioningState(RegisteringValue); + /// Registered. + public static WorkflowTriggerProvisioningState Registered { get; } = new WorkflowTriggerProvisioningState(RegisteredValue); + /// Unregistering. + public static WorkflowTriggerProvisioningState Unregistering { get; } = new WorkflowTriggerProvisioningState(UnregisteringValue); + /// Unregistered. + public static WorkflowTriggerProvisioningState Unregistered { get; } = new WorkflowTriggerProvisioningState(UnregisteredValue); + /// Completed. + public static WorkflowTriggerProvisioningState Completed { get; } = new WorkflowTriggerProvisioningState(CompletedValue); + /// Determines if two values are the same. + public static bool operator ==(WorkflowTriggerProvisioningState left, WorkflowTriggerProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(WorkflowTriggerProvisioningState left, WorkflowTriggerProvisioningState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator WorkflowTriggerProvisioningState(string value) => new WorkflowTriggerProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is WorkflowTriggerProvisioningState other && Equals(other); + /// + public bool Equals(WorkflowTriggerProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowTriggerRecurrence.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowTriggerRecurrence.Serialization.cs new file mode 100644 index 0000000000000..fa1646161cd7e --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowTriggerRecurrence.Serialization.cs @@ -0,0 +1,328 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class WorkflowTriggerRecurrence : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowTriggerRecurrence)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Frequency)) + { + writer.WritePropertyName("frequency"u8); + writer.WriteStringValue(Frequency.Value.ToString()); + } + if (Optional.IsDefined(Interval)) + { + writer.WritePropertyName("interval"u8); + writer.WriteNumberValue(Interval.Value); + } + if (Optional.IsDefined(StartTime)) + { + writer.WritePropertyName("startTime"u8); + writer.WriteStringValue(StartTime); + } + if (Optional.IsDefined(EndTime)) + { + writer.WritePropertyName("endTime"u8); + writer.WriteStringValue(EndTime); + } + if (Optional.IsDefined(TimeZone)) + { + writer.WritePropertyName("timeZone"u8); + writer.WriteStringValue(TimeZone); + } + if (Optional.IsDefined(Schedule)) + { + writer.WritePropertyName("schedule"u8); + writer.WriteObjectValue(Schedule, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WorkflowTriggerRecurrence IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowTriggerRecurrence)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWorkflowTriggerRecurrence(document.RootElement, options); + } + + internal static WorkflowTriggerRecurrence DeserializeWorkflowTriggerRecurrence(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + WorkflowRecurrenceFrequency? frequency = default; + int? interval = default; + string startTime = default; + string endTime = default; + string timeZone = default; + WorkflowRecurrenceSchedule schedule = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("frequency"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + frequency = new WorkflowRecurrenceFrequency(property.Value.GetString()); + continue; + } + if (property.NameEquals("interval"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + interval = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("startTime"u8)) + { + startTime = property.Value.GetString(); + continue; + } + if (property.NameEquals("endTime"u8)) + { + endTime = property.Value.GetString(); + continue; + } + if (property.NameEquals("timeZone"u8)) + { + timeZone = property.Value.GetString(); + continue; + } + if (property.NameEquals("schedule"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schedule = WorkflowRecurrenceSchedule.DeserializeWorkflowRecurrenceSchedule(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WorkflowTriggerRecurrence( + frequency, + interval, + startTime, + endTime, + timeZone, + schedule, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Frequency), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" frequency: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Frequency)) + { + builder.Append(" frequency: "); + builder.AppendLine($"'{Frequency.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Interval), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" interval: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Interval)) + { + builder.Append(" interval: "); + builder.AppendLine($"{Interval.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(StartTime), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" startTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(StartTime)) + { + builder.Append(" startTime: "); + if (StartTime.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{StartTime}'''"); + } + else + { + builder.AppendLine($"'{StartTime}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EndTime), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" endTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(EndTime)) + { + builder.Append(" endTime: "); + if (EndTime.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{EndTime}'''"); + } + else + { + builder.AppendLine($"'{EndTime}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TimeZone), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" timeZone: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TimeZone)) + { + builder.Append(" timeZone: "); + if (TimeZone.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{TimeZone}'''"); + } + else + { + builder.AppendLine($"'{TimeZone}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Schedule), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" schedule: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Schedule)) + { + builder.Append(" schedule: "); + BicepSerializationHelpers.AppendChildObject(builder, Schedule, options, 2, false, " schedule: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WorkflowTriggerRecurrence)} does not support writing '{options.Format}' format."); + } + } + + WorkflowTriggerRecurrence IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWorkflowTriggerRecurrence(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WorkflowTriggerRecurrence)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowTriggerRecurrence.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowTriggerRecurrence.cs new file mode 100644 index 0000000000000..44a929fb03215 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowTriggerRecurrence.cs @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The workflow trigger recurrence. + public partial class WorkflowTriggerRecurrence + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal WorkflowTriggerRecurrence() + { + } + + /// Initializes a new instance of . + /// The frequency. + /// The interval. + /// The start time. + /// The end time. + /// The time zone. + /// The recurrence schedule. + /// Keeps track of any properties unknown to the library. + internal WorkflowTriggerRecurrence(WorkflowRecurrenceFrequency? frequency, int? interval, string startTime, string endTime, string timeZone, WorkflowRecurrenceSchedule schedule, IDictionary serializedAdditionalRawData) + { + Frequency = frequency; + Interval = interval; + StartTime = startTime; + EndTime = endTime; + TimeZone = timeZone; + Schedule = schedule; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The frequency. + [WirePath("frequency")] + public WorkflowRecurrenceFrequency? Frequency { get; } + /// The interval. + [WirePath("interval")] + public int? Interval { get; } + /// The start time. + [WirePath("startTime")] + public string StartTime { get; } + /// The end time. + [WirePath("endTime")] + public string EndTime { get; } + /// The time zone. + [WirePath("timeZone")] + public string TimeZone { get; } + /// The recurrence schedule. + [WirePath("schedule")] + public WorkflowRecurrenceSchedule Schedule { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowVersionListResult.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowVersionListResult.Serialization.cs new file mode 100644 index 0000000000000..9e558cc323839 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowVersionListResult.Serialization.cs @@ -0,0 +1,212 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + internal partial class WorkflowVersionListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowVersionListResult)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Value)) + { + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WorkflowVersionListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowVersionListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWorkflowVersionListResult(document.RootElement, options); + } + + internal static WorkflowVersionListResult DeserializeWorkflowVersionListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + string nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(WorkflowVersionData.DeserializeWorkflowVersionData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WorkflowVersionListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WorkflowVersionListResult)} does not support writing '{options.Format}' format."); + } + } + + WorkflowVersionListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWorkflowVersionListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WorkflowVersionListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowVersionListResult.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowVersionListResult.cs new file mode 100644 index 0000000000000..84b2594d0c0a3 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowVersionListResult.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The list of workflow versions. + internal partial class WorkflowVersionListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal WorkflowVersionListResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// A list of workflow versions. + /// The URL to get the next set of results. + /// Keeps track of any properties unknown to the library. + internal WorkflowVersionListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// A list of workflow versions. + public IReadOnlyList Value { get; } + /// The URL to get the next set of results. + public string NextLink { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/NetworkFeatureCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/NetworkFeatureCollection.cs index 0c8b4b52cf821..19dc2be19fd07 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/NetworkFeatureCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/NetworkFeatureCollection.cs @@ -61,7 +61,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -106,7 +106,7 @@ public virtual async Task> GetAsync(string view /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -151,7 +151,7 @@ public virtual Response Get(string view, CancellationTok /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -194,7 +194,7 @@ public virtual async Task> ExistsAsync(string view, CancellationT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -237,7 +237,7 @@ public virtual Response Exists(string view, CancellationToken cancellation /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual async Task> GetIfExistsA /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/NetworkFeatureResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/NetworkFeatureResource.cs index 433c33c5b29c9..d1b2340c7a8f5 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/NetworkFeatureResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/NetworkFeatureResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Cancellatio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/PublishingUserResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/PublishingUserResource.cs index 1e8565ca026ad..355c64023671b 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/PublishingUserResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/PublishingUserResource.cs @@ -98,7 +98,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -138,7 +138,7 @@ public virtual async Task> GetAsync(Cancellatio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -178,7 +178,7 @@ public virtual Response Get(CancellationToken cancellati /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task> CreateOrUpdateAs /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/AppServiceCertificateOrdersRestOperations.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/AppServiceCertificateOrdersRestOperations.cs index 68d17cbd5731e..721d08dad9f9f 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/AppServiceCertificateOrdersRestOperations.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/AppServiceCertificateOrdersRestOperations.cs @@ -33,7 +33,7 @@ public AppServiceCertificateOrdersRestOperations(HttpPipeline pipeline, string a { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-02-01"; + _apiVersion = apiVersion ?? "2023-12-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/AppServiceEnvironmentsRestOperations.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/AppServiceEnvironmentsRestOperations.cs index 680b66c9ad464..0700d57cfa600 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/AppServiceEnvironmentsRestOperations.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/AppServiceEnvironmentsRestOperations.cs @@ -33,7 +33,7 @@ public AppServiceEnvironmentsRestOperations(HttpPipeline pipeline, string applic { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-02-01"; + _apiVersion = apiVersion ?? "2023-12-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -777,6 +777,300 @@ public Response GetVipInfo(string subscripti } } + internal RequestUriBuilder CreateGetAseCustomDnsSuffixConfigurationRequestUri(string subscriptionId, string resourceGroupName, string name) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/hostingEnvironments/", false); + uri.AppendPath(name, true); + uri.AppendPath("/configurations/customdnssuffix", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetAseCustomDnsSuffixConfigurationRequest(string subscriptionId, string resourceGroupName, string name) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/hostingEnvironments/", false); + uri.AppendPath(name, true); + uri.AppendPath("/configurations/customdnssuffix", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get Custom Dns Suffix configuration of an App Service Environment. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the App Service Environment. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetAseCustomDnsSuffixConfigurationAsync(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateGetAseCustomDnsSuffixConfigurationRequest(subscriptionId, resourceGroupName, name); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + CustomDnsSuffixConfigurationData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = CustomDnsSuffixConfigurationData.DeserializeCustomDnsSuffixConfigurationData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((CustomDnsSuffixConfigurationData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get Custom Dns Suffix configuration of an App Service Environment. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the App Service Environment. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response GetAseCustomDnsSuffixConfiguration(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateGetAseCustomDnsSuffixConfigurationRequest(subscriptionId, resourceGroupName, name); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + CustomDnsSuffixConfigurationData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = CustomDnsSuffixConfigurationData.DeserializeCustomDnsSuffixConfigurationData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((CustomDnsSuffixConfigurationData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateAseCustomDnsSuffixConfigurationRequestUri(string subscriptionId, string resourceGroupName, string name, CustomDnsSuffixConfigurationData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/hostingEnvironments/", false); + uri.AppendPath(name, true); + uri.AppendPath("/configurations/customdnssuffix", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateAseCustomDnsSuffixConfigurationRequest(string subscriptionId, string resourceGroupName, string name, CustomDnsSuffixConfigurationData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/hostingEnvironments/", false); + uri.AppendPath(name, true); + uri.AppendPath("/configurations/customdnssuffix", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Update Custom Dns Suffix configuration of an App Service Environment. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the App Service Environment. + /// The to use. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> UpdateAseCustomDnsSuffixConfigurationAsync(string subscriptionId, string resourceGroupName, string name, CustomDnsSuffixConfigurationData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateAseCustomDnsSuffixConfigurationRequest(subscriptionId, resourceGroupName, name, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + CustomDnsSuffixConfigurationData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = CustomDnsSuffixConfigurationData.DeserializeCustomDnsSuffixConfigurationData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Update Custom Dns Suffix configuration of an App Service Environment. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the App Service Environment. + /// The to use. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response UpdateAseCustomDnsSuffixConfiguration(string subscriptionId, string resourceGroupName, string name, CustomDnsSuffixConfigurationData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateAseCustomDnsSuffixConfigurationRequest(subscriptionId, resourceGroupName, name, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + CustomDnsSuffixConfigurationData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = CustomDnsSuffixConfigurationData.DeserializeCustomDnsSuffixConfigurationData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteAseCustomDnsSuffixConfigurationRequestUri(string subscriptionId, string resourceGroupName, string name) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/hostingEnvironments/", false); + uri.AppendPath(name, true); + uri.AppendPath("/configurations/customdnssuffix", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteAseCustomDnsSuffixConfigurationRequest(string subscriptionId, string resourceGroupName, string name) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/hostingEnvironments/", false); + uri.AppendPath(name, true); + uri.AppendPath("/configurations/customdnssuffix", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete Custom Dns Suffix configuration of an App Service Environment. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the App Service Environment. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> DeleteAseCustomDnsSuffixConfigurationAsync(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateDeleteAseCustomDnsSuffixConfigurationRequest(subscriptionId, resourceGroupName, name); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + { + BinaryData value = default; + value = await BinaryData.FromStreamAsync(message.Response.ContentStream).ConfigureAwait(false); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete Custom Dns Suffix configuration of an App Service Environment. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the App Service Environment. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response DeleteAseCustomDnsSuffixConfiguration(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateDeleteAseCustomDnsSuffixConfigurationRequest(subscriptionId, resourceGroupName, name); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + { + BinaryData value = default; + value = BinaryData.FromStream(message.Response.ContentStream); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateGetAseV3NetworkingConfigurationRequestUri(string subscriptionId, string resourceGroupName, string name) { var uri = new RawRequestUriBuilder(); @@ -1955,6 +2249,174 @@ public Response ListMultiRolePoolSkus(string su } } + internal RequestUriBuilder CreateTestUpgradeAvailableNotificationRequestUri(string subscriptionId, string resourceGroupName, string name) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/hostingEnvironments/", false); + uri.AppendPath(name, true); + uri.AppendPath("/testUpgradeAvailableNotification", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateTestUpgradeAvailableNotificationRequest(string subscriptionId, string resourceGroupName, string name) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/hostingEnvironments/", false); + uri.AppendPath(name, true); + uri.AppendPath("/testUpgradeAvailableNotification", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Send a test notification that an upgrade is available for this App Service Environment. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the App Service Environment. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task TestUpgradeAvailableNotificationAsync(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateTestUpgradeAvailableNotificationRequest(subscriptionId, resourceGroupName, name); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Send a test notification that an upgrade is available for this App Service Environment. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the App Service Environment. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response TestUpgradeAvailableNotification(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateTestUpgradeAvailableNotificationRequest(subscriptionId, resourceGroupName, name); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpgradeRequestUri(string subscriptionId, string resourceGroupName, string name) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/hostingEnvironments/", false); + uri.AppendPath(name, true); + uri.AppendPath("/upgrade", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpgradeRequest(string subscriptionId, string resourceGroupName, string name) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/hostingEnvironments/", false); + uri.AppendPath(name, true); + uri.AppendPath("/upgrade", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Description for Initiate an upgrade of an App Service Environment if one is available. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the App Service Environment. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task UpgradeAsync(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateUpgradeRequest(subscriptionId, resourceGroupName, name); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Description for Initiate an upgrade of an App Service Environment if one is available. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the App Service Environment. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Upgrade(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateUpgradeRequest(subscriptionId, resourceGroupName, name); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateListMultiRoleUsagesRequestUri(string subscriptionId, string resourceGroupName, string name) { var uri = new RawRequestUriBuilder(); @@ -2445,7 +2907,7 @@ public Response GetPrivateEndpoi } } - internal RequestUriBuilder CreateApproveOrRejectPrivateEndpointConnectionRequestUri(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestInfo info) + internal RequestUriBuilder CreateApproveOrRejectPrivateEndpointConnectionRequestUri(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName, RemotePrivateEndpointConnectionARMResourceData data) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -2461,7 +2923,7 @@ internal RequestUriBuilder CreateApproveOrRejectPrivateEndpointConnectionRequest return uri; } - internal HttpMessage CreateApproveOrRejectPrivateEndpointConnectionRequest(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestInfo info) + internal HttpMessage CreateApproveOrRejectPrivateEndpointConnectionRequest(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName, RemotePrivateEndpointConnectionARMResourceData data) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -2481,7 +2943,7 @@ internal HttpMessage CreateApproveOrRejectPrivateEndpointConnectionRequest(strin request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(info, ModelSerializationExtensions.WireOptions); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); request.Content = content; _userAgent.Apply(message); return message; @@ -2492,19 +2954,19 @@ internal HttpMessage CreateApproveOrRejectPrivateEndpointConnectionRequest(strin /// Name of the resource group to which the resource belongs. /// Name of the App Service Environment. /// The to use. - /// The to use. + /// The to use. /// The cancellation token to use. - /// , , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task ApproveOrRejectPrivateEndpointConnectionAsync(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestInfo info, CancellationToken cancellationToken = default) + public async Task ApproveOrRejectPrivateEndpointConnectionAsync(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName, RemotePrivateEndpointConnectionARMResourceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); - Argument.AssertNotNull(info, nameof(info)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateApproveOrRejectPrivateEndpointConnectionRequest(subscriptionId, resourceGroupName, name, privateEndpointConnectionName, info); + using var message = CreateApproveOrRejectPrivateEndpointConnectionRequest(subscriptionId, resourceGroupName, name, privateEndpointConnectionName, data); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -2521,19 +2983,19 @@ public async Task ApproveOrRejectPrivateEndpointConnectionAsync(string /// Name of the resource group to which the resource belongs. /// Name of the App Service Environment. /// The to use. - /// The to use. + /// The to use. /// The cancellation token to use. - /// , , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response ApproveOrRejectPrivateEndpointConnection(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestInfo info, CancellationToken cancellationToken = default) + public Response ApproveOrRejectPrivateEndpointConnection(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName, RemotePrivateEndpointConnectionARMResourceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); - Argument.AssertNotNull(info, nameof(info)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateApproveOrRejectPrivateEndpointConnectionRequest(subscriptionId, resourceGroupName, name, privateEndpointConnectionName, info); + using var message = CreateApproveOrRejectPrivateEndpointConnectionRequest(subscriptionId, resourceGroupName, name, privateEndpointConnectionName, data); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/AppServicePlansRestOperations.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/AppServicePlansRestOperations.cs index 7ee5d3f358506..4eb1037a9c7e9 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/AppServicePlansRestOperations.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/AppServicePlansRestOperations.cs @@ -33,7 +33,7 @@ public AppServicePlansRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-02-01"; + _apiVersion = apiVersion ?? "2023-12-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/CertificateOrdersDiagnosticsRestOperations.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/CertificateOrdersDiagnosticsRestOperations.cs index 41643a60ef3bb..bf668319f3286 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/CertificateOrdersDiagnosticsRestOperations.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/CertificateOrdersDiagnosticsRestOperations.cs @@ -32,7 +32,7 @@ public CertificateOrdersDiagnosticsRestOperations(HttpPipeline pipeline, string { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-02-01"; + _apiVersion = apiVersion ?? "2023-12-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/CertificateRegistrationProviderRestOperations.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/CertificateRegistrationProviderRestOperations.cs index d0e3f3cd8834f..419d5c44e623c 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/CertificateRegistrationProviderRestOperations.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/CertificateRegistrationProviderRestOperations.cs @@ -32,7 +32,7 @@ public CertificateRegistrationProviderRestOperations(HttpPipeline pipeline, stri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-02-01"; + _apiVersion = apiVersion ?? "2023-12-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/CertificatesRestOperations.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/CertificatesRestOperations.cs index 612a2c91b3099..3458d417d160e 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/CertificatesRestOperations.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/CertificatesRestOperations.cs @@ -32,7 +32,7 @@ public CertificatesRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-02-01"; + _apiVersion = apiVersion ?? "2023-12-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/DeletedWebAppsRestOperations.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/DeletedWebAppsRestOperations.cs index 1937d12df7be4..ee6794236ac8b 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/DeletedWebAppsRestOperations.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/DeletedWebAppsRestOperations.cs @@ -32,7 +32,7 @@ public DeletedWebAppsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-02-01"; + _apiVersion = apiVersion ?? "2023-12-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/DiagnosticsRestOperations.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/DiagnosticsRestOperations.cs index dc1be39e9a721..8d476d8ce93a0 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/DiagnosticsRestOperations.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/DiagnosticsRestOperations.cs @@ -32,7 +32,7 @@ public DiagnosticsRestOperations(HttpPipeline pipeline, string applicationId, Ur { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-02-01"; + _apiVersion = apiVersion ?? "2023-12-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/DomainRegistrationProviderRestOperations.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/DomainRegistrationProviderRestOperations.cs index 1ab2849d62cbb..551cc1a8a51d6 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/DomainRegistrationProviderRestOperations.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/DomainRegistrationProviderRestOperations.cs @@ -32,7 +32,7 @@ public DomainRegistrationProviderRestOperations(HttpPipeline pipeline, string ap { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-02-01"; + _apiVersion = apiVersion ?? "2023-12-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/DomainsRestOperations.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/DomainsRestOperations.cs index 33d24a4ed5723..a4fe0e7a8d92e 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/DomainsRestOperations.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/DomainsRestOperations.cs @@ -32,7 +32,7 @@ public DomainsRestOperations(HttpPipeline pipeline, string applicationId, Uri en { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-02-01"; + _apiVersion = apiVersion ?? "2023-12-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -1428,6 +1428,100 @@ public Response Renew(string subscriptionId, string resourceGroupName, string do } } + internal RequestUriBuilder CreateTransferOutRequestUri(string subscriptionId, string resourceGroupName, string domainName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DomainRegistration/domains/", false); + uri.AppendPath(domainName, true); + uri.AppendPath("/transferOut", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateTransferOutRequest(string subscriptionId, string resourceGroupName, string domainName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DomainRegistration/domains/", false); + uri.AppendPath(domainName, true); + uri.AppendPath("/transferOut", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Transfer out domain to another registrar. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of domain. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> TransferOutAsync(string subscriptionId, string resourceGroupName, string domainName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); + + using var message = CreateTransferOutRequest(subscriptionId, resourceGroupName, domainName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AppServiceDomainData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AppServiceDomainData.DeserializeAppServiceDomainData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Transfer out domain to another registrar. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of domain. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response TransferOut(string subscriptionId, string resourceGroupName, string domainName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); + + using var message = CreateTransferOutRequest(subscriptionId, resourceGroupName, domainName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AppServiceDomainData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AppServiceDomainData.DeserializeAppServiceDomainData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId) { var uri = new RawRequestUriBuilder(); diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/GetUsagesInLocationRestOperations.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/GetUsagesInLocationRestOperations.cs new file mode 100644 index 0000000000000..cafc73e821095 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/GetUsagesInLocationRestOperations.cs @@ -0,0 +1,201 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService +{ + internal partial class GetUsagesInLocationRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of GetUsagesInLocationRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public GetUsagesInLocationRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2023-12-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, AzureLocation location) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Web/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/usages", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, AzureLocation location) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Web/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/usages", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List usages in cores for all skus used by a subscription in a given location, for a specific quota type. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// The name of the Azure region. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListRequest(subscriptionId, location); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + CsmUsageQuotaListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = CsmUsageQuotaListResult.DeserializeCsmUsageQuotaListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List usages in cores for all skus used by a subscription in a given location, for a specific quota type. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// The name of the Azure region. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListRequest(subscriptionId, location); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + CsmUsageQuotaListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = CsmUsageQuotaListResult.DeserializeCsmUsageQuotaListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, AzureLocation location) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, AzureLocation location) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List usages in cores for all skus used by a subscription in a given location, for a specific quota type. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// The name of the Azure region. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, location); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + CsmUsageQuotaListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = CsmUsageQuotaListResult.DeserializeCsmUsageQuotaListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List usages in cores for all skus used by a subscription in a given location, for a specific quota type. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// The name of the Azure region. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, location); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + CsmUsageQuotaListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = CsmUsageQuotaListResult.DeserializeCsmUsageQuotaListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/GlobalRestOperations.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/GlobalRestOperations.cs index 77b5a125d4fec..546a696d5071d 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/GlobalRestOperations.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/GlobalRestOperations.cs @@ -33,7 +33,7 @@ public GlobalRestOperations(HttpPipeline pipeline, string applicationId, Uri end { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-02-01"; + _apiVersion = apiVersion ?? "2023-12-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/KubeEnvironmentsRestOperations.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/KubeEnvironmentsRestOperations.cs index f01294a0f8000..0a7cccdac0e6c 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/KubeEnvironmentsRestOperations.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/KubeEnvironmentsRestOperations.cs @@ -32,7 +32,7 @@ public KubeEnvironmentsRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-02-01"; + _apiVersion = apiVersion ?? "2023-12-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/ProviderRestOperations.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/ProviderRestOperations.cs index 4fe6c974c5a40..5048488eb260e 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/ProviderRestOperations.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/ProviderRestOperations.cs @@ -32,7 +32,7 @@ public ProviderRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-02-01"; + _apiVersion = apiVersion ?? "2023-12-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/RecommendationsRestOperations.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/RecommendationsRestOperations.cs index 06bf731ff8656..3da8379f17753 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/RecommendationsRestOperations.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/RecommendationsRestOperations.cs @@ -32,7 +32,7 @@ public RecommendationsRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-02-01"; + _apiVersion = apiVersion ?? "2023-12-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/ResourceHealthMetadataRestOperations.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/ResourceHealthMetadataRestOperations.cs index 1c3af539ae6f6..8a3afb21970e2 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/ResourceHealthMetadataRestOperations.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/ResourceHealthMetadataRestOperations.cs @@ -32,7 +32,7 @@ public ResourceHealthMetadataRestOperations(HttpPipeline pipeline, string applic { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-02-01"; + _apiVersion = apiVersion ?? "2023-12-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/StaticSitesRestOperations.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/StaticSitesRestOperations.cs index f89518983b9b3..6f2f0973dda22 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/StaticSitesRestOperations.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/StaticSitesRestOperations.cs @@ -32,7 +32,7 @@ public StaticSitesRestOperations(HttpPipeline pipeline, string applicationId, Ur { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-02-01"; + _apiVersion = apiVersion ?? "2023-12-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -1494,7 +1494,7 @@ public Response CreateOrUpdateStaticSiteBuild } } - internal RequestUriBuilder CreateListStaticSiteBuildFunctionsRequestUri(string subscriptionId, string resourceGroupName, string name, string environmentName) + internal RequestUriBuilder CreateGetBuildDatabaseConnectionsRequestUri(string subscriptionId, string resourceGroupName, string name, string environmentName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -1506,12 +1506,12 @@ internal RequestUriBuilder CreateListStaticSiteBuildFunctionsRequestUri(string s uri.AppendPath(name, true); uri.AppendPath("/builds/", false); uri.AppendPath(environmentName, true); - uri.AppendPath("/functions", false); + uri.AppendPath("/databaseConnections", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListStaticSiteBuildFunctionsRequest(string subscriptionId, string resourceGroupName, string name, string environmentName) + internal HttpMessage CreateGetBuildDatabaseConnectionsRequest(string subscriptionId, string resourceGroupName, string name, string environmentName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -1526,7 +1526,7 @@ internal HttpMessage CreateListStaticSiteBuildFunctionsRequest(string subscripti uri.AppendPath(name, true); uri.AppendPath("/builds/", false); uri.AppendPath(environmentName, true); - uri.AppendPath("/functions", false); + uri.AppendPath("/databaseConnections", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -1534,7 +1534,7 @@ internal HttpMessage CreateListStaticSiteBuildFunctionsRequest(string subscripti return message; } - /// Description for Gets the functions of a particular static site build. + /// Returns overviews of database connections for a static site build. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. @@ -1542,22 +1542,22 @@ internal HttpMessage CreateListStaticSiteBuildFunctionsRequest(string subscripti /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> ListStaticSiteBuildFunctionsAsync(string subscriptionId, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default) + public async Task> GetBuildDatabaseConnectionsAsync(string subscriptionId, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); - using var message = CreateListStaticSiteBuildFunctionsRequest(subscriptionId, resourceGroupName, name, environmentName); + using var message = CreateGetBuildDatabaseConnectionsRequest(subscriptionId, resourceGroupName, name, environmentName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - StaticSiteFunctionOverviewListResult value = default; + DatabaseConnectionCollection value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = StaticSiteFunctionOverviewListResult.DeserializeStaticSiteFunctionOverviewListResult(document.RootElement); + value = DatabaseConnectionCollection.DeserializeDatabaseConnectionCollection(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -1565,7 +1565,7 @@ public async Task> ListStaticSite } } - /// Description for Gets the functions of a particular static site build. + /// Returns overviews of database connections for a static site build. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. @@ -1573,22 +1573,22 @@ public async Task> ListStaticSite /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response ListStaticSiteBuildFunctions(string subscriptionId, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default) + public Response GetBuildDatabaseConnections(string subscriptionId, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); - using var message = CreateListStaticSiteBuildFunctionsRequest(subscriptionId, resourceGroupName, name, environmentName); + using var message = CreateGetBuildDatabaseConnectionsRequest(subscriptionId, resourceGroupName, name, environmentName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - StaticSiteFunctionOverviewListResult value = default; + DatabaseConnectionCollection value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = StaticSiteFunctionOverviewListResult.DeserializeStaticSiteFunctionOverviewListResult(document.RootElement); + value = DatabaseConnectionCollection.DeserializeDatabaseConnectionCollection(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -1596,7 +1596,7 @@ public Response ListStaticSiteBuildFunctio } } - internal RequestUriBuilder CreateListStaticSiteBuildAppSettingsRequestUri(string subscriptionId, string resourceGroupName, string name, string environmentName) + internal RequestUriBuilder CreateGetBuildDatabaseConnectionRequestUri(string subscriptionId, string resourceGroupName, string name, string environmentName, string databaseConnectionName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -1608,16 +1608,17 @@ internal RequestUriBuilder CreateListStaticSiteBuildAppSettingsRequestUri(string uri.AppendPath(name, true); uri.AppendPath("/builds/", false); uri.AppendPath(environmentName, true); - uri.AppendPath("/listAppSettings", false); + uri.AppendPath("/databaseConnections/", false); + uri.AppendPath(databaseConnectionName, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListStaticSiteBuildAppSettingsRequest(string subscriptionId, string resourceGroupName, string name, string environmentName) + internal HttpMessage CreateGetBuildDatabaseConnectionRequest(string subscriptionId, string resourceGroupName, string name, string environmentName, string databaseConnectionName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Post; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -1628,7 +1629,8 @@ internal HttpMessage CreateListStaticSiteBuildAppSettingsRequest(string subscrip uri.AppendPath(name, true); uri.AppendPath("/builds/", false); uri.AppendPath(environmentName, true); - uri.AppendPath("/listAppSettings", false); + uri.AppendPath("/databaseConnections/", false); + uri.AppendPath(databaseConnectionName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -1636,69 +1638,77 @@ internal HttpMessage CreateListStaticSiteBuildAppSettingsRequest(string subscrip return message; } - /// Description for Gets the application settings of a static site build. + /// Returns overview of a database connection for a static site build by name. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. /// The stage site identifier. + /// Name of the database connection. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> ListStaticSiteBuildAppSettingsAsync(string subscriptionId, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetBuildDatabaseConnectionAsync(string subscriptionId, string resourceGroupName, string name, string environmentName, string databaseConnectionName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNullOrEmpty(databaseConnectionName, nameof(databaseConnectionName)); - using var message = CreateListStaticSiteBuildAppSettingsRequest(subscriptionId, resourceGroupName, name, environmentName); + using var message = CreateGetBuildDatabaseConnectionRequest(subscriptionId, resourceGroupName, name, environmentName, databaseConnectionName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - AppServiceConfigurationDictionary value = default; + StaticSiteDatabaseConnectionData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = AppServiceConfigurationDictionary.DeserializeAppServiceConfigurationDictionary(document.RootElement); + value = StaticSiteDatabaseConnectionData.DeserializeStaticSiteDatabaseConnectionData(document.RootElement); return Response.FromValue(value, message.Response); } + case 404: + return Response.FromValue((StaticSiteDatabaseConnectionData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Description for Gets the application settings of a static site build. + /// Returns overview of a database connection for a static site build by name. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. /// The stage site identifier. + /// Name of the database connection. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response ListStaticSiteBuildAppSettings(string subscriptionId, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response GetBuildDatabaseConnection(string subscriptionId, string resourceGroupName, string name, string environmentName, string databaseConnectionName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNullOrEmpty(databaseConnectionName, nameof(databaseConnectionName)); - using var message = CreateListStaticSiteBuildAppSettingsRequest(subscriptionId, resourceGroupName, name, environmentName); + using var message = CreateGetBuildDatabaseConnectionRequest(subscriptionId, resourceGroupName, name, environmentName, databaseConnectionName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - AppServiceConfigurationDictionary value = default; + StaticSiteDatabaseConnectionData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = AppServiceConfigurationDictionary.DeserializeAppServiceConfigurationDictionary(document.RootElement); + value = StaticSiteDatabaseConnectionData.DeserializeStaticSiteDatabaseConnectionData(document.RootElement); return Response.FromValue(value, message.Response); } + case 404: + return Response.FromValue((StaticSiteDatabaseConnectionData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateListStaticSiteBuildFunctionAppSettingsRequestUri(string subscriptionId, string resourceGroupName, string name, string environmentName) + internal RequestUriBuilder CreateCreateOrUpdateBuildDatabaseConnectionRequestUri(string subscriptionId, string resourceGroupName, string name, string environmentName, string databaseConnectionName, StaticSiteDatabaseConnectionData data) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -1710,16 +1720,17 @@ internal RequestUriBuilder CreateListStaticSiteBuildFunctionAppSettingsRequestUr uri.AppendPath(name, true); uri.AppendPath("/builds/", false); uri.AppendPath(environmentName, true); - uri.AppendPath("/listFunctionAppSettings", false); + uri.AppendPath("/databaseConnections/", false); + uri.AppendPath(databaseConnectionName, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListStaticSiteBuildFunctionAppSettingsRequest(string subscriptionId, string resourceGroupName, string name, string environmentName) + internal HttpMessage CreateCreateOrUpdateBuildDatabaseConnectionRequest(string subscriptionId, string resourceGroupName, string name, string environmentName, string databaseConnectionName, StaticSiteDatabaseConnectionData data) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Post; + request.Method = RequestMethod.Put; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -1730,38 +1741,47 @@ internal HttpMessage CreateListStaticSiteBuildFunctionAppSettingsRequest(string uri.AppendPath(name, true); uri.AppendPath("/builds/", false); uri.AppendPath(environmentName, true); - uri.AppendPath("/listFunctionAppSettings", false); + uri.AppendPath("/databaseConnections/", false); + uri.AppendPath(databaseConnectionName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; _userAgent.Apply(message); return message; } - /// Description for Gets the application settings of a static site build. + /// Description for Create or update a database connection for a static site build. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. /// The stage site identifier. + /// Name of the database connection. + /// A JSON representation of the database connection request properties. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> ListStaticSiteBuildFunctionAppSettingsAsync(string subscriptionId, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default) + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> CreateOrUpdateBuildDatabaseConnectionAsync(string subscriptionId, string resourceGroupName, string name, string environmentName, string databaseConnectionName, StaticSiteDatabaseConnectionData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNullOrEmpty(databaseConnectionName, nameof(databaseConnectionName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateListStaticSiteBuildFunctionAppSettingsRequest(subscriptionId, resourceGroupName, name, environmentName); + using var message = CreateCreateOrUpdateBuildDatabaseConnectionRequest(subscriptionId, resourceGroupName, name, environmentName, databaseConnectionName, data); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - AppServiceConfigurationDictionary value = default; + StaticSiteDatabaseConnectionData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = AppServiceConfigurationDictionary.DeserializeAppServiceConfigurationDictionary(document.RootElement); + value = StaticSiteDatabaseConnectionData.DeserializeStaticSiteDatabaseConnectionData(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -1769,30 +1789,34 @@ public async Task> ListStaticSiteBui } } - /// Description for Gets the application settings of a static site build. + /// Description for Create or update a database connection for a static site build. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. /// The stage site identifier. + /// Name of the database connection. + /// A JSON representation of the database connection request properties. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response ListStaticSiteBuildFunctionAppSettings(string subscriptionId, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default) + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdateBuildDatabaseConnection(string subscriptionId, string resourceGroupName, string name, string environmentName, string databaseConnectionName, StaticSiteDatabaseConnectionData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNullOrEmpty(databaseConnectionName, nameof(databaseConnectionName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateListStaticSiteBuildFunctionAppSettingsRequest(subscriptionId, resourceGroupName, name, environmentName); + using var message = CreateCreateOrUpdateBuildDatabaseConnectionRequest(subscriptionId, resourceGroupName, name, environmentName, databaseConnectionName, data); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - AppServiceConfigurationDictionary value = default; + StaticSiteDatabaseConnectionData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = AppServiceConfigurationDictionary.DeserializeAppServiceConfigurationDictionary(document.RootElement); + value = StaticSiteDatabaseConnectionData.DeserializeStaticSiteDatabaseConnectionData(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -1800,7 +1824,7 @@ public Response ListStaticSiteBuildFunctionAp } } - internal RequestUriBuilder CreateGetUserProvidedFunctionAppsForStaticSiteBuildRequestUri(string subscriptionId, string resourceGroupName, string name, string environmentName) + internal RequestUriBuilder CreateDeleteBuildDatabaseConnectionRequestUri(string subscriptionId, string resourceGroupName, string name, string environmentName, string databaseConnectionName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -1812,16 +1836,17 @@ internal RequestUriBuilder CreateGetUserProvidedFunctionAppsForStaticSiteBuildRe uri.AppendPath(name, true); uri.AppendPath("/builds/", false); uri.AppendPath(environmentName, true); - uri.AppendPath("/userProvidedFunctionApps", false); + uri.AppendPath("/databaseConnections/", false); + uri.AppendPath(databaseConnectionName, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateGetUserProvidedFunctionAppsForStaticSiteBuildRequest(string subscriptionId, string resourceGroupName, string name, string environmentName) + internal HttpMessage CreateDeleteBuildDatabaseConnectionRequest(string subscriptionId, string resourceGroupName, string name, string environmentName, string databaseConnectionName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Delete; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -1832,7 +1857,8 @@ internal HttpMessage CreateGetUserProvidedFunctionAppsForStaticSiteBuildRequest( uri.AppendPath(name, true); uri.AppendPath("/builds/", false); uri.AppendPath(environmentName, true); - uri.AppendPath("/userProvidedFunctionApps", false); + uri.AppendPath("/databaseConnections/", false); + uri.AppendPath(databaseConnectionName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -1840,69 +1866,65 @@ internal HttpMessage CreateGetUserProvidedFunctionAppsForStaticSiteBuildRequest( return message; } - /// Description for Gets the details of the user provided function apps registered with a static site build. + /// Delete a database connection for a static site build. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. /// The stage site identifier. + /// Name of the database connection. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetUserProvidedFunctionAppsForStaticSiteBuildAsync(string subscriptionId, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task DeleteBuildDatabaseConnectionAsync(string subscriptionId, string resourceGroupName, string name, string environmentName, string databaseConnectionName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNullOrEmpty(databaseConnectionName, nameof(databaseConnectionName)); - using var message = CreateGetUserProvidedFunctionAppsForStaticSiteBuildRequest(subscriptionId, resourceGroupName, name, environmentName); + using var message = CreateDeleteBuildDatabaseConnectionRequest(subscriptionId, resourceGroupName, name, environmentName, databaseConnectionName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - { - StaticSiteUserProvidedFunctionAppsListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = StaticSiteUserProvidedFunctionAppsListResult.DeserializeStaticSiteUserProvidedFunctionAppsListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 204: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Description for Gets the details of the user provided function apps registered with a static site build. + /// Delete a database connection for a static site build. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. /// The stage site identifier. + /// Name of the database connection. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response GetUserProvidedFunctionAppsForStaticSiteBuild(string subscriptionId, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response DeleteBuildDatabaseConnection(string subscriptionId, string resourceGroupName, string name, string environmentName, string databaseConnectionName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNullOrEmpty(databaseConnectionName, nameof(databaseConnectionName)); - using var message = CreateGetUserProvidedFunctionAppsForStaticSiteBuildRequest(subscriptionId, resourceGroupName, name, environmentName); + using var message = CreateDeleteBuildDatabaseConnectionRequest(subscriptionId, resourceGroupName, name, environmentName, databaseConnectionName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - { - StaticSiteUserProvidedFunctionAppsListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = StaticSiteUserProvidedFunctionAppsListResult.DeserializeStaticSiteUserProvidedFunctionAppsListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 204: + return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateGetUserProvidedFunctionAppForStaticSiteBuildRequestUri(string subscriptionId, string resourceGroupName, string name, string environmentName, string functionAppName) + internal RequestUriBuilder CreateUpdateBuildDatabaseConnectionRequestUri(string subscriptionId, string resourceGroupName, string name, string environmentName, string databaseConnectionName, StaticSiteDatabaseConnectionPatchContent content) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -1914,17 +1936,17 @@ internal RequestUriBuilder CreateGetUserProvidedFunctionAppForStaticSiteBuildReq uri.AppendPath(name, true); uri.AppendPath("/builds/", false); uri.AppendPath(environmentName, true); - uri.AppendPath("/userProvidedFunctionApps/", false); - uri.AppendPath(functionAppName, true); + uri.AppendPath("/databaseConnections/", false); + uri.AppendPath(databaseConnectionName, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateGetUserProvidedFunctionAppForStaticSiteBuildRequest(string subscriptionId, string resourceGroupName, string name, string environmentName, string functionAppName) + internal HttpMessage CreateUpdateBuildDatabaseConnectionRequest(string subscriptionId, string resourceGroupName, string name, string environmentName, string databaseConnectionName, StaticSiteDatabaseConnectionPatchContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Patch; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -1935,86 +1957,90 @@ internal HttpMessage CreateGetUserProvidedFunctionAppForStaticSiteBuildRequest(s uri.AppendPath(name, true); uri.AppendPath("/builds/", false); uri.AppendPath(environmentName, true); - uri.AppendPath("/userProvidedFunctionApps/", false); - uri.AppendPath(functionAppName, true); + uri.AppendPath("/databaseConnections/", false); + uri.AppendPath(databaseConnectionName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; _userAgent.Apply(message); return message; } - /// Description for Gets the details of the user provided function app registered with a static site build. + /// Description for Create or update a database connection for a static site build. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. /// The stage site identifier. - /// Name of the function app registered with the static site build. + /// Name of the database connection. + /// A JSON representation of the database connection request properties. /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public async Task> GetUserProvidedFunctionAppForStaticSiteBuildAsync(string subscriptionId, string resourceGroupName, string name, string environmentName, string functionAppName, CancellationToken cancellationToken = default) + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> UpdateBuildDatabaseConnectionAsync(string subscriptionId, string resourceGroupName, string name, string environmentName, string databaseConnectionName, StaticSiteDatabaseConnectionPatchContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); - Argument.AssertNotNullOrEmpty(functionAppName, nameof(functionAppName)); + Argument.AssertNotNullOrEmpty(databaseConnectionName, nameof(databaseConnectionName)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateGetUserProvidedFunctionAppForStaticSiteBuildRequest(subscriptionId, resourceGroupName, name, environmentName, functionAppName); + using var message = CreateUpdateBuildDatabaseConnectionRequest(subscriptionId, resourceGroupName, name, environmentName, databaseConnectionName, content); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - StaticSiteUserProvidedFunctionAppData value = default; + StaticSiteDatabaseConnectionData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = StaticSiteUserProvidedFunctionAppData.DeserializeStaticSiteUserProvidedFunctionAppData(document.RootElement); + value = StaticSiteDatabaseConnectionData.DeserializeStaticSiteDatabaseConnectionData(document.RootElement); return Response.FromValue(value, message.Response); } - case 404: - return Response.FromValue((StaticSiteUserProvidedFunctionAppData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Description for Gets the details of the user provided function app registered with a static site build. + /// Description for Create or update a database connection for a static site build. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. /// The stage site identifier. - /// Name of the function app registered with the static site build. + /// Name of the database connection. + /// A JSON representation of the database connection request properties. /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public Response GetUserProvidedFunctionAppForStaticSiteBuild(string subscriptionId, string resourceGroupName, string name, string environmentName, string functionAppName, CancellationToken cancellationToken = default) + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response UpdateBuildDatabaseConnection(string subscriptionId, string resourceGroupName, string name, string environmentName, string databaseConnectionName, StaticSiteDatabaseConnectionPatchContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); - Argument.AssertNotNullOrEmpty(functionAppName, nameof(functionAppName)); + Argument.AssertNotNullOrEmpty(databaseConnectionName, nameof(databaseConnectionName)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateGetUserProvidedFunctionAppForStaticSiteBuildRequest(subscriptionId, resourceGroupName, name, environmentName, functionAppName); + using var message = CreateUpdateBuildDatabaseConnectionRequest(subscriptionId, resourceGroupName, name, environmentName, databaseConnectionName, content); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - StaticSiteUserProvidedFunctionAppData value = default; + StaticSiteDatabaseConnectionData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = StaticSiteUserProvidedFunctionAppData.DeserializeStaticSiteUserProvidedFunctionAppData(document.RootElement); + value = StaticSiteDatabaseConnectionData.DeserializeStaticSiteDatabaseConnectionData(document.RootElement); return Response.FromValue(value, message.Response); } - case 404: - return Response.FromValue((StaticSiteUserProvidedFunctionAppData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateRegisterUserProvidedFunctionAppWithStaticSiteBuildRequestUri(string subscriptionId, string resourceGroupName, string name, string environmentName, string functionAppName, StaticSiteUserProvidedFunctionAppData data, bool? isForced) + internal RequestUriBuilder CreateGetBuildDatabaseConnectionWithDetailsRequestUri(string subscriptionId, string resourceGroupName, string name, string environmentName, string databaseConnectionName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -2026,21 +2052,18 @@ internal RequestUriBuilder CreateRegisterUserProvidedFunctionAppWithStaticSiteBu uri.AppendPath(name, true); uri.AppendPath("/builds/", false); uri.AppendPath(environmentName, true); - uri.AppendPath("/userProvidedFunctionApps/", false); - uri.AppendPath(functionAppName, true); - if (isForced != null) - { - uri.AppendQuery("isForced", isForced.Value, true); - } + uri.AppendPath("/databaseConnections/", false); + uri.AppendPath(databaseConnectionName, true); + uri.AppendPath("/show", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateRegisterUserProvidedFunctionAppWithStaticSiteBuildRequest(string subscriptionId, string resourceGroupName, string name, string environmentName, string functionAppName, StaticSiteUserProvidedFunctionAppData data, bool? isForced) + internal HttpMessage CreateGetBuildDatabaseConnectionWithDetailsRequest(string subscriptionId, string resourceGroupName, string name, string environmentName, string databaseConnectionName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Put; + request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -2051,88 +2074,83 @@ internal HttpMessage CreateRegisterUserProvidedFunctionAppWithStaticSiteBuildReq uri.AppendPath(name, true); uri.AppendPath("/builds/", false); uri.AppendPath(environmentName, true); - uri.AppendPath("/userProvidedFunctionApps/", false); - uri.AppendPath(functionAppName, true); - if (isForced != null) - { - uri.AppendQuery("isForced", isForced.Value, true); - } + uri.AppendPath("/databaseConnections/", false); + uri.AppendPath(databaseConnectionName, true); + uri.AppendPath("/show", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); - request.Content = content; _userAgent.Apply(message); return message; } - /// Description for Register a user provided function app with a static site build. + /// Returns details of a database connection for a static site build by name. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. /// The stage site identifier. - /// Name of the function app to register with the static site build. - /// A JSON representation of the user provided function app properties. See example. - /// Specify <code>true</code> to force the update of the auth configuration on the function app even if an AzureStaticWebApps provider is already configured on the function app. The default is <code>false</code>. + /// Name of the database connection. /// The cancellation token to use. - /// , , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public async Task RegisterUserProvidedFunctionAppWithStaticSiteBuildAsync(string subscriptionId, string resourceGroupName, string name, string environmentName, string functionAppName, StaticSiteUserProvidedFunctionAppData data, bool? isForced = null, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetBuildDatabaseConnectionWithDetailsAsync(string subscriptionId, string resourceGroupName, string name, string environmentName, string databaseConnectionName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); - Argument.AssertNotNullOrEmpty(functionAppName, nameof(functionAppName)); - Argument.AssertNotNull(data, nameof(data)); + Argument.AssertNotNullOrEmpty(databaseConnectionName, nameof(databaseConnectionName)); - using var message = CreateRegisterUserProvidedFunctionAppWithStaticSiteBuildRequest(subscriptionId, resourceGroupName, name, environmentName, functionAppName, data, isForced); + using var message = CreateGetBuildDatabaseConnectionWithDetailsRequest(subscriptionId, resourceGroupName, name, environmentName, databaseConnectionName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + StaticSiteDatabaseConnectionData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = StaticSiteDatabaseConnectionData.DeserializeStaticSiteDatabaseConnectionData(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// Description for Register a user provided function app with a static site build. + /// Returns details of a database connection for a static site build by name. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. /// The stage site identifier. - /// Name of the function app to register with the static site build. - /// A JSON representation of the user provided function app properties. See example. - /// Specify <code>true</code> to force the update of the auth configuration on the function app even if an AzureStaticWebApps provider is already configured on the function app. The default is <code>false</code>. + /// Name of the database connection. /// The cancellation token to use. - /// , , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public Response RegisterUserProvidedFunctionAppWithStaticSiteBuild(string subscriptionId, string resourceGroupName, string name, string environmentName, string functionAppName, StaticSiteUserProvidedFunctionAppData data, bool? isForced = null, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response GetBuildDatabaseConnectionWithDetails(string subscriptionId, string resourceGroupName, string name, string environmentName, string databaseConnectionName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); - Argument.AssertNotNullOrEmpty(functionAppName, nameof(functionAppName)); - Argument.AssertNotNull(data, nameof(data)); + Argument.AssertNotNullOrEmpty(databaseConnectionName, nameof(databaseConnectionName)); - using var message = CreateRegisterUserProvidedFunctionAppWithStaticSiteBuildRequest(subscriptionId, resourceGroupName, name, environmentName, functionAppName, data, isForced); + using var message = CreateGetBuildDatabaseConnectionWithDetailsRequest(subscriptionId, resourceGroupName, name, environmentName, databaseConnectionName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + StaticSiteDatabaseConnectionData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = StaticSiteDatabaseConnectionData.DeserializeStaticSiteDatabaseConnectionData(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateDetachUserProvidedFunctionAppFromStaticSiteBuildRequestUri(string subscriptionId, string resourceGroupName, string name, string environmentName, string functionAppName) + internal RequestUriBuilder CreateListStaticSiteBuildFunctionsRequestUri(string subscriptionId, string resourceGroupName, string name, string environmentName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -2144,17 +2162,16 @@ internal RequestUriBuilder CreateDetachUserProvidedFunctionAppFromStaticSiteBuil uri.AppendPath(name, true); uri.AppendPath("/builds/", false); uri.AppendPath(environmentName, true); - uri.AppendPath("/userProvidedFunctionApps/", false); - uri.AppendPath(functionAppName, true); + uri.AppendPath("/functions", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateDetachUserProvidedFunctionAppFromStaticSiteBuildRequest(string subscriptionId, string resourceGroupName, string name, string environmentName, string functionAppName) + internal HttpMessage CreateListStaticSiteBuildFunctionsRequest(string subscriptionId, string resourceGroupName, string name, string environmentName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Delete; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -2165,8 +2182,7 @@ internal HttpMessage CreateDetachUserProvidedFunctionAppFromStaticSiteBuildReque uri.AppendPath(name, true); uri.AppendPath("/builds/", false); uri.AppendPath(environmentName, true); - uri.AppendPath("/userProvidedFunctionApps/", false); - uri.AppendPath(functionAppName, true); + uri.AppendPath("/functions", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -2174,65 +2190,69 @@ internal HttpMessage CreateDetachUserProvidedFunctionAppFromStaticSiteBuildReque return message; } - /// Description for Detach the user provided function app from the static site build. + /// Description for Gets the functions of a particular static site build. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. /// The stage site identifier. - /// Name of the function app registered with the static site build. /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public async Task DetachUserProvidedFunctionAppFromStaticSiteBuildAsync(string subscriptionId, string resourceGroupName, string name, string environmentName, string functionAppName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListStaticSiteBuildFunctionsAsync(string subscriptionId, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); - Argument.AssertNotNullOrEmpty(functionAppName, nameof(functionAppName)); - using var message = CreateDetachUserProvidedFunctionAppFromStaticSiteBuildRequest(subscriptionId, resourceGroupName, name, environmentName, functionAppName); + using var message = CreateListStaticSiteBuildFunctionsRequest(subscriptionId, resourceGroupName, name, environmentName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 204: - return message.Response; + { + StaticSiteFunctionOverviewListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = StaticSiteFunctionOverviewListResult.DeserializeStaticSiteFunctionOverviewListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// Description for Detach the user provided function app from the static site build. + /// Description for Gets the functions of a particular static site build. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. /// The stage site identifier. - /// Name of the function app registered with the static site build. /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public Response DetachUserProvidedFunctionAppFromStaticSiteBuild(string subscriptionId, string resourceGroupName, string name, string environmentName, string functionAppName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListStaticSiteBuildFunctions(string subscriptionId, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); - Argument.AssertNotNullOrEmpty(functionAppName, nameof(functionAppName)); - using var message = CreateDetachUserProvidedFunctionAppFromStaticSiteBuildRequest(subscriptionId, resourceGroupName, name, environmentName, functionAppName); + using var message = CreateListStaticSiteBuildFunctionsRequest(subscriptionId, resourceGroupName, name, environmentName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 204: - return message.Response; + { + StaticSiteFunctionOverviewListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = StaticSiteFunctionOverviewListResult.DeserializeStaticSiteFunctionOverviewListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateCreateZipDeploymentForStaticSiteBuildRequestUri(string subscriptionId, string resourceGroupName, string name, string environmentName, StaticSiteZipDeployment staticSiteZipDeploymentEnvelope) + internal RequestUriBuilder CreateListStaticSiteBuildAppSettingsRequestUri(string subscriptionId, string resourceGroupName, string name, string environmentName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -2244,12 +2264,12 @@ internal RequestUriBuilder CreateCreateZipDeploymentForStaticSiteBuildRequestUri uri.AppendPath(name, true); uri.AppendPath("/builds/", false); uri.AppendPath(environmentName, true); - uri.AppendPath("/zipdeploy", false); + uri.AppendPath("/listAppSettings", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateCreateZipDeploymentForStaticSiteBuildRequest(string subscriptionId, string resourceGroupName, string name, string environmentName, StaticSiteZipDeployment staticSiteZipDeploymentEnvelope) + internal HttpMessage CreateListStaticSiteBuildAppSettingsRequest(string subscriptionId, string resourceGroupName, string name, string environmentName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -2264,77 +2284,77 @@ internal HttpMessage CreateCreateZipDeploymentForStaticSiteBuildRequest(string s uri.AppendPath(name, true); uri.AppendPath("/builds/", false); uri.AppendPath(environmentName, true); - uri.AppendPath("/zipdeploy", false); + uri.AppendPath("/listAppSettings", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(staticSiteZipDeploymentEnvelope, ModelSerializationExtensions.WireOptions); - request.Content = content; _userAgent.Apply(message); return message; } - /// Description for Deploys zipped content to a specific environment of a static site. + /// Description for Gets the application settings of a static site build. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. - /// Name of the environment. - /// A JSON representation of the StaticSiteZipDeployment properties. See example. + /// The stage site identifier. /// The cancellation token to use. - /// , , , or is null. + /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task CreateZipDeploymentForStaticSiteBuildAsync(string subscriptionId, string resourceGroupName, string name, string environmentName, StaticSiteZipDeployment staticSiteZipDeploymentEnvelope, CancellationToken cancellationToken = default) + public async Task> ListStaticSiteBuildAppSettingsAsync(string subscriptionId, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); - Argument.AssertNotNull(staticSiteZipDeploymentEnvelope, nameof(staticSiteZipDeploymentEnvelope)); - using var message = CreateCreateZipDeploymentForStaticSiteBuildRequest(subscriptionId, resourceGroupName, name, environmentName, staticSiteZipDeploymentEnvelope); + using var message = CreateListStaticSiteBuildAppSettingsRequest(subscriptionId, resourceGroupName, name, environmentName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + AppServiceConfigurationDictionary value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AppServiceConfigurationDictionary.DeserializeAppServiceConfigurationDictionary(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// Description for Deploys zipped content to a specific environment of a static site. + /// Description for Gets the application settings of a static site build. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. - /// Name of the environment. - /// A JSON representation of the StaticSiteZipDeployment properties. See example. + /// The stage site identifier. /// The cancellation token to use. - /// , , , or is null. + /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response CreateZipDeploymentForStaticSiteBuild(string subscriptionId, string resourceGroupName, string name, string environmentName, StaticSiteZipDeployment staticSiteZipDeploymentEnvelope, CancellationToken cancellationToken = default) + public Response ListStaticSiteBuildAppSettings(string subscriptionId, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); - Argument.AssertNotNull(staticSiteZipDeploymentEnvelope, nameof(staticSiteZipDeploymentEnvelope)); - using var message = CreateCreateZipDeploymentForStaticSiteBuildRequest(subscriptionId, resourceGroupName, name, environmentName, staticSiteZipDeploymentEnvelope); + using var message = CreateListStaticSiteBuildAppSettingsRequest(subscriptionId, resourceGroupName, name, environmentName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + AppServiceConfigurationDictionary value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AppServiceConfigurationDictionary.DeserializeAppServiceConfigurationDictionary(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateCreateOrUpdateStaticSiteAppSettingsRequestUri(string subscriptionId, string resourceGroupName, string name, AppServiceConfigurationDictionary appSettings) + internal RequestUriBuilder CreateListStaticSiteBuildFunctionAppSettingsRequestUri(string subscriptionId, string resourceGroupName, string name, string environmentName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -2344,16 +2364,18 @@ internal RequestUriBuilder CreateCreateOrUpdateStaticSiteAppSettingsRequestUri(s uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/config/appsettings", false); + uri.AppendPath("/builds/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/listFunctionAppSettings", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateCreateOrUpdateStaticSiteAppSettingsRequest(string subscriptionId, string resourceGroupName, string name, AppServiceConfigurationDictionary appSettings) + internal HttpMessage CreateListStaticSiteBuildFunctionAppSettingsRequest(string subscriptionId, string resourceGroupName, string name, string environmentName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Put; + request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -2362,34 +2384,32 @@ internal HttpMessage CreateCreateOrUpdateStaticSiteAppSettingsRequest(string sub uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/config/appsettings", false); + uri.AppendPath("/builds/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/listFunctionAppSettings", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(appSettings, ModelSerializationExtensions.WireOptions); - request.Content = content; _userAgent.Apply(message); return message; } - /// Description for Creates or updates the app settings of a static site. + /// Description for Gets the application settings of a static site build. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. - /// The dictionary containing the static site app settings to update. + /// The stage site identifier. /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> CreateOrUpdateStaticSiteAppSettingsAsync(string subscriptionId, string resourceGroupName, string name, AppServiceConfigurationDictionary appSettings, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListStaticSiteBuildFunctionAppSettingsAsync(string subscriptionId, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNull(appSettings, nameof(appSettings)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); - using var message = CreateCreateOrUpdateStaticSiteAppSettingsRequest(subscriptionId, resourceGroupName, name, appSettings); + using var message = CreateListStaticSiteBuildFunctionAppSettingsRequest(subscriptionId, resourceGroupName, name, environmentName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -2405,22 +2425,22 @@ public async Task> CreateOrUpdateSta } } - /// Description for Creates or updates the app settings of a static site. + /// Description for Gets the application settings of a static site build. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. - /// The dictionary containing the static site app settings to update. + /// The stage site identifier. /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdateStaticSiteAppSettings(string subscriptionId, string resourceGroupName, string name, AppServiceConfigurationDictionary appSettings, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListStaticSiteBuildFunctionAppSettings(string subscriptionId, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNull(appSettings, nameof(appSettings)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); - using var message = CreateCreateOrUpdateStaticSiteAppSettingsRequest(subscriptionId, resourceGroupName, name, appSettings); + using var message = CreateListStaticSiteBuildFunctionAppSettingsRequest(subscriptionId, resourceGroupName, name, environmentName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -2436,7 +2456,7 @@ public Response CreateOrUpdateStaticSiteAppSe } } - internal RequestUriBuilder CreateCreateOrUpdateStaticSiteFunctionAppSettingsRequestUri(string subscriptionId, string resourceGroupName, string name, AppServiceConfigurationDictionary appSettings) + internal RequestUriBuilder CreateGetBuildDatabaseConnectionsWithDetailsRequestUri(string subscriptionId, string resourceGroupName, string name, string environmentName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -2446,16 +2466,18 @@ internal RequestUriBuilder CreateCreateOrUpdateStaticSiteFunctionAppSettingsRequ uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/config/functionappsettings", false); + uri.AppendPath("/builds/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/showDatabaseConnections", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateCreateOrUpdateStaticSiteFunctionAppSettingsRequest(string subscriptionId, string resourceGroupName, string name, AppServiceConfigurationDictionary appSettings) + internal HttpMessage CreateGetBuildDatabaseConnectionsWithDetailsRequest(string subscriptionId, string resourceGroupName, string name, string environmentName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Put; + request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -2464,42 +2486,40 @@ internal HttpMessage CreateCreateOrUpdateStaticSiteFunctionAppSettingsRequest(st uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/config/functionappsettings", false); + uri.AppendPath("/builds/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/showDatabaseConnections", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(appSettings, ModelSerializationExtensions.WireOptions); - request.Content = content; _userAgent.Apply(message); return message; } - /// Description for Creates or updates the function app settings of a static site. + /// Returns details of database connections for a static site build. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. - /// The dictionary containing the static site function app settings to update. + /// The stage site identifier. /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> CreateOrUpdateStaticSiteFunctionAppSettingsAsync(string subscriptionId, string resourceGroupName, string name, AppServiceConfigurationDictionary appSettings, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetBuildDatabaseConnectionsWithDetailsAsync(string subscriptionId, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNull(appSettings, nameof(appSettings)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); - using var message = CreateCreateOrUpdateStaticSiteFunctionAppSettingsRequest(subscriptionId, resourceGroupName, name, appSettings); + using var message = CreateGetBuildDatabaseConnectionsWithDetailsRequest(subscriptionId, resourceGroupName, name, environmentName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - AppServiceConfigurationDictionary value = default; + DatabaseConnectionCollection value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = AppServiceConfigurationDictionary.DeserializeAppServiceConfigurationDictionary(document.RootElement); + value = DatabaseConnectionCollection.DeserializeDatabaseConnectionCollection(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -2507,30 +2527,30 @@ public async Task> CreateOrUpdateSta } } - /// Description for Creates or updates the function app settings of a static site. + /// Returns details of database connections for a static site build. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. - /// The dictionary containing the static site function app settings to update. + /// The stage site identifier. /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdateStaticSiteFunctionAppSettings(string subscriptionId, string resourceGroupName, string name, AppServiceConfigurationDictionary appSettings, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetBuildDatabaseConnectionsWithDetails(string subscriptionId, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNull(appSettings, nameof(appSettings)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); - using var message = CreateCreateOrUpdateStaticSiteFunctionAppSettingsRequest(subscriptionId, resourceGroupName, name, appSettings); + using var message = CreateGetBuildDatabaseConnectionsWithDetailsRequest(subscriptionId, resourceGroupName, name, environmentName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - AppServiceConfigurationDictionary value = default; + DatabaseConnectionCollection value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = AppServiceConfigurationDictionary.DeserializeAppServiceConfigurationDictionary(document.RootElement); + value = DatabaseConnectionCollection.DeserializeDatabaseConnectionCollection(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -2538,7 +2558,7 @@ public Response CreateOrUpdateStaticSiteFunct } } - internal RequestUriBuilder CreateCreateUserRolesInvitationLinkRequestUri(string subscriptionId, string resourceGroupName, string name, StaticSiteUserInvitationContent content) + internal RequestUriBuilder CreateGetUserProvidedFunctionAppsForStaticSiteBuildRequestUri(string subscriptionId, string resourceGroupName, string name, string environmentName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -2548,16 +2568,18 @@ internal RequestUriBuilder CreateCreateUserRolesInvitationLinkRequestUri(string uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/createUserInvitation", false); + uri.AppendPath("/builds/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/userProvidedFunctionApps", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateCreateUserRolesInvitationLinkRequest(string subscriptionId, string resourceGroupName, string name, StaticSiteUserInvitationContent content) + internal HttpMessage CreateGetUserProvidedFunctionAppsForStaticSiteBuildRequest(string subscriptionId, string resourceGroupName, string name, string environmentName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Post; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -2566,42 +2588,40 @@ internal HttpMessage CreateCreateUserRolesInvitationLinkRequest(string subscript uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/createUserInvitation", false); + uri.AppendPath("/builds/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/userProvidedFunctionApps", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content0 = new Utf8JsonRequestContent(); - content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); - request.Content = content0; _userAgent.Apply(message); return message; } - /// Description for Creates an invitation link for a user with the role. + /// Description for Gets the details of the user provided function apps registered with a static site build. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. - /// The to use. + /// The stage site identifier. /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> CreateUserRolesInvitationLinkAsync(string subscriptionId, string resourceGroupName, string name, StaticSiteUserInvitationContent content, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetUserProvidedFunctionAppsForStaticSiteBuildAsync(string subscriptionId, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); - using var message = CreateCreateUserRolesInvitationLinkRequest(subscriptionId, resourceGroupName, name, content); + using var message = CreateGetUserProvidedFunctionAppsForStaticSiteBuildRequest(subscriptionId, resourceGroupName, name, environmentName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - StaticSiteUserInvitationResult value = default; + StaticSiteUserProvidedFunctionAppsListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = StaticSiteUserInvitationResult.DeserializeStaticSiteUserInvitationResult(document.RootElement); + value = StaticSiteUserProvidedFunctionAppsListResult.DeserializeStaticSiteUserProvidedFunctionAppsListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -2609,30 +2629,30 @@ public async Task> CreateUserRolesInvit } } - /// Description for Creates an invitation link for a user with the role. + /// Description for Gets the details of the user provided function apps registered with a static site build. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. - /// The to use. + /// The stage site identifier. /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response CreateUserRolesInvitationLink(string subscriptionId, string resourceGroupName, string name, StaticSiteUserInvitationContent content, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetUserProvidedFunctionAppsForStaticSiteBuild(string subscriptionId, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); - using var message = CreateCreateUserRolesInvitationLinkRequest(subscriptionId, resourceGroupName, name, content); + using var message = CreateGetUserProvidedFunctionAppsForStaticSiteBuildRequest(subscriptionId, resourceGroupName, name, environmentName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - StaticSiteUserInvitationResult value = default; + StaticSiteUserProvidedFunctionAppsListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = StaticSiteUserInvitationResult.DeserializeStaticSiteUserInvitationResult(document.RootElement); + value = StaticSiteUserProvidedFunctionAppsListResult.DeserializeStaticSiteUserProvidedFunctionAppsListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -2640,7 +2660,7 @@ public Response CreateUserRolesInvitationLink(st } } - internal RequestUriBuilder CreateListStaticSiteCustomDomainsRequestUri(string subscriptionId, string resourceGroupName, string name) + internal RequestUriBuilder CreateGetUserProvidedFunctionAppForStaticSiteBuildRequestUri(string subscriptionId, string resourceGroupName, string name, string environmentName, string functionAppName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -2650,12 +2670,15 @@ internal RequestUriBuilder CreateListStaticSiteCustomDomainsRequestUri(string su uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/customDomains", false); + uri.AppendPath("/builds/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/userProvidedFunctionApps/", false); + uri.AppendPath(functionAppName, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListStaticSiteCustomDomainsRequest(string subscriptionId, string resourceGroupName, string name) + internal HttpMessage CreateGetUserProvidedFunctionAppForStaticSiteBuildRequest(string subscriptionId, string resourceGroupName, string name, string environmentName, string functionAppName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -2668,7 +2691,10 @@ internal HttpMessage CreateListStaticSiteCustomDomainsRequest(string subscriptio uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/customDomains", false); + uri.AppendPath("/builds/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/userProvidedFunctionApps/", false); + uri.AppendPath(functionAppName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -2676,65 +2702,77 @@ internal HttpMessage CreateListStaticSiteCustomDomainsRequest(string subscriptio return message; } - /// Description for Gets all static site custom domains for a particular static site. + /// Description for Gets the details of the user provided function app registered with a static site build. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. - /// Name of the static site resource to search in. + /// Name of the static site. + /// The stage site identifier. + /// Name of the function app registered with the static site build. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListStaticSiteCustomDomainsAsync(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetUserProvidedFunctionAppForStaticSiteBuildAsync(string subscriptionId, string resourceGroupName, string name, string environmentName, string functionAppName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNullOrEmpty(functionAppName, nameof(functionAppName)); - using var message = CreateListStaticSiteCustomDomainsRequest(subscriptionId, resourceGroupName, name); + using var message = CreateGetUserProvidedFunctionAppForStaticSiteBuildRequest(subscriptionId, resourceGroupName, name, environmentName, functionAppName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - StaticSiteCustomDomainOverviewListResult value = default; + StaticSiteUserProvidedFunctionAppData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = StaticSiteCustomDomainOverviewListResult.DeserializeStaticSiteCustomDomainOverviewListResult(document.RootElement); + value = StaticSiteUserProvidedFunctionAppData.DeserializeStaticSiteUserProvidedFunctionAppData(document.RootElement); return Response.FromValue(value, message.Response); } + case 404: + return Response.FromValue((StaticSiteUserProvidedFunctionAppData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Description for Gets all static site custom domains for a particular static site. + /// Description for Gets the details of the user provided function app registered with a static site build. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. - /// Name of the static site resource to search in. + /// Name of the static site. + /// The stage site identifier. + /// Name of the function app registered with the static site build. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListStaticSiteCustomDomains(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response GetUserProvidedFunctionAppForStaticSiteBuild(string subscriptionId, string resourceGroupName, string name, string environmentName, string functionAppName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNullOrEmpty(functionAppName, nameof(functionAppName)); - using var message = CreateListStaticSiteCustomDomainsRequest(subscriptionId, resourceGroupName, name); + using var message = CreateGetUserProvidedFunctionAppForStaticSiteBuildRequest(subscriptionId, resourceGroupName, name, environmentName, functionAppName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - StaticSiteCustomDomainOverviewListResult value = default; + StaticSiteUserProvidedFunctionAppData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = StaticSiteCustomDomainOverviewListResult.DeserializeStaticSiteCustomDomainOverviewListResult(document.RootElement); + value = StaticSiteUserProvidedFunctionAppData.DeserializeStaticSiteUserProvidedFunctionAppData(document.RootElement); return Response.FromValue(value, message.Response); } + case 404: + return Response.FromValue((StaticSiteUserProvidedFunctionAppData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateGetStaticSiteCustomDomainRequestUri(string subscriptionId, string resourceGroupName, string name, string domainName) + internal RequestUriBuilder CreateRegisterUserProvidedFunctionAppWithStaticSiteBuildRequestUri(string subscriptionId, string resourceGroupName, string name, string environmentName, string functionAppName, StaticSiteUserProvidedFunctionAppData data, bool? isForced) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -2744,17 +2782,23 @@ internal RequestUriBuilder CreateGetStaticSiteCustomDomainRequestUri(string subs uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/customDomains/", false); - uri.AppendPath(domainName, true); + uri.AppendPath("/builds/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/userProvidedFunctionApps/", false); + uri.AppendPath(functionAppName, true); + if (isForced != null) + { + uri.AppendQuery("isForced", isForced.Value, true); + } uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateGetStaticSiteCustomDomainRequest(string subscriptionId, string resourceGroupName, string name, string domainName) + internal HttpMessage CreateRegisterUserProvidedFunctionAppWithStaticSiteBuildRequest(string subscriptionId, string resourceGroupName, string name, string environmentName, string functionAppName, StaticSiteUserProvidedFunctionAppData data, bool? isForced) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Put; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -2763,82 +2807,90 @@ internal HttpMessage CreateGetStaticSiteCustomDomainRequest(string subscriptionI uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/customDomains/", false); - uri.AppendPath(domainName, true); + uri.AppendPath("/builds/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/userProvidedFunctionApps/", false); + uri.AppendPath(functionAppName, true); + if (isForced != null) + { + uri.AppendQuery("isForced", isForced.Value, true); + } uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; } - /// Description for Gets an existing custom domain for a particular static site. + /// Description for Register a user provided function app with a static site build. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. - /// Name of the static site resource to search in. - /// The custom domain name. + /// Name of the static site. + /// The stage site identifier. + /// Name of the function app to register with the static site build. + /// A JSON representation of the user provided function app properties. See example. + /// Specify <code>true</code> to force the update of the auth configuration on the function app even if an AzureStaticWebApps provider is already configured on the function app. The default is <code>false</code>. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetStaticSiteCustomDomainAsync(string subscriptionId, string resourceGroupName, string name, string domainName, CancellationToken cancellationToken = default) + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task RegisterUserProvidedFunctionAppWithStaticSiteBuildAsync(string subscriptionId, string resourceGroupName, string name, string environmentName, string functionAppName, StaticSiteUserProvidedFunctionAppData data, bool? isForced = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNullOrEmpty(functionAppName, nameof(functionAppName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateGetStaticSiteCustomDomainRequest(subscriptionId, resourceGroupName, name, domainName); + using var message = CreateRegisterUserProvidedFunctionAppWithStaticSiteBuildRequest(subscriptionId, resourceGroupName, name, environmentName, functionAppName, data, isForced); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - { - StaticSiteCustomDomainOverviewData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = StaticSiteCustomDomainOverviewData.DeserializeStaticSiteCustomDomainOverviewData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((StaticSiteCustomDomainOverviewData)null, message.Response); + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Description for Gets an existing custom domain for a particular static site. + /// Description for Register a user provided function app with a static site build. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. - /// Name of the static site resource to search in. - /// The custom domain name. + /// Name of the static site. + /// The stage site identifier. + /// Name of the function app to register with the static site build. + /// A JSON representation of the user provided function app properties. See example. + /// Specify <code>true</code> to force the update of the auth configuration on the function app even if an AzureStaticWebApps provider is already configured on the function app. The default is <code>false</code>. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response GetStaticSiteCustomDomain(string subscriptionId, string resourceGroupName, string name, string domainName, CancellationToken cancellationToken = default) + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response RegisterUserProvidedFunctionAppWithStaticSiteBuild(string subscriptionId, string resourceGroupName, string name, string environmentName, string functionAppName, StaticSiteUserProvidedFunctionAppData data, bool? isForced = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNullOrEmpty(functionAppName, nameof(functionAppName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateGetStaticSiteCustomDomainRequest(subscriptionId, resourceGroupName, name, domainName); + using var message = CreateRegisterUserProvidedFunctionAppWithStaticSiteBuildRequest(subscriptionId, resourceGroupName, name, environmentName, functionAppName, data, isForced); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - { - StaticSiteCustomDomainOverviewData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = StaticSiteCustomDomainOverviewData.DeserializeStaticSiteCustomDomainOverviewData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((StaticSiteCustomDomainOverviewData)null, message.Response); + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateCreateOrUpdateStaticSiteCustomDomainRequestUri(string subscriptionId, string resourceGroupName, string name, string domainName, StaticSiteCustomDomainContent content) + internal RequestUriBuilder CreateDetachUserProvidedFunctionAppFromStaticSiteBuildRequestUri(string subscriptionId, string resourceGroupName, string name, string environmentName, string functionAppName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -2848,17 +2900,19 @@ internal RequestUriBuilder CreateCreateOrUpdateStaticSiteCustomDomainRequestUri( uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/customDomains/", false); - uri.AppendPath(domainName, true); + uri.AppendPath("/builds/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/userProvidedFunctionApps/", false); + uri.AppendPath(functionAppName, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateCreateOrUpdateStaticSiteCustomDomainRequest(string subscriptionId, string resourceGroupName, string name, string domainName, StaticSiteCustomDomainContent content) + internal HttpMessage CreateDetachUserProvidedFunctionAppFromStaticSiteBuildRequest(string subscriptionId, string resourceGroupName, string name, string environmentName, string functionAppName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Put; + request.Method = RequestMethod.Delete; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -2867,78 +2921,76 @@ internal HttpMessage CreateCreateOrUpdateStaticSiteCustomDomainRequest(string su uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/customDomains/", false); - uri.AppendPath(domainName, true); + uri.AppendPath("/builds/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/userProvidedFunctionApps/", false); + uri.AppendPath(functionAppName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content0 = new Utf8JsonRequestContent(); - content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); - request.Content = content0; _userAgent.Apply(message); return message; } - /// Description for Creates a new static site custom domain in an existing resource group and static site. + /// Description for Detach the user provided function app from the static site build. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. - /// The custom domain to create. - /// A JSON representation of the static site custom domain request properties. See example. + /// The stage site identifier. + /// Name of the function app registered with the static site build. /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task CreateOrUpdateStaticSiteCustomDomainAsync(string subscriptionId, string resourceGroupName, string name, string domainName, StaticSiteCustomDomainContent content, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task DetachUserProvidedFunctionAppFromStaticSiteBuildAsync(string subscriptionId, string resourceGroupName, string name, string environmentName, string functionAppName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); - Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNullOrEmpty(functionAppName, nameof(functionAppName)); - using var message = CreateCreateOrUpdateStaticSiteCustomDomainRequest(subscriptionId, resourceGroupName, name, domainName, content); + using var message = CreateDetachUserProvidedFunctionAppFromStaticSiteBuildRequest(subscriptionId, resourceGroupName, name, environmentName, functionAppName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: + case 204: return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Description for Creates a new static site custom domain in an existing resource group and static site. + /// Description for Detach the user provided function app from the static site build. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. - /// The custom domain to create. - /// A JSON representation of the static site custom domain request properties. See example. + /// The stage site identifier. + /// Name of the function app registered with the static site build. /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdateStaticSiteCustomDomain(string subscriptionId, string resourceGroupName, string name, string domainName, StaticSiteCustomDomainContent content, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response DetachUserProvidedFunctionAppFromStaticSiteBuild(string subscriptionId, string resourceGroupName, string name, string environmentName, string functionAppName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); - Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNullOrEmpty(functionAppName, nameof(functionAppName)); - using var message = CreateCreateOrUpdateStaticSiteCustomDomainRequest(subscriptionId, resourceGroupName, name, domainName, content); + using var message = CreateDetachUserProvidedFunctionAppFromStaticSiteBuildRequest(subscriptionId, resourceGroupName, name, environmentName, functionAppName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: + case 204: return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateDeleteStaticSiteCustomDomainRequestUri(string subscriptionId, string resourceGroupName, string name, string domainName) + internal RequestUriBuilder CreateCreateZipDeploymentForStaticSiteBuildRequestUri(string subscriptionId, string resourceGroupName, string name, string environmentName, StaticSiteZipDeployment staticSiteZipDeploymentEnvelope) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -2948,17 +3000,18 @@ internal RequestUriBuilder CreateDeleteStaticSiteCustomDomainRequestUri(string s uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/customDomains/", false); - uri.AppendPath(domainName, true); + uri.AppendPath("/builds/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/zipdeploy", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateDeleteStaticSiteCustomDomainRequest(string subscriptionId, string resourceGroupName, string name, string domainName) + internal HttpMessage CreateCreateZipDeploymentForStaticSiteBuildRequest(string subscriptionId, string resourceGroupName, string name, string environmentName, StaticSiteZipDeployment staticSiteZipDeploymentEnvelope) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Delete; + request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -2967,31 +3020,38 @@ internal HttpMessage CreateDeleteStaticSiteCustomDomainRequest(string subscripti uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/customDomains/", false); - uri.AppendPath(domainName, true); + uri.AppendPath("/builds/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/zipdeploy", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(staticSiteZipDeploymentEnvelope, ModelSerializationExtensions.WireOptions); + request.Content = content; _userAgent.Apply(message); return message; } - /// Description for Deletes a custom domain. + /// Description for Deploys zipped content to a specific environment of a static site. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. - /// The custom domain to delete. + /// Name of the environment. + /// A JSON representation of the StaticSiteZipDeployment properties. See example. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task DeleteStaticSiteCustomDomainAsync(string subscriptionId, string resourceGroupName, string name, string domainName, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task CreateZipDeploymentForStaticSiteBuildAsync(string subscriptionId, string resourceGroupName, string name, string environmentName, StaticSiteZipDeployment staticSiteZipDeploymentEnvelope, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNull(staticSiteZipDeploymentEnvelope, nameof(staticSiteZipDeploymentEnvelope)); - using var message = CreateDeleteStaticSiteCustomDomainRequest(subscriptionId, resourceGroupName, name, domainName); + using var message = CreateCreateZipDeploymentForStaticSiteBuildRequest(subscriptionId, resourceGroupName, name, environmentName, staticSiteZipDeploymentEnvelope); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -3003,22 +3063,24 @@ public async Task DeleteStaticSiteCustomDomainAsync(string subscriptio } } - /// Description for Deletes a custom domain. + /// Description for Deploys zipped content to a specific environment of a static site. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. - /// The custom domain to delete. + /// Name of the environment. + /// A JSON representation of the StaticSiteZipDeployment properties. See example. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response DeleteStaticSiteCustomDomain(string subscriptionId, string resourceGroupName, string name, string domainName, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateZipDeploymentForStaticSiteBuild(string subscriptionId, string resourceGroupName, string name, string environmentName, StaticSiteZipDeployment staticSiteZipDeploymentEnvelope, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNull(staticSiteZipDeploymentEnvelope, nameof(staticSiteZipDeploymentEnvelope)); - using var message = CreateDeleteStaticSiteCustomDomainRequest(subscriptionId, resourceGroupName, name, domainName); + using var message = CreateCreateZipDeploymentForStaticSiteBuildRequest(subscriptionId, resourceGroupName, name, environmentName, staticSiteZipDeploymentEnvelope); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -3030,7 +3092,7 @@ public Response DeleteStaticSiteCustomDomain(string subscriptionId, string resou } } - internal RequestUriBuilder CreateValidateCustomDomainCanBeAddedToStaticSiteRequestUri(string subscriptionId, string resourceGroupName, string name, string domainName, StaticSiteCustomDomainContent content) + internal RequestUriBuilder CreateCreateOrUpdateStaticSiteAppSettingsRequestUri(string subscriptionId, string resourceGroupName, string name, AppServiceConfigurationDictionary appSettings) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -3040,18 +3102,16 @@ internal RequestUriBuilder CreateValidateCustomDomainCanBeAddedToStaticSiteReque uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/customDomains/", false); - uri.AppendPath(domainName, true); - uri.AppendPath("/validate", false); + uri.AppendPath("/config/appsettings", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateValidateCustomDomainCanBeAddedToStaticSiteRequest(string subscriptionId, string resourceGroupName, string name, string domainName, StaticSiteCustomDomainContent content) + internal HttpMessage CreateCreateOrUpdateStaticSiteAppSettingsRequest(string subscriptionId, string resourceGroupName, string name, AppServiceConfigurationDictionary appSettings) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Post; + request.Method = RequestMethod.Put; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -3060,79 +3120,81 @@ internal HttpMessage CreateValidateCustomDomainCanBeAddedToStaticSiteRequest(str uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/customDomains/", false); - uri.AppendPath(domainName, true); - uri.AppendPath("/validate", false); + uri.AppendPath("/config/appsettings", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); - var content0 = new Utf8JsonRequestContent(); - content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); - request.Content = content0; + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(appSettings, ModelSerializationExtensions.WireOptions); + request.Content = content; _userAgent.Apply(message); return message; } - /// Description for Validates a particular custom domain can be added to a static site. + /// Description for Creates or updates the app settings of a static site. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. - /// The custom domain to validate. - /// A JSON representation of the static site custom domain request properties. See example. + /// The dictionary containing the static site app settings to update. /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task ValidateCustomDomainCanBeAddedToStaticSiteAsync(string subscriptionId, string resourceGroupName, string name, string domainName, StaticSiteCustomDomainContent content, CancellationToken cancellationToken = default) + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> CreateOrUpdateStaticSiteAppSettingsAsync(string subscriptionId, string resourceGroupName, string name, AppServiceConfigurationDictionary appSettings, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); - Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNull(appSettings, nameof(appSettings)); - using var message = CreateValidateCustomDomainCanBeAddedToStaticSiteRequest(subscriptionId, resourceGroupName, name, domainName, content); + using var message = CreateCreateOrUpdateStaticSiteAppSettingsRequest(subscriptionId, resourceGroupName, name, appSettings); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + AppServiceConfigurationDictionary value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AppServiceConfigurationDictionary.DeserializeAppServiceConfigurationDictionary(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// Description for Validates a particular custom domain can be added to a static site. + /// Description for Creates or updates the app settings of a static site. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. - /// The custom domain to validate. - /// A JSON representation of the static site custom domain request properties. See example. + /// The dictionary containing the static site app settings to update. /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response ValidateCustomDomainCanBeAddedToStaticSite(string subscriptionId, string resourceGroupName, string name, string domainName, StaticSiteCustomDomainContent content, CancellationToken cancellationToken = default) + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdateStaticSiteAppSettings(string subscriptionId, string resourceGroupName, string name, AppServiceConfigurationDictionary appSettings, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); - Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNull(appSettings, nameof(appSettings)); - using var message = CreateValidateCustomDomainCanBeAddedToStaticSiteRequest(subscriptionId, resourceGroupName, name, domainName, content); + using var message = CreateCreateOrUpdateStaticSiteAppSettingsRequest(subscriptionId, resourceGroupName, name, appSettings); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + AppServiceConfigurationDictionary value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AppServiceConfigurationDictionary.DeserializeAppServiceConfigurationDictionary(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateDetachStaticSiteRequestUri(string subscriptionId, string resourceGroupName, string name) + internal RequestUriBuilder CreateListBasicAuthRequestUri(string subscriptionId, string resourceGroupName, string name) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -3142,16 +3204,16 @@ internal RequestUriBuilder CreateDetachStaticSiteRequestUri(string subscriptionI uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/detach", false); + uri.AppendPath("/basicAuth", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateDetachStaticSiteRequest(string subscriptionId, string resourceGroupName, string name) + internal HttpMessage CreateListBasicAuthRequest(string subscriptionId, string resourceGroupName, string name) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Post; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -3160,7 +3222,7 @@ internal HttpMessage CreateDetachStaticSiteRequest(string subscriptionId, string uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/detach", false); + uri.AppendPath("/basicAuth", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -3168,57 +3230,65 @@ internal HttpMessage CreateDetachStaticSiteRequest(string subscriptionId, string return message; } - /// Description for Detaches a static site. + /// Description for Gets the basic auth properties for a static site as a collection. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. - /// Name of the static site to detach. + /// Name of the static site. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task DetachStaticSiteAsync(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + public async Task> ListBasicAuthAsync(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - using var message = CreateDetachStaticSiteRequest(subscriptionId, resourceGroupName, name); + using var message = CreateListBasicAuthRequest(subscriptionId, resourceGroupName, name); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + StaticSiteBasicAuthPropertiesCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = StaticSiteBasicAuthPropertiesCollection.DeserializeStaticSiteBasicAuthPropertiesCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// Description for Detaches a static site. + /// Description for Gets the basic auth properties for a static site as a collection. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. - /// Name of the static site to detach. + /// Name of the static site. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response DetachStaticSite(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + public Response ListBasicAuth(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - using var message = CreateDetachStaticSiteRequest(subscriptionId, resourceGroupName, name); + using var message = CreateListBasicAuthRequest(subscriptionId, resourceGroupName, name); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + StaticSiteBasicAuthPropertiesCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = StaticSiteBasicAuthPropertiesCollection.DeserializeStaticSiteBasicAuthPropertiesCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateListStaticSiteFunctionsRequestUri(string subscriptionId, string resourceGroupName, string name) + internal RequestUriBuilder CreateGetBasicAuthRequestUri(string subscriptionId, string resourceGroupName, string name, StaticSiteBasicAuthName basicAuthName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -3228,12 +3298,13 @@ internal RequestUriBuilder CreateListStaticSiteFunctionsRequestUri(string subscr uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/functions", false); + uri.AppendPath("/basicAuth/", false); + uri.AppendPath(basicAuthName.ToString(), true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListStaticSiteFunctionsRequest(string subscriptionId, string resourceGroupName, string name) + internal HttpMessage CreateGetBasicAuthRequest(string subscriptionId, string resourceGroupName, string name, StaticSiteBasicAuthName basicAuthName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -3246,7 +3317,8 @@ internal HttpMessage CreateListStaticSiteFunctionsRequest(string subscriptionId, uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/functions", false); + uri.AppendPath("/basicAuth/", false); + uri.AppendPath(basicAuthName.ToString(), true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -3254,65 +3326,71 @@ internal HttpMessage CreateListStaticSiteFunctionsRequest(string subscriptionId, return message; } - /// Description for Gets the functions of a static site. + /// Description for Gets the basic auth properties for a static site. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. + /// name of the basic auth entry. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListStaticSiteFunctionsAsync(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + public async Task> GetBasicAuthAsync(string subscriptionId, string resourceGroupName, string name, StaticSiteBasicAuthName basicAuthName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - using var message = CreateListStaticSiteFunctionsRequest(subscriptionId, resourceGroupName, name); + using var message = CreateGetBasicAuthRequest(subscriptionId, resourceGroupName, name, basicAuthName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - StaticSiteFunctionOverviewListResult value = default; + StaticSiteBasicAuthPropertyData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = StaticSiteFunctionOverviewListResult.DeserializeStaticSiteFunctionOverviewListResult(document.RootElement); + value = StaticSiteBasicAuthPropertyData.DeserializeStaticSiteBasicAuthPropertyData(document.RootElement); return Response.FromValue(value, message.Response); } + case 404: + return Response.FromValue((StaticSiteBasicAuthPropertyData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Description for Gets the functions of a static site. + /// Description for Gets the basic auth properties for a static site. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. + /// name of the basic auth entry. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListStaticSiteFunctions(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + public Response GetBasicAuth(string subscriptionId, string resourceGroupName, string name, StaticSiteBasicAuthName basicAuthName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - using var message = CreateListStaticSiteFunctionsRequest(subscriptionId, resourceGroupName, name); + using var message = CreateGetBasicAuthRequest(subscriptionId, resourceGroupName, name, basicAuthName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - StaticSiteFunctionOverviewListResult value = default; + StaticSiteBasicAuthPropertyData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = StaticSiteFunctionOverviewListResult.DeserializeStaticSiteFunctionOverviewListResult(document.RootElement); + value = StaticSiteBasicAuthPropertyData.DeserializeStaticSiteBasicAuthPropertyData(document.RootElement); return Response.FromValue(value, message.Response); } + case 404: + return Response.FromValue((StaticSiteBasicAuthPropertyData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateListStaticSiteAppSettingsRequestUri(string subscriptionId, string resourceGroupName, string name) + internal RequestUriBuilder CreateCreateOrUpdateBasicAuthRequestUri(string subscriptionId, string resourceGroupName, string name, StaticSiteBasicAuthName basicAuthName, StaticSiteBasicAuthPropertyData data) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -3322,16 +3400,17 @@ internal RequestUriBuilder CreateListStaticSiteAppSettingsRequestUri(string subs uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/listAppSettings", false); + uri.AppendPath("/basicAuth/", false); + uri.AppendPath(basicAuthName.ToString(), true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListStaticSiteAppSettingsRequest(string subscriptionId, string resourceGroupName, string name) + internal HttpMessage CreateCreateOrUpdateBasicAuthRequest(string subscriptionId, string resourceGroupName, string name, StaticSiteBasicAuthName basicAuthName, StaticSiteBasicAuthPropertyData data) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Post; + request.Method = RequestMethod.Put; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -3340,36 +3419,44 @@ internal HttpMessage CreateListStaticSiteAppSettingsRequest(string subscriptionI uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/listAppSettings", false); + uri.AppendPath("/basicAuth/", false); + uri.AppendPath(basicAuthName.ToString(), true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; _userAgent.Apply(message); return message; } - /// Description for Gets the application settings of a static site. + /// Description for Adds or updates basic auth for a static site. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. + /// name of the basic auth entry. + /// A JSON representation of the basic auth properties. /// The cancellation token to use. - /// , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListStaticSiteAppSettingsAsync(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + public async Task> CreateOrUpdateBasicAuthAsync(string subscriptionId, string resourceGroupName, string name, StaticSiteBasicAuthName basicAuthName, StaticSiteBasicAuthPropertyData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateListStaticSiteAppSettingsRequest(subscriptionId, resourceGroupName, name); + using var message = CreateCreateOrUpdateBasicAuthRequest(subscriptionId, resourceGroupName, name, basicAuthName, data); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - AppServiceConfigurationDictionary value = default; + StaticSiteBasicAuthPropertyData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = AppServiceConfigurationDictionary.DeserializeAppServiceConfigurationDictionary(document.RootElement); + value = StaticSiteBasicAuthPropertyData.DeserializeStaticSiteBasicAuthPropertyData(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -3377,28 +3464,31 @@ public async Task> ListStaticSiteApp } } - /// Description for Gets the application settings of a static site. + /// Description for Adds or updates basic auth for a static site. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. + /// name of the basic auth entry. + /// A JSON representation of the basic auth properties. /// The cancellation token to use. - /// , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListStaticSiteAppSettings(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + public Response CreateOrUpdateBasicAuth(string subscriptionId, string resourceGroupName, string name, StaticSiteBasicAuthName basicAuthName, StaticSiteBasicAuthPropertyData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateListStaticSiteAppSettingsRequest(subscriptionId, resourceGroupName, name); + using var message = CreateCreateOrUpdateBasicAuthRequest(subscriptionId, resourceGroupName, name, basicAuthName, data); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - AppServiceConfigurationDictionary value = default; + StaticSiteBasicAuthPropertyData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = AppServiceConfigurationDictionary.DeserializeAppServiceConfigurationDictionary(document.RootElement); + value = StaticSiteBasicAuthPropertyData.DeserializeStaticSiteBasicAuthPropertyData(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -3406,7 +3496,7 @@ public Response ListStaticSiteAppSettings(str } } - internal RequestUriBuilder CreateListStaticSiteConfiguredRolesRequestUri(string subscriptionId, string resourceGroupName, string name) + internal RequestUriBuilder CreateCreateOrUpdateStaticSiteFunctionAppSettingsRequestUri(string subscriptionId, string resourceGroupName, string name, AppServiceConfigurationDictionary appSettings) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -3416,16 +3506,16 @@ internal RequestUriBuilder CreateListStaticSiteConfiguredRolesRequestUri(string uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/listConfiguredRoles", false); + uri.AppendPath("/config/functionappsettings", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListStaticSiteConfiguredRolesRequest(string subscriptionId, string resourceGroupName, string name) + internal HttpMessage CreateCreateOrUpdateStaticSiteFunctionAppSettingsRequest(string subscriptionId, string resourceGroupName, string name, AppServiceConfigurationDictionary appSettings) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Post; + request.Method = RequestMethod.Put; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -3434,36 +3524,42 @@ internal HttpMessage CreateListStaticSiteConfiguredRolesRequest(string subscript uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/listConfiguredRoles", false); + uri.AppendPath("/config/functionappsettings", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(appSettings, ModelSerializationExtensions.WireOptions); + request.Content = content; _userAgent.Apply(message); return message; } - /// Description for Lists the roles configured for the static site. + /// Description for Creates or updates the function app settings of a static site. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. + /// The dictionary containing the static site function app settings to update. /// The cancellation token to use. - /// , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListStaticSiteConfiguredRolesAsync(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + public async Task> CreateOrUpdateStaticSiteFunctionAppSettingsAsync(string subscriptionId, string resourceGroupName, string name, AppServiceConfigurationDictionary appSettings, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNull(appSettings, nameof(appSettings)); - using var message = CreateListStaticSiteConfiguredRolesRequest(subscriptionId, resourceGroupName, name); + using var message = CreateCreateOrUpdateStaticSiteFunctionAppSettingsRequest(subscriptionId, resourceGroupName, name, appSettings); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - StaticSiteStringList value = default; + AppServiceConfigurationDictionary value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = StaticSiteStringList.DeserializeStaticSiteStringList(document.RootElement); + value = AppServiceConfigurationDictionary.DeserializeAppServiceConfigurationDictionary(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -3471,28 +3567,30 @@ public async Task> ListStaticSiteConfiguredRolesA } } - /// Description for Lists the roles configured for the static site. + /// Description for Creates or updates the function app settings of a static site. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. + /// The dictionary containing the static site function app settings to update. /// The cancellation token to use. - /// , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListStaticSiteConfiguredRoles(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + public Response CreateOrUpdateStaticSiteFunctionAppSettings(string subscriptionId, string resourceGroupName, string name, AppServiceConfigurationDictionary appSettings, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNull(appSettings, nameof(appSettings)); - using var message = CreateListStaticSiteConfiguredRolesRequest(subscriptionId, resourceGroupName, name); + using var message = CreateCreateOrUpdateStaticSiteFunctionAppSettingsRequest(subscriptionId, resourceGroupName, name, appSettings); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - StaticSiteStringList value = default; + AppServiceConfigurationDictionary value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = StaticSiteStringList.DeserializeStaticSiteStringList(document.RootElement); + value = AppServiceConfigurationDictionary.DeserializeAppServiceConfigurationDictionary(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -3500,7 +3598,7 @@ public Response ListStaticSiteConfiguredRoles(string subsc } } - internal RequestUriBuilder CreateListStaticSiteFunctionAppSettingsRequestUri(string subscriptionId, string resourceGroupName, string name) + internal RequestUriBuilder CreateCreateUserRolesInvitationLinkRequestUri(string subscriptionId, string resourceGroupName, string name, StaticSiteUserInvitationContent content) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -3510,12 +3608,12 @@ internal RequestUriBuilder CreateListStaticSiteFunctionAppSettingsRequestUri(str uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/listFunctionAppSettings", false); + uri.AppendPath("/createUserInvitation", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListStaticSiteFunctionAppSettingsRequest(string subscriptionId, string resourceGroupName, string name) + internal HttpMessage CreateCreateUserRolesInvitationLinkRequest(string subscriptionId, string resourceGroupName, string name, StaticSiteUserInvitationContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -3528,36 +3626,42 @@ internal HttpMessage CreateListStaticSiteFunctionAppSettingsRequest(string subsc uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/listFunctionAppSettings", false); + uri.AppendPath("/createUserInvitation", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; _userAgent.Apply(message); return message; } - /// Description for Gets the application settings of a static site. + /// Description for Creates an invitation link for a user with the role. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. + /// The to use. /// The cancellation token to use. - /// , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListStaticSiteFunctionAppSettingsAsync(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + public async Task> CreateUserRolesInvitationLinkAsync(string subscriptionId, string resourceGroupName, string name, StaticSiteUserInvitationContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateListStaticSiteFunctionAppSettingsRequest(subscriptionId, resourceGroupName, name); + using var message = CreateCreateUserRolesInvitationLinkRequest(subscriptionId, resourceGroupName, name, content); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - AppServiceConfigurationDictionary value = default; + StaticSiteUserInvitationResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = AppServiceConfigurationDictionary.DeserializeAppServiceConfigurationDictionary(document.RootElement); + value = StaticSiteUserInvitationResult.DeserializeStaticSiteUserInvitationResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -3565,28 +3669,30 @@ public async Task> ListStaticSiteFun } } - /// Description for Gets the application settings of a static site. + /// Description for Creates an invitation link for a user with the role. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. + /// The to use. /// The cancellation token to use. - /// , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListStaticSiteFunctionAppSettings(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + public Response CreateUserRolesInvitationLink(string subscriptionId, string resourceGroupName, string name, StaticSiteUserInvitationContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateListStaticSiteFunctionAppSettingsRequest(subscriptionId, resourceGroupName, name); + using var message = CreateCreateUserRolesInvitationLinkRequest(subscriptionId, resourceGroupName, name, content); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - AppServiceConfigurationDictionary value = default; + StaticSiteUserInvitationResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = AppServiceConfigurationDictionary.DeserializeAppServiceConfigurationDictionary(document.RootElement); + value = StaticSiteUserInvitationResult.DeserializeStaticSiteUserInvitationResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -3594,7 +3700,7 @@ public Response ListStaticSiteFunctionAppSett } } - internal RequestUriBuilder CreateListStaticSiteSecretsRequestUri(string subscriptionId, string resourceGroupName, string name) + internal RequestUriBuilder CreateListStaticSiteCustomDomainsRequestUri(string subscriptionId, string resourceGroupName, string name) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -3604,16 +3710,16 @@ internal RequestUriBuilder CreateListStaticSiteSecretsRequestUri(string subscrip uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/listSecrets", false); + uri.AppendPath("/customDomains", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListStaticSiteSecretsRequest(string subscriptionId, string resourceGroupName, string name) + internal HttpMessage CreateListStaticSiteCustomDomainsRequest(string subscriptionId, string resourceGroupName, string name) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Post; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -3622,7 +3728,7 @@ internal HttpMessage CreateListStaticSiteSecretsRequest(string subscriptionId, s uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/listSecrets", false); + uri.AppendPath("/customDomains", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -3630,28 +3736,28 @@ internal HttpMessage CreateListStaticSiteSecretsRequest(string subscriptionId, s return message; } - /// Description for Lists the secrets for an existing static site. + /// Description for Gets all static site custom domains for a particular static site. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. - /// Name of the static site. + /// Name of the static site resource to search in. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListStaticSiteSecretsAsync(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + public async Task> ListStaticSiteCustomDomainsAsync(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - using var message = CreateListStaticSiteSecretsRequest(subscriptionId, resourceGroupName, name); + using var message = CreateListStaticSiteCustomDomainsRequest(subscriptionId, resourceGroupName, name); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - AppServiceConfigurationDictionary value = default; + StaticSiteCustomDomainOverviewListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = AppServiceConfigurationDictionary.DeserializeAppServiceConfigurationDictionary(document.RootElement); + value = StaticSiteCustomDomainOverviewListResult.DeserializeStaticSiteCustomDomainOverviewListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -3659,28 +3765,28 @@ public async Task> ListStaticSiteSec } } - /// Description for Lists the secrets for an existing static site. + /// Description for Gets all static site custom domains for a particular static site. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. - /// Name of the static site. + /// Name of the static site resource to search in. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListStaticSiteSecrets(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + public Response ListStaticSiteCustomDomains(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - using var message = CreateListStaticSiteSecretsRequest(subscriptionId, resourceGroupName, name); + using var message = CreateListStaticSiteCustomDomainsRequest(subscriptionId, resourceGroupName, name); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - AppServiceConfigurationDictionary value = default; + StaticSiteCustomDomainOverviewListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = AppServiceConfigurationDictionary.DeserializeAppServiceConfigurationDictionary(document.RootElement); + value = StaticSiteCustomDomainOverviewListResult.DeserializeStaticSiteCustomDomainOverviewListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -3688,7 +3794,7 @@ public Response ListStaticSiteSecrets(string } } - internal RequestUriBuilder CreateGetPrivateEndpointConnectionListRequestUri(string subscriptionId, string resourceGroupName, string name) + internal RequestUriBuilder CreateGetStaticSiteCustomDomainRequestUri(string subscriptionId, string resourceGroupName, string name, string domainName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -3698,12 +3804,13 @@ internal RequestUriBuilder CreateGetPrivateEndpointConnectionListRequestUri(stri uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/privateEndpointConnections", false); + uri.AppendPath("/customDomains/", false); + uri.AppendPath(domainName, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateGetPrivateEndpointConnectionListRequest(string subscriptionId, string resourceGroupName, string name) + internal HttpMessage CreateGetStaticSiteCustomDomainRequest(string subscriptionId, string resourceGroupName, string name, string domainName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -3716,7 +3823,8 @@ internal HttpMessage CreateGetPrivateEndpointConnectionListRequest(string subscr uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/privateEndpointConnections", false); + uri.AppendPath("/customDomains/", false); + uri.AppendPath(domainName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -3724,65 +3832,73 @@ internal HttpMessage CreateGetPrivateEndpointConnectionListRequest(string subscr return message; } - /// Description for Gets the list of private endpoint connections associated with a static site. + /// Description for Gets an existing custom domain for a particular static site. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. - /// Name of the static site. + /// Name of the static site resource to search in. + /// The custom domain name. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> GetPrivateEndpointConnectionListAsync(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetStaticSiteCustomDomainAsync(string subscriptionId, string resourceGroupName, string name, string domainName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); - using var message = CreateGetPrivateEndpointConnectionListRequest(subscriptionId, resourceGroupName, name); + using var message = CreateGetStaticSiteCustomDomainRequest(subscriptionId, resourceGroupName, name, domainName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - RemotePrivateEndpointConnectionListResult value = default; + StaticSiteCustomDomainOverviewData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = RemotePrivateEndpointConnectionListResult.DeserializeRemotePrivateEndpointConnectionListResult(document.RootElement); + value = StaticSiteCustomDomainOverviewData.DeserializeStaticSiteCustomDomainOverviewData(document.RootElement); return Response.FromValue(value, message.Response); } + case 404: + return Response.FromValue((StaticSiteCustomDomainOverviewData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Description for Gets the list of private endpoint connections associated with a static site. + /// Description for Gets an existing custom domain for a particular static site. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. - /// Name of the static site. + /// Name of the static site resource to search in. + /// The custom domain name. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response GetPrivateEndpointConnectionList(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetStaticSiteCustomDomain(string subscriptionId, string resourceGroupName, string name, string domainName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); - using var message = CreateGetPrivateEndpointConnectionListRequest(subscriptionId, resourceGroupName, name); + using var message = CreateGetStaticSiteCustomDomainRequest(subscriptionId, resourceGroupName, name, domainName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - RemotePrivateEndpointConnectionListResult value = default; + StaticSiteCustomDomainOverviewData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = RemotePrivateEndpointConnectionListResult.DeserializeRemotePrivateEndpointConnectionListResult(document.RootElement); + value = StaticSiteCustomDomainOverviewData.DeserializeStaticSiteCustomDomainOverviewData(document.RootElement); return Response.FromValue(value, message.Response); } + case 404: + return Response.FromValue((StaticSiteCustomDomainOverviewData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateGetPrivateEndpointConnectionRequestUri(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName) + internal RequestUriBuilder CreateCreateOrUpdateStaticSiteCustomDomainRequestUri(string subscriptionId, string resourceGroupName, string name, string domainName, StaticSiteCustomDomainContent content) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -3792,17 +3908,17 @@ internal RequestUriBuilder CreateGetPrivateEndpointConnectionRequestUri(string s uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/privateEndpointConnections/", false); - uri.AppendPath(privateEndpointConnectionName, true); + uri.AppendPath("/customDomains/", false); + uri.AppendPath(domainName, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateGetPrivateEndpointConnectionRequest(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName) + internal HttpMessage CreateCreateOrUpdateStaticSiteCustomDomainRequest(string subscriptionId, string resourceGroupName, string name, string domainName, StaticSiteCustomDomainContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Put; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -3811,82 +3927,78 @@ internal HttpMessage CreateGetPrivateEndpointConnectionRequest(string subscripti uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/privateEndpointConnections/", false); - uri.AppendPath(privateEndpointConnectionName, true); + uri.AppendPath("/customDomains/", false); + uri.AppendPath(domainName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; _userAgent.Apply(message); return message; } - /// Description for Gets a private endpoint connection. + /// Description for Creates a new static site custom domain in an existing resource group and static site. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. - /// Name of the private endpoint connection. + /// The custom domain to create. + /// A JSON representation of the static site custom domain request properties. See example. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetPrivateEndpointConnectionAsync(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateStaticSiteCustomDomainAsync(string subscriptionId, string resourceGroupName, string name, string domainName, StaticSiteCustomDomainContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); + Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateGetPrivateEndpointConnectionRequest(subscriptionId, resourceGroupName, name, privateEndpointConnectionName); + using var message = CreateCreateOrUpdateStaticSiteCustomDomainRequest(subscriptionId, resourceGroupName, name, domainName, content); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - { - RemotePrivateEndpointConnectionARMResourceData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = RemotePrivateEndpointConnectionARMResourceData.DeserializeRemotePrivateEndpointConnectionARMResourceData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((RemotePrivateEndpointConnectionARMResourceData)null, message.Response); + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Description for Gets a private endpoint connection. + /// Description for Creates a new static site custom domain in an existing resource group and static site. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. - /// Name of the private endpoint connection. + /// The custom domain to create. + /// A JSON representation of the static site custom domain request properties. See example. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response GetPrivateEndpointConnection(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdateStaticSiteCustomDomain(string subscriptionId, string resourceGroupName, string name, string domainName, StaticSiteCustomDomainContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); + Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateGetPrivateEndpointConnectionRequest(subscriptionId, resourceGroupName, name, privateEndpointConnectionName); + using var message = CreateCreateOrUpdateStaticSiteCustomDomainRequest(subscriptionId, resourceGroupName, name, domainName, content); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - { - RemotePrivateEndpointConnectionARMResourceData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = RemotePrivateEndpointConnectionARMResourceData.DeserializeRemotePrivateEndpointConnectionARMResourceData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((RemotePrivateEndpointConnectionARMResourceData)null, message.Response); + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateApproveOrRejectPrivateEndpointConnectionRequestUri(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestInfo info) + internal RequestUriBuilder CreateDeleteStaticSiteCustomDomainRequestUri(string subscriptionId, string resourceGroupName, string name, string domainName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -3896,17 +4008,17 @@ internal RequestUriBuilder CreateApproveOrRejectPrivateEndpointConnectionRequest uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/privateEndpointConnections/", false); - uri.AppendPath(privateEndpointConnectionName, true); + uri.AppendPath("/customDomains/", false); + uri.AppendPath(domainName, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateApproveOrRejectPrivateEndpointConnectionRequest(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestInfo info) + internal HttpMessage CreateDeleteStaticSiteCustomDomainRequest(string subscriptionId, string resourceGroupName, string name, string domainName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Put; + request.Method = RequestMethod.Delete; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -3915,37 +4027,31 @@ internal HttpMessage CreateApproveOrRejectPrivateEndpointConnectionRequest(strin uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/privateEndpointConnections/", false); - uri.AppendPath(privateEndpointConnectionName, true); + uri.AppendPath("/customDomains/", false); + uri.AppendPath(domainName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(info, ModelSerializationExtensions.WireOptions); - request.Content = content; _userAgent.Apply(message); return message; } - /// Description for Approves or rejects a private endpoint connection. + /// Description for Deletes a custom domain. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. - /// Name of the private endpoint connection. - /// Request body. + /// The custom domain to delete. /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task ApproveOrRejectPrivateEndpointConnectionAsync(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestInfo info, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteStaticSiteCustomDomainAsync(string subscriptionId, string resourceGroupName, string name, string domainName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); - Argument.AssertNotNull(info, nameof(info)); + Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); - using var message = CreateApproveOrRejectPrivateEndpointConnectionRequest(subscriptionId, resourceGroupName, name, privateEndpointConnectionName, info); + using var message = CreateDeleteStaticSiteCustomDomainRequest(subscriptionId, resourceGroupName, name, domainName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -3957,24 +4063,22 @@ public async Task ApproveOrRejectPrivateEndpointConnectionAsync(string } } - /// Description for Approves or rejects a private endpoint connection. + /// Description for Deletes a custom domain. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. - /// Name of the private endpoint connection. - /// Request body. + /// The custom domain to delete. /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response ApproveOrRejectPrivateEndpointConnection(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestInfo info, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response DeleteStaticSiteCustomDomain(string subscriptionId, string resourceGroupName, string name, string domainName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); - Argument.AssertNotNull(info, nameof(info)); + Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); - using var message = CreateApproveOrRejectPrivateEndpointConnectionRequest(subscriptionId, resourceGroupName, name, privateEndpointConnectionName, info); + using var message = CreateDeleteStaticSiteCustomDomainRequest(subscriptionId, resourceGroupName, name, domainName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -3986,7 +4090,7 @@ public Response ApproveOrRejectPrivateEndpointConnection(string subscriptionId, } } - internal RequestUriBuilder CreateDeletePrivateEndpointConnectionRequestUri(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName) + internal RequestUriBuilder CreateValidateCustomDomainCanBeAddedToStaticSiteRequestUri(string subscriptionId, string resourceGroupName, string name, string domainName, StaticSiteCustomDomainContent content) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -3996,17 +4100,18 @@ internal RequestUriBuilder CreateDeletePrivateEndpointConnectionRequestUri(strin uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/privateEndpointConnections/", false); - uri.AppendPath(privateEndpointConnectionName, true); + uri.AppendPath("/customDomains/", false); + uri.AppendPath(domainName, true); + uri.AppendPath("/validate", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateDeletePrivateEndpointConnectionRequest(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName) + internal HttpMessage CreateValidateCustomDomainCanBeAddedToStaticSiteRequest(string subscriptionId, string resourceGroupName, string name, string domainName, StaticSiteCustomDomainContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Delete; + request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -4015,72 +4120,79 @@ internal HttpMessage CreateDeletePrivateEndpointConnectionRequest(string subscri uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/privateEndpointConnections/", false); - uri.AppendPath(privateEndpointConnectionName, true); + uri.AppendPath("/customDomains/", false); + uri.AppendPath(domainName, true); + uri.AppendPath("/validate", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; _userAgent.Apply(message); return message; } - /// Description for Deletes a private endpoint connection. + /// Description for Validates a particular custom domain can be added to a static site. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. - /// Name of the private endpoint connection. + /// The custom domain to validate. + /// A JSON representation of the static site custom domain request properties. See example. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task DeletePrivateEndpointConnectionAsync(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task ValidateCustomDomainCanBeAddedToStaticSiteAsync(string subscriptionId, string resourceGroupName, string name, string domainName, StaticSiteCustomDomainContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); + Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateDeletePrivateEndpointConnectionRequest(subscriptionId, resourceGroupName, name, privateEndpointConnectionName); + using var message = CreateValidateCustomDomainCanBeAddedToStaticSiteRequest(subscriptionId, resourceGroupName, name, domainName, content); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: case 202: - case 204: return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Description for Deletes a private endpoint connection. + /// Description for Validates a particular custom domain can be added to a static site. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. - /// Name of the private endpoint connection. + /// The custom domain to validate. + /// A JSON representation of the static site custom domain request properties. See example. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response DeletePrivateEndpointConnection(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ValidateCustomDomainCanBeAddedToStaticSite(string subscriptionId, string resourceGroupName, string name, string domainName, StaticSiteCustomDomainContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); + Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateDeletePrivateEndpointConnectionRequest(subscriptionId, resourceGroupName, name, privateEndpointConnectionName); + using var message = CreateValidateCustomDomainCanBeAddedToStaticSiteRequest(subscriptionId, resourceGroupName, name, domainName, content); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: case 202: - case 204: return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateGetPrivateLinkResourcesRequestUri(string subscriptionId, string resourceGroupName, string name) + internal RequestUriBuilder CreateGetDatabaseConnectionsRequestUri(string subscriptionId, string resourceGroupName, string name) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -4090,12 +4202,12 @@ internal RequestUriBuilder CreateGetPrivateLinkResourcesRequestUri(string subscr uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/privateLinkResources", false); + uri.AppendPath("/databaseConnections", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateGetPrivateLinkResourcesRequest(string subscriptionId, string resourceGroupName, string name) + internal HttpMessage CreateGetDatabaseConnectionsRequest(string subscriptionId, string resourceGroupName, string name) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -4108,7 +4220,7 @@ internal HttpMessage CreateGetPrivateLinkResourcesRequest(string subscriptionId, uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/privateLinkResources", false); + uri.AppendPath("/databaseConnections", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -4116,28 +4228,28 @@ internal HttpMessage CreateGetPrivateLinkResourcesRequest(string subscriptionId, return message; } - /// Description for Gets the private link resources. + /// Returns overviews of database connections for a static site. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. - /// Name of the site. + /// Name of the static site. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> GetPrivateLinkResourcesAsync(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + public async Task> GetDatabaseConnectionsAsync(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - using var message = CreateGetPrivateLinkResourcesRequest(subscriptionId, resourceGroupName, name); + using var message = CreateGetDatabaseConnectionsRequest(subscriptionId, resourceGroupName, name); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - PrivateLinkResourcesWrapper value = default; + DatabaseConnectionCollection value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = PrivateLinkResourcesWrapper.DeserializePrivateLinkResourcesWrapper(document.RootElement); + value = DatabaseConnectionCollection.DeserializeDatabaseConnectionCollection(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -4145,28 +4257,28 @@ public async Task> GetPrivateLinkResources } } - /// Description for Gets the private link resources. + /// Returns overviews of database connections for a static site. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. - /// Name of the site. + /// Name of the static site. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response GetPrivateLinkResources(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + public Response GetDatabaseConnections(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - using var message = CreateGetPrivateLinkResourcesRequest(subscriptionId, resourceGroupName, name); + using var message = CreateGetDatabaseConnectionsRequest(subscriptionId, resourceGroupName, name); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - PrivateLinkResourcesWrapper value = default; + DatabaseConnectionCollection value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = PrivateLinkResourcesWrapper.DeserializePrivateLinkResourcesWrapper(document.RootElement); + value = DatabaseConnectionCollection.DeserializeDatabaseConnectionCollection(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -4174,7 +4286,7 @@ public Response GetPrivateLinkResources(string subs } } - internal RequestUriBuilder CreateResetStaticSiteApiKeyRequestUri(string subscriptionId, string resourceGroupName, string name, StaticSiteResetContent content) + internal RequestUriBuilder CreateGetDatabaseConnectionRequestUri(string subscriptionId, string resourceGroupName, string name, string databaseConnectionName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -4184,16 +4296,17 @@ internal RequestUriBuilder CreateResetStaticSiteApiKeyRequestUri(string subscrip uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/resetapikey", false); + uri.AppendPath("/databaseConnections/", false); + uri.AppendPath(databaseConnectionName, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateResetStaticSiteApiKeyRequest(string subscriptionId, string resourceGroupName, string name, StaticSiteResetContent content) + internal HttpMessage CreateGetDatabaseConnectionRequest(string subscriptionId, string resourceGroupName, string name, string databaseConnectionName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Post; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -4202,71 +4315,82 @@ internal HttpMessage CreateResetStaticSiteApiKeyRequest(string subscriptionId, s uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/resetapikey", false); + uri.AppendPath("/databaseConnections/", false); + uri.AppendPath(databaseConnectionName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content0 = new Utf8JsonRequestContent(); - content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); - request.Content = content0; _userAgent.Apply(message); return message; } - /// Description for Resets the api key for an existing static site. + /// Returns overview of a database connection for a static site by name. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. - /// The to use. + /// Name of the database connection. /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task ResetStaticSiteApiKeyAsync(string subscriptionId, string resourceGroupName, string name, StaticSiteResetContent content, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetDatabaseConnectionAsync(string subscriptionId, string resourceGroupName, string name, string databaseConnectionName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNullOrEmpty(databaseConnectionName, nameof(databaseConnectionName)); - using var message = CreateResetStaticSiteApiKeyRequest(subscriptionId, resourceGroupName, name, content); + using var message = CreateGetDatabaseConnectionRequest(subscriptionId, resourceGroupName, name, databaseConnectionName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - return message.Response; + { + StaticSiteDatabaseConnectionData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = StaticSiteDatabaseConnectionData.DeserializeStaticSiteDatabaseConnectionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((StaticSiteDatabaseConnectionData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Description for Resets the api key for an existing static site. + /// Returns overview of a database connection for a static site by name. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. - /// The to use. + /// Name of the database connection. /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ResetStaticSiteApiKey(string subscriptionId, string resourceGroupName, string name, StaticSiteResetContent content, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetDatabaseConnection(string subscriptionId, string resourceGroupName, string name, string databaseConnectionName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNullOrEmpty(databaseConnectionName, nameof(databaseConnectionName)); - using var message = CreateResetStaticSiteApiKeyRequest(subscriptionId, resourceGroupName, name, content); + using var message = CreateGetDatabaseConnectionRequest(subscriptionId, resourceGroupName, name, databaseConnectionName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - return message.Response; + { + StaticSiteDatabaseConnectionData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = StaticSiteDatabaseConnectionData.DeserializeStaticSiteDatabaseConnectionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((StaticSiteDatabaseConnectionData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateGetUserProvidedFunctionAppsForStaticSiteRequestUri(string subscriptionId, string resourceGroupName, string name) + internal RequestUriBuilder CreateCreateOrUpdateDatabaseConnectionRequestUri(string subscriptionId, string resourceGroupName, string name, string databaseConnectionName, StaticSiteDatabaseConnectionData data) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -4276,16 +4400,17 @@ internal RequestUriBuilder CreateGetUserProvidedFunctionAppsForStaticSiteRequest uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/userProvidedFunctionApps", false); + uri.AppendPath("/databaseConnections/", false); + uri.AppendPath(databaseConnectionName, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateGetUserProvidedFunctionAppsForStaticSiteRequest(string subscriptionId, string resourceGroupName, string name) + internal HttpMessage CreateCreateOrUpdateDatabaseConnectionRequest(string subscriptionId, string resourceGroupName, string name, string databaseConnectionName, StaticSiteDatabaseConnectionData data) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Put; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -4294,36 +4419,45 @@ internal HttpMessage CreateGetUserProvidedFunctionAppsForStaticSiteRequest(strin uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/userProvidedFunctionApps", false); + uri.AppendPath("/databaseConnections/", false); + uri.AppendPath(databaseConnectionName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; _userAgent.Apply(message); return message; } - /// Description for Gets the details of the user provided function apps registered with a static site. + /// Description for Create or update a database connection for a static site. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. + /// Name of the database connection. + /// A JSON representation of the database connection request properties. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> GetUserProvidedFunctionAppsForStaticSiteAsync(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> CreateOrUpdateDatabaseConnectionAsync(string subscriptionId, string resourceGroupName, string name, string databaseConnectionName, StaticSiteDatabaseConnectionData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(databaseConnectionName, nameof(databaseConnectionName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateGetUserProvidedFunctionAppsForStaticSiteRequest(subscriptionId, resourceGroupName, name); + using var message = CreateCreateOrUpdateDatabaseConnectionRequest(subscriptionId, resourceGroupName, name, databaseConnectionName, data); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - StaticSiteUserProvidedFunctionAppsListResult value = default; + StaticSiteDatabaseConnectionData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = StaticSiteUserProvidedFunctionAppsListResult.DeserializeStaticSiteUserProvidedFunctionAppsListResult(document.RootElement); + value = StaticSiteDatabaseConnectionData.DeserializeStaticSiteDatabaseConnectionData(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -4331,28 +4465,32 @@ public async Task> GetUse } } - /// Description for Gets the details of the user provided function apps registered with a static site. + /// Description for Create or update a database connection for a static site. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. + /// Name of the database connection. + /// A JSON representation of the database connection request properties. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response GetUserProvidedFunctionAppsForStaticSite(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdateDatabaseConnection(string subscriptionId, string resourceGroupName, string name, string databaseConnectionName, StaticSiteDatabaseConnectionData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(databaseConnectionName, nameof(databaseConnectionName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateGetUserProvidedFunctionAppsForStaticSiteRequest(subscriptionId, resourceGroupName, name); + using var message = CreateCreateOrUpdateDatabaseConnectionRequest(subscriptionId, resourceGroupName, name, databaseConnectionName, data); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - StaticSiteUserProvidedFunctionAppsListResult value = default; + StaticSiteDatabaseConnectionData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = StaticSiteUserProvidedFunctionAppsListResult.DeserializeStaticSiteUserProvidedFunctionAppsListResult(document.RootElement); + value = StaticSiteDatabaseConnectionData.DeserializeStaticSiteDatabaseConnectionData(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -4360,7 +4498,7 @@ public Response GetUserProvidedFun } } - internal RequestUriBuilder CreateGetUserProvidedFunctionAppForStaticSiteRequestUri(string subscriptionId, string resourceGroupName, string name, string functionAppName) + internal RequestUriBuilder CreateDeleteDatabaseConnectionRequestUri(string subscriptionId, string resourceGroupName, string name, string databaseConnectionName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -4370,17 +4508,17 @@ internal RequestUriBuilder CreateGetUserProvidedFunctionAppForStaticSiteRequestU uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/userProvidedFunctionApps/", false); - uri.AppendPath(functionAppName, true); + uri.AppendPath("/databaseConnections/", false); + uri.AppendPath(databaseConnectionName, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateGetUserProvidedFunctionAppForStaticSiteRequest(string subscriptionId, string resourceGroupName, string name, string functionAppName) + internal HttpMessage CreateDeleteDatabaseConnectionRequest(string subscriptionId, string resourceGroupName, string name, string databaseConnectionName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Delete; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -4389,8 +4527,8 @@ internal HttpMessage CreateGetUserProvidedFunctionAppForStaticSiteRequest(string uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/userProvidedFunctionApps/", false); - uri.AppendPath(functionAppName, true); + uri.AppendPath("/databaseConnections/", false); + uri.AppendPath(databaseConnectionName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -4398,73 +4536,61 @@ internal HttpMessage CreateGetUserProvidedFunctionAppForStaticSiteRequest(string return message; } - /// Description for Gets the details of the user provided function app registered with a static site. + /// Delete a database connection for a static site. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. - /// Name of the function app registered with the static site. + /// Name of the database connection. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetUserProvidedFunctionAppForStaticSiteAsync(string subscriptionId, string resourceGroupName, string name, string functionAppName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteDatabaseConnectionAsync(string subscriptionId, string resourceGroupName, string name, string databaseConnectionName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNullOrEmpty(functionAppName, nameof(functionAppName)); + Argument.AssertNotNullOrEmpty(databaseConnectionName, nameof(databaseConnectionName)); - using var message = CreateGetUserProvidedFunctionAppForStaticSiteRequest(subscriptionId, resourceGroupName, name, functionAppName); + using var message = CreateDeleteDatabaseConnectionRequest(subscriptionId, resourceGroupName, name, databaseConnectionName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - { - StaticSiteUserProvidedFunctionAppData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = StaticSiteUserProvidedFunctionAppData.DeserializeStaticSiteUserProvidedFunctionAppData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((StaticSiteUserProvidedFunctionAppData)null, message.Response); + case 204: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Description for Gets the details of the user provided function app registered with a static site. + /// Delete a database connection for a static site. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. - /// Name of the function app registered with the static site. + /// Name of the database connection. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response GetUserProvidedFunctionAppForStaticSite(string subscriptionId, string resourceGroupName, string name, string functionAppName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response DeleteDatabaseConnection(string subscriptionId, string resourceGroupName, string name, string databaseConnectionName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNullOrEmpty(functionAppName, nameof(functionAppName)); + Argument.AssertNotNullOrEmpty(databaseConnectionName, nameof(databaseConnectionName)); - using var message = CreateGetUserProvidedFunctionAppForStaticSiteRequest(subscriptionId, resourceGroupName, name, functionAppName); + using var message = CreateDeleteDatabaseConnectionRequest(subscriptionId, resourceGroupName, name, databaseConnectionName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - { - StaticSiteUserProvidedFunctionAppData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = StaticSiteUserProvidedFunctionAppData.DeserializeStaticSiteUserProvidedFunctionAppData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((StaticSiteUserProvidedFunctionAppData)null, message.Response); - default: + case 204: + return message.Response; + default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateRegisterUserProvidedFunctionAppWithStaticSiteRequestUri(string subscriptionId, string resourceGroupName, string name, string functionAppName, StaticSiteUserProvidedFunctionAppData data, bool? isForced) + internal RequestUriBuilder CreateUpdateDatabaseConnectionRequestUri(string subscriptionId, string resourceGroupName, string name, string databaseConnectionName, StaticSiteDatabaseConnectionPatchContent content) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -4474,21 +4600,17 @@ internal RequestUriBuilder CreateRegisterUserProvidedFunctionAppWithStaticSiteRe uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/userProvidedFunctionApps/", false); - uri.AppendPath(functionAppName, true); - if (isForced != null) - { - uri.AppendQuery("isForced", isForced.Value, true); - } + uri.AppendPath("/databaseConnections/", false); + uri.AppendPath(databaseConnectionName, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateRegisterUserProvidedFunctionAppWithStaticSiteRequest(string subscriptionId, string resourceGroupName, string name, string functionAppName, StaticSiteUserProvidedFunctionAppData data, bool? isForced) + internal HttpMessage CreateUpdateDatabaseConnectionRequest(string subscriptionId, string resourceGroupName, string name, string databaseConnectionName, StaticSiteDatabaseConnectionPatchContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Put; + request.Method = RequestMethod.Patch; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -4497,84 +4619,86 @@ internal HttpMessage CreateRegisterUserProvidedFunctionAppWithStaticSiteRequest( uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/userProvidedFunctionApps/", false); - uri.AppendPath(functionAppName, true); - if (isForced != null) - { - uri.AppendQuery("isForced", isForced.Value, true); - } + uri.AppendPath("/databaseConnections/", false); + uri.AppendPath(databaseConnectionName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); - request.Content = content; + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; _userAgent.Apply(message); return message; } - /// Description for Register a user provided function app with a static site. + /// Description for Create or update a database connection for a static site. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. - /// Name of the function app to register with the static site. - /// A JSON representation of the user provided function app properties. See example. - /// Specify <code>true</code> to force the update of the auth configuration on the function app even if an AzureStaticWebApps provider is already configured on the function app. The default is <code>false</code>. + /// Name of the database connection. + /// A JSON representation of the database connection request properties. /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task RegisterUserProvidedFunctionAppWithStaticSiteAsync(string subscriptionId, string resourceGroupName, string name, string functionAppName, StaticSiteUserProvidedFunctionAppData data, bool? isForced = null, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> UpdateDatabaseConnectionAsync(string subscriptionId, string resourceGroupName, string name, string databaseConnectionName, StaticSiteDatabaseConnectionPatchContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNullOrEmpty(functionAppName, nameof(functionAppName)); - Argument.AssertNotNull(data, nameof(data)); + Argument.AssertNotNullOrEmpty(databaseConnectionName, nameof(databaseConnectionName)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateRegisterUserProvidedFunctionAppWithStaticSiteRequest(subscriptionId, resourceGroupName, name, functionAppName, data, isForced); + using var message = CreateUpdateDatabaseConnectionRequest(subscriptionId, resourceGroupName, name, databaseConnectionName, content); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + StaticSiteDatabaseConnectionData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = StaticSiteDatabaseConnectionData.DeserializeStaticSiteDatabaseConnectionData(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// Description for Register a user provided function app with a static site. + /// Description for Create or update a database connection for a static site. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. - /// Name of the function app to register with the static site. - /// A JSON representation of the user provided function app properties. See example. - /// Specify <code>true</code> to force the update of the auth configuration on the function app even if an AzureStaticWebApps provider is already configured on the function app. The default is <code>false</code>. + /// Name of the database connection. + /// A JSON representation of the database connection request properties. /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response RegisterUserProvidedFunctionAppWithStaticSite(string subscriptionId, string resourceGroupName, string name, string functionAppName, StaticSiteUserProvidedFunctionAppData data, bool? isForced = null, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response UpdateDatabaseConnection(string subscriptionId, string resourceGroupName, string name, string databaseConnectionName, StaticSiteDatabaseConnectionPatchContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNullOrEmpty(functionAppName, nameof(functionAppName)); - Argument.AssertNotNull(data, nameof(data)); + Argument.AssertNotNullOrEmpty(databaseConnectionName, nameof(databaseConnectionName)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateRegisterUserProvidedFunctionAppWithStaticSiteRequest(subscriptionId, resourceGroupName, name, functionAppName, data, isForced); + using var message = CreateUpdateDatabaseConnectionRequest(subscriptionId, resourceGroupName, name, databaseConnectionName, content); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + StaticSiteDatabaseConnectionData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = StaticSiteDatabaseConnectionData.DeserializeStaticSiteDatabaseConnectionData(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateDetachUserProvidedFunctionAppFromStaticSiteRequestUri(string subscriptionId, string resourceGroupName, string name, string functionAppName) + internal RequestUriBuilder CreateGetDatabaseConnectionWithDetailsRequestUri(string subscriptionId, string resourceGroupName, string name, string databaseConnectionName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -4584,17 +4708,18 @@ internal RequestUriBuilder CreateDetachUserProvidedFunctionAppFromStaticSiteRequ uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/userProvidedFunctionApps/", false); - uri.AppendPath(functionAppName, true); + uri.AppendPath("/databaseConnections/", false); + uri.AppendPath(databaseConnectionName, true); + uri.AppendPath("/show", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateDetachUserProvidedFunctionAppFromStaticSiteRequest(string subscriptionId, string resourceGroupName, string name, string functionAppName) + internal HttpMessage CreateGetDatabaseConnectionWithDetailsRequest(string subscriptionId, string resourceGroupName, string name, string databaseConnectionName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Delete; + request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -4603,8 +4728,9 @@ internal HttpMessage CreateDetachUserProvidedFunctionAppFromStaticSiteRequest(st uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/userProvidedFunctionApps/", false); - uri.AppendPath(functionAppName, true); + uri.AppendPath("/databaseConnections/", false); + uri.AppendPath(databaseConnectionName, true); + uri.AppendPath("/show", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -4612,61 +4738,69 @@ internal HttpMessage CreateDetachUserProvidedFunctionAppFromStaticSiteRequest(st return message; } - /// Description for Detach the user provided function app from the static site. + /// Returns details of a database connection for a static site by name. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. - /// Name of the function app registered with the static site. + /// Name of the database connection. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task DetachUserProvidedFunctionAppFromStaticSiteAsync(string subscriptionId, string resourceGroupName, string name, string functionAppName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetDatabaseConnectionWithDetailsAsync(string subscriptionId, string resourceGroupName, string name, string databaseConnectionName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNullOrEmpty(functionAppName, nameof(functionAppName)); + Argument.AssertNotNullOrEmpty(databaseConnectionName, nameof(databaseConnectionName)); - using var message = CreateDetachUserProvidedFunctionAppFromStaticSiteRequest(subscriptionId, resourceGroupName, name, functionAppName); + using var message = CreateGetDatabaseConnectionWithDetailsRequest(subscriptionId, resourceGroupName, name, databaseConnectionName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 204: - return message.Response; + { + StaticSiteDatabaseConnectionData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = StaticSiteDatabaseConnectionData.DeserializeStaticSiteDatabaseConnectionData(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// Description for Detach the user provided function app from the static site. + /// Returns details of a database connection for a static site by name. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. - /// Name of the function app registered with the static site. + /// Name of the database connection. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response DetachUserProvidedFunctionAppFromStaticSite(string subscriptionId, string resourceGroupName, string name, string functionAppName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetDatabaseConnectionWithDetails(string subscriptionId, string resourceGroupName, string name, string databaseConnectionName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNullOrEmpty(functionAppName, nameof(functionAppName)); + Argument.AssertNotNullOrEmpty(databaseConnectionName, nameof(databaseConnectionName)); - using var message = CreateDetachUserProvidedFunctionAppFromStaticSiteRequest(subscriptionId, resourceGroupName, name, functionAppName); + using var message = CreateGetDatabaseConnectionWithDetailsRequest(subscriptionId, resourceGroupName, name, databaseConnectionName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 204: - return message.Response; + { + StaticSiteDatabaseConnectionData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = StaticSiteDatabaseConnectionData.DeserializeStaticSiteDatabaseConnectionData(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateCreateZipDeploymentForStaticSiteRequestUri(string subscriptionId, string resourceGroupName, string name, StaticSiteZipDeployment staticSiteZipDeploymentEnvelope) + internal RequestUriBuilder CreateDetachStaticSiteRequestUri(string subscriptionId, string resourceGroupName, string name) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -4676,12 +4810,12 @@ internal RequestUriBuilder CreateCreateZipDeploymentForStaticSiteRequestUri(stri uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/zipdeploy", false); + uri.AppendPath("/detach", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateCreateZipDeploymentForStaticSiteRequest(string subscriptionId, string resourceGroupName, string name, StaticSiteZipDeployment staticSiteZipDeploymentEnvelope) + internal HttpMessage CreateDetachStaticSiteRequest(string subscriptionId, string resourceGroupName, string name) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -4694,34 +4828,28 @@ internal HttpMessage CreateCreateZipDeploymentForStaticSiteRequest(string subscr uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/zipdeploy", false); + uri.AppendPath("/detach", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(staticSiteZipDeploymentEnvelope, ModelSerializationExtensions.WireOptions); - request.Content = content; _userAgent.Apply(message); return message; } - /// Description for Deploys zipped content to a static site. + /// Description for Detaches a static site. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. - /// Name of the static site. - /// A JSON representation of the StaticSiteZipDeployment properties. See example. + /// Name of the static site to detach. /// The cancellation token to use. - /// , , or is null. + /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task CreateZipDeploymentForStaticSiteAsync(string subscriptionId, string resourceGroupName, string name, StaticSiteZipDeployment staticSiteZipDeploymentEnvelope, CancellationToken cancellationToken = default) + public async Task DetachStaticSiteAsync(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNull(staticSiteZipDeploymentEnvelope, nameof(staticSiteZipDeploymentEnvelope)); - using var message = CreateCreateZipDeploymentForStaticSiteRequest(subscriptionId, resourceGroupName, name, staticSiteZipDeploymentEnvelope); + using var message = CreateDetachStaticSiteRequest(subscriptionId, resourceGroupName, name); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -4733,22 +4861,20 @@ public async Task CreateZipDeploymentForStaticSiteAsync(string subscri } } - /// Description for Deploys zipped content to a static site. + /// Description for Detaches a static site. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. - /// Name of the static site. - /// A JSON representation of the StaticSiteZipDeployment properties. See example. + /// Name of the static site to detach. /// The cancellation token to use. - /// , , or is null. + /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response CreateZipDeploymentForStaticSite(string subscriptionId, string resourceGroupName, string name, StaticSiteZipDeployment staticSiteZipDeploymentEnvelope, CancellationToken cancellationToken = default) + public Response DetachStaticSite(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNull(staticSiteZipDeploymentEnvelope, nameof(staticSiteZipDeploymentEnvelope)); - using var message = CreateCreateZipDeploymentForStaticSiteRequest(subscriptionId, resourceGroupName, name, staticSiteZipDeploymentEnvelope); + using var message = CreateDetachStaticSiteRequest(subscriptionId, resourceGroupName, name); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -4760,15 +4886,3283 @@ public Response CreateZipDeploymentForStaticSite(string subscriptionId, string r } } - internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId) + internal RequestUriBuilder CreateListStaticSiteFunctionsRequestUri(string subscriptionId, string resourceGroupName, string name) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/functions", false); + uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId) + internal HttpMessage CreateListStaticSiteFunctionsRequest(string subscriptionId, string resourceGroupName, string name) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/functions", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Description for Gets the functions of a static site. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListStaticSiteFunctionsAsync(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateListStaticSiteFunctionsRequest(subscriptionId, resourceGroupName, name); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + StaticSiteFunctionOverviewListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = StaticSiteFunctionOverviewListResult.DeserializeStaticSiteFunctionOverviewListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Description for Gets the functions of a static site. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListStaticSiteFunctions(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateListStaticSiteFunctionsRequest(subscriptionId, resourceGroupName, name); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + StaticSiteFunctionOverviewListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = StaticSiteFunctionOverviewListResult.DeserializeStaticSiteFunctionOverviewListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListStaticSiteAppSettingsRequestUri(string subscriptionId, string resourceGroupName, string name) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/listAppSettings", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListStaticSiteAppSettingsRequest(string subscriptionId, string resourceGroupName, string name) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/listAppSettings", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Description for Gets the application settings of a static site. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListStaticSiteAppSettingsAsync(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateListStaticSiteAppSettingsRequest(subscriptionId, resourceGroupName, name); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AppServiceConfigurationDictionary value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AppServiceConfigurationDictionary.DeserializeAppServiceConfigurationDictionary(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Description for Gets the application settings of a static site. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListStaticSiteAppSettings(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateListStaticSiteAppSettingsRequest(subscriptionId, resourceGroupName, name); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AppServiceConfigurationDictionary value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AppServiceConfigurationDictionary.DeserializeAppServiceConfigurationDictionary(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListStaticSiteConfiguredRolesRequestUri(string subscriptionId, string resourceGroupName, string name) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/listConfiguredRoles", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListStaticSiteConfiguredRolesRequest(string subscriptionId, string resourceGroupName, string name) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/listConfiguredRoles", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Description for Lists the roles configured for the static site. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListStaticSiteConfiguredRolesAsync(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateListStaticSiteConfiguredRolesRequest(subscriptionId, resourceGroupName, name); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + StaticSiteStringList value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = StaticSiteStringList.DeserializeStaticSiteStringList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Description for Lists the roles configured for the static site. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListStaticSiteConfiguredRoles(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateListStaticSiteConfiguredRolesRequest(subscriptionId, resourceGroupName, name); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + StaticSiteStringList value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = StaticSiteStringList.DeserializeStaticSiteStringList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListStaticSiteFunctionAppSettingsRequestUri(string subscriptionId, string resourceGroupName, string name) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/listFunctionAppSettings", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListStaticSiteFunctionAppSettingsRequest(string subscriptionId, string resourceGroupName, string name) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/listFunctionAppSettings", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Description for Gets the application settings of a static site. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListStaticSiteFunctionAppSettingsAsync(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateListStaticSiteFunctionAppSettingsRequest(subscriptionId, resourceGroupName, name); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AppServiceConfigurationDictionary value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AppServiceConfigurationDictionary.DeserializeAppServiceConfigurationDictionary(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Description for Gets the application settings of a static site. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListStaticSiteFunctionAppSettings(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateListStaticSiteFunctionAppSettingsRequest(subscriptionId, resourceGroupName, name); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AppServiceConfigurationDictionary value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AppServiceConfigurationDictionary.DeserializeAppServiceConfigurationDictionary(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListStaticSiteSecretsRequestUri(string subscriptionId, string resourceGroupName, string name) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/listSecrets", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListStaticSiteSecretsRequest(string subscriptionId, string resourceGroupName, string name) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/listSecrets", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Description for Lists the secrets for an existing static site. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListStaticSiteSecretsAsync(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateListStaticSiteSecretsRequest(subscriptionId, resourceGroupName, name); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AppServiceConfigurationDictionary value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AppServiceConfigurationDictionary.DeserializeAppServiceConfigurationDictionary(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Description for Lists the secrets for an existing static site. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListStaticSiteSecrets(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateListStaticSiteSecretsRequest(subscriptionId, resourceGroupName, name); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AppServiceConfigurationDictionary value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AppServiceConfigurationDictionary.DeserializeAppServiceConfigurationDictionary(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetPrivateEndpointConnectionListRequestUri(string subscriptionId, string resourceGroupName, string name) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/privateEndpointConnections", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetPrivateEndpointConnectionListRequest(string subscriptionId, string resourceGroupName, string name) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/privateEndpointConnections", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Description for Gets the list of private endpoint connections associated with a static site. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetPrivateEndpointConnectionListAsync(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateGetPrivateEndpointConnectionListRequest(subscriptionId, resourceGroupName, name); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + RemotePrivateEndpointConnectionListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = RemotePrivateEndpointConnectionListResult.DeserializeRemotePrivateEndpointConnectionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Description for Gets the list of private endpoint connections associated with a static site. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response GetPrivateEndpointConnectionList(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateGetPrivateEndpointConnectionListRequest(subscriptionId, resourceGroupName, name); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + RemotePrivateEndpointConnectionListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = RemotePrivateEndpointConnectionListResult.DeserializeRemotePrivateEndpointConnectionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetPrivateEndpointConnectionRequestUri(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/privateEndpointConnections/", false); + uri.AppendPath(privateEndpointConnectionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetPrivateEndpointConnectionRequest(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/privateEndpointConnections/", false); + uri.AppendPath(privateEndpointConnectionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Description for Gets a private endpoint connection. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// Name of the private endpoint connection. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetPrivateEndpointConnectionAsync(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); + + using var message = CreateGetPrivateEndpointConnectionRequest(subscriptionId, resourceGroupName, name, privateEndpointConnectionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + RemotePrivateEndpointConnectionARMResourceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = RemotePrivateEndpointConnectionARMResourceData.DeserializeRemotePrivateEndpointConnectionARMResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((RemotePrivateEndpointConnectionARMResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Description for Gets a private endpoint connection. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// Name of the private endpoint connection. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetPrivateEndpointConnection(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); + + using var message = CreateGetPrivateEndpointConnectionRequest(subscriptionId, resourceGroupName, name, privateEndpointConnectionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + RemotePrivateEndpointConnectionARMResourceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = RemotePrivateEndpointConnectionARMResourceData.DeserializeRemotePrivateEndpointConnectionARMResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((RemotePrivateEndpointConnectionARMResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateApproveOrRejectPrivateEndpointConnectionRequestUri(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName, RemotePrivateEndpointConnectionARMResourceData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/privateEndpointConnections/", false); + uri.AppendPath(privateEndpointConnectionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateApproveOrRejectPrivateEndpointConnectionRequest(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName, RemotePrivateEndpointConnectionARMResourceData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/privateEndpointConnections/", false); + uri.AppendPath(privateEndpointConnectionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Description for Approves or rejects a private endpoint connection. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// Name of the private endpoint connection. + /// Request body. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task ApproveOrRejectPrivateEndpointConnectionAsync(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName, RemotePrivateEndpointConnectionARMResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateApproveOrRejectPrivateEndpointConnectionRequest(subscriptionId, resourceGroupName, name, privateEndpointConnectionName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Description for Approves or rejects a private endpoint connection. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// Name of the private endpoint connection. + /// Request body. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ApproveOrRejectPrivateEndpointConnection(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName, RemotePrivateEndpointConnectionARMResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateApproveOrRejectPrivateEndpointConnectionRequest(subscriptionId, resourceGroupName, name, privateEndpointConnectionName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeletePrivateEndpointConnectionRequestUri(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/privateEndpointConnections/", false); + uri.AppendPath(privateEndpointConnectionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeletePrivateEndpointConnectionRequest(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/privateEndpointConnections/", false); + uri.AppendPath(privateEndpointConnectionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Description for Deletes a private endpoint connection. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// Name of the private endpoint connection. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeletePrivateEndpointConnectionAsync(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); + + using var message = CreateDeletePrivateEndpointConnectionRequest(subscriptionId, resourceGroupName, name, privateEndpointConnectionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Description for Deletes a private endpoint connection. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// Name of the private endpoint connection. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response DeletePrivateEndpointConnection(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); + + using var message = CreateDeletePrivateEndpointConnectionRequest(subscriptionId, resourceGroupName, name, privateEndpointConnectionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetPrivateLinkResourcesRequestUri(string subscriptionId, string resourceGroupName, string name) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/privateLinkResources", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetPrivateLinkResourcesRequest(string subscriptionId, string resourceGroupName, string name) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/privateLinkResources", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Description for Gets the private link resources. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the site. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetPrivateLinkResourcesAsync(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateGetPrivateLinkResourcesRequest(subscriptionId, resourceGroupName, name); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PrivateLinkResourcesWrapper value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = PrivateLinkResourcesWrapper.DeserializePrivateLinkResourcesWrapper(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Description for Gets the private link resources. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the site. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response GetPrivateLinkResources(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateGetPrivateLinkResourcesRequest(subscriptionId, resourceGroupName, name); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PrivateLinkResourcesWrapper value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = PrivateLinkResourcesWrapper.DeserializePrivateLinkResourcesWrapper(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateResetStaticSiteApiKeyRequestUri(string subscriptionId, string resourceGroupName, string name, StaticSiteResetContent content) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/resetapikey", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateResetStaticSiteApiKeyRequest(string subscriptionId, string resourceGroupName, string name, StaticSiteResetContent content) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/resetapikey", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; + _userAgent.Apply(message); + return message; + } + + /// Description for Resets the api key for an existing static site. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The to use. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task ResetStaticSiteApiKeyAsync(string subscriptionId, string resourceGroupName, string name, StaticSiteResetContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateResetStaticSiteApiKeyRequest(subscriptionId, resourceGroupName, name, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Description for Resets the api key for an existing static site. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The to use. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ResetStaticSiteApiKey(string subscriptionId, string resourceGroupName, string name, StaticSiteResetContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateResetStaticSiteApiKeyRequest(subscriptionId, resourceGroupName, name, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetDatabaseConnectionsWithDetailsRequestUri(string subscriptionId, string resourceGroupName, string name) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/showDatabaseConnections", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetDatabaseConnectionsWithDetailsRequest(string subscriptionId, string resourceGroupName, string name) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/showDatabaseConnections", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Returns details of database connections for a static site. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetDatabaseConnectionsWithDetailsAsync(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateGetDatabaseConnectionsWithDetailsRequest(subscriptionId, resourceGroupName, name); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DatabaseConnectionCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = DatabaseConnectionCollection.DeserializeDatabaseConnectionCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Returns details of database connections for a static site. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response GetDatabaseConnectionsWithDetails(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateGetDatabaseConnectionsWithDetailsRequest(subscriptionId, resourceGroupName, name); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DatabaseConnectionCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = DatabaseConnectionCollection.DeserializeDatabaseConnectionCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetUserProvidedFunctionAppsForStaticSiteRequestUri(string subscriptionId, string resourceGroupName, string name) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/userProvidedFunctionApps", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetUserProvidedFunctionAppsForStaticSiteRequest(string subscriptionId, string resourceGroupName, string name) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/userProvidedFunctionApps", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Description for Gets the details of the user provided function apps registered with a static site. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetUserProvidedFunctionAppsForStaticSiteAsync(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateGetUserProvidedFunctionAppsForStaticSiteRequest(subscriptionId, resourceGroupName, name); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + StaticSiteUserProvidedFunctionAppsListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = StaticSiteUserProvidedFunctionAppsListResult.DeserializeStaticSiteUserProvidedFunctionAppsListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Description for Gets the details of the user provided function apps registered with a static site. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response GetUserProvidedFunctionAppsForStaticSite(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateGetUserProvidedFunctionAppsForStaticSiteRequest(subscriptionId, resourceGroupName, name); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + StaticSiteUserProvidedFunctionAppsListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = StaticSiteUserProvidedFunctionAppsListResult.DeserializeStaticSiteUserProvidedFunctionAppsListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetUserProvidedFunctionAppForStaticSiteRequestUri(string subscriptionId, string resourceGroupName, string name, string functionAppName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/userProvidedFunctionApps/", false); + uri.AppendPath(functionAppName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetUserProvidedFunctionAppForStaticSiteRequest(string subscriptionId, string resourceGroupName, string name, string functionAppName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/userProvidedFunctionApps/", false); + uri.AppendPath(functionAppName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Description for Gets the details of the user provided function app registered with a static site. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// Name of the function app registered with the static site. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetUserProvidedFunctionAppForStaticSiteAsync(string subscriptionId, string resourceGroupName, string name, string functionAppName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(functionAppName, nameof(functionAppName)); + + using var message = CreateGetUserProvidedFunctionAppForStaticSiteRequest(subscriptionId, resourceGroupName, name, functionAppName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + StaticSiteUserProvidedFunctionAppData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = StaticSiteUserProvidedFunctionAppData.DeserializeStaticSiteUserProvidedFunctionAppData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((StaticSiteUserProvidedFunctionAppData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Description for Gets the details of the user provided function app registered with a static site. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// Name of the function app registered with the static site. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetUserProvidedFunctionAppForStaticSite(string subscriptionId, string resourceGroupName, string name, string functionAppName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(functionAppName, nameof(functionAppName)); + + using var message = CreateGetUserProvidedFunctionAppForStaticSiteRequest(subscriptionId, resourceGroupName, name, functionAppName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + StaticSiteUserProvidedFunctionAppData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = StaticSiteUserProvidedFunctionAppData.DeserializeStaticSiteUserProvidedFunctionAppData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((StaticSiteUserProvidedFunctionAppData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateRegisterUserProvidedFunctionAppWithStaticSiteRequestUri(string subscriptionId, string resourceGroupName, string name, string functionAppName, StaticSiteUserProvidedFunctionAppData data, bool? isForced) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/userProvidedFunctionApps/", false); + uri.AppendPath(functionAppName, true); + if (isForced != null) + { + uri.AppendQuery("isForced", isForced.Value, true); + } + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateRegisterUserProvidedFunctionAppWithStaticSiteRequest(string subscriptionId, string resourceGroupName, string name, string functionAppName, StaticSiteUserProvidedFunctionAppData data, bool? isForced) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/userProvidedFunctionApps/", false); + uri.AppendPath(functionAppName, true); + if (isForced != null) + { + uri.AppendQuery("isForced", isForced.Value, true); + } + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Description for Register a user provided function app with a static site. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// Name of the function app to register with the static site. + /// A JSON representation of the user provided function app properties. See example. + /// Specify <code>true</code> to force the update of the auth configuration on the function app even if an AzureStaticWebApps provider is already configured on the function app. The default is <code>false</code>. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task RegisterUserProvidedFunctionAppWithStaticSiteAsync(string subscriptionId, string resourceGroupName, string name, string functionAppName, StaticSiteUserProvidedFunctionAppData data, bool? isForced = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(functionAppName, nameof(functionAppName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateRegisterUserProvidedFunctionAppWithStaticSiteRequest(subscriptionId, resourceGroupName, name, functionAppName, data, isForced); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Description for Register a user provided function app with a static site. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// Name of the function app to register with the static site. + /// A JSON representation of the user provided function app properties. See example. + /// Specify <code>true</code> to force the update of the auth configuration on the function app even if an AzureStaticWebApps provider is already configured on the function app. The default is <code>false</code>. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response RegisterUserProvidedFunctionAppWithStaticSite(string subscriptionId, string resourceGroupName, string name, string functionAppName, StaticSiteUserProvidedFunctionAppData data, bool? isForced = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(functionAppName, nameof(functionAppName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateRegisterUserProvidedFunctionAppWithStaticSiteRequest(subscriptionId, resourceGroupName, name, functionAppName, data, isForced); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDetachUserProvidedFunctionAppFromStaticSiteRequestUri(string subscriptionId, string resourceGroupName, string name, string functionAppName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/userProvidedFunctionApps/", false); + uri.AppendPath(functionAppName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDetachUserProvidedFunctionAppFromStaticSiteRequest(string subscriptionId, string resourceGroupName, string name, string functionAppName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/userProvidedFunctionApps/", false); + uri.AppendPath(functionAppName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Description for Detach the user provided function app from the static site. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// Name of the function app registered with the static site. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DetachUserProvidedFunctionAppFromStaticSiteAsync(string subscriptionId, string resourceGroupName, string name, string functionAppName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(functionAppName, nameof(functionAppName)); + + using var message = CreateDetachUserProvidedFunctionAppFromStaticSiteRequest(subscriptionId, resourceGroupName, name, functionAppName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Description for Detach the user provided function app from the static site. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// Name of the function app registered with the static site. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response DetachUserProvidedFunctionAppFromStaticSite(string subscriptionId, string resourceGroupName, string name, string functionAppName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(functionAppName, nameof(functionAppName)); + + using var message = CreateDetachUserProvidedFunctionAppFromStaticSiteRequest(subscriptionId, resourceGroupName, name, functionAppName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateZipDeploymentForStaticSiteRequestUri(string subscriptionId, string resourceGroupName, string name, StaticSiteZipDeployment staticSiteZipDeploymentEnvelope) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/zipdeploy", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateZipDeploymentForStaticSiteRequest(string subscriptionId, string resourceGroupName, string name, StaticSiteZipDeployment staticSiteZipDeploymentEnvelope) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/zipdeploy", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(staticSiteZipDeploymentEnvelope, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Description for Deploys zipped content to a static site. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// A JSON representation of the StaticSiteZipDeployment properties. See example. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task CreateZipDeploymentForStaticSiteAsync(string subscriptionId, string resourceGroupName, string name, StaticSiteZipDeployment staticSiteZipDeploymentEnvelope, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNull(staticSiteZipDeploymentEnvelope, nameof(staticSiteZipDeploymentEnvelope)); + + using var message = CreateCreateZipDeploymentForStaticSiteRequest(subscriptionId, resourceGroupName, name, staticSiteZipDeploymentEnvelope); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Description for Deploys zipped content to a static site. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// A JSON representation of the StaticSiteZipDeployment properties. See example. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response CreateZipDeploymentForStaticSite(string subscriptionId, string resourceGroupName, string name, StaticSiteZipDeployment staticSiteZipDeploymentEnvelope, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNull(staticSiteZipDeploymentEnvelope, nameof(staticSiteZipDeploymentEnvelope)); + + using var message = CreateCreateZipDeploymentForStaticSiteRequest(subscriptionId, resourceGroupName, name, staticSiteZipDeploymentEnvelope); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateValidateBackendRequestUri(string subscriptionId, string resourceGroupName, string name, string linkedBackendName, StaticSiteLinkedBackendData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/linkedBackends/", false); + uri.AppendPath(linkedBackendName, true); + uri.AppendPath("/validate", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateValidateBackendRequest(string subscriptionId, string resourceGroupName, string name, string linkedBackendName, StaticSiteLinkedBackendData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/linkedBackends/", false); + uri.AppendPath(linkedBackendName, true); + uri.AppendPath("/validate", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Validates that a backend can be linked to a static site. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// Name of the linked backend that should be retrieved. + /// A JSON representation of the linked backend request properties. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task ValidateBackendAsync(string subscriptionId, string resourceGroupName, string name, string linkedBackendName, StaticSiteLinkedBackendData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(linkedBackendName, nameof(linkedBackendName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateValidateBackendRequest(subscriptionId, resourceGroupName, name, linkedBackendName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Validates that a backend can be linked to a static site. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// Name of the linked backend that should be retrieved. + /// A JSON representation of the linked backend request properties. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ValidateBackend(string subscriptionId, string resourceGroupName, string name, string linkedBackendName, StaticSiteLinkedBackendData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(linkedBackendName, nameof(linkedBackendName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateValidateBackendRequest(subscriptionId, resourceGroupName, name, linkedBackendName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateValidateBackendForBuildRequestUri(string subscriptionId, string resourceGroupName, string name, string environmentName, string linkedBackendName, StaticSiteLinkedBackendData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/builds/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/linkedBackends/", false); + uri.AppendPath(linkedBackendName, true); + uri.AppendPath("/validate", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateValidateBackendForBuildRequest(string subscriptionId, string resourceGroupName, string name, string environmentName, string linkedBackendName, StaticSiteLinkedBackendData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/builds/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/linkedBackends/", false); + uri.AppendPath(linkedBackendName, true); + uri.AppendPath("/validate", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Validates that a backend can be linked to a static site build. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The stage site identifier. + /// Name of the linked backend that should be retrieved. + /// A JSON representation of the linked backend request properties. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task ValidateBackendForBuildAsync(string subscriptionId, string resourceGroupName, string name, string environmentName, string linkedBackendName, StaticSiteLinkedBackendData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNullOrEmpty(linkedBackendName, nameof(linkedBackendName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateValidateBackendForBuildRequest(subscriptionId, resourceGroupName, name, environmentName, linkedBackendName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Validates that a backend can be linked to a static site build. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The stage site identifier. + /// Name of the linked backend that should be retrieved. + /// A JSON representation of the linked backend request properties. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response ValidateBackendForBuild(string subscriptionId, string resourceGroupName, string name, string environmentName, string linkedBackendName, StaticSiteLinkedBackendData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNullOrEmpty(linkedBackendName, nameof(linkedBackendName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateValidateBackendForBuildRequest(subscriptionId, resourceGroupName, name, environmentName, linkedBackendName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetLinkedBackendsRequestUri(string subscriptionId, string resourceGroupName, string name) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/linkedBackends", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetLinkedBackendsRequest(string subscriptionId, string resourceGroupName, string name) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/linkedBackends", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Returns details of all backends linked to a static site. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetLinkedBackendsAsync(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateGetLinkedBackendsRequest(subscriptionId, resourceGroupName, name); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + StaticSiteLinkedBackendsCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = StaticSiteLinkedBackendsCollection.DeserializeStaticSiteLinkedBackendsCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Returns details of all backends linked to a static site. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response GetLinkedBackends(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateGetLinkedBackendsRequest(subscriptionId, resourceGroupName, name); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + StaticSiteLinkedBackendsCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = StaticSiteLinkedBackendsCollection.DeserializeStaticSiteLinkedBackendsCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetLinkedBackendsForBuildRequestUri(string subscriptionId, string resourceGroupName, string name, string environmentName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/builds/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/linkedBackends", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetLinkedBackendsForBuildRequest(string subscriptionId, string resourceGroupName, string name, string environmentName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/builds/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/linkedBackends", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Returns details of all backends linked to a static site build. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The stage site identifier. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetLinkedBackendsForBuildAsync(string subscriptionId, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + + using var message = CreateGetLinkedBackendsForBuildRequest(subscriptionId, resourceGroupName, name, environmentName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + StaticSiteLinkedBackendsCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = StaticSiteLinkedBackendsCollection.DeserializeStaticSiteLinkedBackendsCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Returns details of all backends linked to a static site build. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The stage site identifier. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetLinkedBackendsForBuild(string subscriptionId, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + + using var message = CreateGetLinkedBackendsForBuildRequest(subscriptionId, resourceGroupName, name, environmentName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + StaticSiteLinkedBackendsCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = StaticSiteLinkedBackendsCollection.DeserializeStaticSiteLinkedBackendsCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetLinkedBackendRequestUri(string subscriptionId, string resourceGroupName, string name, string linkedBackendName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/linkedBackends/", false); + uri.AppendPath(linkedBackendName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetLinkedBackendRequest(string subscriptionId, string resourceGroupName, string name, string linkedBackendName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/linkedBackends/", false); + uri.AppendPath(linkedBackendName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Returns the details of a linked backend linked to a static site by name. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// Name of the linked backend that should be retrieved. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetLinkedBackendAsync(string subscriptionId, string resourceGroupName, string name, string linkedBackendName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(linkedBackendName, nameof(linkedBackendName)); + + using var message = CreateGetLinkedBackendRequest(subscriptionId, resourceGroupName, name, linkedBackendName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + StaticSiteLinkedBackendData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = StaticSiteLinkedBackendData.DeserializeStaticSiteLinkedBackendData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((StaticSiteLinkedBackendData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Returns the details of a linked backend linked to a static site by name. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// Name of the linked backend that should be retrieved. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetLinkedBackend(string subscriptionId, string resourceGroupName, string name, string linkedBackendName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(linkedBackendName, nameof(linkedBackendName)); + + using var message = CreateGetLinkedBackendRequest(subscriptionId, resourceGroupName, name, linkedBackendName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + StaticSiteLinkedBackendData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = StaticSiteLinkedBackendData.DeserializeStaticSiteLinkedBackendData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((StaticSiteLinkedBackendData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateLinkBackendRequestUri(string subscriptionId, string resourceGroupName, string name, string linkedBackendName, StaticSiteLinkedBackendData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/linkedBackends/", false); + uri.AppendPath(linkedBackendName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateLinkBackendRequest(string subscriptionId, string resourceGroupName, string name, string linkedBackendName, StaticSiteLinkedBackendData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/linkedBackends/", false); + uri.AppendPath(linkedBackendName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Link backend to a static site. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// Name of the backend to link to the static site. + /// A JSON representation of the linked backend request properties. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task LinkBackendAsync(string subscriptionId, string resourceGroupName, string name, string linkedBackendName, StaticSiteLinkedBackendData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(linkedBackendName, nameof(linkedBackendName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateLinkBackendRequest(subscriptionId, resourceGroupName, name, linkedBackendName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Link backend to a static site. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// Name of the backend to link to the static site. + /// A JSON representation of the linked backend request properties. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response LinkBackend(string subscriptionId, string resourceGroupName, string name, string linkedBackendName, StaticSiteLinkedBackendData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(linkedBackendName, nameof(linkedBackendName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateLinkBackendRequest(subscriptionId, resourceGroupName, name, linkedBackendName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUnlinkBackendRequestUri(string subscriptionId, string resourceGroupName, string name, string linkedBackendName, bool? isCleaningAuthConfig) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/linkedBackends/", false); + uri.AppendPath(linkedBackendName, true); + if (isCleaningAuthConfig != null) + { + uri.AppendQuery("isCleaningAuthConfig", isCleaningAuthConfig.Value, true); + } + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUnlinkBackendRequest(string subscriptionId, string resourceGroupName, string name, string linkedBackendName, bool? isCleaningAuthConfig) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/linkedBackends/", false); + uri.AppendPath(linkedBackendName, true); + if (isCleaningAuthConfig != null) + { + uri.AppendQuery("isCleaningAuthConfig", isCleaningAuthConfig.Value, true); + } + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Unlink a backend from a static site. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// Name of the backend linked to the static site. + /// Decides if Easy Auth configuration will be removed from backend configuration. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task UnlinkBackendAsync(string subscriptionId, string resourceGroupName, string name, string linkedBackendName, bool? isCleaningAuthConfig = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(linkedBackendName, nameof(linkedBackendName)); + + using var message = CreateUnlinkBackendRequest(subscriptionId, resourceGroupName, name, linkedBackendName, isCleaningAuthConfig); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Unlink a backend from a static site. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// Name of the backend linked to the static site. + /// Decides if Easy Auth configuration will be removed from backend configuration. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response UnlinkBackend(string subscriptionId, string resourceGroupName, string name, string linkedBackendName, bool? isCleaningAuthConfig = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(linkedBackendName, nameof(linkedBackendName)); + + using var message = CreateUnlinkBackendRequest(subscriptionId, resourceGroupName, name, linkedBackendName, isCleaningAuthConfig); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetLinkedBackendForBuildRequestUri(string subscriptionId, string resourceGroupName, string name, string environmentName, string linkedBackendName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/builds/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/linkedBackends/", false); + uri.AppendPath(linkedBackendName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetLinkedBackendForBuildRequest(string subscriptionId, string resourceGroupName, string name, string environmentName, string linkedBackendName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/builds/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/linkedBackends/", false); + uri.AppendPath(linkedBackendName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Returns the details of a linked backend linked to a static site build by name. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The stage site identifier. + /// Name of the linked backend that should be retrieved. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetLinkedBackendForBuildAsync(string subscriptionId, string resourceGroupName, string name, string environmentName, string linkedBackendName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNullOrEmpty(linkedBackendName, nameof(linkedBackendName)); + + using var message = CreateGetLinkedBackendForBuildRequest(subscriptionId, resourceGroupName, name, environmentName, linkedBackendName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + StaticSiteLinkedBackendData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = StaticSiteLinkedBackendData.DeserializeStaticSiteLinkedBackendData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((StaticSiteLinkedBackendData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Returns the details of a linked backend linked to a static site build by name. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The stage site identifier. + /// Name of the linked backend that should be retrieved. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response GetLinkedBackendForBuild(string subscriptionId, string resourceGroupName, string name, string environmentName, string linkedBackendName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNullOrEmpty(linkedBackendName, nameof(linkedBackendName)); + + using var message = CreateGetLinkedBackendForBuildRequest(subscriptionId, resourceGroupName, name, environmentName, linkedBackendName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + StaticSiteLinkedBackendData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = StaticSiteLinkedBackendData.DeserializeStaticSiteLinkedBackendData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((StaticSiteLinkedBackendData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateLinkBackendToBuildRequestUri(string subscriptionId, string resourceGroupName, string name, string environmentName, string linkedBackendName, StaticSiteLinkedBackendData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/builds/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/linkedBackends/", false); + uri.AppendPath(linkedBackendName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateLinkBackendToBuildRequest(string subscriptionId, string resourceGroupName, string name, string environmentName, string linkedBackendName, StaticSiteLinkedBackendData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/builds/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/linkedBackends/", false); + uri.AppendPath(linkedBackendName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Link backend to a static site build. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The stage site identifier. + /// Name of the backend to link to the static site. + /// A JSON representation of the linked backend request properties. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task LinkBackendToBuildAsync(string subscriptionId, string resourceGroupName, string name, string environmentName, string linkedBackendName, StaticSiteLinkedBackendData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNullOrEmpty(linkedBackendName, nameof(linkedBackendName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateLinkBackendToBuildRequest(subscriptionId, resourceGroupName, name, environmentName, linkedBackendName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Link backend to a static site build. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The stage site identifier. + /// Name of the backend to link to the static site. + /// A JSON representation of the linked backend request properties. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response LinkBackendToBuild(string subscriptionId, string resourceGroupName, string name, string environmentName, string linkedBackendName, StaticSiteLinkedBackendData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNullOrEmpty(linkedBackendName, nameof(linkedBackendName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateLinkBackendToBuildRequest(subscriptionId, resourceGroupName, name, environmentName, linkedBackendName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUnlinkBackendFromBuildRequestUri(string subscriptionId, string resourceGroupName, string name, string environmentName, string linkedBackendName, bool? isCleaningAuthConfig) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/builds/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/linkedBackends/", false); + uri.AppendPath(linkedBackendName, true); + if (isCleaningAuthConfig != null) + { + uri.AppendQuery("isCleaningAuthConfig", isCleaningAuthConfig.Value, true); + } + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUnlinkBackendFromBuildRequest(string subscriptionId, string resourceGroupName, string name, string environmentName, string linkedBackendName, bool? isCleaningAuthConfig) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/builds/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/linkedBackends/", false); + uri.AppendPath(linkedBackendName, true); + if (isCleaningAuthConfig != null) + { + uri.AppendQuery("isCleaningAuthConfig", isCleaningAuthConfig.Value, true); + } + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Unlink a backend from a static site build. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The stage site identifier. + /// Name of the backend linked to the static site. + /// Decides if auth will be removed from backend configuration. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task UnlinkBackendFromBuildAsync(string subscriptionId, string resourceGroupName, string name, string environmentName, string linkedBackendName, bool? isCleaningAuthConfig = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNullOrEmpty(linkedBackendName, nameof(linkedBackendName)); + + using var message = CreateUnlinkBackendFromBuildRequest(subscriptionId, resourceGroupName, name, environmentName, linkedBackendName, isCleaningAuthConfig); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Unlink a backend from a static site build. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The stage site identifier. + /// Name of the backend linked to the static site. + /// Decides if auth will be removed from backend configuration. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response UnlinkBackendFromBuild(string subscriptionId, string resourceGroupName, string name, string environmentName, string linkedBackendName, bool? isCleaningAuthConfig = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNullOrEmpty(linkedBackendName, nameof(linkedBackendName)); + + using var message = CreateUnlinkBackendFromBuildRequest(subscriptionId, resourceGroupName, name, environmentName, linkedBackendName, isCleaningAuthConfig); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Description for Get all Static Sites for a subscription. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + StaticSiteListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = StaticSiteListResult.DeserializeStaticSiteListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Description for Get all Static Sites for a subscription. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + StaticSiteListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = StaticSiteListResult.DeserializeStaticSiteListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetStaticSitesByResourceGroupNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateGetStaticSitesByResourceGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Description for Gets all static sites in the specified resource group. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> GetStaticSitesByResourceGroupNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateGetStaticSitesByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + StaticSiteListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = StaticSiteListResult.DeserializeStaticSiteListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Description for Gets all static sites in the specified resource group. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response GetStaticSitesByResourceGroupNextPage(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateGetStaticSitesByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + StaticSiteListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = StaticSiteListResult.DeserializeStaticSiteListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListStaticSiteUsersNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name, string authprovider) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListStaticSiteUsersNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string name, string authprovider) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Description for Gets the list of users of a static site. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The auth provider for the users. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListStaticSiteUsersNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, string authprovider, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(authprovider, nameof(authprovider)); + + using var message = CreateListStaticSiteUsersNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, authprovider); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + StaticSiteUserListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = StaticSiteUserListResult.DeserializeStaticSiteUserListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Description for Gets the list of users of a static site. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The auth provider for the users. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListStaticSiteUsersNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, string authprovider, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(authprovider, nameof(authprovider)); + + using var message = CreateListStaticSiteUsersNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, authprovider); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + StaticSiteUserListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = StaticSiteUserListResult.DeserializeStaticSiteUserListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetStaticSiteBuildsNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateGetStaticSiteBuildsNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string name) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Description for Gets all static site builds for a particular static site. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetStaticSiteBuildsNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateGetStaticSiteBuildsNextPageRequest(nextLink, subscriptionId, resourceGroupName, name); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + StaticSiteBuildListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = StaticSiteBuildListResult.DeserializeStaticSiteBuildListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Description for Gets all static site builds for a particular static site. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response GetStaticSiteBuildsNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateGetStaticSiteBuildsNextPageRequest(nextLink, subscriptionId, resourceGroupName, name); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + StaticSiteBuildListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = StaticSiteBuildListResult.DeserializeStaticSiteBuildListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetBuildDatabaseConnectionsNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name, string environmentName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateGetBuildDatabaseConnectionsNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string name, string environmentName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Returns overviews of database connections for a static site build. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The stage site identifier. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetBuildDatabaseConnectionsNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + + using var message = CreateGetBuildDatabaseConnectionsNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, environmentName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DatabaseConnectionCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = DatabaseConnectionCollection.DeserializeDatabaseConnectionCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Returns overviews of database connections for a static site build. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The stage site identifier. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetBuildDatabaseConnectionsNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + + using var message = CreateGetBuildDatabaseConnectionsNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, environmentName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DatabaseConnectionCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = DatabaseConnectionCollection.DeserializeDatabaseConnectionCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListStaticSiteBuildFunctionsNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name, string environmentName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListStaticSiteBuildFunctionsNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string name, string environmentName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Description for Gets the functions of a particular static site build. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The stage site identifier. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListStaticSiteBuildFunctionsNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + + using var message = CreateListStaticSiteBuildFunctionsNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, environmentName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + StaticSiteFunctionOverviewListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = StaticSiteFunctionOverviewListResult.DeserializeStaticSiteFunctionOverviewListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Description for Gets the functions of a particular static site build. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The stage site identifier. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListStaticSiteBuildFunctionsNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + + using var message = CreateListStaticSiteBuildFunctionsNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, environmentName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + StaticSiteFunctionOverviewListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = StaticSiteFunctionOverviewListResult.DeserializeStaticSiteFunctionOverviewListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetBuildDatabaseConnectionsWithDetailsNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name, string environmentName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateGetBuildDatabaseConnectionsWithDetailsNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string name, string environmentName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Returns details of database connections for a static site build. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The stage site identifier. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetBuildDatabaseConnectionsWithDetailsNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + + using var message = CreateGetBuildDatabaseConnectionsWithDetailsNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, environmentName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DatabaseConnectionCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = DatabaseConnectionCollection.DeserializeDatabaseConnectionCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Returns details of database connections for a static site build. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The stage site identifier. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetBuildDatabaseConnectionsWithDetailsNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + + using var message = CreateGetBuildDatabaseConnectionsWithDetailsNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, environmentName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DatabaseConnectionCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = DatabaseConnectionCollection.DeserializeDatabaseConnectionCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetUserProvidedFunctionAppsForStaticSiteBuildNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name, string environmentName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateGetUserProvidedFunctionAppsForStaticSiteBuildNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string name, string environmentName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -4782,26 +8176,32 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript return message; } - /// Description for Get all Static Sites for a subscription. + /// Description for Gets the details of the user provided function apps registered with a static site build. /// The URL to the next page of results. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The stage site identifier. /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public async Task> ListNextPageAsync(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetUserProvidedFunctionAppsForStaticSiteBuildNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); - using var message = CreateListNextPageRequest(nextLink, subscriptionId); + using var message = CreateGetUserProvidedFunctionAppsForStaticSiteBuildNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, environmentName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - StaticSiteListResult value = default; + StaticSiteUserProvidedFunctionAppsListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = StaticSiteListResult.DeserializeStaticSiteListResult(document.RootElement); + value = StaticSiteUserProvidedFunctionAppsListResult.DeserializeStaticSiteUserProvidedFunctionAppsListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -4809,26 +8209,32 @@ public async Task> ListNextPageAsync(string nextL } } - /// Description for Get all Static Sites for a subscription. + /// Description for Gets the details of the user provided function apps registered with a static site build. /// The URL to the next page of results. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The stage site identifier. /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public Response ListNextPage(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetUserProvidedFunctionAppsForStaticSiteBuildNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); - using var message = CreateListNextPageRequest(nextLink, subscriptionId); + using var message = CreateGetUserProvidedFunctionAppsForStaticSiteBuildNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, environmentName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - StaticSiteListResult value = default; + StaticSiteUserProvidedFunctionAppsListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = StaticSiteListResult.DeserializeStaticSiteListResult(document.RootElement); + value = StaticSiteUserProvidedFunctionAppsListResult.DeserializeStaticSiteUserProvidedFunctionAppsListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -4836,7 +8242,7 @@ public Response ListNextPage(string nextLink, string subsc } } - internal RequestUriBuilder CreateGetStaticSitesByResourceGroupNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName) + internal RequestUriBuilder CreateListBasicAuthNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -4844,7 +8250,7 @@ internal RequestUriBuilder CreateGetStaticSitesByResourceGroupNextPageRequestUri return uri; } - internal HttpMessage CreateGetStaticSitesByResourceGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName) + internal HttpMessage CreateListBasicAuthNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string name) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -4858,28 +8264,30 @@ internal HttpMessage CreateGetStaticSitesByResourceGroupNextPageRequest(string n return message; } - /// Description for Gets all static sites in the specified resource group. + /// Description for Gets the basic auth properties for a static site as a collection. /// The URL to the next page of results. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. + /// Name of the static site. /// The cancellation token to use. - /// , or is null. - /// or is an empty string, and was expected to be non-empty. - public async Task> GetStaticSitesByResourceGroupNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListBasicAuthNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); - using var message = CreateGetStaticSitesByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + using var message = CreateListBasicAuthNextPageRequest(nextLink, subscriptionId, resourceGroupName, name); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - StaticSiteListResult value = default; + StaticSiteBasicAuthPropertiesCollection value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = StaticSiteListResult.DeserializeStaticSiteListResult(document.RootElement); + value = StaticSiteBasicAuthPropertiesCollection.DeserializeStaticSiteBasicAuthPropertiesCollection(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -4887,28 +8295,30 @@ public async Task> GetStaticSitesByResourceGroupN } } - /// Description for Gets all static sites in the specified resource group. + /// Description for Gets the basic auth properties for a static site as a collection. /// The URL to the next page of results. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. + /// Name of the static site. /// The cancellation token to use. - /// , or is null. - /// or is an empty string, and was expected to be non-empty. - public Response GetStaticSitesByResourceGroupNextPage(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListBasicAuthNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); - using var message = CreateGetStaticSitesByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + using var message = CreateListBasicAuthNextPageRequest(nextLink, subscriptionId, resourceGroupName, name); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - StaticSiteListResult value = default; + StaticSiteBasicAuthPropertiesCollection value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = StaticSiteListResult.DeserializeStaticSiteListResult(document.RootElement); + value = StaticSiteBasicAuthPropertiesCollection.DeserializeStaticSiteBasicAuthPropertiesCollection(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -4916,7 +8326,7 @@ public Response GetStaticSitesByResourceGroupNextPage(stri } } - internal RequestUriBuilder CreateListStaticSiteUsersNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name, string authprovider) + internal RequestUriBuilder CreateListStaticSiteCustomDomainsNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -4924,7 +8334,7 @@ internal RequestUriBuilder CreateListStaticSiteUsersNextPageRequestUri(string ne return uri; } - internal HttpMessage CreateListStaticSiteUsersNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string name, string authprovider) + internal HttpMessage CreateListStaticSiteCustomDomainsNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string name) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -4938,32 +8348,30 @@ internal HttpMessage CreateListStaticSiteUsersNextPageRequest(string nextLink, s return message; } - /// Description for Gets the list of users of a static site. + /// Description for Gets all static site custom domains for a particular static site. /// The URL to the next page of results. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. - /// Name of the static site. - /// The auth provider for the users. + /// Name of the static site resource to search in. /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> ListStaticSiteUsersNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, string authprovider, CancellationToken cancellationToken = default) + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListStaticSiteCustomDomainsNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNullOrEmpty(authprovider, nameof(authprovider)); - using var message = CreateListStaticSiteUsersNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, authprovider); + using var message = CreateListStaticSiteCustomDomainsNextPageRequest(nextLink, subscriptionId, resourceGroupName, name); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - StaticSiteUserListResult value = default; + StaticSiteCustomDomainOverviewListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = StaticSiteUserListResult.DeserializeStaticSiteUserListResult(document.RootElement); + value = StaticSiteCustomDomainOverviewListResult.DeserializeStaticSiteCustomDomainOverviewListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -4971,32 +8379,30 @@ public async Task> ListStaticSiteUsersNextPag } } - /// Description for Gets the list of users of a static site. + /// Description for Gets all static site custom domains for a particular static site. /// The URL to the next page of results. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. - /// Name of the static site. - /// The auth provider for the users. + /// Name of the static site resource to search in. /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response ListStaticSiteUsersNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, string authprovider, CancellationToken cancellationToken = default) + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListStaticSiteCustomDomainsNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNullOrEmpty(authprovider, nameof(authprovider)); - using var message = CreateListStaticSiteUsersNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, authprovider); + using var message = CreateListStaticSiteCustomDomainsNextPageRequest(nextLink, subscriptionId, resourceGroupName, name); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - StaticSiteUserListResult value = default; + StaticSiteCustomDomainOverviewListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = StaticSiteUserListResult.DeserializeStaticSiteUserListResult(document.RootElement); + value = StaticSiteCustomDomainOverviewListResult.DeserializeStaticSiteCustomDomainOverviewListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -5004,7 +8410,7 @@ public Response ListStaticSiteUsersNextPage(string nex } } - internal RequestUriBuilder CreateGetStaticSiteBuildsNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name) + internal RequestUriBuilder CreateGetDatabaseConnectionsNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -5012,7 +8418,7 @@ internal RequestUriBuilder CreateGetStaticSiteBuildsNextPageRequestUri(string ne return uri; } - internal HttpMessage CreateGetStaticSiteBuildsNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string name) + internal HttpMessage CreateGetDatabaseConnectionsNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string name) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -5026,7 +8432,7 @@ internal HttpMessage CreateGetStaticSiteBuildsNextPageRequest(string nextLink, s return message; } - /// Description for Gets all static site builds for a particular static site. + /// Returns overviews of database connections for a static site. /// The URL to the next page of results. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. @@ -5034,22 +8440,22 @@ internal HttpMessage CreateGetStaticSiteBuildsNextPageRequest(string nextLink, s /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> GetStaticSiteBuildsNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + public async Task> GetDatabaseConnectionsNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - using var message = CreateGetStaticSiteBuildsNextPageRequest(nextLink, subscriptionId, resourceGroupName, name); + using var message = CreateGetDatabaseConnectionsNextPageRequest(nextLink, subscriptionId, resourceGroupName, name); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - StaticSiteBuildListResult value = default; + DatabaseConnectionCollection value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = StaticSiteBuildListResult.DeserializeStaticSiteBuildListResult(document.RootElement); + value = DatabaseConnectionCollection.DeserializeDatabaseConnectionCollection(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -5057,7 +8463,7 @@ public async Task> GetStaticSiteBuildsNextPa } } - /// Description for Gets all static site builds for a particular static site. + /// Returns overviews of database connections for a static site. /// The URL to the next page of results. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. @@ -5065,22 +8471,22 @@ public async Task> GetStaticSiteBuildsNextPa /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response GetStaticSiteBuildsNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + public Response GetDatabaseConnectionsNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - using var message = CreateGetStaticSiteBuildsNextPageRequest(nextLink, subscriptionId, resourceGroupName, name); + using var message = CreateGetDatabaseConnectionsNextPageRequest(nextLink, subscriptionId, resourceGroupName, name); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - StaticSiteBuildListResult value = default; + DatabaseConnectionCollection value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = StaticSiteBuildListResult.DeserializeStaticSiteBuildListResult(document.RootElement); + value = DatabaseConnectionCollection.DeserializeDatabaseConnectionCollection(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -5088,7 +8494,7 @@ public Response GetStaticSiteBuildsNextPage(string ne } } - internal RequestUriBuilder CreateListStaticSiteBuildFunctionsNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name, string environmentName) + internal RequestUriBuilder CreateListStaticSiteFunctionsNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -5096,7 +8502,7 @@ internal RequestUriBuilder CreateListStaticSiteBuildFunctionsNextPageRequestUri( return uri; } - internal HttpMessage CreateListStaticSiteBuildFunctionsNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string name, string environmentName) + internal HttpMessage CreateListStaticSiteFunctionsNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string name) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -5110,24 +8516,22 @@ internal HttpMessage CreateListStaticSiteBuildFunctionsNextPageRequest(string ne return message; } - /// Description for Gets the functions of a particular static site build. + /// Description for Gets the functions of a static site. /// The URL to the next page of results. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. - /// The stage site identifier. /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> ListStaticSiteBuildFunctionsNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListStaticSiteFunctionsNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); - using var message = CreateListStaticSiteBuildFunctionsNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, environmentName); + using var message = CreateListStaticSiteFunctionsNextPageRequest(nextLink, subscriptionId, resourceGroupName, name); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -5143,24 +8547,22 @@ public async Task> ListStaticSite } } - /// Description for Gets the functions of a particular static site build. + /// Description for Gets the functions of a static site. /// The URL to the next page of results. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. - /// The stage site identifier. /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response ListStaticSiteBuildFunctionsNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListStaticSiteFunctionsNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); - using var message = CreateListStaticSiteBuildFunctionsNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, environmentName); + using var message = CreateListStaticSiteFunctionsNextPageRequest(nextLink, subscriptionId, resourceGroupName, name); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -5176,7 +8578,7 @@ public Response ListStaticSiteBuildFunctio } } - internal RequestUriBuilder CreateGetUserProvidedFunctionAppsForStaticSiteBuildNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name, string environmentName) + internal RequestUriBuilder CreateGetPrivateEndpointConnectionListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -5184,7 +8586,7 @@ internal RequestUriBuilder CreateGetUserProvidedFunctionAppsForStaticSiteBuildNe return uri; } - internal HttpMessage CreateGetUserProvidedFunctionAppsForStaticSiteBuildNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string name, string environmentName) + internal HttpMessage CreateGetPrivateEndpointConnectionListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string name) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -5198,32 +8600,30 @@ internal HttpMessage CreateGetUserProvidedFunctionAppsForStaticSiteBuildNextPage return message; } - /// Description for Gets the details of the user provided function apps registered with a static site build. + /// Description for Gets the list of private endpoint connections associated with a static site. /// The URL to the next page of results. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. - /// The stage site identifier. /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetUserProvidedFunctionAppsForStaticSiteBuildNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetPrivateEndpointConnectionListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); - using var message = CreateGetUserProvidedFunctionAppsForStaticSiteBuildNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, environmentName); + using var message = CreateGetPrivateEndpointConnectionListNextPageRequest(nextLink, subscriptionId, resourceGroupName, name); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - StaticSiteUserProvidedFunctionAppsListResult value = default; + RemotePrivateEndpointConnectionListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = StaticSiteUserProvidedFunctionAppsListResult.DeserializeStaticSiteUserProvidedFunctionAppsListResult(document.RootElement); + value = RemotePrivateEndpointConnectionListResult.DeserializeRemotePrivateEndpointConnectionListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -5231,32 +8631,30 @@ public async Task> GetUse } } - /// Description for Gets the details of the user provided function apps registered with a static site build. + /// Description for Gets the list of private endpoint connections associated with a static site. /// The URL to the next page of results. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. - /// The stage site identifier. /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response GetUserProvidedFunctionAppsForStaticSiteBuildNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response GetPrivateEndpointConnectionListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); - using var message = CreateGetUserProvidedFunctionAppsForStaticSiteBuildNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, environmentName); + using var message = CreateGetPrivateEndpointConnectionListNextPageRequest(nextLink, subscriptionId, resourceGroupName, name); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - StaticSiteUserProvidedFunctionAppsListResult value = default; + RemotePrivateEndpointConnectionListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = StaticSiteUserProvidedFunctionAppsListResult.DeserializeStaticSiteUserProvidedFunctionAppsListResult(document.RootElement); + value = RemotePrivateEndpointConnectionListResult.DeserializeRemotePrivateEndpointConnectionListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -5264,7 +8662,7 @@ public Response GetUserProvidedFun } } - internal RequestUriBuilder CreateListStaticSiteCustomDomainsNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name) + internal RequestUriBuilder CreateGetDatabaseConnectionsWithDetailsNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -5272,7 +8670,7 @@ internal RequestUriBuilder CreateListStaticSiteCustomDomainsNextPageRequestUri(s return uri; } - internal HttpMessage CreateListStaticSiteCustomDomainsNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string name) + internal HttpMessage CreateGetDatabaseConnectionsWithDetailsNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string name) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -5286,30 +8684,30 @@ internal HttpMessage CreateListStaticSiteCustomDomainsNextPageRequest(string nex return message; } - /// Description for Gets all static site custom domains for a particular static site. + /// Returns details of database connections for a static site. /// The URL to the next page of results. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. - /// Name of the static site resource to search in. + /// Name of the static site. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListStaticSiteCustomDomainsNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + public async Task> GetDatabaseConnectionsWithDetailsNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - using var message = CreateListStaticSiteCustomDomainsNextPageRequest(nextLink, subscriptionId, resourceGroupName, name); + using var message = CreateGetDatabaseConnectionsWithDetailsNextPageRequest(nextLink, subscriptionId, resourceGroupName, name); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - StaticSiteCustomDomainOverviewListResult value = default; + DatabaseConnectionCollection value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = StaticSiteCustomDomainOverviewListResult.DeserializeStaticSiteCustomDomainOverviewListResult(document.RootElement); + value = DatabaseConnectionCollection.DeserializeDatabaseConnectionCollection(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -5317,30 +8715,30 @@ public async Task> ListStatic } } - /// Description for Gets all static site custom domains for a particular static site. + /// Returns details of database connections for a static site. /// The URL to the next page of results. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. - /// Name of the static site resource to search in. + /// Name of the static site. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListStaticSiteCustomDomainsNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + public Response GetDatabaseConnectionsWithDetailsNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - using var message = CreateListStaticSiteCustomDomainsNextPageRequest(nextLink, subscriptionId, resourceGroupName, name); + using var message = CreateGetDatabaseConnectionsWithDetailsNextPageRequest(nextLink, subscriptionId, resourceGroupName, name); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - StaticSiteCustomDomainOverviewListResult value = default; + DatabaseConnectionCollection value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = StaticSiteCustomDomainOverviewListResult.DeserializeStaticSiteCustomDomainOverviewListResult(document.RootElement); + value = DatabaseConnectionCollection.DeserializeDatabaseConnectionCollection(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -5348,7 +8746,7 @@ public Response ListStaticSiteCustomDo } } - internal RequestUriBuilder CreateListStaticSiteFunctionsNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name) + internal RequestUriBuilder CreateGetUserProvidedFunctionAppsForStaticSiteNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -5356,7 +8754,7 @@ internal RequestUriBuilder CreateListStaticSiteFunctionsNextPageRequestUri(strin return uri; } - internal HttpMessage CreateListStaticSiteFunctionsNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string name) + internal HttpMessage CreateGetUserProvidedFunctionAppsForStaticSiteNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string name) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -5370,7 +8768,7 @@ internal HttpMessage CreateListStaticSiteFunctionsNextPageRequest(string nextLin return message; } - /// Description for Gets the functions of a static site. + /// Description for Gets the details of the user provided function apps registered with a static site. /// The URL to the next page of results. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. @@ -5378,22 +8776,22 @@ internal HttpMessage CreateListStaticSiteFunctionsNextPageRequest(string nextLin /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListStaticSiteFunctionsNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + public async Task> GetUserProvidedFunctionAppsForStaticSiteNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - using var message = CreateListStaticSiteFunctionsNextPageRequest(nextLink, subscriptionId, resourceGroupName, name); + using var message = CreateGetUserProvidedFunctionAppsForStaticSiteNextPageRequest(nextLink, subscriptionId, resourceGroupName, name); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - StaticSiteFunctionOverviewListResult value = default; + StaticSiteUserProvidedFunctionAppsListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = StaticSiteFunctionOverviewListResult.DeserializeStaticSiteFunctionOverviewListResult(document.RootElement); + value = StaticSiteUserProvidedFunctionAppsListResult.DeserializeStaticSiteUserProvidedFunctionAppsListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -5401,7 +8799,7 @@ public async Task> ListStaticSite } } - /// Description for Gets the functions of a static site. + /// Description for Gets the details of the user provided function apps registered with a static site. /// The URL to the next page of results. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. @@ -5409,22 +8807,22 @@ public async Task> ListStaticSite /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListStaticSiteFunctionsNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + public Response GetUserProvidedFunctionAppsForStaticSiteNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - using var message = CreateListStaticSiteFunctionsNextPageRequest(nextLink, subscriptionId, resourceGroupName, name); + using var message = CreateGetUserProvidedFunctionAppsForStaticSiteNextPageRequest(nextLink, subscriptionId, resourceGroupName, name); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - StaticSiteFunctionOverviewListResult value = default; + StaticSiteUserProvidedFunctionAppsListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = StaticSiteFunctionOverviewListResult.DeserializeStaticSiteFunctionOverviewListResult(document.RootElement); + value = StaticSiteUserProvidedFunctionAppsListResult.DeserializeStaticSiteUserProvidedFunctionAppsListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -5432,7 +8830,7 @@ public Response ListStaticSiteFunctionsNex } } - internal RequestUriBuilder CreateGetPrivateEndpointConnectionListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name) + internal RequestUriBuilder CreateGetLinkedBackendsNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -5440,7 +8838,7 @@ internal RequestUriBuilder CreateGetPrivateEndpointConnectionListNextPageRequest return uri; } - internal HttpMessage CreateGetPrivateEndpointConnectionListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string name) + internal HttpMessage CreateGetLinkedBackendsNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string name) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -5454,7 +8852,7 @@ internal HttpMessage CreateGetPrivateEndpointConnectionListNextPageRequest(strin return message; } - /// Description for Gets the list of private endpoint connections associated with a static site. + /// Returns details of all backends linked to a static site. /// The URL to the next page of results. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. @@ -5462,22 +8860,22 @@ internal HttpMessage CreateGetPrivateEndpointConnectionListNextPageRequest(strin /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> GetPrivateEndpointConnectionListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + public async Task> GetLinkedBackendsNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - using var message = CreateGetPrivateEndpointConnectionListNextPageRequest(nextLink, subscriptionId, resourceGroupName, name); + using var message = CreateGetLinkedBackendsNextPageRequest(nextLink, subscriptionId, resourceGroupName, name); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - RemotePrivateEndpointConnectionListResult value = default; + StaticSiteLinkedBackendsCollection value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = RemotePrivateEndpointConnectionListResult.DeserializeRemotePrivateEndpointConnectionListResult(document.RootElement); + value = StaticSiteLinkedBackendsCollection.DeserializeStaticSiteLinkedBackendsCollection(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -5485,7 +8883,7 @@ public async Task> GetPrivat } } - /// Description for Gets the list of private endpoint connections associated with a static site. + /// Returns details of all backends linked to a static site. /// The URL to the next page of results. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. @@ -5493,22 +8891,22 @@ public async Task> GetPrivat /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response GetPrivateEndpointConnectionListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + public Response GetLinkedBackendsNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - using var message = CreateGetPrivateEndpointConnectionListNextPageRequest(nextLink, subscriptionId, resourceGroupName, name); + using var message = CreateGetLinkedBackendsNextPageRequest(nextLink, subscriptionId, resourceGroupName, name); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - RemotePrivateEndpointConnectionListResult value = default; + StaticSiteLinkedBackendsCollection value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = RemotePrivateEndpointConnectionListResult.DeserializeRemotePrivateEndpointConnectionListResult(document.RootElement); + value = StaticSiteLinkedBackendsCollection.DeserializeStaticSiteLinkedBackendsCollection(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -5516,7 +8914,7 @@ public Response GetPrivateEndpointCon } } - internal RequestUriBuilder CreateGetUserProvidedFunctionAppsForStaticSiteNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name) + internal RequestUriBuilder CreateGetLinkedBackendsForBuildNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name, string environmentName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -5524,7 +8922,7 @@ internal RequestUriBuilder CreateGetUserProvidedFunctionAppsForStaticSiteNextPag return uri; } - internal HttpMessage CreateGetUserProvidedFunctionAppsForStaticSiteNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string name) + internal HttpMessage CreateGetLinkedBackendsForBuildNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string name, string environmentName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -5538,30 +8936,32 @@ internal HttpMessage CreateGetUserProvidedFunctionAppsForStaticSiteNextPageReque return message; } - /// Description for Gets the details of the user provided function apps registered with a static site. + /// Returns details of all backends linked to a static site build. /// The URL to the next page of results. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. + /// The stage site identifier. /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> GetUserProvidedFunctionAppsForStaticSiteNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetLinkedBackendsForBuildNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); - using var message = CreateGetUserProvidedFunctionAppsForStaticSiteNextPageRequest(nextLink, subscriptionId, resourceGroupName, name); + using var message = CreateGetLinkedBackendsForBuildNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, environmentName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - StaticSiteUserProvidedFunctionAppsListResult value = default; + StaticSiteLinkedBackendsCollection value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = StaticSiteUserProvidedFunctionAppsListResult.DeserializeStaticSiteUserProvidedFunctionAppsListResult(document.RootElement); + value = StaticSiteLinkedBackendsCollection.DeserializeStaticSiteLinkedBackendsCollection(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -5569,30 +8969,32 @@ public async Task> GetUse } } - /// Description for Gets the details of the user provided function apps registered with a static site. + /// Returns details of all backends linked to a static site build. /// The URL to the next page of results. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. + /// The stage site identifier. /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response GetUserProvidedFunctionAppsForStaticSiteNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetLinkedBackendsForBuildNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); - using var message = CreateGetUserProvidedFunctionAppsForStaticSiteNextPageRequest(nextLink, subscriptionId, resourceGroupName, name); + using var message = CreateGetLinkedBackendsForBuildNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, environmentName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - StaticSiteUserProvidedFunctionAppsListResult value = default; + StaticSiteLinkedBackendsCollection value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = StaticSiteUserProvidedFunctionAppsListResult.DeserializeStaticSiteUserProvidedFunctionAppsListResult(document.RootElement); + value = StaticSiteLinkedBackendsCollection.DeserializeStaticSiteLinkedBackendsCollection(document.RootElement); return Response.FromValue(value, message.Response); } default: diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/TopLevelDomainsRestOperations.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/TopLevelDomainsRestOperations.cs index d2a8058ab6a5a..b22565790e8a6 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/TopLevelDomainsRestOperations.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/TopLevelDomainsRestOperations.cs @@ -32,7 +32,7 @@ public TopLevelDomainsRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-02-01"; + _apiVersion = apiVersion ?? "2023-12-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/WebAppsRestOperations.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/WebAppsRestOperations.cs index ab4f5df2008c8..1dafeced33d6b 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/WebAppsRestOperations.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/WebAppsRestOperations.cs @@ -34,7 +34,7 @@ public WebAppsRestOperations(HttpPipeline pipeline, string applicationId, Uri en { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-02-01"; + _apiVersion = apiVersion ?? "2023-12-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -2384,6 +2384,100 @@ public Response GetAuthSettings(string subscriptionId, string } } + internal RequestUriBuilder CreateGetAuthSettingsV2WithoutSecretsRequestUri(string subscriptionId, string resourceGroupName, string name) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/config/authsettingsV2", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetAuthSettingsV2WithoutSecretsRequest(string subscriptionId, string resourceGroupName, string name) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/config/authsettingsV2", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Description for Gets site's Authentication / Authorization settings for apps via the V2 format. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the app. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetAuthSettingsV2WithoutSecretsAsync(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateGetAuthSettingsV2WithoutSecretsRequest(subscriptionId, resourceGroupName, name); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SiteAuthSettingsV2 value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = SiteAuthSettingsV2.DeserializeSiteAuthSettingsV2(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Description for Gets site's Authentication / Authorization settings for apps via the V2 format. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the app. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response GetAuthSettingsV2WithoutSecrets(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateGetAuthSettingsV2WithoutSecretsRequest(subscriptionId, resourceGroupName, name); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SiteAuthSettingsV2 value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = SiteAuthSettingsV2.DeserializeSiteAuthSettingsV2(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateUpdateAuthSettingsV2RequestUri(string subscriptionId, string resourceGroupName, string name, SiteAuthSettingsV2 siteAuthSettingsV2) { var uri = new RawRequestUriBuilder(); @@ -5778,6 +5872,192 @@ public Response StopContinuousWebJob(string subscriptionId, string resourceGroup } } + internal RequestUriBuilder CreateListProductionSiteDeploymentStatusesRequestUri(string subscriptionId, string resourceGroupName, string name) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/deploymentStatus", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListProductionSiteDeploymentStatusesRequest(string subscriptionId, string resourceGroupName, string name) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/deploymentStatus", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List deployment statuses for an app (or deployment slot, if specified). + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the app. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListProductionSiteDeploymentStatusesAsync(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateListProductionSiteDeploymentStatusesRequest(subscriptionId, resourceGroupName, name); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + CsmDeploymentStatusCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = CsmDeploymentStatusCollection.DeserializeCsmDeploymentStatusCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List deployment statuses for an app (or deployment slot, if specified). + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the app. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListProductionSiteDeploymentStatuses(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateListProductionSiteDeploymentStatusesRequest(subscriptionId, resourceGroupName, name); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + CsmDeploymentStatusCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = CsmDeploymentStatusCollection.DeserializeCsmDeploymentStatusCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetProductionSiteDeploymentStatusRequestUri(string subscriptionId, string resourceGroupName, string name, string deploymentStatusId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/deploymentStatus/", false); + uri.AppendPath(deploymentStatusId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetProductionSiteDeploymentStatusRequest(string subscriptionId, string resourceGroupName, string name, string deploymentStatusId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/deploymentStatus/", false); + uri.AppendPath(deploymentStatusId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the deployment status for an app (or deployment slot, if specified). + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the app. + /// GUID of the deployment operation. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task GetProductionSiteDeploymentStatusAsync(string subscriptionId, string resourceGroupName, string name, string deploymentStatusId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(deploymentStatusId, nameof(deploymentStatusId)); + + using var message = CreateGetProductionSiteDeploymentStatusRequest(subscriptionId, resourceGroupName, name, deploymentStatusId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the deployment status for an app (or deployment slot, if specified). + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the app. + /// GUID of the deployment operation. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetProductionSiteDeploymentStatus(string subscriptionId, string resourceGroupName, string name, string deploymentStatusId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(deploymentStatusId, nameof(deploymentStatusId)); + + using var message = CreateGetProductionSiteDeploymentStatusRequest(subscriptionId, resourceGroupName, name, deploymentStatusId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateListDeploymentsRequestUri(string subscriptionId, string resourceGroupName, string name) { var uri = new RawRequestUriBuilder(); @@ -7170,6 +7450,190 @@ public Response GetMSDeployLog(string subscriptionId, string } } + internal RequestUriBuilder CreateGetOneDeployStatusRequestUri(string subscriptionId, string resourceGroupName, string name) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/extensions/onedeploy", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetOneDeployStatusRequest(string subscriptionId, string resourceGroupName, string name) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/extensions/onedeploy", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Description for Invoke onedeploy status API /api/deployments and gets the deployment status for the site. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of web app. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetOneDeployStatusAsync(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateGetOneDeployStatusRequest(subscriptionId, resourceGroupName, name); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + BinaryData value = default; + value = await BinaryData.FromStreamAsync(message.Response.ContentStream).ConfigureAwait(false); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Description for Invoke onedeploy status API /api/deployments and gets the deployment status for the site. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of web app. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response GetOneDeployStatus(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateGetOneDeployStatusRequest(subscriptionId, resourceGroupName, name); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + BinaryData value = default; + value = BinaryData.FromStream(message.Response.ContentStream); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOneDeployOperationRequestUri(string subscriptionId, string resourceGroupName, string name) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/extensions/onedeploy", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOneDeployOperationRequest(string subscriptionId, string resourceGroupName, string name) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/extensions/onedeploy", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Description for Invoke the OneDeploy publish web app extension. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of web app. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> CreateOneDeployOperationAsync(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateCreateOneDeployOperationRequest(subscriptionId, resourceGroupName, name); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + BinaryData value = default; + value = await BinaryData.FromStreamAsync(message.Response.ContentStream).ConfigureAwait(false); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Description for Invoke the OneDeploy publish web app extension. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of web app. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response CreateOneDeployOperation(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateCreateOneDeployOperationRequest(subscriptionId, resourceGroupName, name); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + BinaryData value = default; + value = BinaryData.FromStream(message.Response.ContentStream); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateListFunctionsRequestUri(string subscriptionId, string resourceGroupName, string name) { var uri = new RawRequestUriBuilder(); @@ -14208,7 +14672,7 @@ public Response GetPrivateEndpoi } } - internal RequestUriBuilder CreateApproveOrRejectPrivateEndpointConnectionRequestUri(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestInfo info) + internal RequestUriBuilder CreateApproveOrRejectPrivateEndpointConnectionRequestUri(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName, RemotePrivateEndpointConnectionARMResourceData data) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -14224,7 +14688,7 @@ internal RequestUriBuilder CreateApproveOrRejectPrivateEndpointConnectionRequest return uri; } - internal HttpMessage CreateApproveOrRejectPrivateEndpointConnectionRequest(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestInfo info) + internal HttpMessage CreateApproveOrRejectPrivateEndpointConnectionRequest(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName, RemotePrivateEndpointConnectionARMResourceData data) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -14244,7 +14708,7 @@ internal HttpMessage CreateApproveOrRejectPrivateEndpointConnectionRequest(strin request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(info, ModelSerializationExtensions.WireOptions); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); request.Content = content; _userAgent.Apply(message); return message; @@ -14255,19 +14719,19 @@ internal HttpMessage CreateApproveOrRejectPrivateEndpointConnectionRequest(strin /// Name of the resource group to which the resource belongs. /// Name of the site. /// The to use. - /// The to use. + /// The to use. /// The cancellation token to use. - /// , , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task ApproveOrRejectPrivateEndpointConnectionAsync(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestInfo info, CancellationToken cancellationToken = default) + public async Task ApproveOrRejectPrivateEndpointConnectionAsync(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName, RemotePrivateEndpointConnectionARMResourceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); - Argument.AssertNotNull(info, nameof(info)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateApproveOrRejectPrivateEndpointConnectionRequest(subscriptionId, resourceGroupName, name, privateEndpointConnectionName, info); + using var message = CreateApproveOrRejectPrivateEndpointConnectionRequest(subscriptionId, resourceGroupName, name, privateEndpointConnectionName, data); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -14284,19 +14748,19 @@ public async Task ApproveOrRejectPrivateEndpointConnectionAsync(string /// Name of the resource group to which the resource belongs. /// Name of the site. /// The to use. - /// The to use. + /// The to use. /// The cancellation token to use. - /// , , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response ApproveOrRejectPrivateEndpointConnection(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestInfo info, CancellationToken cancellationToken = default) + public Response ApproveOrRejectPrivateEndpointConnection(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName, RemotePrivateEndpointConnectionARMResourceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); - Argument.AssertNotNull(info, nameof(info)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateApproveOrRejectPrivateEndpointConnectionRequest(subscriptionId, resourceGroupName, name, privateEndpointConnectionName, info); + using var message = CreateApproveOrRejectPrivateEndpointConnectionRequest(subscriptionId, resourceGroupName, name, privateEndpointConnectionName, data); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -16164,6 +16628,406 @@ public Response RestoreSnapshot(string subscriptionId, string resourceGroupName, } } + internal RequestUriBuilder CreateListSiteContainersRequestUri(string subscriptionId, string resourceGroupName, string name) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/sitecontainers", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListSiteContainersRequest(string subscriptionId, string resourceGroupName, string name) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/sitecontainers", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists all the site containers of a site, or a deployment slot. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the app. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListSiteContainersAsync(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateListSiteContainersRequest(subscriptionId, resourceGroupName, name); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + Models.SiteContainerCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.SiteContainerCollection.DeserializeSiteContainerCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists all the site containers of a site, or a deployment slot. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the app. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListSiteContainers(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateListSiteContainersRequest(subscriptionId, resourceGroupName, name); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + Models.SiteContainerCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.SiteContainerCollection.DeserializeSiteContainerCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetSiteContainerRequestUri(string subscriptionId, string resourceGroupName, string name, string containerName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/sitecontainers/", false); + uri.AppendPath(containerName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetSiteContainerRequest(string subscriptionId, string resourceGroupName, string name, string containerName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/sitecontainers/", false); + uri.AppendPath(containerName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets a site container of a site, or a deployment slot. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the app. + /// Site Container Name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetSiteContainerAsync(string subscriptionId, string resourceGroupName, string name, string containerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(containerName, nameof(containerName)); + + using var message = CreateGetSiteContainerRequest(subscriptionId, resourceGroupName, name, containerName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SiteContainerData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = SiteContainerData.DeserializeSiteContainerData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((SiteContainerData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets a site container of a site, or a deployment slot. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the app. + /// Site Container Name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetSiteContainer(string subscriptionId, string resourceGroupName, string name, string containerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(containerName, nameof(containerName)); + + using var message = CreateGetSiteContainerRequest(subscriptionId, resourceGroupName, name, containerName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SiteContainerData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = SiteContainerData.DeserializeSiteContainerData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((SiteContainerData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateSiteContainerRequestUri(string subscriptionId, string resourceGroupName, string name, string containerName, SiteContainerData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/sitecontainers/", false); + uri.AppendPath(containerName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateSiteContainerRequest(string subscriptionId, string resourceGroupName, string name, string containerName, SiteContainerData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/sitecontainers/", false); + uri.AppendPath(containerName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates or Updates a site container for a site, or a deployment slot. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the app. + /// Site Container Name. + /// Container Entity. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> CreateOrUpdateSiteContainerAsync(string subscriptionId, string resourceGroupName, string name, string containerName, SiteContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(containerName, nameof(containerName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateSiteContainerRequest(subscriptionId, resourceGroupName, name, containerName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + { + SiteContainerData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = SiteContainerData.DeserializeSiteContainerData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates or Updates a site container for a site, or a deployment slot. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the app. + /// Site Container Name. + /// Container Entity. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdateSiteContainer(string subscriptionId, string resourceGroupName, string name, string containerName, SiteContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(containerName, nameof(containerName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateSiteContainerRequest(subscriptionId, resourceGroupName, name, containerName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + { + SiteContainerData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = SiteContainerData.DeserializeSiteContainerData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteSiteContainerRequestUri(string subscriptionId, string resourceGroupName, string name, string containerName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/sitecontainers/", false); + uri.AppendPath(containerName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteSiteContainerRequest(string subscriptionId, string resourceGroupName, string name, string containerName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/sitecontainers/", false); + uri.AppendPath(containerName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Deletes a site container for a site, or a deployment slot. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the app. + /// Site Container Name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteSiteContainerAsync(string subscriptionId, string resourceGroupName, string name, string containerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(containerName, nameof(containerName)); + + using var message = CreateDeleteSiteContainerRequest(subscriptionId, resourceGroupName, name, containerName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Deletes a site container for a site, or a deployment slot. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the app. + /// Site Container Name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response DeleteSiteContainer(string subscriptionId, string resourceGroupName, string name, string containerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(containerName, nameof(containerName)); + + using var message = CreateDeleteSiteContainerRequest(subscriptionId, resourceGroupName, name, containerName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateListSiteExtensionsRequestUri(string subscriptionId, string resourceGroupName, string name) { var uri = new RawRequestUriBuilder(); @@ -18986,6 +19850,108 @@ public Response GetAuthSettingsSlot(string subscriptionId, str } } + internal RequestUriBuilder CreateGetAuthSettingsV2WithoutSecretsSlotRequestUri(string subscriptionId, string resourceGroupName, string name, string slot) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/slots/", false); + uri.AppendPath(slot, true); + uri.AppendPath("/config/authsettingsV2", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetAuthSettingsV2WithoutSecretsSlotRequest(string subscriptionId, string resourceGroupName, string name, string slot) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/slots/", false); + uri.AppendPath(slot, true); + uri.AppendPath("/config/authsettingsV2", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets site's Authentication / Authorization settings for apps via the V2 format. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the app. + /// Name of the deployment slot. If a slot is not specified, the API will get the settings for the production slot. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAuthSettingsV2WithoutSecretsSlotAsync(string subscriptionId, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(slot, nameof(slot)); + + using var message = CreateGetAuthSettingsV2WithoutSecretsSlotRequest(subscriptionId, resourceGroupName, name, slot); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SiteAuthSettingsV2 value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = SiteAuthSettingsV2.DeserializeSiteAuthSettingsV2(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets site's Authentication / Authorization settings for apps via the V2 format. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the app. + /// Name of the deployment slot. If a slot is not specified, the API will get the settings for the production slot. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetAuthSettingsV2WithoutSecretsSlot(string subscriptionId, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(slot, nameof(slot)); + + using var message = CreateGetAuthSettingsV2WithoutSecretsSlotRequest(subscriptionId, resourceGroupName, name, slot); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SiteAuthSettingsV2 value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = SiteAuthSettingsV2.DeserializeSiteAuthSettingsV2(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateUpdateAuthSettingsV2SlotRequestUri(string subscriptionId, string resourceGroupName, string name, string slot, SiteAuthSettingsV2 siteAuthSettingsV2) { var uri = new RawRequestUriBuilder(); @@ -22444,6 +23410,208 @@ public Response StopContinuousWebJobSlot(string subscriptionId, string resourceG } } + internal RequestUriBuilder CreateListSlotSiteDeploymentStatusesSlotRequestUri(string subscriptionId, string resourceGroupName, string name, string slot) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/slots/", false); + uri.AppendPath(slot, true); + uri.AppendPath("/deploymentStatus", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListSlotSiteDeploymentStatusesSlotRequest(string subscriptionId, string resourceGroupName, string name, string slot) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/slots/", false); + uri.AppendPath(slot, true); + uri.AppendPath("/deploymentStatus", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List deployment statuses for an app (or deployment slot, if specified). + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the app. + /// Name of the deployment slot. If a slot is not specified, the API will get the deployment status for the production slot. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListSlotSiteDeploymentStatusesSlotAsync(string subscriptionId, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(slot, nameof(slot)); + + using var message = CreateListSlotSiteDeploymentStatusesSlotRequest(subscriptionId, resourceGroupName, name, slot); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + CsmDeploymentStatusCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = CsmDeploymentStatusCollection.DeserializeCsmDeploymentStatusCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List deployment statuses for an app (or deployment slot, if specified). + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the app. + /// Name of the deployment slot. If a slot is not specified, the API will get the deployment status for the production slot. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListSlotSiteDeploymentStatusesSlot(string subscriptionId, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(slot, nameof(slot)); + + using var message = CreateListSlotSiteDeploymentStatusesSlotRequest(subscriptionId, resourceGroupName, name, slot); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + CsmDeploymentStatusCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = CsmDeploymentStatusCollection.DeserializeCsmDeploymentStatusCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetSlotSiteDeploymentStatusSlotRequestUri(string subscriptionId, string resourceGroupName, string name, string slot, string deploymentStatusId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/slots/", false); + uri.AppendPath(slot, true); + uri.AppendPath("/deploymentStatus/", false); + uri.AppendPath(deploymentStatusId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetSlotSiteDeploymentStatusSlotRequest(string subscriptionId, string resourceGroupName, string name, string slot, string deploymentStatusId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/slots/", false); + uri.AppendPath(slot, true); + uri.AppendPath("/deploymentStatus/", false); + uri.AppendPath(deploymentStatusId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the deployment status for an app (or deployment slot, if specified). + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the app. + /// Name of the deployment slot. If a slot is not specified, the API will get the deployment status for the production slot. + /// GUID of the deployment operation. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task GetSlotSiteDeploymentStatusSlotAsync(string subscriptionId, string resourceGroupName, string name, string slot, string deploymentStatusId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(slot, nameof(slot)); + Argument.AssertNotNullOrEmpty(deploymentStatusId, nameof(deploymentStatusId)); + + using var message = CreateGetSlotSiteDeploymentStatusSlotRequest(subscriptionId, resourceGroupName, name, slot, deploymentStatusId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the deployment status for an app (or deployment slot, if specified). + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the app. + /// Name of the deployment slot. If a slot is not specified, the API will get the deployment status for the production slot. + /// GUID of the deployment operation. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response GetSlotSiteDeploymentStatusSlot(string subscriptionId, string resourceGroupName, string name, string slot, string deploymentStatusId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(slot, nameof(slot)); + Argument.AssertNotNullOrEmpty(deploymentStatusId, nameof(deploymentStatusId)); + + using var message = CreateGetSlotSiteDeploymentStatusSlotRequest(subscriptionId, resourceGroupName, name, slot, deploymentStatusId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateListDeploymentsSlotRequestUri(string subscriptionId, string resourceGroupName, string name, string slot) { var uri = new RawRequestUriBuilder(); @@ -31344,7 +32512,7 @@ public Response GetPrivateEndpoi } } - internal RequestUriBuilder CreateApproveOrRejectPrivateEndpointConnectionSlotRequestUri(string subscriptionId, string resourceGroupName, string name, string slot, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestInfo info) + internal RequestUriBuilder CreateApproveOrRejectPrivateEndpointConnectionSlotRequestUri(string subscriptionId, string resourceGroupName, string name, string slot, string privateEndpointConnectionName, RemotePrivateEndpointConnectionARMResourceData data) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -31362,7 +32530,7 @@ internal RequestUriBuilder CreateApproveOrRejectPrivateEndpointConnectionSlotReq return uri; } - internal HttpMessage CreateApproveOrRejectPrivateEndpointConnectionSlotRequest(string subscriptionId, string resourceGroupName, string name, string slot, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestInfo info) + internal HttpMessage CreateApproveOrRejectPrivateEndpointConnectionSlotRequest(string subscriptionId, string resourceGroupName, string name, string slot, string privateEndpointConnectionName, RemotePrivateEndpointConnectionARMResourceData data) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -31384,7 +32552,7 @@ internal HttpMessage CreateApproveOrRejectPrivateEndpointConnectionSlotRequest(s request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(info, ModelSerializationExtensions.WireOptions); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); request.Content = content; _userAgent.Apply(message); return message; @@ -31396,20 +32564,20 @@ internal HttpMessage CreateApproveOrRejectPrivateEndpointConnectionSlotRequest(s /// Name of the site. /// The to use. /// The to use. - /// The to use. + /// The to use. /// The cancellation token to use. - /// , , , , or is null. + /// , , , , or is null. /// , , , or is an empty string, and was expected to be non-empty. - public async Task ApproveOrRejectPrivateEndpointConnectionSlotAsync(string subscriptionId, string resourceGroupName, string name, string slot, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestInfo info, CancellationToken cancellationToken = default) + public async Task ApproveOrRejectPrivateEndpointConnectionSlotAsync(string subscriptionId, string resourceGroupName, string name, string slot, string privateEndpointConnectionName, RemotePrivateEndpointConnectionARMResourceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); Argument.AssertNotNullOrEmpty(slot, nameof(slot)); Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); - Argument.AssertNotNull(info, nameof(info)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateApproveOrRejectPrivateEndpointConnectionSlotRequest(subscriptionId, resourceGroupName, name, slot, privateEndpointConnectionName, info); + using var message = CreateApproveOrRejectPrivateEndpointConnectionSlotRequest(subscriptionId, resourceGroupName, name, slot, privateEndpointConnectionName, data); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -31427,20 +32595,20 @@ public async Task ApproveOrRejectPrivateEndpointConnectionSlotAsync(st /// Name of the site. /// The to use. /// The to use. - /// The to use. + /// The to use. /// The cancellation token to use. - /// , , , , or is null. + /// , , , , or is null. /// , , , or is an empty string, and was expected to be non-empty. - public Response ApproveOrRejectPrivateEndpointConnectionSlot(string subscriptionId, string resourceGroupName, string name, string slot, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestInfo info, CancellationToken cancellationToken = default) + public Response ApproveOrRejectPrivateEndpointConnectionSlot(string subscriptionId, string resourceGroupName, string name, string slot, string privateEndpointConnectionName, RemotePrivateEndpointConnectionARMResourceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); Argument.AssertNotNullOrEmpty(slot, nameof(slot)); Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); - Argument.AssertNotNull(info, nameof(info)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateApproveOrRejectPrivateEndpointConnectionSlotRequest(subscriptionId, resourceGroupName, name, slot, privateEndpointConnectionName, info); + using var message = CreateApproveOrRejectPrivateEndpointConnectionSlotRequest(subscriptionId, resourceGroupName, name, slot, privateEndpointConnectionName, data); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -33460,6 +34628,438 @@ public Response RestoreSnapshotSlot(string subscriptionId, string resourceGroupN } } + internal RequestUriBuilder CreateListSiteContainersSlotRequestUri(string subscriptionId, string resourceGroupName, string name, string slot) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/slots/", false); + uri.AppendPath(slot, true); + uri.AppendPath("/sitecontainers", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListSiteContainersSlotRequest(string subscriptionId, string resourceGroupName, string name, string slot) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/slots/", false); + uri.AppendPath(slot, true); + uri.AppendPath("/sitecontainers", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists all the site containers of a site, or a deployment slot. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the app. + /// Name of the deployment slot. If a slot is not specified, the API will get a list of site containers for the production slot. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListSiteContainersSlotAsync(string subscriptionId, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(slot, nameof(slot)); + + using var message = CreateListSiteContainersSlotRequest(subscriptionId, resourceGroupName, name, slot); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + Models.SiteContainerCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.SiteContainerCollection.DeserializeSiteContainerCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists all the site containers of a site, or a deployment slot. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the app. + /// Name of the deployment slot. If a slot is not specified, the API will get a list of site containers for the production slot. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListSiteContainersSlot(string subscriptionId, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(slot, nameof(slot)); + + using var message = CreateListSiteContainersSlotRequest(subscriptionId, resourceGroupName, name, slot); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + Models.SiteContainerCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.SiteContainerCollection.DeserializeSiteContainerCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetSiteContainerSlotRequestUri(string subscriptionId, string resourceGroupName, string name, string slot, string containerName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/slots/", false); + uri.AppendPath(slot, true); + uri.AppendPath("/sitecontainers/", false); + uri.AppendPath(containerName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetSiteContainerSlotRequest(string subscriptionId, string resourceGroupName, string name, string slot, string containerName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/slots/", false); + uri.AppendPath(slot, true); + uri.AppendPath("/sitecontainers/", false); + uri.AppendPath(containerName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets a site container of a site, or a deployment slot. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the app. + /// Name of the deployment slot. If a slot is not specified, the API will get the Site Container for the production slot. + /// Site Container Name. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetSiteContainerSlotAsync(string subscriptionId, string resourceGroupName, string name, string slot, string containerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(slot, nameof(slot)); + Argument.AssertNotNullOrEmpty(containerName, nameof(containerName)); + + using var message = CreateGetSiteContainerSlotRequest(subscriptionId, resourceGroupName, name, slot, containerName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SiteContainerData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = SiteContainerData.DeserializeSiteContainerData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((SiteContainerData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets a site container of a site, or a deployment slot. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the app. + /// Name of the deployment slot. If a slot is not specified, the API will get the Site Container for the production slot. + /// Site Container Name. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response GetSiteContainerSlot(string subscriptionId, string resourceGroupName, string name, string slot, string containerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(slot, nameof(slot)); + Argument.AssertNotNullOrEmpty(containerName, nameof(containerName)); + + using var message = CreateGetSiteContainerSlotRequest(subscriptionId, resourceGroupName, name, slot, containerName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SiteContainerData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = SiteContainerData.DeserializeSiteContainerData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((SiteContainerData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateSiteContainerSlotRequestUri(string subscriptionId, string resourceGroupName, string name, string slot, string containerName, SiteContainerData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/slots/", false); + uri.AppendPath(slot, true); + uri.AppendPath("/sitecontainers/", false); + uri.AppendPath(containerName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateSiteContainerSlotRequest(string subscriptionId, string resourceGroupName, string name, string slot, string containerName, SiteContainerData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/slots/", false); + uri.AppendPath(slot, true); + uri.AppendPath("/sitecontainers/", false); + uri.AppendPath(containerName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates or Updates a site container for a site, or a deployment slot. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the app. + /// Name of the deployment slot. If a slot is not specified, the API will create the container for the production slot. + /// Site Container Name. + /// Container Entity. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> CreateOrUpdateSiteContainerSlotAsync(string subscriptionId, string resourceGroupName, string name, string slot, string containerName, SiteContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(slot, nameof(slot)); + Argument.AssertNotNullOrEmpty(containerName, nameof(containerName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateSiteContainerSlotRequest(subscriptionId, resourceGroupName, name, slot, containerName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + { + SiteContainerData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = SiteContainerData.DeserializeSiteContainerData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates or Updates a site container for a site, or a deployment slot. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the app. + /// Name of the deployment slot. If a slot is not specified, the API will create the container for the production slot. + /// Site Container Name. + /// Container Entity. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdateSiteContainerSlot(string subscriptionId, string resourceGroupName, string name, string slot, string containerName, SiteContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(slot, nameof(slot)); + Argument.AssertNotNullOrEmpty(containerName, nameof(containerName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateSiteContainerSlotRequest(subscriptionId, resourceGroupName, name, slot, containerName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + { + SiteContainerData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = SiteContainerData.DeserializeSiteContainerData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteSiteContainerSlotRequestUri(string subscriptionId, string resourceGroupName, string name, string slot, string containerName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/slots/", false); + uri.AppendPath(slot, true); + uri.AppendPath("/sitecontainers/", false); + uri.AppendPath(containerName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteSiteContainerSlotRequest(string subscriptionId, string resourceGroupName, string name, string slot, string containerName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/slots/", false); + uri.AppendPath(slot, true); + uri.AppendPath("/sitecontainers/", false); + uri.AppendPath(containerName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Deletes a site container for a site, or a deployment slot. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the app. + /// Name of the deployment slot. If a slot is not specified, the API will delete the container for the production slot. + /// Site Container Name. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task DeleteSiteContainerSlotAsync(string subscriptionId, string resourceGroupName, string name, string slot, string containerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(slot, nameof(slot)); + Argument.AssertNotNullOrEmpty(containerName, nameof(containerName)); + + using var message = CreateDeleteSiteContainerSlotRequest(subscriptionId, resourceGroupName, name, slot, containerName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Deletes a site container for a site, or a deployment slot. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the app. + /// Name of the deployment slot. If a slot is not specified, the API will delete the container for the production slot. + /// Site Container Name. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response DeleteSiteContainerSlot(string subscriptionId, string resourceGroupName, string name, string slot, string containerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(slot, nameof(slot)); + Argument.AssertNotNullOrEmpty(containerName, nameof(containerName)); + + using var message = CreateDeleteSiteContainerSlotRequest(subscriptionId, resourceGroupName, name, slot, containerName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateListSiteExtensionsSlotRequestUri(string subscriptionId, string resourceGroupName, string name, string slot) { var uri = new RawRequestUriBuilder(); @@ -40278,6 +41878,808 @@ public Response GetWebJob(string subscriptionId, string resourceGrou } } + internal RequestUriBuilder CreateDeployWorkflowArtifactsRequestUri(string subscriptionId, string resourceGroupName, string name, WorkflowArtifacts workflowArtifacts) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/deployWorkflowArtifacts", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeployWorkflowArtifactsRequest(string subscriptionId, string resourceGroupName, string name, WorkflowArtifacts workflowArtifacts) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/deployWorkflowArtifacts", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + if (workflowArtifacts != null) + { + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(workflowArtifacts, ModelSerializationExtensions.WireOptions); + request.Content = content; + } + _userAgent.Apply(message); + return message; + } + + /// Description for Creates the artifacts for web site, or a deployment slot. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// Application settings and files of the workflow. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task DeployWorkflowArtifactsAsync(string subscriptionId, string resourceGroupName, string name, WorkflowArtifacts workflowArtifacts = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateDeployWorkflowArtifactsRequest(subscriptionId, resourceGroupName, name, workflowArtifacts); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Description for Creates the artifacts for web site, or a deployment slot. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// Application settings and files of the workflow. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response DeployWorkflowArtifacts(string subscriptionId, string resourceGroupName, string name, WorkflowArtifacts workflowArtifacts = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateDeployWorkflowArtifactsRequest(subscriptionId, resourceGroupName, name, workflowArtifacts); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeployWorkflowArtifactsSlotRequestUri(string subscriptionId, string resourceGroupName, string name, string slot, WorkflowArtifacts workflowArtifacts) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/slots/", false); + uri.AppendPath(slot, true); + uri.AppendPath("/deployWorkflowArtifacts", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeployWorkflowArtifactsSlotRequest(string subscriptionId, string resourceGroupName, string name, string slot, WorkflowArtifacts workflowArtifacts) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/slots/", false); + uri.AppendPath(slot, true); + uri.AppendPath("/deployWorkflowArtifacts", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + if (workflowArtifacts != null) + { + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(workflowArtifacts, ModelSerializationExtensions.WireOptions); + request.Content = content; + } + _userAgent.Apply(message); + return message; + } + + /// Description for Creates the artifacts for web site, or a deployment slot. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// Name of the deployment slot. + /// Application settings and files of the workflow. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeployWorkflowArtifactsSlotAsync(string subscriptionId, string resourceGroupName, string name, string slot, WorkflowArtifacts workflowArtifacts = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(slot, nameof(slot)); + + using var message = CreateDeployWorkflowArtifactsSlotRequest(subscriptionId, resourceGroupName, name, slot, workflowArtifacts); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Description for Creates the artifacts for web site, or a deployment slot. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// Name of the deployment slot. + /// Application settings and files of the workflow. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response DeployWorkflowArtifactsSlot(string subscriptionId, string resourceGroupName, string name, string slot, WorkflowArtifacts workflowArtifacts = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(slot, nameof(slot)); + + using var message = CreateDeployWorkflowArtifactsSlotRequest(subscriptionId, resourceGroupName, name, slot, workflowArtifacts); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListInstanceWorkflowsSlotRequestUri(string subscriptionId, string resourceGroupName, string name, string slot) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/slots/", false); + uri.AppendPath(slot, true); + uri.AppendPath("/workflows", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListInstanceWorkflowsSlotRequest(string subscriptionId, string resourceGroupName, string name, string slot) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/slots/", false); + uri.AppendPath(slot, true); + uri.AppendPath("/workflows", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List the workflows for a web site, or a deployment slot. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// Name of the deployment slot. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListInstanceWorkflowsSlotAsync(string subscriptionId, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(slot, nameof(slot)); + + using var message = CreateListInstanceWorkflowsSlotRequest(subscriptionId, resourceGroupName, name, slot); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WorkflowEnvelopeCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WorkflowEnvelopeCollection.DeserializeWorkflowEnvelopeCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List the workflows for a web site, or a deployment slot. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// Name of the deployment slot. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListInstanceWorkflowsSlot(string subscriptionId, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(slot, nameof(slot)); + + using var message = CreateListInstanceWorkflowsSlotRequest(subscriptionId, resourceGroupName, name, slot); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WorkflowEnvelopeCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WorkflowEnvelopeCollection.DeserializeWorkflowEnvelopeCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetInstanceWorkflowSlotRequestUri(string subscriptionId, string resourceGroupName, string name, string slot, string workflowName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/slots/", false); + uri.AppendPath(slot, true); + uri.AppendPath("/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetInstanceWorkflowSlotRequest(string subscriptionId, string resourceGroupName, string name, string slot, string workflowName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/slots/", false); + uri.AppendPath(slot, true); + uri.AppendPath("/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get workflow information by its ID for web site, or a deployment slot. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// Name of the deployment slot. + /// Workflow name. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetInstanceWorkflowSlotAsync(string subscriptionId, string resourceGroupName, string name, string slot, string workflowName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(slot, nameof(slot)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + + using var message = CreateGetInstanceWorkflowSlotRequest(subscriptionId, resourceGroupName, name, slot, workflowName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WorkflowEnvelopeData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WorkflowEnvelopeData.DeserializeWorkflowEnvelopeData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((WorkflowEnvelopeData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get workflow information by its ID for web site, or a deployment slot. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// Name of the deployment slot. + /// Workflow name. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response GetInstanceWorkflowSlot(string subscriptionId, string resourceGroupName, string name, string slot, string workflowName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(slot, nameof(slot)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + + using var message = CreateGetInstanceWorkflowSlotRequest(subscriptionId, resourceGroupName, name, slot, workflowName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WorkflowEnvelopeData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WorkflowEnvelopeData.DeserializeWorkflowEnvelopeData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((WorkflowEnvelopeData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListWorkflowsConnectionsSlotRequestUri(string subscriptionId, string resourceGroupName, string name, string slot) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/slots/", false); + uri.AppendPath(slot, true); + uri.AppendPath("/listWorkflowsConnections", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListWorkflowsConnectionsSlotRequest(string subscriptionId, string resourceGroupName, string name, string slot) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/slots/", false); + uri.AppendPath(slot, true); + uri.AppendPath("/listWorkflowsConnections", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists logic app's connections for web site, or a deployment slot. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// Name of the deployment slot. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListWorkflowsConnectionsSlotAsync(string subscriptionId, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(slot, nameof(slot)); + + using var message = CreateListWorkflowsConnectionsSlotRequest(subscriptionId, resourceGroupName, name, slot); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WorkflowEnvelopeData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WorkflowEnvelopeData.DeserializeWorkflowEnvelopeData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists logic app's connections for web site, or a deployment slot. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// Name of the deployment slot. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListWorkflowsConnectionsSlot(string subscriptionId, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(slot, nameof(slot)); + + using var message = CreateListWorkflowsConnectionsSlotRequest(subscriptionId, resourceGroupName, name, slot); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WorkflowEnvelopeData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WorkflowEnvelopeData.DeserializeWorkflowEnvelopeData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListWorkflowsRequestUri(string subscriptionId, string resourceGroupName, string name) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/workflows", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListWorkflowsRequest(string subscriptionId, string resourceGroupName, string name) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/workflows", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List the workflows for a web site, or a deployment slot. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListWorkflowsAsync(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateListWorkflowsRequest(subscriptionId, resourceGroupName, name); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WorkflowEnvelopeCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WorkflowEnvelopeCollection.DeserializeWorkflowEnvelopeCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List the workflows for a web site, or a deployment slot. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListWorkflows(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateListWorkflowsRequest(subscriptionId, resourceGroupName, name); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WorkflowEnvelopeCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WorkflowEnvelopeCollection.DeserializeWorkflowEnvelopeCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetWorkflowRequestUri(string subscriptionId, string resourceGroupName, string name, string workflowName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetWorkflowRequest(string subscriptionId, string resourceGroupName, string name, string workflowName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get workflow information by its ID for web site, or a deployment slot. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// Workflow name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetWorkflowAsync(string subscriptionId, string resourceGroupName, string name, string workflowName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + + using var message = CreateGetWorkflowRequest(subscriptionId, resourceGroupName, name, workflowName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WorkflowEnvelopeData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WorkflowEnvelopeData.DeserializeWorkflowEnvelopeData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((WorkflowEnvelopeData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get workflow information by its ID for web site, or a deployment slot. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// Workflow name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetWorkflow(string subscriptionId, string resourceGroupName, string name, string workflowName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + + using var message = CreateGetWorkflowRequest(subscriptionId, resourceGroupName, name, workflowName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WorkflowEnvelopeData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WorkflowEnvelopeData.DeserializeWorkflowEnvelopeData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((WorkflowEnvelopeData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListWorkflowsConnectionsRequestUri(string subscriptionId, string resourceGroupName, string name) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/listWorkflowsConnections", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListWorkflowsConnectionsRequest(string subscriptionId, string resourceGroupName, string name) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/listWorkflowsConnections", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists logic app's connections for web site, or a deployment slot. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListWorkflowsConnectionsAsync(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateListWorkflowsConnectionsRequest(subscriptionId, resourceGroupName, name); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WorkflowEnvelopeData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WorkflowEnvelopeData.DeserializeWorkflowEnvelopeData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists logic app's connections for web site, or a deployment slot. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListWorkflowsConnections(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateListWorkflowsConnectionsRequest(subscriptionId, resourceGroupName, name); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WorkflowEnvelopeData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WorkflowEnvelopeData.DeserializeWorkflowEnvelopeData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId) { var uri = new RawRequestUriBuilder(); @@ -41024,6 +43426,90 @@ public Response ListContinuousWebJobsNextPage(string } } + internal RequestUriBuilder CreateListProductionSiteDeploymentStatusesNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListProductionSiteDeploymentStatusesNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string name) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List deployment statuses for an app (or deployment slot, if specified). + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the app. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListProductionSiteDeploymentStatusesNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateListProductionSiteDeploymentStatusesNextPageRequest(nextLink, subscriptionId, resourceGroupName, name); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + CsmDeploymentStatusCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = CsmDeploymentStatusCollection.DeserializeCsmDeploymentStatusCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List deployment statuses for an app (or deployment slot, if specified). + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the app. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListProductionSiteDeploymentStatusesNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateListProductionSiteDeploymentStatusesNextPageRequest(nextLink, subscriptionId, resourceGroupName, name); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + CsmDeploymentStatusCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = CsmDeploymentStatusCollection.DeserializeCsmDeploymentStatusCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateListDeploymentsNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name) { var uri = new RawRequestUriBuilder(); @@ -42314,6 +44800,90 @@ public Response ListPublicCertificatesNextPage(stri } } + internal RequestUriBuilder CreateListSiteContainersNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListSiteContainersNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string name) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists all the site containers of a site, or a deployment slot. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the app. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListSiteContainersNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateListSiteContainersNextPageRequest(nextLink, subscriptionId, resourceGroupName, name); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + Models.SiteContainerCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.SiteContainerCollection.DeserializeSiteContainerCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists all the site containers of a site, or a deployment slot. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the app. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListSiteContainersNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateListSiteContainersNextPageRequest(nextLink, subscriptionId, resourceGroupName, name); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + Models.SiteContainerCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.SiteContainerCollection.DeserializeSiteContainerCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateListSiteExtensionsNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name) { var uri = new RawRequestUriBuilder(); @@ -43098,6 +45668,94 @@ public Response ListContinuousWebJobsSlotNextPage(st } } + internal RequestUriBuilder CreateListSlotSiteDeploymentStatusesSlotNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name, string slot) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListSlotSiteDeploymentStatusesSlotNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string name, string slot) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List deployment statuses for an app (or deployment slot, if specified). + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the app. + /// Name of the deployment slot. If a slot is not specified, the API will get the deployment status for the production slot. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListSlotSiteDeploymentStatusesSlotNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(slot, nameof(slot)); + + using var message = CreateListSlotSiteDeploymentStatusesSlotNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, slot); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + CsmDeploymentStatusCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = CsmDeploymentStatusCollection.DeserializeCsmDeploymentStatusCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List deployment statuses for an app (or deployment slot, if specified). + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the app. + /// Name of the deployment slot. If a slot is not specified, the API will get the deployment status for the production slot. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListSlotSiteDeploymentStatusesSlotNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(slot, nameof(slot)); + + using var message = CreateListSlotSiteDeploymentStatusesSlotNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, slot); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + CsmDeploymentStatusCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = CsmDeploymentStatusCollection.DeserializeCsmDeploymentStatusCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateListDeploymentsSlotNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name, string slot) { var uri = new RawRequestUriBuilder(); @@ -44448,6 +47106,94 @@ public Response ListPublicCertificatesSlotNextPage( } } + internal RequestUriBuilder CreateListSiteContainersSlotNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name, string slot) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListSiteContainersSlotNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string name, string slot) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists all the site containers of a site, or a deployment slot. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the app. + /// Name of the deployment slot. If a slot is not specified, the API will get a list of site containers for the production slot. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListSiteContainersSlotNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(slot, nameof(slot)); + + using var message = CreateListSiteContainersSlotNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, slot); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + Models.SiteContainerCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.SiteContainerCollection.DeserializeSiteContainerCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists all the site containers of a site, or a deployment slot. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the app. + /// Name of the deployment slot. If a slot is not specified, the API will get a list of site containers for the production slot. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListSiteContainersSlotNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(slot, nameof(slot)); + + using var message = CreateListSiteContainersSlotNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, slot); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + Models.SiteContainerCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.SiteContainerCollection.DeserializeSiteContainerCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateListSiteExtensionsSlotNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name, string slot) { var uri = new RawRequestUriBuilder(); @@ -45759,5 +48505,177 @@ public Response ListWebJobsNextPage(string nextLink, string s throw new RequestFailedException(message.Response); } } + + internal RequestUriBuilder CreateListInstanceWorkflowsSlotNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name, string slot) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListInstanceWorkflowsSlotNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string name, string slot) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List the workflows for a web site, or a deployment slot. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// Name of the deployment slot. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListInstanceWorkflowsSlotNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(slot, nameof(slot)); + + using var message = CreateListInstanceWorkflowsSlotNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, slot); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WorkflowEnvelopeCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WorkflowEnvelopeCollection.DeserializeWorkflowEnvelopeCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List the workflows for a web site, or a deployment slot. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// Name of the deployment slot. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListInstanceWorkflowsSlotNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(slot, nameof(slot)); + + using var message = CreateListInstanceWorkflowsSlotNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, slot); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WorkflowEnvelopeCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WorkflowEnvelopeCollection.DeserializeWorkflowEnvelopeCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListWorkflowsNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListWorkflowsNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string name) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List the workflows for a web site, or a deployment slot. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListWorkflowsNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateListWorkflowsNextPageRequest(nextLink, subscriptionId, resourceGroupName, name); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WorkflowEnvelopeCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WorkflowEnvelopeCollection.DeserializeWorkflowEnvelopeCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List the workflows for a web site, or a deployment slot. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListWorkflowsNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateListWorkflowsNextPageRequest(nextLink, subscriptionId, resourceGroupName, name); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WorkflowEnvelopeCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WorkflowEnvelopeCollection.DeserializeWorkflowEnvelopeCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/WebSiteManagementRestOperations.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/WebSiteManagementRestOperations.cs index 3e6d4717f8326..16b1b4c18ff18 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/WebSiteManagementRestOperations.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/WebSiteManagementRestOperations.cs @@ -32,7 +32,7 @@ public WebSiteManagementRestOperations(HttpPipeline pipeline, string application { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-02-01"; + _apiVersion = apiVersion ?? "2023-12-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -592,6 +592,94 @@ public Response CheckNameAvailability(string subscript } } + internal RequestUriBuilder CreateListCustomHostNameSitesRequestUri(string subscriptionId, string hostname) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Web/customhostnameSites", false); + if (hostname != null) + { + uri.AppendQuery("hostname", hostname, true); + } + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListCustomHostNameSitesRequest(string subscriptionId, string hostname) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Web/customhostnameSites", false); + if (hostname != null) + { + uri.AppendQuery("hostname", hostname, true); + } + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get custom hostnames under this subscription. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Specific hostname. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListCustomHostNameSitesAsync(string subscriptionId, string hostname = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListCustomHostNameSitesRequest(subscriptionId, hostname); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + CustomHostnameSitesCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = CustomHostnameSitesCollection.DeserializeCustomHostnameSitesCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get custom hostnames under this subscription. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Specific hostname. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response ListCustomHostNameSites(string subscriptionId, string hostname = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListCustomHostNameSitesRequest(subscriptionId, hostname); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + CustomHostnameSitesCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = CustomHostnameSitesCollection.DeserializeCustomHostnameSitesCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateGetSubscriptionDeploymentLocationsRequestUri(string subscriptionId) { var uri = new RawRequestUriBuilder(); @@ -670,6 +758,84 @@ public Response GetSubscriptionDeploymentLocation } } + internal RequestUriBuilder CreateListAseRegionsRequestUri(string subscriptionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Web/aseRegions", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListAseRegionsRequest(string subscriptionId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Web/aseRegions", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Description for get a list of available ASE regions and its supported Skus. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListAseRegionsAsync(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListAseRegionsRequest(subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AseRegionCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AseRegionCollection.DeserializeAseRegionCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Description for get a list of available ASE regions and its supported Skus. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response ListAseRegions(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListAseRegionsRequest(subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AseRegionCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AseRegionCollection.DeserializeAseRegionCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateListGeoRegionsRequestUri(string subscriptionId, AppServiceSkuName? sku, bool? linuxWorkersEnabled, bool? xenonWorkersEnabled, bool? linuxDynamicWorkersEnabled) { var uri = new RawRequestUriBuilder(); @@ -1360,6 +1526,160 @@ public Response ListBillingMetersNextPage(stri } } + internal RequestUriBuilder CreateListCustomHostNameSitesNextPageRequestUri(string nextLink, string subscriptionId, string hostname) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListCustomHostNameSitesNextPageRequest(string nextLink, string subscriptionId, string hostname) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get custom hostnames under this subscription. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Specific hostname. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListCustomHostNameSitesNextPageAsync(string nextLink, string subscriptionId, string hostname = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListCustomHostNameSitesNextPageRequest(nextLink, subscriptionId, hostname); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + CustomHostnameSitesCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = CustomHostnameSitesCollection.DeserializeCustomHostnameSitesCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get custom hostnames under this subscription. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Specific hostname. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response ListCustomHostNameSitesNextPage(string nextLink, string subscriptionId, string hostname = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListCustomHostNameSitesNextPageRequest(nextLink, subscriptionId, hostname); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + CustomHostnameSitesCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = CustomHostnameSitesCollection.DeserializeCustomHostnameSitesCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListAseRegionsNextPageRequestUri(string nextLink, string subscriptionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListAseRegionsNextPageRequest(string nextLink, string subscriptionId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Description for get a list of available ASE regions and its supported Skus. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListAseRegionsNextPageAsync(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListAseRegionsNextPageRequest(nextLink, subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AseRegionCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AseRegionCollection.DeserializeAseRegionCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Description for get a list of available ASE regions and its supported Skus. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response ListAseRegionsNextPage(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListAseRegionsNextPageRequest(nextLink, subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AseRegionCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AseRegionCollection.DeserializeAseRegionCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateListGeoRegionsNextPageRequestUri(string nextLink, string subscriptionId, AppServiceSkuName? sku, bool? linuxWorkersEnabled, bool? xenonWorkersEnabled, bool? linuxDynamicWorkersEnabled) { var uri = new RawRequestUriBuilder(); diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/WorkflowRunActionRepetitionsRequestHistoriesRestOperations.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/WorkflowRunActionRepetitionsRequestHistoriesRestOperations.cs new file mode 100644 index 0000000000000..4ea3e131b5f9d --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/WorkflowRunActionRepetitionsRequestHistoriesRestOperations.cs @@ -0,0 +1,401 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService +{ + internal partial class WorkflowRunActionRepetitionsRequestHistoriesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of WorkflowRunActionRepetitionsRequestHistoriesRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public WorkflowRunActionRepetitionsRequestHistoriesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2023-12-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, string repetitionName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/runs/", false); + uri.AppendPath(runName, true); + uri.AppendPath("/actions/", false); + uri.AppendPath(actionName, true); + uri.AppendPath("/repetitions/", false); + uri.AppendPath(repetitionName, true); + uri.AppendPath("/requestHistories", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, string repetitionName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/runs/", false); + uri.AppendPath(runName, true); + uri.AppendPath("/actions/", false); + uri.AppendPath(actionName, true); + uri.AppendPath("/repetitions/", false); + uri.AppendPath(repetitionName, true); + uri.AppendPath("/requestHistories", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List a workflow run repetition request history. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow run name. + /// The workflow action name. + /// The workflow repetition. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, string repetitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + Argument.AssertNotNullOrEmpty(actionName, nameof(actionName)); + Argument.AssertNotNullOrEmpty(repetitionName, nameof(repetitionName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, name, workflowName, runName, actionName, repetitionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + RequestHistoryListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = RequestHistoryListResult.DeserializeRequestHistoryListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List a workflow run repetition request history. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow run name. + /// The workflow action name. + /// The workflow repetition. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, string repetitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + Argument.AssertNotNullOrEmpty(actionName, nameof(actionName)); + Argument.AssertNotNullOrEmpty(repetitionName, nameof(repetitionName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, name, workflowName, runName, actionName, repetitionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + RequestHistoryListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = RequestHistoryListResult.DeserializeRequestHistoryListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, string repetitionName, string requestHistoryName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/runs/", false); + uri.AppendPath(runName, true); + uri.AppendPath("/actions/", false); + uri.AppendPath(actionName, true); + uri.AppendPath("/repetitions/", false); + uri.AppendPath(repetitionName, true); + uri.AppendPath("/requestHistories/", false); + uri.AppendPath(requestHistoryName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, string repetitionName, string requestHistoryName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/runs/", false); + uri.AppendPath(runName, true); + uri.AppendPath("/actions/", false); + uri.AppendPath(actionName, true); + uri.AppendPath("/repetitions/", false); + uri.AppendPath(repetitionName, true); + uri.AppendPath("/requestHistories/", false); + uri.AppendPath(requestHistoryName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets a workflow run repetition request history. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow run name. + /// The workflow action name. + /// The workflow repetition. + /// The request history name. + /// The cancellation token to use. + /// , , , , , , or is null. + /// , , , , , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, string repetitionName, string requestHistoryName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + Argument.AssertNotNullOrEmpty(actionName, nameof(actionName)); + Argument.AssertNotNullOrEmpty(repetitionName, nameof(repetitionName)); + Argument.AssertNotNullOrEmpty(requestHistoryName, nameof(requestHistoryName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, name, workflowName, runName, actionName, repetitionName, requestHistoryName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WebAppRequestHistoryData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WebAppRequestHistoryData.DeserializeWebAppRequestHistoryData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((WebAppRequestHistoryData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets a workflow run repetition request history. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow run name. + /// The workflow action name. + /// The workflow repetition. + /// The request history name. + /// The cancellation token to use. + /// , , , , , , or is null. + /// , , , , , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, string repetitionName, string requestHistoryName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + Argument.AssertNotNullOrEmpty(actionName, nameof(actionName)); + Argument.AssertNotNullOrEmpty(repetitionName, nameof(repetitionName)); + Argument.AssertNotNullOrEmpty(requestHistoryName, nameof(requestHistoryName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, name, workflowName, runName, actionName, repetitionName, requestHistoryName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WebAppRequestHistoryData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WebAppRequestHistoryData.DeserializeWebAppRequestHistoryData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((WebAppRequestHistoryData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, string repetitionName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, string repetitionName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List a workflow run repetition request history. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow run name. + /// The workflow action name. + /// The workflow repetition. + /// The cancellation token to use. + /// , , , , , , or is null. + /// , , , , , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, string repetitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + Argument.AssertNotNullOrEmpty(actionName, nameof(actionName)); + Argument.AssertNotNullOrEmpty(repetitionName, nameof(repetitionName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, workflowName, runName, actionName, repetitionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + RequestHistoryListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = RequestHistoryListResult.DeserializeRequestHistoryListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List a workflow run repetition request history. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow run name. + /// The workflow action name. + /// The workflow repetition. + /// The cancellation token to use. + /// , , , , , , or is null. + /// , , , , , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, string repetitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + Argument.AssertNotNullOrEmpty(actionName, nameof(actionName)); + Argument.AssertNotNullOrEmpty(repetitionName, nameof(repetitionName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, workflowName, runName, actionName, repetitionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + RequestHistoryListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = RequestHistoryListResult.DeserializeRequestHistoryListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/WorkflowRunActionRepetitionsRestOperations.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/WorkflowRunActionRepetitionsRestOperations.cs new file mode 100644 index 0000000000000..87d9d311e4daf --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/WorkflowRunActionRepetitionsRestOperations.cs @@ -0,0 +1,607 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService +{ + internal partial class WorkflowRunActionRepetitionsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of WorkflowRunActionRepetitionsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public WorkflowRunActionRepetitionsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2023-12-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/runs/", false); + uri.AppendPath(runName, true); + uri.AppendPath("/actions/", false); + uri.AppendPath(actionName, true); + uri.AppendPath("/repetitions", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/runs/", false); + uri.AppendPath(runName, true); + uri.AppendPath("/actions/", false); + uri.AppendPath(actionName, true); + uri.AppendPath("/repetitions", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get all of a workflow run action repetitions. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow run name. + /// The workflow action name. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + Argument.AssertNotNullOrEmpty(actionName, nameof(actionName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, name, workflowName, runName, actionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WorkflowRunActionRepetitionDefinitionCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WorkflowRunActionRepetitionDefinitionCollection.DeserializeWorkflowRunActionRepetitionDefinitionCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get all of a workflow run action repetitions. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow run name. + /// The workflow action name. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + Argument.AssertNotNullOrEmpty(actionName, nameof(actionName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, name, workflowName, runName, actionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WorkflowRunActionRepetitionDefinitionCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WorkflowRunActionRepetitionDefinitionCollection.DeserializeWorkflowRunActionRepetitionDefinitionCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, string repetitionName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/runs/", false); + uri.AppendPath(runName, true); + uri.AppendPath("/actions/", false); + uri.AppendPath(actionName, true); + uri.AppendPath("/repetitions/", false); + uri.AppendPath(repetitionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, string repetitionName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/runs/", false); + uri.AppendPath(runName, true); + uri.AppendPath("/actions/", false); + uri.AppendPath(actionName, true); + uri.AppendPath("/repetitions/", false); + uri.AppendPath(repetitionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a workflow run action repetition. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow run name. + /// The workflow action name. + /// The workflow repetition. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, string repetitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + Argument.AssertNotNullOrEmpty(actionName, nameof(actionName)); + Argument.AssertNotNullOrEmpty(repetitionName, nameof(repetitionName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, name, workflowName, runName, actionName, repetitionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WorkflowRunActionRepetitionDefinitionData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WorkflowRunActionRepetitionDefinitionData.DeserializeWorkflowRunActionRepetitionDefinitionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((WorkflowRunActionRepetitionDefinitionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a workflow run action repetition. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow run name. + /// The workflow action name. + /// The workflow repetition. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, string repetitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + Argument.AssertNotNullOrEmpty(actionName, nameof(actionName)); + Argument.AssertNotNullOrEmpty(repetitionName, nameof(repetitionName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, name, workflowName, runName, actionName, repetitionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WorkflowRunActionRepetitionDefinitionData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WorkflowRunActionRepetitionDefinitionData.DeserializeWorkflowRunActionRepetitionDefinitionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((WorkflowRunActionRepetitionDefinitionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListExpressionTracesRequestUri(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, string repetitionName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/runs/", false); + uri.AppendPath(runName, true); + uri.AppendPath("/actions/", false); + uri.AppendPath(actionName, true); + uri.AppendPath("/repetitions/", false); + uri.AppendPath(repetitionName, true); + uri.AppendPath("/listExpressionTraces", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListExpressionTracesRequest(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, string repetitionName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/runs/", false); + uri.AppendPath(runName, true); + uri.AppendPath("/actions/", false); + uri.AppendPath(actionName, true); + uri.AppendPath("/repetitions/", false); + uri.AppendPath(repetitionName, true); + uri.AppendPath("/listExpressionTraces", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists a workflow run expression trace. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow run name. + /// The workflow action name. + /// The workflow repetition. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , , or is an empty string, and was expected to be non-empty. + public async Task> ListExpressionTracesAsync(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, string repetitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + Argument.AssertNotNullOrEmpty(actionName, nameof(actionName)); + Argument.AssertNotNullOrEmpty(repetitionName, nameof(repetitionName)); + + using var message = CreateListExpressionTracesRequest(subscriptionId, resourceGroupName, name, workflowName, runName, actionName, repetitionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ExpressionTraces value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ExpressionTraces.DeserializeExpressionTraces(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists a workflow run expression trace. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow run name. + /// The workflow action name. + /// The workflow repetition. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , , or is an empty string, and was expected to be non-empty. + public Response ListExpressionTraces(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, string repetitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + Argument.AssertNotNullOrEmpty(actionName, nameof(actionName)); + Argument.AssertNotNullOrEmpty(repetitionName, nameof(repetitionName)); + + using var message = CreateListExpressionTracesRequest(subscriptionId, resourceGroupName, name, workflowName, runName, actionName, repetitionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ExpressionTraces value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ExpressionTraces.DeserializeExpressionTraces(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get all of a workflow run action repetitions. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow run name. + /// The workflow action name. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + Argument.AssertNotNullOrEmpty(actionName, nameof(actionName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, workflowName, runName, actionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WorkflowRunActionRepetitionDefinitionCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WorkflowRunActionRepetitionDefinitionCollection.DeserializeWorkflowRunActionRepetitionDefinitionCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get all of a workflow run action repetitions. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow run name. + /// The workflow action name. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + Argument.AssertNotNullOrEmpty(actionName, nameof(actionName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, workflowName, runName, actionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WorkflowRunActionRepetitionDefinitionCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WorkflowRunActionRepetitionDefinitionCollection.DeserializeWorkflowRunActionRepetitionDefinitionCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListExpressionTracesNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, string repetitionName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListExpressionTracesNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, string repetitionName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists a workflow run expression trace. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow run name. + /// The workflow action name. + /// The workflow repetition. + /// The cancellation token to use. + /// , , , , , , or is null. + /// , , , , , or is an empty string, and was expected to be non-empty. + public async Task> ListExpressionTracesNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, string repetitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + Argument.AssertNotNullOrEmpty(actionName, nameof(actionName)); + Argument.AssertNotNullOrEmpty(repetitionName, nameof(repetitionName)); + + using var message = CreateListExpressionTracesNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, workflowName, runName, actionName, repetitionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ExpressionTraces value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ExpressionTraces.DeserializeExpressionTraces(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists a workflow run expression trace. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow run name. + /// The workflow action name. + /// The workflow repetition. + /// The cancellation token to use. + /// , , , , , , or is null. + /// , , , , , or is an empty string, and was expected to be non-empty. + public Response ListExpressionTracesNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, string repetitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + Argument.AssertNotNullOrEmpty(actionName, nameof(actionName)); + Argument.AssertNotNullOrEmpty(repetitionName, nameof(repetitionName)); + + using var message = CreateListExpressionTracesNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, workflowName, runName, actionName, repetitionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ExpressionTraces value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ExpressionTraces.DeserializeExpressionTraces(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/WorkflowRunActionScopeRepetitionsRestOperations.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/WorkflowRunActionScopeRepetitionsRestOperations.cs new file mode 100644 index 0000000000000..8da5a5e8d8945 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/WorkflowRunActionScopeRepetitionsRestOperations.cs @@ -0,0 +1,381 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService +{ + internal partial class WorkflowRunActionScopeRepetitionsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of WorkflowRunActionScopeRepetitionsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public WorkflowRunActionScopeRepetitionsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2023-12-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/runs/", false); + uri.AppendPath(runName, true); + uri.AppendPath("/actions/", false); + uri.AppendPath(actionName, true); + uri.AppendPath("/scopeRepetitions", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/runs/", false); + uri.AppendPath(runName, true); + uri.AppendPath("/actions/", false); + uri.AppendPath(actionName, true); + uri.AppendPath("/scopeRepetitions", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List the workflow run action scoped repetitions. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow run name. + /// The workflow action name. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + Argument.AssertNotNullOrEmpty(actionName, nameof(actionName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, name, workflowName, runName, actionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WorkflowRunActionRepetitionDefinitionCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WorkflowRunActionRepetitionDefinitionCollection.DeserializeWorkflowRunActionRepetitionDefinitionCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List the workflow run action scoped repetitions. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow run name. + /// The workflow action name. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + Argument.AssertNotNullOrEmpty(actionName, nameof(actionName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, name, workflowName, runName, actionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WorkflowRunActionRepetitionDefinitionCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WorkflowRunActionRepetitionDefinitionCollection.DeserializeWorkflowRunActionRepetitionDefinitionCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, string repetitionName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/runs/", false); + uri.AppendPath(runName, true); + uri.AppendPath("/actions/", false); + uri.AppendPath(actionName, true); + uri.AppendPath("/scopeRepetitions/", false); + uri.AppendPath(repetitionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, string repetitionName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/runs/", false); + uri.AppendPath(runName, true); + uri.AppendPath("/actions/", false); + uri.AppendPath(actionName, true); + uri.AppendPath("/scopeRepetitions/", false); + uri.AppendPath(repetitionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a workflow run action scoped repetition. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow run name. + /// The workflow action name. + /// The workflow repetition. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, string repetitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + Argument.AssertNotNullOrEmpty(actionName, nameof(actionName)); + Argument.AssertNotNullOrEmpty(repetitionName, nameof(repetitionName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, name, workflowName, runName, actionName, repetitionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WorkflowRunActionRepetitionDefinitionData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WorkflowRunActionRepetitionDefinitionData.DeserializeWorkflowRunActionRepetitionDefinitionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((WorkflowRunActionRepetitionDefinitionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a workflow run action scoped repetition. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow run name. + /// The workflow action name. + /// The workflow repetition. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, string repetitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + Argument.AssertNotNullOrEmpty(actionName, nameof(actionName)); + Argument.AssertNotNullOrEmpty(repetitionName, nameof(repetitionName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, name, workflowName, runName, actionName, repetitionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WorkflowRunActionRepetitionDefinitionData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WorkflowRunActionRepetitionDefinitionData.DeserializeWorkflowRunActionRepetitionDefinitionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((WorkflowRunActionRepetitionDefinitionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List the workflow run action scoped repetitions. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow run name. + /// The workflow action name. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + Argument.AssertNotNullOrEmpty(actionName, nameof(actionName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, workflowName, runName, actionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WorkflowRunActionRepetitionDefinitionCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WorkflowRunActionRepetitionDefinitionCollection.DeserializeWorkflowRunActionRepetitionDefinitionCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List the workflow run action scoped repetitions. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow run name. + /// The workflow action name. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + Argument.AssertNotNullOrEmpty(actionName, nameof(actionName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, workflowName, runName, actionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WorkflowRunActionRepetitionDefinitionCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WorkflowRunActionRepetitionDefinitionCollection.DeserializeWorkflowRunActionRepetitionDefinitionCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/WorkflowRunActionsRestOperations.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/WorkflowRunActionsRestOperations.cs new file mode 100644 index 0000000000000..650c841db1ea5 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/WorkflowRunActionsRestOperations.cs @@ -0,0 +1,599 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService +{ + internal partial class WorkflowRunActionsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of WorkflowRunActionsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public WorkflowRunActionsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2023-12-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, int? top, string filter) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/runs/", false); + uri.AppendPath(runName, true); + uri.AppendPath("/actions", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, int? top, string filter) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/runs/", false); + uri.AppendPath(runName, true); + uri.AppendPath("/actions", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets a list of workflow run actions. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow run name. + /// The number of items to be included in the result. + /// The filter to apply on the operation. Options for filters include: Status. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, int? top = null, string filter = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, name, workflowName, runName, top, filter); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WorkflowRunActionListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WorkflowRunActionListResult.DeserializeWorkflowRunActionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets a list of workflow run actions. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow run name. + /// The number of items to be included in the result. + /// The filter to apply on the operation. Options for filters include: Status. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, int? top = null, string filter = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, name, workflowName, runName, top, filter); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WorkflowRunActionListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WorkflowRunActionListResult.DeserializeWorkflowRunActionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/runs/", false); + uri.AppendPath(runName, true); + uri.AppendPath("/actions/", false); + uri.AppendPath(actionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/runs/", false); + uri.AppendPath(runName, true); + uri.AppendPath("/actions/", false); + uri.AppendPath(actionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets a workflow run action. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow run name. + /// The workflow action name. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + Argument.AssertNotNullOrEmpty(actionName, nameof(actionName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, name, workflowName, runName, actionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WorkflowRunActionData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WorkflowRunActionData.DeserializeWorkflowRunActionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((WorkflowRunActionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets a workflow run action. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow run name. + /// The workflow action name. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + Argument.AssertNotNullOrEmpty(actionName, nameof(actionName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, name, workflowName, runName, actionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WorkflowRunActionData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WorkflowRunActionData.DeserializeWorkflowRunActionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((WorkflowRunActionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListExpressionTracesRequestUri(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/runs/", false); + uri.AppendPath(runName, true); + uri.AppendPath("/actions/", false); + uri.AppendPath(actionName, true); + uri.AppendPath("/listExpressionTraces", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListExpressionTracesRequest(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/runs/", false); + uri.AppendPath(runName, true); + uri.AppendPath("/actions/", false); + uri.AppendPath(actionName, true); + uri.AppendPath("/listExpressionTraces", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists a workflow run expression trace. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow run name. + /// The workflow action name. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task> ListExpressionTracesAsync(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + Argument.AssertNotNullOrEmpty(actionName, nameof(actionName)); + + using var message = CreateListExpressionTracesRequest(subscriptionId, resourceGroupName, name, workflowName, runName, actionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ExpressionTraces value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ExpressionTraces.DeserializeExpressionTraces(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists a workflow run expression trace. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow run name. + /// The workflow action name. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response ListExpressionTraces(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + Argument.AssertNotNullOrEmpty(actionName, nameof(actionName)); + + using var message = CreateListExpressionTracesRequest(subscriptionId, resourceGroupName, name, workflowName, runName, actionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ExpressionTraces value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ExpressionTraces.DeserializeExpressionTraces(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, int? top, string filter) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, int? top, string filter) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets a list of workflow run actions. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow run name. + /// The number of items to be included in the result. + /// The filter to apply on the operation. Options for filters include: Status. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, int? top = null, string filter = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, workflowName, runName, top, filter); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WorkflowRunActionListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WorkflowRunActionListResult.DeserializeWorkflowRunActionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets a list of workflow run actions. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow run name. + /// The number of items to be included in the result. + /// The filter to apply on the operation. Options for filters include: Status. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, int? top = null, string filter = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, workflowName, runName, top, filter); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WorkflowRunActionListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WorkflowRunActionListResult.DeserializeWorkflowRunActionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListExpressionTracesNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListExpressionTracesNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists a workflow run expression trace. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow run name. + /// The workflow action name. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task> ListExpressionTracesNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + Argument.AssertNotNullOrEmpty(actionName, nameof(actionName)); + + using var message = CreateListExpressionTracesNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, workflowName, runName, actionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ExpressionTraces value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ExpressionTraces.DeserializeExpressionTraces(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists a workflow run expression trace. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow run name. + /// The workflow action name. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response ListExpressionTracesNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + Argument.AssertNotNullOrEmpty(actionName, nameof(actionName)); + + using var message = CreateListExpressionTracesNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, workflowName, runName, actionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ExpressionTraces value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ExpressionTraces.DeserializeExpressionTraces(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/WorkflowRunsRestOperations.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/WorkflowRunsRestOperations.cs new file mode 100644 index 0000000000000..3d5b344a0b07f --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/WorkflowRunsRestOperations.cs @@ -0,0 +1,465 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService +{ + internal partial class WorkflowRunsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of WorkflowRunsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public WorkflowRunsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2023-12-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string name, string workflowName, int? top, string filter) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/runs", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string name, string workflowName, int? top, string filter) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/runs", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets a list of workflow runs. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The number of items to be included in the result. + /// The filter to apply on the operation. Options for filters include: Status, StartTime, and ClientTrackingId. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string name, string workflowName, int? top = null, string filter = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, name, workflowName, top, filter); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WorkflowRunListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WorkflowRunListResult.DeserializeWorkflowRunListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets a list of workflow runs. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The number of items to be included in the result. + /// The filter to apply on the operation. Options for filters include: Status, StartTime, and ClientTrackingId. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string name, string workflowName, int? top = null, string filter = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, name, workflowName, top, filter); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WorkflowRunListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WorkflowRunListResult.DeserializeWorkflowRunListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/runs/", false); + uri.AppendPath(runName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/runs/", false); + uri.AppendPath(runName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets a workflow run. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow run name. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, name, workflowName, runName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WorkflowRunData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WorkflowRunData.DeserializeWorkflowRunData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((WorkflowRunData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets a workflow run. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow run name. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, name, workflowName, runName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WorkflowRunData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WorkflowRunData.DeserializeWorkflowRunData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((WorkflowRunData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCancelRequestUri(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/runs/", false); + uri.AppendPath(runName, true); + uri.AppendPath("/cancel", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCancelRequest(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/runs/", false); + uri.AppendPath(runName, true); + uri.AppendPath("/cancel", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Cancels a workflow run. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow run name. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task CancelAsync(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + + using var message = CreateCancelRequest(subscriptionId, resourceGroupName, name, workflowName, runName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Cancels a workflow run. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow run name. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Cancel(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + + using var message = CreateCancelRequest(subscriptionId, resourceGroupName, name, workflowName, runName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name, string workflowName, int? top, string filter) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string name, string workflowName, int? top, string filter) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets a list of workflow runs. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The number of items to be included in the result. + /// The filter to apply on the operation. Options for filters include: Status, StartTime, and ClientTrackingId. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, string workflowName, int? top = null, string filter = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, workflowName, top, filter); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WorkflowRunListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WorkflowRunListResult.DeserializeWorkflowRunListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets a list of workflow runs. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The number of items to be included in the result. + /// The filter to apply on the operation. Options for filters include: Status, StartTime, and ClientTrackingId. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, string workflowName, int? top = null, string filter = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, workflowName, top, filter); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WorkflowRunListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WorkflowRunListResult.DeserializeWorkflowRunListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/WorkflowTriggerHistoriesRestOperations.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/WorkflowTriggerHistoriesRestOperations.cs new file mode 100644 index 0000000000000..5b011927774aa --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/WorkflowTriggerHistoriesRestOperations.cs @@ -0,0 +1,493 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService +{ + internal partial class WorkflowTriggerHistoriesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of WorkflowTriggerHistoriesRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public WorkflowTriggerHistoriesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2023-12-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string name, string workflowName, string triggerName, int? top, string filter) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/triggers/", false); + uri.AppendPath(triggerName, true); + uri.AppendPath("/histories", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string name, string workflowName, string triggerName, int? top, string filter) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/triggers/", false); + uri.AppendPath(triggerName, true); + uri.AppendPath("/histories", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets a list of workflow trigger histories. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow trigger name. + /// The number of items to be included in the result. + /// The filter to apply on the operation. Options for filters include: Status, StartTime, and ClientTrackingId. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string name, string workflowName, string triggerName, int? top = null, string filter = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(triggerName, nameof(triggerName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, name, workflowName, triggerName, top, filter); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WorkflowTriggerHistoryListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WorkflowTriggerHistoryListResult.DeserializeWorkflowTriggerHistoryListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets a list of workflow trigger histories. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow trigger name. + /// The number of items to be included in the result. + /// The filter to apply on the operation. Options for filters include: Status, StartTime, and ClientTrackingId. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string name, string workflowName, string triggerName, int? top = null, string filter = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(triggerName, nameof(triggerName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, name, workflowName, triggerName, top, filter); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WorkflowTriggerHistoryListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WorkflowTriggerHistoryListResult.DeserializeWorkflowTriggerHistoryListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string name, string workflowName, string triggerName, string historyName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/triggers/", false); + uri.AppendPath(triggerName, true); + uri.AppendPath("/histories/", false); + uri.AppendPath(historyName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string name, string workflowName, string triggerName, string historyName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/triggers/", false); + uri.AppendPath(triggerName, true); + uri.AppendPath("/histories/", false); + uri.AppendPath(historyName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets a workflow trigger history. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow trigger name. + /// The workflow trigger history name. Corresponds to the run name for triggers that resulted in a run. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string name, string workflowName, string triggerName, string historyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(triggerName, nameof(triggerName)); + Argument.AssertNotNullOrEmpty(historyName, nameof(historyName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, name, workflowName, triggerName, historyName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WorkflowTriggerHistoryData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WorkflowTriggerHistoryData.DeserializeWorkflowTriggerHistoryData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((WorkflowTriggerHistoryData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets a workflow trigger history. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow trigger name. + /// The workflow trigger history name. Corresponds to the run name for triggers that resulted in a run. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string name, string workflowName, string triggerName, string historyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(triggerName, nameof(triggerName)); + Argument.AssertNotNullOrEmpty(historyName, nameof(historyName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, name, workflowName, triggerName, historyName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WorkflowTriggerHistoryData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WorkflowTriggerHistoryData.DeserializeWorkflowTriggerHistoryData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((WorkflowTriggerHistoryData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateResubmitRequestUri(string subscriptionId, string resourceGroupName, string name, string workflowName, string triggerName, string historyName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/triggers/", false); + uri.AppendPath(triggerName, true); + uri.AppendPath("/histories/", false); + uri.AppendPath(historyName, true); + uri.AppendPath("/resubmit", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateResubmitRequest(string subscriptionId, string resourceGroupName, string name, string workflowName, string triggerName, string historyName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/triggers/", false); + uri.AppendPath(triggerName, true); + uri.AppendPath("/histories/", false); + uri.AppendPath(historyName, true); + uri.AppendPath("/resubmit", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Resubmits a workflow run based on the trigger history. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow trigger name. + /// The workflow trigger history name. Corresponds to the run name for triggers that resulted in a run. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task ResubmitAsync(string subscriptionId, string resourceGroupName, string name, string workflowName, string triggerName, string historyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(triggerName, nameof(triggerName)); + Argument.AssertNotNullOrEmpty(historyName, nameof(historyName)); + + using var message = CreateResubmitRequest(subscriptionId, resourceGroupName, name, workflowName, triggerName, historyName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Resubmits a workflow run based on the trigger history. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow trigger name. + /// The workflow trigger history name. Corresponds to the run name for triggers that resulted in a run. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response Resubmit(string subscriptionId, string resourceGroupName, string name, string workflowName, string triggerName, string historyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(triggerName, nameof(triggerName)); + Argument.AssertNotNullOrEmpty(historyName, nameof(historyName)); + + using var message = CreateResubmitRequest(subscriptionId, resourceGroupName, name, workflowName, triggerName, historyName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name, string workflowName, string triggerName, int? top, string filter) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string name, string workflowName, string triggerName, int? top, string filter) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets a list of workflow trigger histories. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow trigger name. + /// The number of items to be included in the result. + /// The filter to apply on the operation. Options for filters include: Status, StartTime, and ClientTrackingId. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, string workflowName, string triggerName, int? top = null, string filter = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(triggerName, nameof(triggerName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, workflowName, triggerName, top, filter); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WorkflowTriggerHistoryListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WorkflowTriggerHistoryListResult.DeserializeWorkflowTriggerHistoryListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets a list of workflow trigger histories. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow trigger name. + /// The number of items to be included in the result. + /// The filter to apply on the operation. Options for filters include: Status, StartTime, and ClientTrackingId. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, string workflowName, string triggerName, int? top = null, string filter = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(triggerName, nameof(triggerName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, workflowName, triggerName, top, filter); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WorkflowTriggerHistoryListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WorkflowTriggerHistoryListResult.DeserializeWorkflowTriggerHistoryListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/WorkflowTriggersRestOperations.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/WorkflowTriggersRestOperations.cs new file mode 100644 index 0000000000000..b31d20642004c --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/WorkflowTriggersRestOperations.cs @@ -0,0 +1,687 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService +{ + internal partial class WorkflowTriggersRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of WorkflowTriggersRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public WorkflowTriggersRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2023-12-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string name, string workflowName, int? top, string filter) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/triggers", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string name, string workflowName, int? top, string filter) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/triggers", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets a list of workflow triggers. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The number of items to be included in the result. + /// The filter to apply on the operation. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string name, string workflowName, int? top = null, string filter = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, name, workflowName, top, filter); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WorkflowTriggerListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WorkflowTriggerListResult.DeserializeWorkflowTriggerListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets a list of workflow triggers. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The number of items to be included in the result. + /// The filter to apply on the operation. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string name, string workflowName, int? top = null, string filter = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, name, workflowName, top, filter); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WorkflowTriggerListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WorkflowTriggerListResult.DeserializeWorkflowTriggerListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string name, string workflowName, string triggerName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/triggers/", false); + uri.AppendPath(triggerName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string name, string workflowName, string triggerName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/triggers/", false); + uri.AppendPath(triggerName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets a workflow trigger. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow trigger name. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string name, string workflowName, string triggerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(triggerName, nameof(triggerName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, name, workflowName, triggerName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WorkflowTriggerData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WorkflowTriggerData.DeserializeWorkflowTriggerData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((WorkflowTriggerData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets a workflow trigger. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow trigger name. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string name, string workflowName, string triggerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(triggerName, nameof(triggerName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, name, workflowName, triggerName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WorkflowTriggerData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WorkflowTriggerData.DeserializeWorkflowTriggerData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((WorkflowTriggerData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListCallbackUrlRequestUri(string subscriptionId, string resourceGroupName, string name, string workflowName, string triggerName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/triggers/", false); + uri.AppendPath(triggerName, true); + uri.AppendPath("/listCallbackUrl", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListCallbackUrlRequest(string subscriptionId, string resourceGroupName, string name, string workflowName, string triggerName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/triggers/", false); + uri.AppendPath(triggerName, true); + uri.AppendPath("/listCallbackUrl", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get the callback URL for a workflow trigger. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow trigger name. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> ListCallbackUrlAsync(string subscriptionId, string resourceGroupName, string name, string workflowName, string triggerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(triggerName, nameof(triggerName)); + + using var message = CreateListCallbackUrlRequest(subscriptionId, resourceGroupName, name, workflowName, triggerName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WorkflowTriggerCallbackUri value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WorkflowTriggerCallbackUri.DeserializeWorkflowTriggerCallbackUri(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get the callback URL for a workflow trigger. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow trigger name. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response ListCallbackUrl(string subscriptionId, string resourceGroupName, string name, string workflowName, string triggerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(triggerName, nameof(triggerName)); + + using var message = CreateListCallbackUrlRequest(subscriptionId, resourceGroupName, name, workflowName, triggerName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WorkflowTriggerCallbackUri value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WorkflowTriggerCallbackUri.DeserializeWorkflowTriggerCallbackUri(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateRunRequestUri(string subscriptionId, string resourceGroupName, string name, string workflowName, string triggerName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/triggers/", false); + uri.AppendPath(triggerName, true); + uri.AppendPath("/run", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateRunRequest(string subscriptionId, string resourceGroupName, string name, string workflowName, string triggerName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/triggers/", false); + uri.AppendPath(triggerName, true); + uri.AppendPath("/run", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Runs a workflow trigger. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow trigger name. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task RunAsync(string subscriptionId, string resourceGroupName, string name, string workflowName, string triggerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(triggerName, nameof(triggerName)); + + using var message = CreateRunRequest(subscriptionId, resourceGroupName, name, workflowName, triggerName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Runs a workflow trigger. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow trigger name. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Run(string subscriptionId, string resourceGroupName, string name, string workflowName, string triggerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(triggerName, nameof(triggerName)); + + using var message = CreateRunRequest(subscriptionId, resourceGroupName, name, workflowName, triggerName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetSchemaJsonRequestUri(string subscriptionId, string resourceGroupName, string name, string workflowName, string triggerName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/triggers/", false); + uri.AppendPath(triggerName, true); + uri.AppendPath("/schemas/json", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetSchemaJsonRequest(string subscriptionId, string resourceGroupName, string name, string workflowName, string triggerName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/triggers/", false); + uri.AppendPath(triggerName, true); + uri.AppendPath("/schemas/json", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get the trigger schema as JSON. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow trigger name. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetSchemaJsonAsync(string subscriptionId, string resourceGroupName, string name, string workflowName, string triggerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(triggerName, nameof(triggerName)); + + using var message = CreateGetSchemaJsonRequest(subscriptionId, resourceGroupName, name, workflowName, triggerName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WebAppJsonSchema value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WebAppJsonSchema.DeserializeWebAppJsonSchema(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get the trigger schema as JSON. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow trigger name. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response GetSchemaJson(string subscriptionId, string resourceGroupName, string name, string workflowName, string triggerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(triggerName, nameof(triggerName)); + + using var message = CreateGetSchemaJsonRequest(subscriptionId, resourceGroupName, name, workflowName, triggerName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WebAppJsonSchema value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WebAppJsonSchema.DeserializeWebAppJsonSchema(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name, string workflowName, int? top, string filter) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string name, string workflowName, int? top, string filter) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets a list of workflow triggers. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The number of items to be included in the result. + /// The filter to apply on the operation. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, string workflowName, int? top = null, string filter = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, workflowName, top, filter); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WorkflowTriggerListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WorkflowTriggerListResult.DeserializeWorkflowTriggerListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets a list of workflow triggers. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The number of items to be included in the result. + /// The filter to apply on the operation. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, string workflowName, int? top = null, string filter = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, workflowName, top, filter); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WorkflowTriggerListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WorkflowTriggerListResult.DeserializeWorkflowTriggerListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/WorkflowVersionsRestOperations.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/WorkflowVersionsRestOperations.cs new file mode 100644 index 0000000000000..5931ea377155f --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/WorkflowVersionsRestOperations.cs @@ -0,0 +1,353 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService +{ + internal partial class WorkflowVersionsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of WorkflowVersionsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public WorkflowVersionsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2023-12-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string name, string workflowName, int? top) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/versions", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string name, string workflowName, int? top) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/versions", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets a list of workflow versions. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The number of items to be included in the result. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string name, string workflowName, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, name, workflowName, top); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WorkflowVersionListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WorkflowVersionListResult.DeserializeWorkflowVersionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets a list of workflow versions. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The number of items to be included in the result. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string name, string workflowName, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, name, workflowName, top); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WorkflowVersionListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WorkflowVersionListResult.DeserializeWorkflowVersionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string name, string workflowName, string versionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(versionId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string name, string workflowName, string versionId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(versionId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets a workflow version. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow versionId. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string name, string workflowName, string versionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(versionId, nameof(versionId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, name, workflowName, versionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WorkflowVersionData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WorkflowVersionData.DeserializeWorkflowVersionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((WorkflowVersionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets a workflow version. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow versionId. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string name, string workflowName, string versionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(versionId, nameof(versionId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, name, workflowName, versionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WorkflowVersionData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WorkflowVersionData.DeserializeWorkflowVersionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((WorkflowVersionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name, string workflowName, int? top) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string name, string workflowName, int? top) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets a list of workflow versions. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The number of items to be included in the result. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, string workflowName, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, workflowName, top); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WorkflowVersionListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WorkflowVersionListResult.DeserializeWorkflowVersionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets a list of workflow versions. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The number of items to be included in the result. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, string workflowName, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, workflowName, top); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WorkflowVersionListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WorkflowVersionListResult.DeserializeWorkflowVersionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/WorkflowsRestOperations.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/WorkflowsRestOperations.cs new file mode 100644 index 0000000000000..8400673c29430 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/WorkflowsRestOperations.cs @@ -0,0 +1,238 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService +{ + internal partial class WorkflowsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of WorkflowsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public WorkflowsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2023-12-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateRegenerateAccessKeyRequestUri(string subscriptionId, string resourceGroupName, string name, string workflowName, WorkflowRegenerateActionContent content) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/regenerateAccessKey", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateRegenerateAccessKeyRequest(string subscriptionId, string resourceGroupName, string name, string workflowName, WorkflowRegenerateActionContent content) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/regenerateAccessKey", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; + _userAgent.Apply(message); + return message; + } + + /// Regenerates the callback URL access key for request triggers. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The access key type. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task RegenerateAccessKeyAsync(string subscriptionId, string resourceGroupName, string name, string workflowName, WorkflowRegenerateActionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateRegenerateAccessKeyRequest(subscriptionId, resourceGroupName, name, workflowName, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Regenerates the callback URL access key for request triggers. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The access key type. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response RegenerateAccessKey(string subscriptionId, string resourceGroupName, string name, string workflowName, WorkflowRegenerateActionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateRegenerateAccessKeyRequest(subscriptionId, resourceGroupName, name, workflowName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateValidateRequestUri(string subscriptionId, string resourceGroupName, string name, string workflowName, WorkflowData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/validate", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateValidateRequest(string subscriptionId, string resourceGroupName, string name, string workflowName, WorkflowData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/validate", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Validates the workflow definition. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task ValidateAsync(string subscriptionId, string resourceGroupName, string name, string workflowName, WorkflowData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateValidateRequest(subscriptionId, resourceGroupName, name, workflowName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Validates the workflow definition. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Validate(string subscriptionId, string resourceGroupName, string name, string workflowName, WorkflowData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateValidateRequest(subscriptionId, resourceGroupName, name, workflowName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/ScmSiteBasicPublishingCredentialsPolicyResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/ScmSiteBasicPublishingCredentialsPolicyResource.cs index ee99474e20f34..ef46aa536d198 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/ScmSiteBasicPublishingCredentialsPolicyResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/ScmSiteBasicPublishingCredentialsPolicyResource.cs @@ -100,7 +100,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -180,7 +180,7 @@ public virtual Response Get(Can /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -228,7 +228,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/ScmSiteSlotBasicPublishingCredentialsPolicyResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/ScmSiteSlotBasicPublishingCredentialsPolicyResource.cs index 187505840150c..380537f001f5e 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/ScmSiteSlotBasicPublishingCredentialsPolicyResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/ScmSiteSlotBasicPublishingCredentialsPolicyResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -229,7 +229,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteBackupCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteBackupCollection.cs index 5356d13a11fcd..902a4c4ed6c73 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteBackupCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteBackupCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(string backupId /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string backupId, CancellationTok /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken c /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationToken cancellatio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string backupId, Cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string backupId, CancellationToken cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> GetIfExistsAsync /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteBackupResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteBackupResource.cs index 3e2616558237c..ec0cca9815af1 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteBackupResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteBackupResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(CancellationTok /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken cancellationTo /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -270,7 +270,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task> GetBackupStatusSecretsAs /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -354,7 +354,7 @@ public virtual Response GetBackupStatusSecrets(WebAppBackupI /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -400,7 +400,7 @@ public virtual async Task RestoreAsync(WaitUntil waitUntil, Restor /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteConfigAppsettingCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteConfigAppsettingCollection.cs index cb9406825a5eb..b4878ddd70475 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteConfigAppsettingCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteConfigAppsettingCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(strin /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string appSettingKey, /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(Cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationToken c /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string appSettingKey, Canc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string appSettingKey, CancellationToken can /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> GetIfE /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteConfigAppsettingResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteConfigAppsettingResource.cs index 9a67cd98ff0b6..a29f6e74e3300 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteConfigAppsettingResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteConfigAppsettingResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteConfigData.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteConfigData.Serialization.cs index 8b27aafabec1c..0653b1e4bb49c 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteConfigData.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteConfigData.Serialization.cs @@ -307,6 +307,23 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp writer.WriteNull("appSettings"); } } + if (Optional.IsCollectionDefined(Metadata)) + { + if (Metadata != null) + { + writer.WritePropertyName("metadata"u8); + writer.WriteStartArray(); + foreach (var item in Metadata) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + else + { + writer.WriteNull("metadata"); + } + } if (Optional.IsCollectionDefined(ConnectionStrings)) { if (ConnectionStrings != null) @@ -723,6 +740,18 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp writer.WriteNull("ipSecurityRestrictions"); } } + if (Optional.IsDefined(IPSecurityRestrictionsDefaultAction)) + { + if (IPSecurityRestrictionsDefaultAction != null) + { + writer.WritePropertyName("ipSecurityRestrictionsDefaultAction"u8); + writer.WriteStringValue(IPSecurityRestrictionsDefaultAction.Value.ToString()); + } + else + { + writer.WriteNull("ipSecurityRestrictionsDefaultAction"); + } + } if (Optional.IsCollectionDefined(ScmIPSecurityRestrictions)) { if (ScmIPSecurityRestrictions != null) @@ -740,6 +769,18 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp writer.WriteNull("scmIpSecurityRestrictions"); } } + if (Optional.IsDefined(ScmIPSecurityRestrictionsDefaultAction)) + { + if (ScmIPSecurityRestrictionsDefaultAction != null) + { + writer.WritePropertyName("scmIpSecurityRestrictionsDefaultAction"u8); + writer.WriteStringValue(ScmIPSecurityRestrictionsDefaultAction.Value.ToString()); + } + else + { + writer.WriteNull("scmIpSecurityRestrictionsDefaultAction"); + } + } if (Optional.IsDefined(AllowIPSecurityRestrictionsForScmToUseMain)) { if (AllowIPSecurityRestrictionsForScmToUseMain != null) @@ -776,6 +817,18 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp writer.WriteNull("minTlsVersion"); } } + if (Optional.IsDefined(MinTlsCipherSuite)) + { + if (MinTlsCipherSuite != null) + { + writer.WritePropertyName("minTlsCipherSuite"u8); + writer.WriteStringValue(MinTlsCipherSuite.Value.ToString()); + } + else + { + writer.WriteNull("minTlsCipherSuite"); + } + } if (Optional.IsDefined(ScmMinTlsVersion)) { if (ScmMinTlsVersion != null) @@ -824,6 +877,18 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp writer.WriteNull("functionAppScaleLimit"); } } + if (Optional.IsDefined(ElasticWebAppScaleLimit)) + { + if (ElasticWebAppScaleLimit != null) + { + writer.WritePropertyName("elasticWebAppScaleLimit"u8); + writer.WriteNumberValue(ElasticWebAppScaleLimit.Value); + } + else + { + writer.WriteNull("elasticWebAppScaleLimit"); + } + } if (Optional.IsDefined(HealthCheckPath)) { if (HealthCheckPath != null) @@ -966,6 +1031,7 @@ internal static SiteConfigData DeserializeSiteConfigData(JsonElement element, Mo bool? detailedErrorLoggingEnabled = default; string publishingUsername = default; IList appSettings = default; + IList metadata = default; IList connectionStrings = default; SiteMachineKey machineKey = default; IList handlerMappings = default; @@ -999,14 +1065,18 @@ internal static SiteConfigData DeserializeSiteConfigData(JsonElement element, Mo int? xManagedServiceIdentityId = default; string keyVaultReferenceIdentity = default; IList ipSecurityRestrictions = default; + SiteDefaultAction? ipSecurityRestrictionsDefaultAction = default; IList scmIPSecurityRestrictions = default; + SiteDefaultAction? scmIPSecurityRestrictionsDefaultAction = default; bool? scmIPSecurityRestrictionsUseMain = default; bool? http20Enabled = default; AppServiceSupportedTlsVersion? minTlsVersion = default; + AppServiceTlsCipherSuite? minTlsCipherSuite = default; AppServiceSupportedTlsVersion? scmMinTlsVersion = default; AppServiceFtpsState? ftpsState = default; int? preWarmedInstanceCount = default; int? functionAppScaleLimit = default; + int? elasticWebAppScaleLimit = default; string healthCheckPath = default; bool? functionsRuntimeScaleMonitoringEnabled = default; string websiteTimeZone = default; @@ -1265,6 +1335,21 @@ internal static SiteConfigData DeserializeSiteConfigData(JsonElement element, Mo appSettings = array; continue; } + if (property0.NameEquals("metadata"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + metadata = null; + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(AppServiceNameValuePair.DeserializeAppServiceNameValuePair(item, options)); + } + metadata = array; + continue; + } if (property0.NameEquals("connectionStrings"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -1615,6 +1700,16 @@ internal static SiteConfigData DeserializeSiteConfigData(JsonElement element, Mo ipSecurityRestrictions = array; continue; } + if (property0.NameEquals("ipSecurityRestrictionsDefaultAction"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + ipSecurityRestrictionsDefaultAction = null; + continue; + } + ipSecurityRestrictionsDefaultAction = new SiteDefaultAction(property0.Value.GetString()); + continue; + } if (property0.NameEquals("scmIpSecurityRestrictions"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -1630,6 +1725,16 @@ internal static SiteConfigData DeserializeSiteConfigData(JsonElement element, Mo scmIPSecurityRestrictions = array; continue; } + if (property0.NameEquals("scmIpSecurityRestrictionsDefaultAction"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + scmIPSecurityRestrictionsDefaultAction = null; + continue; + } + scmIPSecurityRestrictionsDefaultAction = new SiteDefaultAction(property0.Value.GetString()); + continue; + } if (property0.NameEquals("scmIpSecurityRestrictionsUseMain"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -1660,6 +1765,16 @@ internal static SiteConfigData DeserializeSiteConfigData(JsonElement element, Mo minTlsVersion = new AppServiceSupportedTlsVersion(property0.Value.GetString()); continue; } + if (property0.NameEquals("minTlsCipherSuite"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + minTlsCipherSuite = null; + continue; + } + minTlsCipherSuite = new AppServiceTlsCipherSuite(property0.Value.GetString()); + continue; + } if (property0.NameEquals("scmMinTlsVersion"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -1700,6 +1815,16 @@ internal static SiteConfigData DeserializeSiteConfigData(JsonElement element, Mo functionAppScaleLimit = property0.Value.GetInt32(); continue; } + if (property0.NameEquals("elasticWebAppScaleLimit"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + elasticWebAppScaleLimit = null; + continue; + } + elasticWebAppScaleLimit = property0.Value.GetInt32(); + continue; + } if (property0.NameEquals("healthCheckPath"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -1799,6 +1924,7 @@ internal static SiteConfigData DeserializeSiteConfigData(JsonElement element, Mo detailedErrorLoggingEnabled, publishingUsername, appSettings ?? new ChangeTrackingList(), + metadata ?? new ChangeTrackingList(), connectionStrings ?? new ChangeTrackingList(), machineKey, handlerMappings ?? new ChangeTrackingList(), @@ -1832,14 +1958,18 @@ internal static SiteConfigData DeserializeSiteConfigData(JsonElement element, Mo xManagedServiceIdentityId, keyVaultReferenceIdentity, ipSecurityRestrictions ?? new ChangeTrackingList(), + ipSecurityRestrictionsDefaultAction, scmIPSecurityRestrictions ?? new ChangeTrackingList(), + scmIPSecurityRestrictionsDefaultAction, scmIPSecurityRestrictionsUseMain, http20Enabled, minTlsVersion, + minTlsCipherSuite, scmMinTlsVersion, ftpsState, preWarmedInstanceCount, functionAppScaleLimit, + elasticWebAppScaleLimit, healthCheckPath, functionsRuntimeScaleMonitoringEnabled, websiteTimeZone, @@ -2354,6 +2484,29 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Metadata), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" metadata: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Metadata)) + { + if (Metadata.Any()) + { + builder.Append(" metadata: "); + builder.AppendLine("["); + foreach (var item in Metadata) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " metadata: "); + } + builder.AppendLine(" ]"); + } + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ConnectionStrings), out propertyOverride); if (hasPropertyOverride) { @@ -2974,6 +3127,21 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IPSecurityRestrictionsDefaultAction), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" ipSecurityRestrictionsDefaultAction: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IPSecurityRestrictionsDefaultAction)) + { + builder.Append(" ipSecurityRestrictionsDefaultAction: "); + builder.AppendLine($"'{IPSecurityRestrictionsDefaultAction.Value.ToString()}'"); + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ScmIPSecurityRestrictions), out propertyOverride); if (hasPropertyOverride) { @@ -2997,6 +3165,21 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ScmIPSecurityRestrictionsDefaultAction), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" scmIpSecurityRestrictionsDefaultAction: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ScmIPSecurityRestrictionsDefaultAction)) + { + builder.Append(" scmIpSecurityRestrictionsDefaultAction: "); + builder.AppendLine($"'{ScmIPSecurityRestrictionsDefaultAction.Value.ToString()}'"); + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AllowIPSecurityRestrictionsForScmToUseMain), out propertyOverride); if (hasPropertyOverride) { @@ -3044,6 +3227,21 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(MinTlsCipherSuite), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" minTlsCipherSuite: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(MinTlsCipherSuite)) + { + builder.Append(" minTlsCipherSuite: "); + builder.AppendLine($"'{MinTlsCipherSuite.Value.ToString()}'"); + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ScmMinTlsVersion), out propertyOverride); if (hasPropertyOverride) { @@ -3104,6 +3302,21 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ElasticWebAppScaleLimit), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" elasticWebAppScaleLimit: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ElasticWebAppScaleLimit)) + { + builder.Append(" elasticWebAppScaleLimit: "); + builder.AppendLine($"{ElasticWebAppScaleLimit.Value}"); + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(HealthCheckPath), out propertyOverride); if (hasPropertyOverride) { diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteConfigData.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteConfigData.cs index 49ee7cc15effb..053352629af5a 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteConfigData.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteConfigData.cs @@ -56,6 +56,7 @@ public SiteConfigData() { DefaultDocuments = new ChangeTrackingList(); AppSettings = new ChangeTrackingList(); + Metadata = new ChangeTrackingList(); ConnectionStrings = new ChangeTrackingList(); HandlerMappings = new ChangeTrackingList(); VirtualApplications = new ChangeTrackingList(); @@ -89,6 +90,7 @@ public SiteConfigData() /// <code>true</code> if detailed error logging is enabled; otherwise, <code>false</code>. /// Publishing user name. /// Application settings. + /// Application metadata. This property cannot be retrieved, since it may contain secrets. /// Connection strings. /// Site MachineKey. /// Handler mappings. @@ -122,10 +124,13 @@ public SiteConfigData() /// Explicit Managed Service Identity Id. /// Identity to use for Key Vault Reference authentication. /// IP security restrictions for main. + /// Default action for main access restriction if no rules are matched. /// IP security restrictions for scm. + /// Default action for scm access restriction if no rules are matched. /// IP security restrictions for scm to use main. /// Http20Enabled: configures a web site to allow clients to connect over http2.0. /// MinTlsVersion: configures the minimum version of TLS required for SSL requests. + /// The minimum strength TLS cipher suite allowed for an application. /// ScmMinTlsVersion: configures the minimum version of TLS required for SSL requests for SCM site. /// State of FTP / FTPS service. /// @@ -136,6 +141,10 @@ public SiteConfigData() /// Maximum number of workers that a site can scale out to. /// This setting only applies to the Consumption and Elastic Premium Plans /// + /// + /// Maximum number of workers that a site can scale out to. + /// This setting only applies to apps in plans where ElasticScaleEnabled is <code>true</code> + /// /// Health check path. /// /// Gets or sets a value indicating whether functions runtime scale monitoring is enabled. When enabled, @@ -151,7 +160,7 @@ public SiteConfigData() /// Property to allow or block all public traffic. /// Kind of resource. /// Keeps track of any properties unknown to the library. - internal SiteConfigData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, int? numberOfWorkers, IList defaultDocuments, string netFrameworkVersion, string phpVersion, string pythonVersion, string nodeVersion, string powerShellVersion, string linuxFxVersion, string windowsFxVersion, bool? isRequestTracingEnabled, DateTimeOffset? requestTracingExpirationOn, bool? isRemoteDebuggingEnabled, string remoteDebuggingVersion, bool? isHttpLoggingEnabled, bool? useManagedIdentityCreds, string acrUserManagedIdentityId, int? logsDirectorySizeLimit, bool? isDetailedErrorLoggingEnabled, string publishingUsername, IList appSettings, IList connectionStrings, SiteMachineKey machineKey, IList handlerMappings, string documentRoot, ScmType? scmType, bool? use32BitWorkerProcess, bool? isWebSocketsEnabled, bool? isAlwaysOn, string javaVersion, string javaContainer, string javaContainerVersion, string appCommandLine, ManagedPipelineMode? managedPipelineMode, IList virtualApplications, SiteLoadBalancing? loadBalancing, RoutingRuleExperiments experiments, SiteLimits limits, bool? isAutoHealEnabled, AutoHealRules autoHealRules, string tracingOptions, string vnetName, bool? isVnetRouteAllEnabled, int? vnetPrivatePortsCount, AppServiceCorsSettings cors, WebAppPushSettings push, AppServiceApiDefinitionInfo apiDefinition, ApiManagementConfig apiManagementConfig, string autoSwapSlotName, bool? isLocalMySqlEnabled, int? managedServiceIdentityId, int? xManagedServiceIdentityId, string keyVaultReferenceIdentity, IList ipSecurityRestrictions, IList scmIPSecurityRestrictions, bool? allowIPSecurityRestrictionsForScmToUseMain, bool? isHttp20Enabled, AppServiceSupportedTlsVersion? minTlsVersion, AppServiceSupportedTlsVersion? scmMinTlsVersion, AppServiceFtpsState? ftpsState, int? preWarmedInstanceCount, int? functionAppScaleLimit, string healthCheckPath, bool? isFunctionsRuntimeScaleMonitoringEnabled, string websiteTimeZone, int? minimumElasticInstanceCount, IDictionary azureStorageAccounts, string publicNetworkAccess, string kind, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal SiteConfigData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, int? numberOfWorkers, IList defaultDocuments, string netFrameworkVersion, string phpVersion, string pythonVersion, string nodeVersion, string powerShellVersion, string linuxFxVersion, string windowsFxVersion, bool? isRequestTracingEnabled, DateTimeOffset? requestTracingExpirationOn, bool? isRemoteDebuggingEnabled, string remoteDebuggingVersion, bool? isHttpLoggingEnabled, bool? useManagedIdentityCreds, string acrUserManagedIdentityId, int? logsDirectorySizeLimit, bool? isDetailedErrorLoggingEnabled, string publishingUsername, IList appSettings, IList metadata, IList connectionStrings, SiteMachineKey machineKey, IList handlerMappings, string documentRoot, ScmType? scmType, bool? use32BitWorkerProcess, bool? isWebSocketsEnabled, bool? isAlwaysOn, string javaVersion, string javaContainer, string javaContainerVersion, string appCommandLine, ManagedPipelineMode? managedPipelineMode, IList virtualApplications, SiteLoadBalancing? loadBalancing, RoutingRuleExperiments experiments, SiteLimits limits, bool? isAutoHealEnabled, AutoHealRules autoHealRules, string tracingOptions, string vnetName, bool? isVnetRouteAllEnabled, int? vnetPrivatePortsCount, AppServiceCorsSettings cors, WebAppPushSettings push, AppServiceApiDefinitionInfo apiDefinition, ApiManagementConfig apiManagementConfig, string autoSwapSlotName, bool? isLocalMySqlEnabled, int? managedServiceIdentityId, int? xManagedServiceIdentityId, string keyVaultReferenceIdentity, IList ipSecurityRestrictions, SiteDefaultAction? ipSecurityRestrictionsDefaultAction, IList scmIPSecurityRestrictions, SiteDefaultAction? scmIPSecurityRestrictionsDefaultAction, bool? allowIPSecurityRestrictionsForScmToUseMain, bool? isHttp20Enabled, AppServiceSupportedTlsVersion? minTlsVersion, AppServiceTlsCipherSuite? minTlsCipherSuite, AppServiceSupportedTlsVersion? scmMinTlsVersion, AppServiceFtpsState? ftpsState, int? preWarmedInstanceCount, int? functionAppScaleLimit, int? elasticWebAppScaleLimit, string healthCheckPath, bool? isFunctionsRuntimeScaleMonitoringEnabled, string websiteTimeZone, int? minimumElasticInstanceCount, IDictionary azureStorageAccounts, string publicNetworkAccess, string kind, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { NumberOfWorkers = numberOfWorkers; DefaultDocuments = defaultDocuments; @@ -173,6 +182,7 @@ internal SiteConfigData(ResourceIdentifier id, string name, ResourceType resourc IsDetailedErrorLoggingEnabled = isDetailedErrorLoggingEnabled; PublishingUsername = publishingUsername; AppSettings = appSettings; + Metadata = metadata; ConnectionStrings = connectionStrings; MachineKey = machineKey; HandlerMappings = handlerMappings; @@ -206,14 +216,18 @@ internal SiteConfigData(ResourceIdentifier id, string name, ResourceType resourc XManagedServiceIdentityId = xManagedServiceIdentityId; KeyVaultReferenceIdentity = keyVaultReferenceIdentity; IPSecurityRestrictions = ipSecurityRestrictions; + IPSecurityRestrictionsDefaultAction = ipSecurityRestrictionsDefaultAction; ScmIPSecurityRestrictions = scmIPSecurityRestrictions; + ScmIPSecurityRestrictionsDefaultAction = scmIPSecurityRestrictionsDefaultAction; AllowIPSecurityRestrictionsForScmToUseMain = allowIPSecurityRestrictionsForScmToUseMain; IsHttp20Enabled = isHttp20Enabled; MinTlsVersion = minTlsVersion; + MinTlsCipherSuite = minTlsCipherSuite; ScmMinTlsVersion = scmMinTlsVersion; FtpsState = ftpsState; PreWarmedInstanceCount = preWarmedInstanceCount; FunctionAppScaleLimit = functionAppScaleLimit; + ElasticWebAppScaleLimit = elasticWebAppScaleLimit; HealthCheckPath = healthCheckPath; IsFunctionsRuntimeScaleMonitoringEnabled = isFunctionsRuntimeScaleMonitoringEnabled; WebsiteTimeZone = websiteTimeZone; @@ -284,6 +298,9 @@ internal SiteConfigData(ResourceIdentifier id, string name, ResourceType resourc /// Application settings. [WirePath("properties.appSettings")] public IList AppSettings { get; set; } + /// Application metadata. This property cannot be retrieved, since it may contain secrets. + [WirePath("properties.metadata")] + public IList Metadata { get; set; } /// Connection strings. [WirePath("properties.connectionStrings")] public IList ConnectionStrings { get; set; } @@ -418,9 +435,15 @@ public string ApiManagementConfigId /// IP security restrictions for main. [WirePath("properties.ipSecurityRestrictions")] public IList IPSecurityRestrictions { get; set; } + /// Default action for main access restriction if no rules are matched. + [WirePath("properties.ipSecurityRestrictionsDefaultAction")] + public SiteDefaultAction? IPSecurityRestrictionsDefaultAction { get; set; } /// IP security restrictions for scm. [WirePath("properties.scmIpSecurityRestrictions")] public IList ScmIPSecurityRestrictions { get; set; } + /// Default action for scm access restriction if no rules are matched. + [WirePath("properties.scmIpSecurityRestrictionsDefaultAction")] + public SiteDefaultAction? ScmIPSecurityRestrictionsDefaultAction { get; set; } /// IP security restrictions for scm to use main. [WirePath("properties.scmIpSecurityRestrictionsUseMain")] public bool? AllowIPSecurityRestrictionsForScmToUseMain { get; set; } @@ -430,6 +453,9 @@ public string ApiManagementConfigId /// MinTlsVersion: configures the minimum version of TLS required for SSL requests. [WirePath("properties.minTlsVersion")] public AppServiceSupportedTlsVersion? MinTlsVersion { get; set; } + /// The minimum strength TLS cipher suite allowed for an application. + [WirePath("properties.minTlsCipherSuite")] + public AppServiceTlsCipherSuite? MinTlsCipherSuite { get; set; } /// ScmMinTlsVersion: configures the minimum version of TLS required for SSL requests for SCM site. [WirePath("properties.scmMinTlsVersion")] public AppServiceSupportedTlsVersion? ScmMinTlsVersion { get; set; } @@ -448,6 +474,12 @@ public string ApiManagementConfigId /// [WirePath("properties.functionAppScaleLimit")] public int? FunctionAppScaleLimit { get; set; } + /// + /// Maximum number of workers that a site can scale out to. + /// This setting only applies to apps in plans where ElasticScaleEnabled is <code>true</code> + /// + [WirePath("properties.elasticWebAppScaleLimit")] + public int? ElasticWebAppScaleLimit { get; set; } /// Health check path. [WirePath("properties.healthCheckPath")] public string HealthCheckPath { get; set; } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteConfigSnapshotCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteConfigSnapshotCollection.cs index a29f17e920c12..20c54dbc96db9 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteConfigSnapshotCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteConfigSnapshotCollection.cs @@ -61,7 +61,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -106,7 +106,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -151,7 +151,7 @@ public virtual Response Get(string snapshotId, Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -194,7 +194,7 @@ public virtual async Task> ExistsAsync(string snapshotId, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -237,7 +237,7 @@ public virtual Response Exists(string snapshotId, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual async Task> GetIfExi /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteConfigSnapshotResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteConfigSnapshotResource.cs index 2f10aaf57395e..eca7af0cdd0f9 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteConfigSnapshotResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteConfigSnapshotResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -219,7 +219,7 @@ public virtual async Task RecoverSiteConfigurationSnapshotAsync(Cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteContainerCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteContainerCollection.cs new file mode 100644 index 0000000000000..0d0be326b8b33 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteContainerCollection.cs @@ -0,0 +1,497 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetSiteContainers method from an instance of . + /// + public partial class SiteContainerCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _siteContainerWebAppsClientDiagnostics; + private readonly WebAppsRestOperations _siteContainerWebAppsRestClient; + + /// Initializes a new instance of the class for mocking. + protected SiteContainerCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal SiteContainerCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _siteContainerWebAppsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppService", SiteContainerResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(SiteContainerResource.ResourceType, out string siteContainerWebAppsApiVersion); + _siteContainerWebAppsRestClient = new WebAppsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, siteContainerWebAppsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != WebSiteResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, WebSiteResource.ResourceType), nameof(id)); + } + + /// + /// Creates or Updates a site container for a site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sitecontainers/{containerName} + /// + /// + /// Operation Id + /// WebApps_CreateOrUpdateSiteContainer + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Site Container Name. + /// Container Entity. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string containerName, SiteContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(containerName, nameof(containerName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _siteContainerWebAppsClientDiagnostics.CreateScope("SiteContainerCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _siteContainerWebAppsRestClient.CreateOrUpdateSiteContainerAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, containerName, data, cancellationToken).ConfigureAwait(false); + var uri = _siteContainerWebAppsRestClient.CreateCreateOrUpdateSiteContainerRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, containerName, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppServiceArmOperation(Response.FromValue(new SiteContainerResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or Updates a site container for a site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sitecontainers/{containerName} + /// + /// + /// Operation Id + /// WebApps_CreateOrUpdateSiteContainer + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Site Container Name. + /// Container Entity. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string containerName, SiteContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(containerName, nameof(containerName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _siteContainerWebAppsClientDiagnostics.CreateScope("SiteContainerCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _siteContainerWebAppsRestClient.CreateOrUpdateSiteContainer(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, containerName, data, cancellationToken); + var uri = _siteContainerWebAppsRestClient.CreateCreateOrUpdateSiteContainerRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, containerName, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppServiceArmOperation(Response.FromValue(new SiteContainerResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a site container of a site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sitecontainers/{containerName} + /// + /// + /// Operation Id + /// WebApps_GetSiteContainer + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Site Container Name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string containerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(containerName, nameof(containerName)); + + using var scope = _siteContainerWebAppsClientDiagnostics.CreateScope("SiteContainerCollection.Get"); + scope.Start(); + try + { + var response = await _siteContainerWebAppsRestClient.GetSiteContainerAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, containerName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SiteContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a site container of a site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sitecontainers/{containerName} + /// + /// + /// Operation Id + /// WebApps_GetSiteContainer + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Site Container Name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string containerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(containerName, nameof(containerName)); + + using var scope = _siteContainerWebAppsClientDiagnostics.CreateScope("SiteContainerCollection.Get"); + scope.Start(); + try + { + var response = _siteContainerWebAppsRestClient.GetSiteContainer(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, containerName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SiteContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists all the site containers of a site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sitecontainers + /// + /// + /// Operation Id + /// WebApps_ListSiteContainers + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _siteContainerWebAppsRestClient.CreateListSiteContainersRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _siteContainerWebAppsRestClient.CreateListSiteContainersNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new SiteContainerResource(Client, SiteContainerData.DeserializeSiteContainerData(e)), _siteContainerWebAppsClientDiagnostics, Pipeline, "SiteContainerCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Lists all the site containers of a site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sitecontainers + /// + /// + /// Operation Id + /// WebApps_ListSiteContainers + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _siteContainerWebAppsRestClient.CreateListSiteContainersRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _siteContainerWebAppsRestClient.CreateListSiteContainersNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new SiteContainerResource(Client, SiteContainerData.DeserializeSiteContainerData(e)), _siteContainerWebAppsClientDiagnostics, Pipeline, "SiteContainerCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sitecontainers/{containerName} + /// + /// + /// Operation Id + /// WebApps_GetSiteContainer + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Site Container Name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string containerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(containerName, nameof(containerName)); + + using var scope = _siteContainerWebAppsClientDiagnostics.CreateScope("SiteContainerCollection.Exists"); + scope.Start(); + try + { + var response = await _siteContainerWebAppsRestClient.GetSiteContainerAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, containerName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sitecontainers/{containerName} + /// + /// + /// Operation Id + /// WebApps_GetSiteContainer + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Site Container Name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string containerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(containerName, nameof(containerName)); + + using var scope = _siteContainerWebAppsClientDiagnostics.CreateScope("SiteContainerCollection.Exists"); + scope.Start(); + try + { + var response = _siteContainerWebAppsRestClient.GetSiteContainer(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, containerName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sitecontainers/{containerName} + /// + /// + /// Operation Id + /// WebApps_GetSiteContainer + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Site Container Name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string containerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(containerName, nameof(containerName)); + + using var scope = _siteContainerWebAppsClientDiagnostics.CreateScope("SiteContainerCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _siteContainerWebAppsRestClient.GetSiteContainerAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, containerName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new SiteContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sitecontainers/{containerName} + /// + /// + /// Operation Id + /// WebApps_GetSiteContainer + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Site Container Name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string containerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(containerName, nameof(containerName)); + + using var scope = _siteContainerWebAppsClientDiagnostics.CreateScope("SiteContainerCollection.GetIfExists"); + scope.Start(); + try + { + var response = _siteContainerWebAppsRestClient.GetSiteContainer(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, containerName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new SiteContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteContainerData.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteContainerData.Serialization.cs new file mode 100644 index 0000000000000..762c05c96d975 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteContainerData.Serialization.cs @@ -0,0 +1,726 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.AppService.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppService +{ + public partial class SiteContainerData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SiteContainerData)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Kind)) + { + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind); + } + if (options.Format != "W") + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (options.Format != "W") + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W") + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(ResourceType); + } + if (options.Format != "W" && Optional.IsDefined(SystemData)) + { + writer.WritePropertyName("systemData"u8); + JsonSerializer.Serialize(writer, SystemData); + } + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(Image)) + { + writer.WritePropertyName("image"u8); + writer.WriteStringValue(Image); + } + if (Optional.IsDefined(TargetPort)) + { + writer.WritePropertyName("targetPort"u8); + writer.WriteStringValue(TargetPort); + } + if (Optional.IsDefined(IsMain)) + { + writer.WritePropertyName("isMain"u8); + writer.WriteBooleanValue(IsMain.Value); + } + if (Optional.IsDefined(StartUpCommand)) + { + writer.WritePropertyName("startUpCommand"u8); + writer.WriteStringValue(StartUpCommand); + } + if (Optional.IsDefined(AuthType)) + { + writer.WritePropertyName("authType"u8); + writer.WriteStringValue(AuthType.Value.ToSerialString()); + } + if (Optional.IsDefined(UserName)) + { + writer.WritePropertyName("userName"u8); + writer.WriteStringValue(UserName); + } + if (Optional.IsDefined(PasswordSecret)) + { + writer.WritePropertyName("passwordSecret"u8); + writer.WriteStringValue(PasswordSecret); + } + if (Optional.IsDefined(UserManagedIdentityClientId)) + { + writer.WritePropertyName("userManagedIdentityClientId"u8); + writer.WriteStringValue(UserManagedIdentityClientId); + } + if (options.Format != "W" && Optional.IsDefined(CreatedOn)) + { + writer.WritePropertyName("createdTime"u8); + writer.WriteStringValue(CreatedOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(LastModifiedOn)) + { + writer.WritePropertyName("lastModifiedTime"u8); + writer.WriteStringValue(LastModifiedOn.Value, "O"); + } + if (Optional.IsCollectionDefined(VolumeMounts)) + { + writer.WritePropertyName("volumeMounts"u8); + writer.WriteStartArray(); + foreach (var item in VolumeMounts) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(EnvironmentVariables)) + { + writer.WritePropertyName("environmentVariables"u8); + writer.WriteStartArray(); + foreach (var item in EnvironmentVariables) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + SiteContainerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SiteContainerData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSiteContainerData(document.RootElement, options); + } + + internal static SiteContainerData DeserializeSiteContainerData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string kind = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + string image = default; + string targetPort = default; + bool? isMain = default; + string startUpCommand = default; + SiteContainerAuthType? authType = default; + string userName = default; + string passwordSecret = default; + string userManagedIdentityClientId = default; + DateTimeOffset? createdTime = default; + DateTimeOffset? lastModifiedTime = default; + IList volumeMounts = default; + IList environmentVariables = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("kind"u8)) + { + kind = property.Value.GetString(); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("image"u8)) + { + image = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("targetPort"u8)) + { + targetPort = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("isMain"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isMain = property0.Value.GetBoolean(); + continue; + } + if (property0.NameEquals("startUpCommand"u8)) + { + startUpCommand = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("authType"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + authType = property0.Value.GetString().ToSiteContainerAuthType(); + continue; + } + if (property0.NameEquals("userName"u8)) + { + userName = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("passwordSecret"u8)) + { + passwordSecret = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("userManagedIdentityClientId"u8)) + { + userManagedIdentityClientId = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("createdTime"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + createdTime = property0.Value.GetDateTimeOffset("O"); + continue; + } + if (property0.NameEquals("lastModifiedTime"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lastModifiedTime = property0.Value.GetDateTimeOffset("O"); + continue; + } + if (property0.NameEquals("volumeMounts"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(SiteContainerVolumeMount.DeserializeSiteContainerVolumeMount(item, options)); + } + volumeMounts = array; + continue; + } + if (property0.NameEquals("environmentVariables"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(WebAppEnvironmentVariable.DeserializeWebAppEnvironmentVariable(item, options)); + } + environmentVariables = array; + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SiteContainerData( + id, + name, + type, + systemData, + image, + targetPort, + isMain, + startUpCommand, + authType, + userName, + passwordSecret, + userManagedIdentityClientId, + createdTime, + lastModifiedTime, + volumeMounts ?? new ChangeTrackingList(), + environmentVariables ?? new ChangeTrackingList(), + kind, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Kind), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" kind: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Kind)) + { + builder.Append(" kind: "); + if (Kind.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Kind}'''"); + } + else + { + builder.AppendLine($"'{Kind}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Image), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" image: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Image)) + { + builder.Append(" image: "); + if (Image.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Image}'''"); + } + else + { + builder.AppendLine($"'{Image}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TargetPort), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" targetPort: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TargetPort)) + { + builder.Append(" targetPort: "); + if (TargetPort.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{TargetPort}'''"); + } + else + { + builder.AppendLine($"'{TargetPort}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsMain), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" isMain: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsMain)) + { + builder.Append(" isMain: "); + var boolValue = IsMain.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(StartUpCommand), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" startUpCommand: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(StartUpCommand)) + { + builder.Append(" startUpCommand: "); + if (StartUpCommand.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{StartUpCommand}'''"); + } + else + { + builder.AppendLine($"'{StartUpCommand}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AuthType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" authType: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AuthType)) + { + builder.Append(" authType: "); + builder.AppendLine($"'{AuthType.Value.ToSerialString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(UserName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" userName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(UserName)) + { + builder.Append(" userName: "); + if (UserName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{UserName}'''"); + } + else + { + builder.AppendLine($"'{UserName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PasswordSecret), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" passwordSecret: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PasswordSecret)) + { + builder.Append(" passwordSecret: "); + if (PasswordSecret.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{PasswordSecret}'''"); + } + else + { + builder.AppendLine($"'{PasswordSecret}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(UserManagedIdentityClientId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" userManagedIdentityClientId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(UserManagedIdentityClientId)) + { + builder.Append(" userManagedIdentityClientId: "); + if (UserManagedIdentityClientId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{UserManagedIdentityClientId}'''"); + } + else + { + builder.AppendLine($"'{UserManagedIdentityClientId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CreatedOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" createdTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CreatedOn)) + { + builder.Append(" createdTime: "); + var formattedDateTimeString = TypeFormatters.ToString(CreatedOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(LastModifiedOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" lastModifiedTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(LastModifiedOn)) + { + builder.Append(" lastModifiedTime: "); + var formattedDateTimeString = TypeFormatters.ToString(LastModifiedOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(VolumeMounts), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" volumeMounts: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(VolumeMounts)) + { + if (VolumeMounts.Any()) + { + builder.Append(" volumeMounts: "); + builder.AppendLine("["); + foreach (var item in VolumeMounts) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " volumeMounts: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EnvironmentVariables), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" environmentVariables: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(EnvironmentVariables)) + { + if (EnvironmentVariables.Any()) + { + builder.Append(" environmentVariables: "); + builder.AppendLine("["); + foreach (var item in EnvironmentVariables) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " environmentVariables: "); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(SiteContainerData)} does not support writing '{options.Format}' format."); + } + } + + SiteContainerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSiteContainerData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SiteContainerData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteContainerData.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteContainerData.cs new file mode 100644 index 0000000000000..dbb433d21f411 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteContainerData.cs @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.AppService.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A class representing the SiteContainer data model. + /// Container of a site + /// + public partial class SiteContainerData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public SiteContainerData() + { + VolumeMounts = new ChangeTrackingList(); + EnvironmentVariables = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Image Name. + /// Target Port. + /// <code>true</code> if the container is the main site container; <code>false</code> otherwise. + /// StartUp Command. + /// Auth Type. + /// User Name. + /// Password Secret. + /// UserManagedIdentity ClientId. + /// Created Time. + /// Last Modified Time. + /// List of volume mounts. + /// List of environment variables. + /// Kind of resource. + /// Keeps track of any properties unknown to the library. + internal SiteContainerData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string image, string targetPort, bool? isMain, string startUpCommand, SiteContainerAuthType? authType, string userName, string passwordSecret, string userManagedIdentityClientId, DateTimeOffset? createdOn, DateTimeOffset? lastModifiedOn, IList volumeMounts, IList environmentVariables, string kind, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Image = image; + TargetPort = targetPort; + IsMain = isMain; + StartUpCommand = startUpCommand; + AuthType = authType; + UserName = userName; + PasswordSecret = passwordSecret; + UserManagedIdentityClientId = userManagedIdentityClientId; + CreatedOn = createdOn; + LastModifiedOn = lastModifiedOn; + VolumeMounts = volumeMounts; + EnvironmentVariables = environmentVariables; + Kind = kind; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Image Name. + [WirePath("properties.image")] + public string Image { get; set; } + /// Target Port. + [WirePath("properties.targetPort")] + public string TargetPort { get; set; } + /// <code>true</code> if the container is the main site container; <code>false</code> otherwise. + [WirePath("properties.isMain")] + public bool? IsMain { get; set; } + /// StartUp Command. + [WirePath("properties.startUpCommand")] + public string StartUpCommand { get; set; } + /// Auth Type. + [WirePath("properties.authType")] + public SiteContainerAuthType? AuthType { get; set; } + /// User Name. + [WirePath("properties.userName")] + public string UserName { get; set; } + /// Password Secret. + [WirePath("properties.passwordSecret")] + public string PasswordSecret { get; set; } + /// UserManagedIdentity ClientId. + [WirePath("properties.userManagedIdentityClientId")] + public string UserManagedIdentityClientId { get; set; } + /// Created Time. + [WirePath("properties.createdTime")] + public DateTimeOffset? CreatedOn { get; } + /// Last Modified Time. + [WirePath("properties.lastModifiedTime")] + public DateTimeOffset? LastModifiedOn { get; } + /// List of volume mounts. + [WirePath("properties.volumeMounts")] + public IList VolumeMounts { get; } + /// List of environment variables. + [WirePath("properties.environmentVariables")] + public IList EnvironmentVariables { get; } + /// Kind of resource. + [WirePath("kind")] + public string Kind { get; set; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteContainerResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteContainerResource.Serialization.cs new file mode 100644 index 0000000000000..3fce7f496c7b7 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteContainerResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.AppService +{ + public partial class SiteContainerResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + SiteContainerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + SiteContainerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteContainerResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteContainerResource.cs new file mode 100644 index 0000000000000..f648a7bbe6857 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteContainerResource.cs @@ -0,0 +1,355 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A Class representing a SiteContainer along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetSiteContainerResource method. + /// Otherwise you can get one from its parent resource using the GetSiteContainer method. + /// + public partial class SiteContainerResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The name. + /// The containerName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name, string containerName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sitecontainers/{containerName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _siteContainerWebAppsClientDiagnostics; + private readonly WebAppsRestOperations _siteContainerWebAppsRestClient; + private readonly SiteContainerData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Web/sites/sitecontainers"; + + /// Initializes a new instance of the class for mocking. + protected SiteContainerResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal SiteContainerResource(ArmClient client, SiteContainerData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal SiteContainerResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _siteContainerWebAppsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppService", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string siteContainerWebAppsApiVersion); + _siteContainerWebAppsRestClient = new WebAppsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, siteContainerWebAppsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual SiteContainerData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Gets a site container of a site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sitecontainers/{containerName} + /// + /// + /// Operation Id + /// WebApps_GetSiteContainer + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _siteContainerWebAppsClientDiagnostics.CreateScope("SiteContainerResource.Get"); + scope.Start(); + try + { + var response = await _siteContainerWebAppsRestClient.GetSiteContainerAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SiteContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a site container of a site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sitecontainers/{containerName} + /// + /// + /// Operation Id + /// WebApps_GetSiteContainer + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _siteContainerWebAppsClientDiagnostics.CreateScope("SiteContainerResource.Get"); + scope.Start(); + try + { + var response = _siteContainerWebAppsRestClient.GetSiteContainer(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SiteContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes a site container for a site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sitecontainers/{containerName} + /// + /// + /// Operation Id + /// WebApps_DeleteSiteContainer + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _siteContainerWebAppsClientDiagnostics.CreateScope("SiteContainerResource.Delete"); + scope.Start(); + try + { + var response = await _siteContainerWebAppsRestClient.DeleteSiteContainerAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var uri = _siteContainerWebAppsRestClient.CreateDeleteSiteContainerRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppServiceArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes a site container for a site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sitecontainers/{containerName} + /// + /// + /// Operation Id + /// WebApps_DeleteSiteContainer + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _siteContainerWebAppsClientDiagnostics.CreateScope("SiteContainerResource.Delete"); + scope.Start(); + try + { + var response = _siteContainerWebAppsRestClient.DeleteSiteContainer(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var uri = _siteContainerWebAppsRestClient.CreateDeleteSiteContainerRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppServiceArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or Updates a site container for a site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sitecontainers/{containerName} + /// + /// + /// Operation Id + /// WebApps_CreateOrUpdateSiteContainer + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Container Entity. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, SiteContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _siteContainerWebAppsClientDiagnostics.CreateScope("SiteContainerResource.Update"); + scope.Start(); + try + { + var response = await _siteContainerWebAppsRestClient.CreateOrUpdateSiteContainerAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var uri = _siteContainerWebAppsRestClient.CreateCreateOrUpdateSiteContainerRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppServiceArmOperation(Response.FromValue(new SiteContainerResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or Updates a site container for a site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sitecontainers/{containerName} + /// + /// + /// Operation Id + /// WebApps_CreateOrUpdateSiteContainer + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Container Entity. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, SiteContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _siteContainerWebAppsClientDiagnostics.CreateScope("SiteContainerResource.Update"); + scope.Start(); + try + { + var response = _siteContainerWebAppsRestClient.CreateOrUpdateSiteContainer(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var uri = _siteContainerWebAppsRestClient.CreateCreateOrUpdateSiteContainerRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppServiceArmOperation(Response.FromValue(new SiteContainerResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDeploymentCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDeploymentCollection.cs index 75d5e9d48960f..662779c1cf48b 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDeploymentCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDeploymentCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> CreateOrUpdateAs /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wai /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync(string id, /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string id, CancellationToken /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -286,7 +286,7 @@ public virtual AsyncPageable GetAllAsync(CancellationTok /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -316,7 +316,7 @@ public virtual Pageable GetAll(CancellationToken cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string id, CancellationTok /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -402,7 +402,7 @@ public virtual Response Exists(string id, CancellationToken cancellationTo /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -447,7 +447,7 @@ public virtual async Task> GetIfExistsA /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDeploymentResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDeploymentResource.cs index 88acd4b00876d..97aeec1ceb82e 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDeploymentResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDeploymentResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancellatio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken cancellati /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -269,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -317,7 +317,7 @@ public virtual async Task> UpdateAsync(Wait /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -365,7 +365,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -403,7 +403,7 @@ public virtual async Task> GetDeploymentLogAsyn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDetectorCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDetectorCollection.cs index 3ec11408df5a8..0041f023fa47c 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDetectorCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDetectorCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -112,7 +112,7 @@ public virtual async Task> GetAsync(string detect /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -160,7 +160,7 @@ public virtual Response Get(string detectorName, DateTimeO /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -190,7 +190,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -220,7 +220,7 @@ public virtual Pageable GetAll(CancellationToken cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -266,7 +266,7 @@ public virtual async Task> ExistsAsync(string detectorName, DateT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Response Exists(string detectorName, DateTimeOffset? startT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -360,7 +360,7 @@ public virtual async Task> GetIfExistsAsy /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDetectorResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDetectorResource.cs index 153df94418b41..d2c5b537b3e1b 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDetectorResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDetectorResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -144,7 +144,7 @@ public virtual async Task> GetAsync(DateTimeOffse /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDiagnosticAnalysisCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDiagnosticAnalysisCollection.cs index e0d8c2f07c439..19f1c23652039 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDiagnosticAnalysisCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDiagnosticAnalysisCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(str /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string analysisName, /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationToken /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string analysisName, Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string analysisName, CancellationToken canc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> GetI /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDiagnosticAnalysisResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDiagnosticAnalysisResource.cs index c967ab38256d9..e54943df052a4 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDiagnosticAnalysisResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDiagnosticAnalysisResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Can /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken ca /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task> ExecuteAsync(DateTimeOff /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDiagnosticCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDiagnosticCollection.cs index f4ac4284c978b..fd968b630aaec 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDiagnosticCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDiagnosticCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(string diag /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string diagnosticCategory, C /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(CancellationTok /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationToken cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string diagnosticCategory, /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string diagnosticCategory, CancellationToke /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> GetIfExistsA /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDiagnosticDetectorCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDiagnosticDetectorCollection.cs index e019f319f353a..4ab8bf337c136 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDiagnosticDetectorCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDiagnosticDetectorCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(str /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string detectorName, /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationToken /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string detectorName, Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string detectorName, CancellationToken canc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> GetI /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDiagnosticDetectorResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDiagnosticDetectorResource.cs index b7bfa465a074a..72a36f80c32dc 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDiagnosticDetectorResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDiagnosticDetectorResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Can /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken ca /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task> ExecuteAsync(Dat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDiagnosticResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDiagnosticResource.cs index 48093c35a47fc..d9691691708e3 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDiagnosticResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDiagnosticResource.cs @@ -108,7 +108,7 @@ public virtual SiteDiagnosticAnalysisCollection GetSiteDiagnosticAnalyses() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -139,7 +139,7 @@ public virtual async Task> GetSiteDiagn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -177,7 +177,7 @@ public virtual SiteDiagnosticDetectorCollection GetSiteDiagnosticDetectors() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetSiteDiagn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -239,7 +239,7 @@ public virtual Response GetSiteDiagnosticDetecto /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -279,7 +279,7 @@ public virtual async Task> GetAsync(Cancellatio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDomainOwnershipIdentifierCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDomainOwnershipIdentifierCollection.cs index 81535e42f0163..614d4c3b370b7 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDomainOwnershipIdentifierCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDomainOwnershipIdentifierCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> C /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAs /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string domain /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -286,7 +286,7 @@ public virtual AsyncPageable GetAllAsync( /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -316,7 +316,7 @@ public virtual Pageable GetAll(Cancellati /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string domainOwnershipIden /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -402,7 +402,7 @@ public virtual Response Exists(string domainOwnershipIdentifierName, Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -447,7 +447,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDomainOwnershipIdentifierResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDomainOwnershipIdentifierResource.cs index 7ca983a9fb465..dca4c6c048c1a 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDomainOwnershipIdentifierResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDomainOwnershipIdentifierResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAs /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -269,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> Updat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteExtensionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteExtensionResource.cs index a21e49914ae5b..7699297361549 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteExtensionResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteExtensionResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancellation /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken cancellatio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task> CreateOrUpdateAsy /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -273,7 +273,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wait /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> GetMSDeployLogAsync(Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteFunctionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteFunctionCollection.cs index d4d4f9c838d3f..a8212f10fd584 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteFunctionCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteFunctionCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdateAsyn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitU /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string functi /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string functionName, Cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string functionName, Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string functionName, CancellationToken canc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIfExistsAsy /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteFunctionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteFunctionResource.cs index 2e6ce018cc60e..eb3405b913933 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteFunctionResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteFunctionResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(CancellationT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken cancellation /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -270,7 +270,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -316,7 +316,7 @@ public virtual async Task> UpdateAsync(WaitUn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -362,7 +362,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, Fu /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -403,7 +403,7 @@ public virtual async Task> CreateOrUpdateFunctionSecretA /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -444,7 +444,7 @@ public virtual Response CreateOrUpdateFunctionSecret(string keyNa /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -483,7 +483,7 @@ public virtual async Task DeleteFunctionSecretAsync(string keyName, Ca /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -522,7 +522,7 @@ public virtual Response DeleteFunctionSecret(string keyName, CancellationToken c /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -560,7 +560,7 @@ public virtual async Task> GetFuncti /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -598,7 +598,7 @@ public virtual Response GetFunctionKeys(Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -636,7 +636,7 @@ public virtual async Task> GetFunctionSecretsAsync(Can /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteHostNameBindingCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteHostNameBindingCollection.cs index 3a1f963f4b9cf..49b6aa77c4dee 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteHostNameBindingCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteHostNameBindingCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> CreateOrUpd /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnti /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string hostName, Cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -286,7 +286,7 @@ public virtual AsyncPageable GetAllAsync(Cancellati /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -316,7 +316,7 @@ public virtual Pageable GetAll(CancellationToken ca /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string hostName, Cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -402,7 +402,7 @@ public virtual Response Exists(string hostName, CancellationToken cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -447,7 +447,7 @@ public virtual async Task> GetIfEx /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteHostNameBindingResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteHostNameBindingResource.cs index 6c4fb624f2985..c4f4ed051b5cb 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteHostNameBindingResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteHostNameBindingResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -269,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -317,7 +317,7 @@ public virtual async Task> UpdateAsync /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteHybridConnectionNamespaceRelayCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteHybridConnectionNamespaceRelayCollection.cs index 60f08d9ba0502..c4a538d4165fc 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteHybridConnectionNamespaceRelayCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteHybridConnectionNamespaceRelayCollection.cs @@ -61,7 +61,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -167,7 +167,7 @@ public virtual ArmOperation CreateOr /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -261,7 +261,7 @@ public virtual Response Get(string n /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -306,7 +306,7 @@ public virtual async Task> ExistsAsync(string namespaceName, stri /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -351,7 +351,7 @@ public virtual Response Exists(string namespaceName, string relayName, Can /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteHybridConnectionNamespaceRelayResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteHybridConnectionNamespaceRelayResource.cs index 96a3e1867e39d..bdd52a0b74171 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteHybridConnectionNamespaceRelayResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteHybridConnectionNamespaceRelayResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(Cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -270,7 +270,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteInstanceCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteInstanceCollection.cs index 36dae2d6e411a..cb23aef21d262 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteInstanceCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteInstanceCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(string instan /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string instanceId, Cancellatio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationToken cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string instanceId, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string instanceId, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> GetIfExistsAsy /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteInstanceExtensionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteInstanceExtensionResource.cs index 937b99c605cfd..38e4291a38d5b 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteInstanceExtensionResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteInstanceExtensionResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Canc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken can /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -228,7 +228,7 @@ public virtual async Task> CreateOrU /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -274,7 +274,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task> GetInstanceMSDeployLogAsy /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteInstanceProcessCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteInstanceProcessCollection.cs index 90426f507a88a..f381ed42334ad 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteInstanceProcessCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteInstanceProcessCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string processId, Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(Cancellati /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationToken ca /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string processId, Cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string processId, CancellationToken cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> GetIfEx /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteInstanceProcessModuleCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteInstanceProcessModuleCollection.cs index 93bdb5fd3b465..0e1e23b7bd480 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteInstanceProcessModuleCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteInstanceProcessModuleCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string baseAddres /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(Canc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationTo /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string baseAddress, Cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string baseAddress, CancellationToken cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteInstanceProcessModuleResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteInstanceProcessModuleResource.cs index 63b45f51d70dd..351bfd64cb72c 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteInstanceProcessModuleResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteInstanceProcessModuleResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteInstanceProcessResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteInstanceProcessResource.cs index ace56106a2472..5f1730a9cbd06 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteInstanceProcessResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteInstanceProcessResource.cs @@ -112,7 +112,7 @@ public virtual SiteInstanceProcessModuleCollection GetSiteInstanceProcessModules /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetSiteIn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -174,7 +174,7 @@ public virtual Response GetSiteInstanceProces /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual async Task> GetAsync(Cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -254,7 +254,7 @@ public virtual Response Get(CancellationToken cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -298,7 +298,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -342,7 +342,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -380,7 +380,7 @@ public virtual async Task> GetInstanceProcessDumpAsync(Cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -418,7 +418,7 @@ public virtual Response GetInstanceProcessDump(CancellationToken cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -448,7 +448,7 @@ public virtual AsyncPageable GetInstanceProcessThreadsAsync(C /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteInstanceResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteInstanceResource.cs index 0b6690ef8eb2f..2726ddc09f756 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteInstanceResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteInstanceResource.cs @@ -115,7 +115,7 @@ public virtual SiteInstanceProcessCollection GetSiteInstanceProcesses() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -146,7 +146,7 @@ public virtual async Task> GetSiteInstance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -177,7 +177,7 @@ public virtual Response GetSiteInstanceProcess(stri /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -217,7 +217,7 @@ public virtual async Task> GetAsync(CancellationT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteNetworkConfigResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteNetworkConfigResource.cs index 91909fe6fb29c..a9311dbcd8e4b 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteNetworkConfigResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteNetworkConfigResource.cs @@ -100,7 +100,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> GetAsync(Cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -180,7 +180,7 @@ public virtual Response Get(CancellationToken cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -269,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task> UpdateAsync(Swift /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual Response Update(SwiftVirtualNetworkDat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -404,7 +404,7 @@ public virtual async Task> CreateOrUpdat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SitePrivateEndpointConnectionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SitePrivateEndpointConnectionCollection.cs index eb9b75b1ded7b..4945012317d16 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SitePrivateEndpointConnectionCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SitePrivateEndpointConnectionCollection.cs @@ -14,7 +14,6 @@ using Autorest.CSharp.Core; using Azure.Core; using Azure.Core.Pipeline; -using Azure.ResourceManager.AppService.Models; namespace Azure.ResourceManager.AppService { @@ -65,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -75,21 +74,21 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The to use. - /// The to use. + /// The to use. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestInfo info, CancellationToken cancellationToken = default) + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string privateEndpointConnectionName, RemotePrivateEndpointConnectionARMResourceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); - Argument.AssertNotNull(info, nameof(info)); + Argument.AssertNotNull(data, nameof(data)); using var scope = _sitePrivateEndpointConnectionWebAppsClientDiagnostics.CreateScope("SitePrivateEndpointConnectionCollection.CreateOrUpdate"); scope.Start(); try { - var response = await _sitePrivateEndpointConnectionWebAppsRestClient.ApproveOrRejectPrivateEndpointConnectionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, info, cancellationToken).ConfigureAwait(false); - var operation = new AppServiceArmOperation(new SitePrivateEndpointConnectionOperationSource(Client), _sitePrivateEndpointConnectionWebAppsClientDiagnostics, Pipeline, _sitePrivateEndpointConnectionWebAppsRestClient.CreateApproveOrRejectPrivateEndpointConnectionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, info).Request, response, OperationFinalStateVia.Location); + var response = await _sitePrivateEndpointConnectionWebAppsRestClient.ApproveOrRejectPrivateEndpointConnectionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, data, cancellationToken).ConfigureAwait(false); + var operation = new AppServiceArmOperation(new SitePrivateEndpointConnectionOperationSource(Client), _sitePrivateEndpointConnectionWebAppsClientDiagnostics, Pipeline, _sitePrivateEndpointConnectionWebAppsRestClient.CreateApproveOrRejectPrivateEndpointConnectionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -114,7 +113,7 @@ public virtual async Task> C /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -124,21 +123,21 @@ public virtual async Task> C /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The to use. - /// The to use. + /// The to use. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestInfo info, CancellationToken cancellationToken = default) + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string privateEndpointConnectionName, RemotePrivateEndpointConnectionARMResourceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); - Argument.AssertNotNull(info, nameof(info)); + Argument.AssertNotNull(data, nameof(data)); using var scope = _sitePrivateEndpointConnectionWebAppsClientDiagnostics.CreateScope("SitePrivateEndpointConnectionCollection.CreateOrUpdate"); scope.Start(); try { - var response = _sitePrivateEndpointConnectionWebAppsRestClient.ApproveOrRejectPrivateEndpointConnection(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, info, cancellationToken); - var operation = new AppServiceArmOperation(new SitePrivateEndpointConnectionOperationSource(Client), _sitePrivateEndpointConnectionWebAppsClientDiagnostics, Pipeline, _sitePrivateEndpointConnectionWebAppsRestClient.CreateApproveOrRejectPrivateEndpointConnectionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, info).Request, response, OperationFinalStateVia.Location); + var response = _sitePrivateEndpointConnectionWebAppsRestClient.ApproveOrRejectPrivateEndpointConnection(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, data, cancellationToken); + var operation = new AppServiceArmOperation(new SitePrivateEndpointConnectionOperationSource(Client), _sitePrivateEndpointConnectionWebAppsClientDiagnostics, Pipeline, _sitePrivateEndpointConnectionWebAppsRestClient.CreateApproveOrRejectPrivateEndpointConnectionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -163,7 +162,7 @@ public virtual ArmOperation CreateOrUpdat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -208,7 +207,7 @@ public virtual async Task> GetAs /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -253,7 +252,7 @@ public virtual Response Get(string privat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -283,7 +282,7 @@ public virtual AsyncPageable GetAllAsync( /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -313,7 +312,7 @@ public virtual Pageable GetAll(Cancellati /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -356,7 +355,7 @@ public virtual async Task> ExistsAsync(string privateEndpointConn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -399,7 +398,7 @@ public virtual Response Exists(string privateEndpointConnectionName, Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -444,7 +443,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SitePrivateEndpointConnectionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SitePrivateEndpointConnectionResource.cs index 6463cd63c008a..233e7f61a27f1 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SitePrivateEndpointConnectionResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SitePrivateEndpointConnectionResource.cs @@ -11,7 +11,6 @@ using System.Threading.Tasks; using Azure.Core; using Azure.Core.Pipeline; -using Azure.ResourceManager.AppService.Models; namespace Azure.ResourceManager.AppService { @@ -102,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -142,7 +141,7 @@ public virtual async Task> GetAs /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -182,7 +181,7 @@ public virtual Response Get(CancellationT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -224,7 +223,7 @@ public virtual async Task> DeleteAsync(WaitUntil waitUn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -266,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, Cancellation /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -275,19 +274,19 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, Cancellation /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The to use. + /// The to use. /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, PrivateLinkConnectionApprovalRequestInfo info, CancellationToken cancellationToken = default) + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, RemotePrivateEndpointConnectionARMResourceData data, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(info, nameof(info)); + Argument.AssertNotNull(data, nameof(data)); using var scope = _sitePrivateEndpointConnectionWebAppsClientDiagnostics.CreateScope("SitePrivateEndpointConnectionResource.Update"); scope.Start(); try { - var response = await _sitePrivateEndpointConnectionWebAppsRestClient.ApproveOrRejectPrivateEndpointConnectionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, info, cancellationToken).ConfigureAwait(false); - var operation = new AppServiceArmOperation(new SitePrivateEndpointConnectionOperationSource(Client), _sitePrivateEndpointConnectionWebAppsClientDiagnostics, Pipeline, _sitePrivateEndpointConnectionWebAppsRestClient.CreateApproveOrRejectPrivateEndpointConnectionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, info).Request, response, OperationFinalStateVia.Location); + var response = await _sitePrivateEndpointConnectionWebAppsRestClient.ApproveOrRejectPrivateEndpointConnectionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new AppServiceArmOperation(new SitePrivateEndpointConnectionOperationSource(Client), _sitePrivateEndpointConnectionWebAppsClientDiagnostics, Pipeline, _sitePrivateEndpointConnectionWebAppsRestClient.CreateApproveOrRejectPrivateEndpointConnectionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -312,7 +311,7 @@ public virtual async Task> U /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -321,19 +320,19 @@ public virtual async Task> U /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The to use. + /// The to use. /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, PrivateLinkConnectionApprovalRequestInfo info, CancellationToken cancellationToken = default) + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, RemotePrivateEndpointConnectionARMResourceData data, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(info, nameof(info)); + Argument.AssertNotNull(data, nameof(data)); using var scope = _sitePrivateEndpointConnectionWebAppsClientDiagnostics.CreateScope("SitePrivateEndpointConnectionResource.Update"); scope.Start(); try { - var response = _sitePrivateEndpointConnectionWebAppsRestClient.ApproveOrRejectPrivateEndpointConnection(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, info, cancellationToken); - var operation = new AppServiceArmOperation(new SitePrivateEndpointConnectionOperationSource(Client), _sitePrivateEndpointConnectionWebAppsClientDiagnostics, Pipeline, _sitePrivateEndpointConnectionWebAppsRestClient.CreateApproveOrRejectPrivateEndpointConnectionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, info).Request, response, OperationFinalStateVia.Location); + var response = _sitePrivateEndpointConnectionWebAppsRestClient.ApproveOrRejectPrivateEndpointConnection(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new AppServiceArmOperation(new SitePrivateEndpointConnectionOperationSource(Client), _sitePrivateEndpointConnectionWebAppsClientDiagnostics, Pipeline, _sitePrivateEndpointConnectionWebAppsRestClient.CreateApproveOrRejectPrivateEndpointConnectionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteProcessCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteProcessCollection.cs index fea159cd7041c..682834cfab600 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteProcessCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteProcessCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(string process /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string processId, CancellationT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationToken cancellati /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string processId, Cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string processId, CancellationToken cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> GetIfExistsAsyn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteProcessModuleCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteProcessModuleCollection.cs index f007ca4857efd..95c3525916034 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteProcessModuleCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteProcessModuleCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(string b /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string baseAddress, Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(Cancellation /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationToken canc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string baseAddress, Cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string baseAddress, CancellationToken cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> GetIfExis /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteProcessModuleResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteProcessModuleResource.cs index 91b5ed82c7a14..48aca1f155c6c 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteProcessModuleResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteProcessModuleResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteProcessResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteProcessResource.cs index ee0f8bf894bcb..ce5a4e394d380 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteProcessResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteProcessResource.cs @@ -111,7 +111,7 @@ public virtual SiteProcessModuleCollection GetSiteProcessModules() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetSiteProcessMod /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -173,7 +173,7 @@ public virtual Response GetSiteProcessModule(string b /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task> GetAsync(CancellationTo /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(CancellationToken cancellationT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -297,7 +297,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -341,7 +341,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -379,7 +379,7 @@ public virtual async Task> GetProcessDumpAsync(CancellationToke /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -417,7 +417,7 @@ public virtual Response GetProcessDump(CancellationToken cancellationTok /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -447,7 +447,7 @@ public virtual AsyncPageable GetProcessThreadsAsync(Cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SitePublicCertificateCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SitePublicCertificateCollection.cs index deaf5ea6db443..7aa98b72e5518 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SitePublicCertificateCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SitePublicCertificateCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> CreateOrU /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync(stri /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string publicCertific /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -286,7 +286,7 @@ public virtual AsyncPageable GetAllAsync(Cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -316,7 +316,7 @@ public virtual Pageable GetAll(CancellationToken /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string publicCertificateNa /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -402,7 +402,7 @@ public virtual Response Exists(string publicCertificateName, CancellationT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -447,7 +447,7 @@ public virtual async Task> GetIf /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SitePublicCertificateResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SitePublicCertificateResource.cs index 25ecf8380869c..586d5cb97097c 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SitePublicCertificateResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SitePublicCertificateResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Canc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken can /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -269,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -317,7 +317,7 @@ public virtual async Task> UpdateAsy /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteRecommendationCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteRecommendationCollection.cs index 62270df19cab7..a4e83f2e17873 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteRecommendationCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteRecommendationCollection.cs @@ -61,7 +61,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -108,7 +108,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -155,7 +155,7 @@ public virtual Response Get(string name, bool? updat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -200,7 +200,7 @@ public virtual async Task> ExistsAsync(string name, bool? updateS /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -245,7 +245,7 @@ public virtual Response Exists(string name, bool? updateSeen = null, strin /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -292,7 +292,7 @@ public virtual async Task> GetIfExi /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteRecommendationResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteRecommendationResource.cs index acc217ec3b3f9..8c74cce78388f 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteRecommendationResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteRecommendationResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(bool? u /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -185,7 +185,7 @@ public virtual Response Get(bool? updateSeen = null, /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DisableAsync(CancellationToken cancellationT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotBackupCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotBackupCollection.cs index fbc015a9149e4..36de14a06a5f9 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotBackupCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotBackupCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(string back /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string backupId, Cancellatio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(CancellationTok /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationToken cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string backupId, Cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string backupId, CancellationToken cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> GetIfExistsA /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotBackupResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotBackupResource.cs index 85ed07c85d93f..f6db4dacdc436 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotBackupResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotBackupResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Cancellatio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken cancellati /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -271,7 +271,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual async Task> GetBackupStatusSecre /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual Response GetBackupStatusSecretsSlot(WebAp /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -401,7 +401,7 @@ public virtual async Task RestoreSlotAsync(WaitUntil waitUntil, Re /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotConfigSnapshotCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotConfigSnapshotCollection.cs index 3e01fd36c4c1d..9a8aff8a81c77 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotConfigSnapshotCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotConfigSnapshotCollection.cs @@ -61,7 +61,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -106,7 +106,7 @@ public virtual async Task> GetAsync(str /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -151,7 +151,7 @@ public virtual Response Get(string snapshotId, C /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -194,7 +194,7 @@ public virtual async Task> ExistsAsync(string snapshotId, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -237,7 +237,7 @@ public virtual Response Exists(string snapshotId, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual async Task> GetI /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotConfigSnapshotResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotConfigSnapshotResource.cs index fc9ecc2c4d186..3e52c771ba59b 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotConfigSnapshotResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotConfigSnapshotResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Can /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken ca /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -220,7 +220,7 @@ public virtual async Task RecoverSiteConfigurationSnapshotSlotAsync(Ca /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDeploymentCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDeploymentCollection.cs index 1c3f413cabf10..bd31c0ea5a048 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDeploymentCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDeploymentCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> CreateOrUpda /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string id, CancellationT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -286,7 +286,7 @@ public virtual AsyncPageable GetAllAsync(Cancellatio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -316,7 +316,7 @@ public virtual Pageable GetAll(CancellationToken can /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string id, CancellationTok /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -402,7 +402,7 @@ public virtual Response Exists(string id, CancellationToken cancellationTo /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -447,7 +447,7 @@ public virtual async Task> GetIfExi /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDeploymentResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDeploymentResource.cs index 78f2c15a21a7b..79afd50b4382f 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDeploymentResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDeploymentResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -270,7 +270,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -318,7 +318,7 @@ public virtual async Task> UpdateAsync( /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -366,7 +366,7 @@ public virtual ArmOperation Update(WaitUntil waitUnt /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -404,7 +404,7 @@ public virtual async Task> GetDeploymentLog /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDetectorCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDetectorCollection.cs index b7a26d38af72e..37f0903e2f8ec 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDetectorCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDetectorCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -112,7 +112,7 @@ public virtual async Task> GetAsync(string de /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -160,7 +160,7 @@ public virtual Response Get(string detectorName, DateT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -190,7 +190,7 @@ public virtual AsyncPageable GetAllAsync(CancellationT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -220,7 +220,7 @@ public virtual Pageable GetAll(CancellationToken cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -266,7 +266,7 @@ public virtual async Task> ExistsAsync(string detectorName, DateT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Response Exists(string detectorName, DateTimeOffset? startT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -360,7 +360,7 @@ public virtual async Task> GetIfExist /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDetectorResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDetectorResource.cs index 7ce4d805e818b..8c8c37ef83b53 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDetectorResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDetectorResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -145,7 +145,7 @@ public virtual async Task> GetAsync(DateTimeO /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDiagnosticAnalysisCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDiagnosticAnalysisCollection.cs index cb1318df2f599..7ebd6c3a289cc 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDiagnosticAnalysisCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDiagnosticAnalysisCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string analysisN /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(Can /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string analysisName, Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string analysisName, CancellationToken canc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDiagnosticAnalysisResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDiagnosticAnalysisResource.cs index f5de947ec60d6..334a6f22c53a0 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDiagnosticAnalysisResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDiagnosticAnalysisResource.cs @@ -104,7 +104,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -144,7 +144,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual Response Get(CancellationToke /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task> ExecuteSiteAnalysisSlotA /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDiagnosticCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDiagnosticCollection.cs index 63968e104fce8..e8bd4afb5bb43 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDiagnosticCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDiagnosticCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string diagnosticCategor /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(Cancellatio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationToken can /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string diagnosticCategory, /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string diagnosticCategory, CancellationToke /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> GetIfExi /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDiagnosticDetectorCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDiagnosticDetectorCollection.cs index 35a1b7ebba3e8..910f25ddf0953 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDiagnosticDetectorCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDiagnosticDetectorCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string detectorN /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(Can /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string detectorName, Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string detectorName, CancellationToken canc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDiagnosticDetectorResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDiagnosticDetectorResource.cs index 2f60a012ae60d..d97f6617cb876 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDiagnosticDetectorResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDiagnosticDetectorResource.cs @@ -104,7 +104,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -144,7 +144,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual Response Get(CancellationToke /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task> ExecuteSiteDetec /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDiagnosticResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDiagnosticResource.cs index 6acca75bb9e7f..177707511f25f 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDiagnosticResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDiagnosticResource.cs @@ -109,7 +109,7 @@ public virtual SiteSlotDiagnosticAnalysisCollection GetSiteSlotDiagnosticAnalyse /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> GetSiteS /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -178,7 +178,7 @@ public virtual SiteSlotDiagnosticDetectorCollection GetSiteSlotDiagnosticDetecto /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -209,7 +209,7 @@ public virtual async Task> GetSiteS /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -240,7 +240,7 @@ public virtual Response GetSiteSlotDiagnosti /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -280,7 +280,7 @@ public virtual async Task> GetAsync(Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDomainOwnershipIdentifierCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDomainOwnershipIdentifierCollection.cs index c713176fe96c9..83e7a952dd34d 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDomainOwnershipIdentifierCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDomainOwnershipIdentifierCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrU /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string do /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -286,7 +286,7 @@ public virtual AsyncPageable GetAllAs /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -316,7 +316,7 @@ public virtual Pageable GetAll(Cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string domainOwnershipIden /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -402,7 +402,7 @@ public virtual Response Exists(string domainOwnershipIdentifierName, Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -447,7 +447,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDomainOwnershipIdentifierResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDomainOwnershipIdentifierResource.cs index e627ca854917c..412e9badc61f0 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDomainOwnershipIdentifierResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDomainOwnershipIdentifierResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(Cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -270,7 +270,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task> U /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotExtensionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotExtensionResource.cs index f0f711b939e9c..74f6941d8ad55 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotExtensionResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotExtensionResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -228,7 +228,7 @@ public virtual async Task> CreateOrUpdat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -274,7 +274,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task> GetMSDeployLogSlotAsync(C /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotFunctionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotFunctionCollection.cs index 716aecd5cbc35..dbb31bf39052d 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotFunctionCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotFunctionCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdate /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil w /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string fu /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string functionName, Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(CancellationT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string functionName, Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string functionName, CancellationToken canc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIfExist /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotFunctionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotFunctionResource.cs index 10dac1787745b..c17daa47a6265 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotFunctionResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotFunctionResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -271,7 +271,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -317,7 +317,7 @@ public virtual async Task> UpdateAsync(Wa /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -363,7 +363,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -404,7 +404,7 @@ public virtual async Task> CreateOrUpdateFunctionSecretS /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -445,7 +445,7 @@ public virtual Response CreateOrUpdateFunctionSecretSlot(string k /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -484,7 +484,7 @@ public virtual async Task DeleteFunctionSecretSlotAsync(string keyName /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -523,7 +523,7 @@ public virtual Response DeleteFunctionSecretSlot(string keyName, CancellationTok /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -561,7 +561,7 @@ public virtual async Task> GetFuncti /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -599,7 +599,7 @@ public virtual Response GetFunctionKeysSlot(C /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -637,7 +637,7 @@ public virtual async Task> GetFunctionSecretsSlotAsync /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotHostNameBindingCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotHostNameBindingCollection.cs index 15535cb32e00f..d1833f4f0bb7a 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotHostNameBindingCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotHostNameBindingCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> CreateO /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate(Wait /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync(st /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string hostName, Ca /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -286,7 +286,7 @@ public virtual AsyncPageable GetAllAsync(Cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -316,7 +316,7 @@ public virtual Pageable GetAll(CancellationToke /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string hostName, Cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -402,7 +402,7 @@ public virtual Response Exists(string hostName, CancellationToken cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -447,7 +447,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotHostNameBindingResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotHostNameBindingResource.cs index efecbf449f0fc..caf08333359b3 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotHostNameBindingResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotHostNameBindingResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Ca /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken c /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -270,7 +270,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -318,7 +318,7 @@ public virtual async Task> UpdateA /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotHybridConnectionNamespaceRelayCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotHybridConnectionNamespaceRelayCollection.cs index fb83c18eb9f2f..d45054ac32c95 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotHybridConnectionNamespaceRelayCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotHybridConnectionNamespaceRelayCollection.cs @@ -61,7 +61,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -167,7 +167,7 @@ public virtual ArmOperation Crea /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -261,7 +261,7 @@ public virtual Response Get(stri /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -306,7 +306,7 @@ public virtual async Task> ExistsAsync(string namespaceName, stri /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -351,7 +351,7 @@ public virtual Response Exists(string namespaceName, string relayName, Can /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotHybridConnectionNamespaceRelayResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotHybridConnectionNamespaceRelayResource.cs index 6ecaac3000514..bffe8f1385b4f 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotHybridConnectionNamespaceRelayResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotHybridConnectionNamespaceRelayResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(Canc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -271,7 +271,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotInstanceCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotInstanceCollection.cs index 24976e8edf9fe..831b0e78cd071 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotInstanceCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotInstanceCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(string in /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string instanceId, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(CancellationT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationToken cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string instanceId, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string instanceId, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> GetIfExist /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotInstanceExtensionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotInstanceExtensionResource.cs index b51af8053fbf8..80a69726d4d17 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotInstanceExtensionResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotInstanceExtensionResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -229,7 +229,7 @@ public virtual async Task> Creat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -275,7 +275,7 @@ public virtual ArmOperation CreateOrUpdate(Wa /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual async Task> GetInstanceMSDeployLogSlo /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotInstanceProcessCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotInstanceProcessCollection.cs index f7246a9095d98..f2d37089f0d2e 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotInstanceProcessCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotInstanceProcessCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(st /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string processId, C /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(Cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationToke /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string processId, Cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string processId, CancellationToken cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotInstanceProcessModuleCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotInstanceProcessModuleCollection.cs index 5d3a836c36463..0caf71b75c4e6 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotInstanceProcessModuleCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotInstanceProcessModuleCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAs /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string baseAd /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync( /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(Cancellati /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string baseAddress, Cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string baseAddress, CancellationToken cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotInstanceProcessModuleResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotInstanceProcessModuleResource.cs index 0ff7df93e8105..1c3a102ef0ba2 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotInstanceProcessModuleResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotInstanceProcessModuleResource.cs @@ -104,7 +104,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -144,7 +144,7 @@ public virtual async Task> GetAs /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotInstanceProcessResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotInstanceProcessResource.cs index 75bece9420af0..a5910f651ca47 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotInstanceProcessResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotInstanceProcessResource.cs @@ -113,7 +113,7 @@ public virtual SiteSlotInstanceProcessModuleCollection GetSiteSlotInstanceProces /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -144,7 +144,7 @@ public virtual async Task> GetSi /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -175,7 +175,7 @@ public virtual Response GetSiteSlotInstan /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -215,7 +215,7 @@ public virtual async Task> GetAsync(Ca /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -255,7 +255,7 @@ public virtual Response Get(CancellationToken c /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -299,7 +299,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -343,7 +343,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -381,7 +381,7 @@ public virtual async Task> GetInstanceProcessDumpSlotAsync(Canc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -419,7 +419,7 @@ public virtual Response GetInstanceProcessDumpSlot(CancellationToken can /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -449,7 +449,7 @@ public virtual AsyncPageable GetInstanceProcessThreadsSlotAsy /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotInstanceResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotInstanceResource.cs index 35b585dcbc9b9..e55cb542ddc65 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotInstanceResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotInstanceResource.cs @@ -116,7 +116,7 @@ public virtual SiteSlotInstanceProcessCollection GetSiteSlotInstanceProcesses() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -147,7 +147,7 @@ public virtual async Task> GetSiteSlot /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -178,7 +178,7 @@ public virtual Response GetSiteSlotInstanceProc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -218,7 +218,7 @@ public virtual async Task> GetAsync(Cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotNetworkConfigResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotNetworkConfigResource.cs index 303be6ffa5ccd..4faa7d6cfeb69 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotNetworkConfigResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotNetworkConfigResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Canc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken can /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -270,7 +270,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual async Task> UpdateAsync(S /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual Response Update(SwiftVirtualNetwor /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -405,7 +405,7 @@ public virtual async Task> CreateOrU /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotPrivateEndpointConnectionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotPrivateEndpointConnectionCollection.cs index 5ba9e28f1878d..25c2dc638e1d1 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotPrivateEndpointConnectionCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotPrivateEndpointConnectionCollection.cs @@ -14,7 +14,6 @@ using Autorest.CSharp.Core; using Azure.Core; using Azure.Core.Pipeline; -using Azure.ResourceManager.AppService.Models; namespace Azure.ResourceManager.AppService { @@ -65,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -75,21 +74,21 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The to use. - /// The to use. + /// The to use. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestInfo info, CancellationToken cancellationToken = default) + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string privateEndpointConnectionName, RemotePrivateEndpointConnectionARMResourceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); - Argument.AssertNotNull(info, nameof(info)); + Argument.AssertNotNull(data, nameof(data)); using var scope = _siteSlotPrivateEndpointConnectionWebAppsClientDiagnostics.CreateScope("SiteSlotPrivateEndpointConnectionCollection.CreateOrUpdate"); scope.Start(); try { - var response = await _siteSlotPrivateEndpointConnectionWebAppsRestClient.ApproveOrRejectPrivateEndpointConnectionSlotAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, privateEndpointConnectionName, info, cancellationToken).ConfigureAwait(false); - var operation = new AppServiceArmOperation(new SiteSlotPrivateEndpointConnectionOperationSource(Client), _siteSlotPrivateEndpointConnectionWebAppsClientDiagnostics, Pipeline, _siteSlotPrivateEndpointConnectionWebAppsRestClient.CreateApproveOrRejectPrivateEndpointConnectionSlotRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, privateEndpointConnectionName, info).Request, response, OperationFinalStateVia.Location); + var response = await _siteSlotPrivateEndpointConnectionWebAppsRestClient.ApproveOrRejectPrivateEndpointConnectionSlotAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, privateEndpointConnectionName, data, cancellationToken).ConfigureAwait(false); + var operation = new AppServiceArmOperation(new SiteSlotPrivateEndpointConnectionOperationSource(Client), _siteSlotPrivateEndpointConnectionWebAppsClientDiagnostics, Pipeline, _siteSlotPrivateEndpointConnectionWebAppsRestClient.CreateApproveOrRejectPrivateEndpointConnectionSlotRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, privateEndpointConnectionName, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -114,7 +113,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -124,21 +123,21 @@ public virtual async Task /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The to use. - /// The to use. + /// The to use. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestInfo info, CancellationToken cancellationToken = default) + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string privateEndpointConnectionName, RemotePrivateEndpointConnectionARMResourceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); - Argument.AssertNotNull(info, nameof(info)); + Argument.AssertNotNull(data, nameof(data)); using var scope = _siteSlotPrivateEndpointConnectionWebAppsClientDiagnostics.CreateScope("SiteSlotPrivateEndpointConnectionCollection.CreateOrUpdate"); scope.Start(); try { - var response = _siteSlotPrivateEndpointConnectionWebAppsRestClient.ApproveOrRejectPrivateEndpointConnectionSlot(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, privateEndpointConnectionName, info, cancellationToken); - var operation = new AppServiceArmOperation(new SiteSlotPrivateEndpointConnectionOperationSource(Client), _siteSlotPrivateEndpointConnectionWebAppsClientDiagnostics, Pipeline, _siteSlotPrivateEndpointConnectionWebAppsRestClient.CreateApproveOrRejectPrivateEndpointConnectionSlotRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, privateEndpointConnectionName, info).Request, response, OperationFinalStateVia.Location); + var response = _siteSlotPrivateEndpointConnectionWebAppsRestClient.ApproveOrRejectPrivateEndpointConnectionSlot(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, privateEndpointConnectionName, data, cancellationToken); + var operation = new AppServiceArmOperation(new SiteSlotPrivateEndpointConnectionOperationSource(Client), _siteSlotPrivateEndpointConnectionWebAppsClientDiagnostics, Pipeline, _siteSlotPrivateEndpointConnectionWebAppsRestClient.CreateApproveOrRejectPrivateEndpointConnectionSlotRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, privateEndpointConnectionName, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -163,7 +162,7 @@ public virtual ArmOperation CreateOrU /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -208,7 +207,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -253,7 +252,7 @@ public virtual Response Get(string pr /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -283,7 +282,7 @@ public virtual AsyncPageable GetAllAs /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -313,7 +312,7 @@ public virtual Pageable GetAll(Cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -356,7 +355,7 @@ public virtual async Task> ExistsAsync(string privateEndpointConn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -399,7 +398,7 @@ public virtual Response Exists(string privateEndpointConnectionName, Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -444,7 +443,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotPrivateEndpointConnectionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotPrivateEndpointConnectionResource.cs index b864676e01aab..6b0395a103a66 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotPrivateEndpointConnectionResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotPrivateEndpointConnectionResource.cs @@ -11,7 +11,6 @@ using System.Threading.Tasks; using Azure.Core; using Azure.Core.Pipeline; -using Azure.ResourceManager.AppService.Models; namespace Azure.ResourceManager.AppService { @@ -103,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -143,7 +142,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -183,7 +182,7 @@ public virtual Response Get(Cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -225,7 +224,7 @@ public virtual async Task> DeleteAsync(WaitUntil waitUn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -267,7 +266,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, Cancellation /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -276,19 +275,19 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, Cancellation /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The to use. + /// The to use. /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, PrivateLinkConnectionApprovalRequestInfo info, CancellationToken cancellationToken = default) + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, RemotePrivateEndpointConnectionARMResourceData data, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(info, nameof(info)); + Argument.AssertNotNull(data, nameof(data)); using var scope = _siteSlotPrivateEndpointConnectionWebAppsClientDiagnostics.CreateScope("SiteSlotPrivateEndpointConnectionResource.Update"); scope.Start(); try { - var response = await _siteSlotPrivateEndpointConnectionWebAppsRestClient.ApproveOrRejectPrivateEndpointConnectionSlotAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, info, cancellationToken).ConfigureAwait(false); - var operation = new AppServiceArmOperation(new SiteSlotPrivateEndpointConnectionOperationSource(Client), _siteSlotPrivateEndpointConnectionWebAppsClientDiagnostics, Pipeline, _siteSlotPrivateEndpointConnectionWebAppsRestClient.CreateApproveOrRejectPrivateEndpointConnectionSlotRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, info).Request, response, OperationFinalStateVia.Location); + var response = await _siteSlotPrivateEndpointConnectionWebAppsRestClient.ApproveOrRejectPrivateEndpointConnectionSlotAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new AppServiceArmOperation(new SiteSlotPrivateEndpointConnectionOperationSource(Client), _siteSlotPrivateEndpointConnectionWebAppsClientDiagnostics, Pipeline, _siteSlotPrivateEndpointConnectionWebAppsRestClient.CreateApproveOrRejectPrivateEndpointConnectionSlotRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -313,7 +312,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -322,19 +321,19 @@ public virtual async Task /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The to use. + /// The to use. /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, PrivateLinkConnectionApprovalRequestInfo info, CancellationToken cancellationToken = default) + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, RemotePrivateEndpointConnectionARMResourceData data, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(info, nameof(info)); + Argument.AssertNotNull(data, nameof(data)); using var scope = _siteSlotPrivateEndpointConnectionWebAppsClientDiagnostics.CreateScope("SiteSlotPrivateEndpointConnectionResource.Update"); scope.Start(); try { - var response = _siteSlotPrivateEndpointConnectionWebAppsRestClient.ApproveOrRejectPrivateEndpointConnectionSlot(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, info, cancellationToken); - var operation = new AppServiceArmOperation(new SiteSlotPrivateEndpointConnectionOperationSource(Client), _siteSlotPrivateEndpointConnectionWebAppsClientDiagnostics, Pipeline, _siteSlotPrivateEndpointConnectionWebAppsRestClient.CreateApproveOrRejectPrivateEndpointConnectionSlotRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, info).Request, response, OperationFinalStateVia.Location); + var response = _siteSlotPrivateEndpointConnectionWebAppsRestClient.ApproveOrRejectPrivateEndpointConnectionSlot(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new AppServiceArmOperation(new SiteSlotPrivateEndpointConnectionOperationSource(Client), _siteSlotPrivateEndpointConnectionWebAppsClientDiagnostics, Pipeline, _siteSlotPrivateEndpointConnectionWebAppsRestClient.CreateApproveOrRejectPrivateEndpointConnectionSlotRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotProcessCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotProcessCollection.cs index 78d514900b84d..f0fd85c62bfd4 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotProcessCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotProcessCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(string pro /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string processId, Cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(CancellationTo /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string processId, Cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string processId, CancellationToken cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> GetIfExists /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotProcessModuleCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotProcessModuleCollection.cs index f6306d378e9ba..0025e8a89b4d0 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotProcessModuleCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotProcessModuleCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(stri /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string baseAddress, C /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(Cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationToken /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string baseAddress, Cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string baseAddress, CancellationToken cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> GetIf /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotProcessModuleResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotProcessModuleResource.cs index f5c7eebd8b76f..af7bf2d647f65 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotProcessModuleResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotProcessModuleResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Canc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotProcessResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotProcessResource.cs index 6fc69b1fd23ea..8e7d68abbabe0 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotProcessResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotProcessResource.cs @@ -112,7 +112,7 @@ public virtual SiteSlotProcessModuleCollection GetSiteSlotProcessModules() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetSiteSlotPr /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -174,7 +174,7 @@ public virtual Response GetSiteSlotProcessModule( /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual async Task> GetAsync(Cancellati /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -254,7 +254,7 @@ public virtual Response Get(CancellationToken cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -298,7 +298,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -342,7 +342,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -380,7 +380,7 @@ public virtual async Task> GetProcessDumpSlotAsync(Cancellation /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -418,7 +418,7 @@ public virtual Response GetProcessDumpSlot(CancellationToken cancellatio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -448,7 +448,7 @@ public virtual AsyncPageable GetProcessThreadsSlotAsync(Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotSiteContainerCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotSiteContainerCollection.cs new file mode 100644 index 0000000000000..9d2c322ad1f97 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotSiteContainerCollection.cs @@ -0,0 +1,497 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetSiteSlotSiteContainers method from an instance of . + /// + public partial class SiteSlotSiteContainerCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _siteSlotSiteContainerWebAppsClientDiagnostics; + private readonly WebAppsRestOperations _siteSlotSiteContainerWebAppsRestClient; + + /// Initializes a new instance of the class for mocking. + protected SiteSlotSiteContainerCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal SiteSlotSiteContainerCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _siteSlotSiteContainerWebAppsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppService", SiteSlotSiteContainerResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(SiteSlotSiteContainerResource.ResourceType, out string siteSlotSiteContainerWebAppsApiVersion); + _siteSlotSiteContainerWebAppsRestClient = new WebAppsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, siteSlotSiteContainerWebAppsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != WebSiteSlotResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, WebSiteSlotResource.ResourceType), nameof(id)); + } + + /// + /// Creates or Updates a site container for a site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sitecontainers/{containerName} + /// + /// + /// Operation Id + /// WebApps_CreateOrUpdateSiteContainerSlot + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Site Container Name. + /// Container Entity. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string containerName, SiteContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(containerName, nameof(containerName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _siteSlotSiteContainerWebAppsClientDiagnostics.CreateScope("SiteSlotSiteContainerCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _siteSlotSiteContainerWebAppsRestClient.CreateOrUpdateSiteContainerSlotAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, containerName, data, cancellationToken).ConfigureAwait(false); + var uri = _siteSlotSiteContainerWebAppsRestClient.CreateCreateOrUpdateSiteContainerSlotRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, containerName, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppServiceArmOperation(Response.FromValue(new SiteSlotSiteContainerResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or Updates a site container for a site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sitecontainers/{containerName} + /// + /// + /// Operation Id + /// WebApps_CreateOrUpdateSiteContainerSlot + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Site Container Name. + /// Container Entity. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string containerName, SiteContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(containerName, nameof(containerName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _siteSlotSiteContainerWebAppsClientDiagnostics.CreateScope("SiteSlotSiteContainerCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _siteSlotSiteContainerWebAppsRestClient.CreateOrUpdateSiteContainerSlot(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, containerName, data, cancellationToken); + var uri = _siteSlotSiteContainerWebAppsRestClient.CreateCreateOrUpdateSiteContainerSlotRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, containerName, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppServiceArmOperation(Response.FromValue(new SiteSlotSiteContainerResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a site container of a site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sitecontainers/{containerName} + /// + /// + /// Operation Id + /// WebApps_GetSiteContainerSlot + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Site Container Name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string containerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(containerName, nameof(containerName)); + + using var scope = _siteSlotSiteContainerWebAppsClientDiagnostics.CreateScope("SiteSlotSiteContainerCollection.Get"); + scope.Start(); + try + { + var response = await _siteSlotSiteContainerWebAppsRestClient.GetSiteContainerSlotAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, containerName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SiteSlotSiteContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a site container of a site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sitecontainers/{containerName} + /// + /// + /// Operation Id + /// WebApps_GetSiteContainerSlot + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Site Container Name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string containerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(containerName, nameof(containerName)); + + using var scope = _siteSlotSiteContainerWebAppsClientDiagnostics.CreateScope("SiteSlotSiteContainerCollection.Get"); + scope.Start(); + try + { + var response = _siteSlotSiteContainerWebAppsRestClient.GetSiteContainerSlot(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, containerName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SiteSlotSiteContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists all the site containers of a site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sitecontainers + /// + /// + /// Operation Id + /// WebApps_ListSiteContainersSlot + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _siteSlotSiteContainerWebAppsRestClient.CreateListSiteContainersSlotRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _siteSlotSiteContainerWebAppsRestClient.CreateListSiteContainersSlotNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new SiteSlotSiteContainerResource(Client, SiteContainerData.DeserializeSiteContainerData(e)), _siteSlotSiteContainerWebAppsClientDiagnostics, Pipeline, "SiteSlotSiteContainerCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Lists all the site containers of a site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sitecontainers + /// + /// + /// Operation Id + /// WebApps_ListSiteContainersSlot + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _siteSlotSiteContainerWebAppsRestClient.CreateListSiteContainersSlotRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _siteSlotSiteContainerWebAppsRestClient.CreateListSiteContainersSlotNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new SiteSlotSiteContainerResource(Client, SiteContainerData.DeserializeSiteContainerData(e)), _siteSlotSiteContainerWebAppsClientDiagnostics, Pipeline, "SiteSlotSiteContainerCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sitecontainers/{containerName} + /// + /// + /// Operation Id + /// WebApps_GetSiteContainerSlot + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Site Container Name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string containerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(containerName, nameof(containerName)); + + using var scope = _siteSlotSiteContainerWebAppsClientDiagnostics.CreateScope("SiteSlotSiteContainerCollection.Exists"); + scope.Start(); + try + { + var response = await _siteSlotSiteContainerWebAppsRestClient.GetSiteContainerSlotAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, containerName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sitecontainers/{containerName} + /// + /// + /// Operation Id + /// WebApps_GetSiteContainerSlot + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Site Container Name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string containerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(containerName, nameof(containerName)); + + using var scope = _siteSlotSiteContainerWebAppsClientDiagnostics.CreateScope("SiteSlotSiteContainerCollection.Exists"); + scope.Start(); + try + { + var response = _siteSlotSiteContainerWebAppsRestClient.GetSiteContainerSlot(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, containerName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sitecontainers/{containerName} + /// + /// + /// Operation Id + /// WebApps_GetSiteContainerSlot + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Site Container Name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string containerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(containerName, nameof(containerName)); + + using var scope = _siteSlotSiteContainerWebAppsClientDiagnostics.CreateScope("SiteSlotSiteContainerCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _siteSlotSiteContainerWebAppsRestClient.GetSiteContainerSlotAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, containerName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new SiteSlotSiteContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sitecontainers/{containerName} + /// + /// + /// Operation Id + /// WebApps_GetSiteContainerSlot + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Site Container Name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string containerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(containerName, nameof(containerName)); + + using var scope = _siteSlotSiteContainerWebAppsClientDiagnostics.CreateScope("SiteSlotSiteContainerCollection.GetIfExists"); + scope.Start(); + try + { + var response = _siteSlotSiteContainerWebAppsRestClient.GetSiteContainerSlot(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, containerName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new SiteSlotSiteContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotSiteContainerResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotSiteContainerResource.Serialization.cs new file mode 100644 index 0000000000000..5e7258284f263 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotSiteContainerResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.AppService +{ + public partial class SiteSlotSiteContainerResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + SiteContainerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + SiteContainerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotSiteContainerResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotSiteContainerResource.cs new file mode 100644 index 0000000000000..348f685a596b2 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotSiteContainerResource.cs @@ -0,0 +1,356 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A Class representing a SiteSlotSiteContainer along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetSiteSlotSiteContainerResource method. + /// Otherwise you can get one from its parent resource using the GetSiteSlotSiteContainer method. + /// + public partial class SiteSlotSiteContainerResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The name. + /// The slot. + /// The containerName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name, string slot, string containerName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sitecontainers/{containerName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _siteSlotSiteContainerWebAppsClientDiagnostics; + private readonly WebAppsRestOperations _siteSlotSiteContainerWebAppsRestClient; + private readonly SiteContainerData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Web/sites/slots/sitecontainers"; + + /// Initializes a new instance of the class for mocking. + protected SiteSlotSiteContainerResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal SiteSlotSiteContainerResource(ArmClient client, SiteContainerData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal SiteSlotSiteContainerResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _siteSlotSiteContainerWebAppsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppService", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string siteSlotSiteContainerWebAppsApiVersion); + _siteSlotSiteContainerWebAppsRestClient = new WebAppsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, siteSlotSiteContainerWebAppsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual SiteContainerData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Gets a site container of a site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sitecontainers/{containerName} + /// + /// + /// Operation Id + /// WebApps_GetSiteContainerSlot + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _siteSlotSiteContainerWebAppsClientDiagnostics.CreateScope("SiteSlotSiteContainerResource.Get"); + scope.Start(); + try + { + var response = await _siteSlotSiteContainerWebAppsRestClient.GetSiteContainerSlotAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SiteSlotSiteContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a site container of a site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sitecontainers/{containerName} + /// + /// + /// Operation Id + /// WebApps_GetSiteContainerSlot + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _siteSlotSiteContainerWebAppsClientDiagnostics.CreateScope("SiteSlotSiteContainerResource.Get"); + scope.Start(); + try + { + var response = _siteSlotSiteContainerWebAppsRestClient.GetSiteContainerSlot(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SiteSlotSiteContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes a site container for a site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sitecontainers/{containerName} + /// + /// + /// Operation Id + /// WebApps_DeleteSiteContainerSlot + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _siteSlotSiteContainerWebAppsClientDiagnostics.CreateScope("SiteSlotSiteContainerResource.Delete"); + scope.Start(); + try + { + var response = await _siteSlotSiteContainerWebAppsRestClient.DeleteSiteContainerSlotAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var uri = _siteSlotSiteContainerWebAppsRestClient.CreateDeleteSiteContainerSlotRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppServiceArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes a site container for a site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sitecontainers/{containerName} + /// + /// + /// Operation Id + /// WebApps_DeleteSiteContainerSlot + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _siteSlotSiteContainerWebAppsClientDiagnostics.CreateScope("SiteSlotSiteContainerResource.Delete"); + scope.Start(); + try + { + var response = _siteSlotSiteContainerWebAppsRestClient.DeleteSiteContainerSlot(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var uri = _siteSlotSiteContainerWebAppsRestClient.CreateDeleteSiteContainerSlotRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppServiceArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or Updates a site container for a site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sitecontainers/{containerName} + /// + /// + /// Operation Id + /// WebApps_CreateOrUpdateSiteContainerSlot + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Container Entity. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, SiteContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _siteSlotSiteContainerWebAppsClientDiagnostics.CreateScope("SiteSlotSiteContainerResource.Update"); + scope.Start(); + try + { + var response = await _siteSlotSiteContainerWebAppsRestClient.CreateOrUpdateSiteContainerSlotAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var uri = _siteSlotSiteContainerWebAppsRestClient.CreateCreateOrUpdateSiteContainerSlotRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppServiceArmOperation(Response.FromValue(new SiteSlotSiteContainerResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or Updates a site container for a site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sitecontainers/{containerName} + /// + /// + /// Operation Id + /// WebApps_CreateOrUpdateSiteContainerSlot + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Container Entity. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, SiteContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _siteSlotSiteContainerWebAppsClientDiagnostics.CreateScope("SiteSlotSiteContainerResource.Update"); + scope.Start(); + try + { + var response = _siteSlotSiteContainerWebAppsRestClient.CreateOrUpdateSiteContainerSlot(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); + var uri = _siteSlotSiteContainerWebAppsRestClient.CreateCreateOrUpdateSiteContainerSlotRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppServiceArmOperation(Response.FromValue(new SiteSlotSiteContainerResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotVirtualNetworkConnectionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotVirtualNetworkConnectionCollection.cs index fdb07f08c8d6a..52d0266b11022 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotVirtualNetworkConnectionCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotVirtualNetworkConnectionCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUp /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string vne /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -285,7 +285,7 @@ public virtual AsyncPageable GetAllAsy /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -314,7 +314,7 @@ public virtual Pageable GetAll(Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -357,7 +357,7 @@ public virtual async Task> ExistsAsync(string vnetName, Cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -400,7 +400,7 @@ public virtual Response Exists(string vnetName, CancellationToken cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -445,7 +445,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotVirtualNetworkConnectionGatewayCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotVirtualNetworkConnectionGatewayCollection.cs index 369ddc77253ce..ac0016e07f55e 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotVirtualNetworkConnectionGatewayCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotVirtualNetworkConnectionGatewayCollection.cs @@ -61,7 +61,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -112,7 +112,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation Cre /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(str /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -296,7 +296,7 @@ public virtual async Task> ExistsAsync(string gatewayName, Cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -339,7 +339,7 @@ public virtual Response Exists(string gatewayName, CancellationToken cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -384,7 +384,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotVirtualNetworkConnectionGatewayResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotVirtualNetworkConnectionGatewayResource.cs index c475921495584..0d3ec0797cf40 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotVirtualNetworkConnectionGatewayResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotVirtualNetworkConnectionGatewayResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(Can /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotVirtualNetworkConnectionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotVirtualNetworkConnectionResource.cs index cef5b34f08027..056cc3c8ffb2d 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotVirtualNetworkConnectionResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotVirtualNetworkConnectionResource.cs @@ -109,7 +109,7 @@ public virtual SiteSlotVirtualNetworkConnectionGatewayCollection GetSiteSlotVirt /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -171,7 +171,7 @@ public virtual Response GetSite /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -251,7 +251,7 @@ public virtual Response Get(Cancellati /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -295,7 +295,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -339,7 +339,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -381,7 +381,7 @@ public virtual async Task> Up /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotWorkflowCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotWorkflowCollection.cs new file mode 100644 index 0000000000000..2d38dca174869 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotWorkflowCollection.cs @@ -0,0 +1,395 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetSiteSlotWorkflows method from an instance of . + /// + public partial class SiteSlotWorkflowCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _siteSlotWorkflowWebAppsClientDiagnostics; + private readonly WebAppsRestOperations _siteSlotWorkflowWebAppsRestClient; + + /// Initializes a new instance of the class for mocking. + protected SiteSlotWorkflowCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal SiteSlotWorkflowCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _siteSlotWorkflowWebAppsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppService", SiteSlotWorkflowResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(SiteSlotWorkflowResource.ResourceType, out string siteSlotWorkflowWebAppsApiVersion); + _siteSlotWorkflowWebAppsRestClient = new WebAppsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, siteSlotWorkflowWebAppsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != WebSiteSlotResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, WebSiteSlotResource.ResourceType), nameof(id)); + } + + /// + /// Get workflow information by its ID for web site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/workflows/{workflowName} + /// + /// + /// Operation Id + /// WebApps_GetInstanceWorkflowSlot + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Workflow name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string workflowName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + + using var scope = _siteSlotWorkflowWebAppsClientDiagnostics.CreateScope("SiteSlotWorkflowCollection.Get"); + scope.Start(); + try + { + var response = await _siteSlotWorkflowWebAppsRestClient.GetInstanceWorkflowSlotAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, workflowName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SiteSlotWorkflowResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get workflow information by its ID for web site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/workflows/{workflowName} + /// + /// + /// Operation Id + /// WebApps_GetInstanceWorkflowSlot + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Workflow name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string workflowName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + + using var scope = _siteSlotWorkflowWebAppsClientDiagnostics.CreateScope("SiteSlotWorkflowCollection.Get"); + scope.Start(); + try + { + var response = _siteSlotWorkflowWebAppsRestClient.GetInstanceWorkflowSlot(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, workflowName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SiteSlotWorkflowResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List the workflows for a web site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/workflows + /// + /// + /// Operation Id + /// WebApps_ListInstanceWorkflowsSlot + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _siteSlotWorkflowWebAppsRestClient.CreateListInstanceWorkflowsSlotRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _siteSlotWorkflowWebAppsRestClient.CreateListInstanceWorkflowsSlotNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new SiteSlotWorkflowResource(Client, WorkflowEnvelopeData.DeserializeWorkflowEnvelopeData(e)), _siteSlotWorkflowWebAppsClientDiagnostics, Pipeline, "SiteSlotWorkflowCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List the workflows for a web site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/workflows + /// + /// + /// Operation Id + /// WebApps_ListInstanceWorkflowsSlot + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _siteSlotWorkflowWebAppsRestClient.CreateListInstanceWorkflowsSlotRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _siteSlotWorkflowWebAppsRestClient.CreateListInstanceWorkflowsSlotNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new SiteSlotWorkflowResource(Client, WorkflowEnvelopeData.DeserializeWorkflowEnvelopeData(e)), _siteSlotWorkflowWebAppsClientDiagnostics, Pipeline, "SiteSlotWorkflowCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/workflows/{workflowName} + /// + /// + /// Operation Id + /// WebApps_GetInstanceWorkflowSlot + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Workflow name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string workflowName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + + using var scope = _siteSlotWorkflowWebAppsClientDiagnostics.CreateScope("SiteSlotWorkflowCollection.Exists"); + scope.Start(); + try + { + var response = await _siteSlotWorkflowWebAppsRestClient.GetInstanceWorkflowSlotAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, workflowName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/workflows/{workflowName} + /// + /// + /// Operation Id + /// WebApps_GetInstanceWorkflowSlot + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Workflow name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string workflowName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + + using var scope = _siteSlotWorkflowWebAppsClientDiagnostics.CreateScope("SiteSlotWorkflowCollection.Exists"); + scope.Start(); + try + { + var response = _siteSlotWorkflowWebAppsRestClient.GetInstanceWorkflowSlot(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, workflowName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/workflows/{workflowName} + /// + /// + /// Operation Id + /// WebApps_GetInstanceWorkflowSlot + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Workflow name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string workflowName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + + using var scope = _siteSlotWorkflowWebAppsClientDiagnostics.CreateScope("SiteSlotWorkflowCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _siteSlotWorkflowWebAppsRestClient.GetInstanceWorkflowSlotAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, workflowName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new SiteSlotWorkflowResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/workflows/{workflowName} + /// + /// + /// Operation Id + /// WebApps_GetInstanceWorkflowSlot + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Workflow name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string workflowName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + + using var scope = _siteSlotWorkflowWebAppsClientDiagnostics.CreateScope("SiteSlotWorkflowCollection.GetIfExists"); + scope.Start(); + try + { + var response = _siteSlotWorkflowWebAppsRestClient.GetInstanceWorkflowSlot(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, workflowName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new SiteSlotWorkflowResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotWorkflowResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotWorkflowResource.Serialization.cs new file mode 100644 index 0000000000000..4061c6ab3efc7 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotWorkflowResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.AppService +{ + public partial class SiteSlotWorkflowResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + WorkflowEnvelopeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + WorkflowEnvelopeData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotWorkflowResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotWorkflowResource.cs new file mode 100644 index 0000000000000..dc7ccc097128c --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotWorkflowResource.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A Class representing a SiteSlotWorkflow along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetSiteSlotWorkflowResource method. + /// Otherwise you can get one from its parent resource using the GetSiteSlotWorkflow method. + /// + public partial class SiteSlotWorkflowResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The name. + /// The slot. + /// The workflowName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name, string slot, string workflowName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/workflows/{workflowName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _siteSlotWorkflowWebAppsClientDiagnostics; + private readonly WebAppsRestOperations _siteSlotWorkflowWebAppsRestClient; + private readonly WorkflowEnvelopeData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Web/sites/slots/workflows"; + + /// Initializes a new instance of the class for mocking. + protected SiteSlotWorkflowResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal SiteSlotWorkflowResource(ArmClient client, WorkflowEnvelopeData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal SiteSlotWorkflowResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _siteSlotWorkflowWebAppsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppService", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string siteSlotWorkflowWebAppsApiVersion); + _siteSlotWorkflowWebAppsRestClient = new WebAppsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, siteSlotWorkflowWebAppsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual WorkflowEnvelopeData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get workflow information by its ID for web site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/workflows/{workflowName} + /// + /// + /// Operation Id + /// WebApps_GetInstanceWorkflowSlot + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _siteSlotWorkflowWebAppsClientDiagnostics.CreateScope("SiteSlotWorkflowResource.Get"); + scope.Start(); + try + { + var response = await _siteSlotWorkflowWebAppsRestClient.GetInstanceWorkflowSlotAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SiteSlotWorkflowResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get workflow information by its ID for web site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/workflows/{workflowName} + /// + /// + /// Operation Id + /// WebApps_GetInstanceWorkflowSlot + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _siteSlotWorkflowWebAppsClientDiagnostics.CreateScope("SiteSlotWorkflowResource.Get"); + scope.Start(); + try + { + var response = _siteSlotWorkflowWebAppsRestClient.GetInstanceWorkflowSlot(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SiteSlotWorkflowResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteVirtualNetworkConnectionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteVirtualNetworkConnectionCollection.cs index c37dbeac36ba7..530e473232b42 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteVirtualNetworkConnectionCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteVirtualNetworkConnectionCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> Cr /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsy /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string vnetNam /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -285,7 +285,7 @@ public virtual AsyncPageable GetAllAsync(C /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -314,7 +314,7 @@ public virtual Pageable GetAll(Cancellatio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -357,7 +357,7 @@ public virtual async Task> ExistsAsync(string vnetName, Cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -400,7 +400,7 @@ public virtual Response Exists(string vnetName, CancellationToken cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -445,7 +445,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteVirtualNetworkConnectionGatewayCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteVirtualNetworkConnectionGatewayCollection.cs index 787d6d709aa45..7f04de2d23247 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteVirtualNetworkConnectionGatewayCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteVirtualNetworkConnectionGatewayCollection.cs @@ -61,7 +61,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -112,7 +112,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateO /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -296,7 +296,7 @@ public virtual async Task> ExistsAsync(string gatewayName, Cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -339,7 +339,7 @@ public virtual Response Exists(string gatewayName, CancellationToken cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -384,7 +384,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteVirtualNetworkConnectionGatewayResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteVirtualNetworkConnectionGatewayResource.cs index 0009c44b06ff2..2a1da8c089784 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteVirtualNetworkConnectionGatewayResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteVirtualNetworkConnectionGatewayResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteVirtualNetworkConnectionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteVirtualNetworkConnectionResource.cs index e0dd8e389bf53..acac1753387a9 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteVirtualNetworkConnectionResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteVirtualNetworkConnectionResource.cs @@ -108,7 +108,7 @@ public virtual SiteVirtualNetworkConnectionGatewayCollection GetSiteVirtualNetwo /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -139,7 +139,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -170,7 +170,7 @@ public virtual Response GetSiteVirt /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task> GetAsy /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -250,7 +250,7 @@ public virtual Response Get(CancellationTo /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -294,7 +294,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -338,7 +338,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -380,7 +380,7 @@ public virtual async Task> Update /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteWorkflowCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteWorkflowCollection.cs new file mode 100644 index 0000000000000..13ae1f228c1e2 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteWorkflowCollection.cs @@ -0,0 +1,395 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetSiteWorkflows method from an instance of . + /// + public partial class SiteWorkflowCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _siteWorkflowWebAppsClientDiagnostics; + private readonly WebAppsRestOperations _siteWorkflowWebAppsRestClient; + + /// Initializes a new instance of the class for mocking. + protected SiteWorkflowCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal SiteWorkflowCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _siteWorkflowWebAppsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppService", SiteWorkflowResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(SiteWorkflowResource.ResourceType, out string siteWorkflowWebAppsApiVersion); + _siteWorkflowWebAppsRestClient = new WebAppsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, siteWorkflowWebAppsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != WebSiteResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, WebSiteResource.ResourceType), nameof(id)); + } + + /// + /// Get workflow information by its ID for web site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/workflows/{workflowName} + /// + /// + /// Operation Id + /// WebApps_GetWorkflow + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Workflow name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string workflowName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + + using var scope = _siteWorkflowWebAppsClientDiagnostics.CreateScope("SiteWorkflowCollection.Get"); + scope.Start(); + try + { + var response = await _siteWorkflowWebAppsRestClient.GetWorkflowAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, workflowName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SiteWorkflowResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get workflow information by its ID for web site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/workflows/{workflowName} + /// + /// + /// Operation Id + /// WebApps_GetWorkflow + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Workflow name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string workflowName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + + using var scope = _siteWorkflowWebAppsClientDiagnostics.CreateScope("SiteWorkflowCollection.Get"); + scope.Start(); + try + { + var response = _siteWorkflowWebAppsRestClient.GetWorkflow(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, workflowName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SiteWorkflowResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List the workflows for a web site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/workflows + /// + /// + /// Operation Id + /// WebApps_ListWorkflows + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _siteWorkflowWebAppsRestClient.CreateListWorkflowsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _siteWorkflowWebAppsRestClient.CreateListWorkflowsNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new SiteWorkflowResource(Client, WorkflowEnvelopeData.DeserializeWorkflowEnvelopeData(e)), _siteWorkflowWebAppsClientDiagnostics, Pipeline, "SiteWorkflowCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List the workflows for a web site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/workflows + /// + /// + /// Operation Id + /// WebApps_ListWorkflows + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _siteWorkflowWebAppsRestClient.CreateListWorkflowsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _siteWorkflowWebAppsRestClient.CreateListWorkflowsNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new SiteWorkflowResource(Client, WorkflowEnvelopeData.DeserializeWorkflowEnvelopeData(e)), _siteWorkflowWebAppsClientDiagnostics, Pipeline, "SiteWorkflowCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/workflows/{workflowName} + /// + /// + /// Operation Id + /// WebApps_GetWorkflow + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Workflow name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string workflowName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + + using var scope = _siteWorkflowWebAppsClientDiagnostics.CreateScope("SiteWorkflowCollection.Exists"); + scope.Start(); + try + { + var response = await _siteWorkflowWebAppsRestClient.GetWorkflowAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, workflowName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/workflows/{workflowName} + /// + /// + /// Operation Id + /// WebApps_GetWorkflow + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Workflow name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string workflowName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + + using var scope = _siteWorkflowWebAppsClientDiagnostics.CreateScope("SiteWorkflowCollection.Exists"); + scope.Start(); + try + { + var response = _siteWorkflowWebAppsRestClient.GetWorkflow(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, workflowName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/workflows/{workflowName} + /// + /// + /// Operation Id + /// WebApps_GetWorkflow + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Workflow name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string workflowName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + + using var scope = _siteWorkflowWebAppsClientDiagnostics.CreateScope("SiteWorkflowCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _siteWorkflowWebAppsRestClient.GetWorkflowAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, workflowName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new SiteWorkflowResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/workflows/{workflowName} + /// + /// + /// Operation Id + /// WebApps_GetWorkflow + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Workflow name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string workflowName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + + using var scope = _siteWorkflowWebAppsClientDiagnostics.CreateScope("SiteWorkflowCollection.GetIfExists"); + scope.Start(); + try + { + var response = _siteWorkflowWebAppsRestClient.GetWorkflow(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, workflowName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new SiteWorkflowResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteWorkflowResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteWorkflowResource.Serialization.cs new file mode 100644 index 0000000000000..163dc096044b2 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteWorkflowResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.AppService +{ + public partial class SiteWorkflowResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + WorkflowEnvelopeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + WorkflowEnvelopeData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteWorkflowResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteWorkflowResource.cs new file mode 100644 index 0000000000000..76e4ed1d66512 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteWorkflowResource.cs @@ -0,0 +1,171 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A Class representing a SiteWorkflow along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetSiteWorkflowResource method. + /// Otherwise you can get one from its parent resource using the GetSiteWorkflow method. + /// + public partial class SiteWorkflowResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The name. + /// The workflowName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name, string workflowName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/workflows/{workflowName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _siteWorkflowWebAppsClientDiagnostics; + private readonly WebAppsRestOperations _siteWorkflowWebAppsRestClient; + private readonly WorkflowEnvelopeData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Web/sites/workflows"; + + /// Initializes a new instance of the class for mocking. + protected SiteWorkflowResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal SiteWorkflowResource(ArmClient client, WorkflowEnvelopeData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal SiteWorkflowResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _siteWorkflowWebAppsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppService", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string siteWorkflowWebAppsApiVersion); + _siteWorkflowWebAppsRestClient = new WebAppsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, siteWorkflowWebAppsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual WorkflowEnvelopeData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get workflow information by its ID for web site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/workflows/{workflowName} + /// + /// + /// Operation Id + /// WebApps_GetWorkflow + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _siteWorkflowWebAppsClientDiagnostics.CreateScope("SiteWorkflowResource.Get"); + scope.Start(); + try + { + var response = await _siteWorkflowWebAppsRestClient.GetWorkflowAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SiteWorkflowResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get workflow information by its ID for web site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/workflows/{workflowName} + /// + /// + /// Operation Id + /// WebApps_GetWorkflow + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _siteWorkflowWebAppsClientDiagnostics.CreateScope("SiteWorkflowResource.Get"); + scope.Start(); + try + { + var response = _siteWorkflowWebAppsRestClient.GetWorkflow(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SiteWorkflowResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SlotConfigNamesResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SlotConfigNamesResource.cs index 195666eeb82bc..f7eb3625de2db 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SlotConfigNamesResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SlotConfigNamesResource.cs @@ -100,7 +100,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> GetAsync(Cancellati /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -180,7 +180,7 @@ public virtual Response Get(CancellationToken cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -228,7 +228,7 @@ public virtual async Task> CreateOrUpdateA /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBasicAuthPropertyCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBasicAuthPropertyCollection.cs new file mode 100644 index 0000000000000..56e7e04800d25 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBasicAuthPropertyCollection.cs @@ -0,0 +1,470 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetStaticSiteBasicAuthProperties method from an instance of . + /// + public partial class StaticSiteBasicAuthPropertyCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _staticSiteBasicAuthPropertyStaticSitesClientDiagnostics; + private readonly StaticSitesRestOperations _staticSiteBasicAuthPropertyStaticSitesRestClient; + + /// Initializes a new instance of the class for mocking. + protected StaticSiteBasicAuthPropertyCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal StaticSiteBasicAuthPropertyCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _staticSiteBasicAuthPropertyStaticSitesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppService", StaticSiteBasicAuthPropertyResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(StaticSiteBasicAuthPropertyResource.ResourceType, out string staticSiteBasicAuthPropertyStaticSitesApiVersion); + _staticSiteBasicAuthPropertyStaticSitesRestClient = new StaticSitesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, staticSiteBasicAuthPropertyStaticSitesApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != StaticSiteResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, StaticSiteResource.ResourceType), nameof(id)); + } + + /// + /// Description for Adds or updates basic auth for a static site. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/basicAuth/{basicAuthName} + /// + /// + /// Operation Id + /// StaticSites_CreateOrUpdateBasicAuth + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// name of the basic auth entry. + /// A JSON representation of the basic auth properties. + /// The cancellation token to use. + /// is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, StaticSiteBasicAuthName basicAuthName, StaticSiteBasicAuthPropertyData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _staticSiteBasicAuthPropertyStaticSitesClientDiagnostics.CreateScope("StaticSiteBasicAuthPropertyCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _staticSiteBasicAuthPropertyStaticSitesRestClient.CreateOrUpdateBasicAuthAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, basicAuthName, data, cancellationToken).ConfigureAwait(false); + var uri = _staticSiteBasicAuthPropertyStaticSitesRestClient.CreateCreateOrUpdateBasicAuthRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, basicAuthName, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppServiceArmOperation(Response.FromValue(new StaticSiteBasicAuthPropertyResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Description for Adds or updates basic auth for a static site. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/basicAuth/{basicAuthName} + /// + /// + /// Operation Id + /// StaticSites_CreateOrUpdateBasicAuth + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// name of the basic auth entry. + /// A JSON representation of the basic auth properties. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, StaticSiteBasicAuthName basicAuthName, StaticSiteBasicAuthPropertyData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _staticSiteBasicAuthPropertyStaticSitesClientDiagnostics.CreateScope("StaticSiteBasicAuthPropertyCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _staticSiteBasicAuthPropertyStaticSitesRestClient.CreateOrUpdateBasicAuth(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, basicAuthName, data, cancellationToken); + var uri = _staticSiteBasicAuthPropertyStaticSitesRestClient.CreateCreateOrUpdateBasicAuthRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, basicAuthName, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppServiceArmOperation(Response.FromValue(new StaticSiteBasicAuthPropertyResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Description for Gets the basic auth properties for a static site. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/basicAuth/{basicAuthName} + /// + /// + /// Operation Id + /// StaticSites_GetBasicAuth + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// name of the basic auth entry. + /// The cancellation token to use. + public virtual async Task> GetAsync(StaticSiteBasicAuthName basicAuthName, CancellationToken cancellationToken = default) + { + using var scope = _staticSiteBasicAuthPropertyStaticSitesClientDiagnostics.CreateScope("StaticSiteBasicAuthPropertyCollection.Get"); + scope.Start(); + try + { + var response = await _staticSiteBasicAuthPropertyStaticSitesRestClient.GetBasicAuthAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, basicAuthName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new StaticSiteBasicAuthPropertyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Description for Gets the basic auth properties for a static site. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/basicAuth/{basicAuthName} + /// + /// + /// Operation Id + /// StaticSites_GetBasicAuth + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// name of the basic auth entry. + /// The cancellation token to use. + public virtual Response Get(StaticSiteBasicAuthName basicAuthName, CancellationToken cancellationToken = default) + { + using var scope = _staticSiteBasicAuthPropertyStaticSitesClientDiagnostics.CreateScope("StaticSiteBasicAuthPropertyCollection.Get"); + scope.Start(); + try + { + var response = _staticSiteBasicAuthPropertyStaticSitesRestClient.GetBasicAuth(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, basicAuthName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new StaticSiteBasicAuthPropertyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Description for Gets the basic auth properties for a static site as a collection. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/basicAuth + /// + /// + /// Operation Id + /// StaticSites_ListBasicAuth + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _staticSiteBasicAuthPropertyStaticSitesRestClient.CreateListBasicAuthRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _staticSiteBasicAuthPropertyStaticSitesRestClient.CreateListBasicAuthNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new StaticSiteBasicAuthPropertyResource(Client, StaticSiteBasicAuthPropertyData.DeserializeStaticSiteBasicAuthPropertyData(e)), _staticSiteBasicAuthPropertyStaticSitesClientDiagnostics, Pipeline, "StaticSiteBasicAuthPropertyCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Description for Gets the basic auth properties for a static site as a collection. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/basicAuth + /// + /// + /// Operation Id + /// StaticSites_ListBasicAuth + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _staticSiteBasicAuthPropertyStaticSitesRestClient.CreateListBasicAuthRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _staticSiteBasicAuthPropertyStaticSitesRestClient.CreateListBasicAuthNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new StaticSiteBasicAuthPropertyResource(Client, StaticSiteBasicAuthPropertyData.DeserializeStaticSiteBasicAuthPropertyData(e)), _staticSiteBasicAuthPropertyStaticSitesClientDiagnostics, Pipeline, "StaticSiteBasicAuthPropertyCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/basicAuth/{basicAuthName} + /// + /// + /// Operation Id + /// StaticSites_GetBasicAuth + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// name of the basic auth entry. + /// The cancellation token to use. + public virtual async Task> ExistsAsync(StaticSiteBasicAuthName basicAuthName, CancellationToken cancellationToken = default) + { + using var scope = _staticSiteBasicAuthPropertyStaticSitesClientDiagnostics.CreateScope("StaticSiteBasicAuthPropertyCollection.Exists"); + scope.Start(); + try + { + var response = await _staticSiteBasicAuthPropertyStaticSitesRestClient.GetBasicAuthAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, basicAuthName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/basicAuth/{basicAuthName} + /// + /// + /// Operation Id + /// StaticSites_GetBasicAuth + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// name of the basic auth entry. + /// The cancellation token to use. + public virtual Response Exists(StaticSiteBasicAuthName basicAuthName, CancellationToken cancellationToken = default) + { + using var scope = _staticSiteBasicAuthPropertyStaticSitesClientDiagnostics.CreateScope("StaticSiteBasicAuthPropertyCollection.Exists"); + scope.Start(); + try + { + var response = _staticSiteBasicAuthPropertyStaticSitesRestClient.GetBasicAuth(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, basicAuthName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/basicAuth/{basicAuthName} + /// + /// + /// Operation Id + /// StaticSites_GetBasicAuth + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// name of the basic auth entry. + /// The cancellation token to use. + public virtual async Task> GetIfExistsAsync(StaticSiteBasicAuthName basicAuthName, CancellationToken cancellationToken = default) + { + using var scope = _staticSiteBasicAuthPropertyStaticSitesClientDiagnostics.CreateScope("StaticSiteBasicAuthPropertyCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _staticSiteBasicAuthPropertyStaticSitesRestClient.GetBasicAuthAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, basicAuthName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new StaticSiteBasicAuthPropertyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/basicAuth/{basicAuthName} + /// + /// + /// Operation Id + /// StaticSites_GetBasicAuth + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// name of the basic auth entry. + /// The cancellation token to use. + public virtual NullableResponse GetIfExists(StaticSiteBasicAuthName basicAuthName, CancellationToken cancellationToken = default) + { + using var scope = _staticSiteBasicAuthPropertyStaticSitesClientDiagnostics.CreateScope("StaticSiteBasicAuthPropertyCollection.GetIfExists"); + scope.Start(); + try + { + var response = _staticSiteBasicAuthPropertyStaticSitesRestClient.GetBasicAuth(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, basicAuthName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new StaticSiteBasicAuthPropertyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBasicAuthPropertyData.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBasicAuthPropertyData.Serialization.cs new file mode 100644 index 0000000000000..d0035dcef8cf9 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBasicAuthPropertyData.Serialization.cs @@ -0,0 +1,488 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppService +{ + public partial class StaticSiteBasicAuthPropertyData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(StaticSiteBasicAuthPropertyData)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Kind)) + { + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind); + } + if (options.Format != "W") + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (options.Format != "W") + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W") + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(ResourceType); + } + if (options.Format != "W" && Optional.IsDefined(SystemData)) + { + writer.WritePropertyName("systemData"u8); + JsonSerializer.Serialize(writer, SystemData); + } + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(Password)) + { + writer.WritePropertyName("password"u8); + writer.WriteStringValue(Password); + } + if (Optional.IsDefined(SecretUri)) + { + writer.WritePropertyName("secretUrl"u8); + writer.WriteStringValue(SecretUri.AbsoluteUri); + } + if (Optional.IsDefined(ApplicableEnvironmentsMode)) + { + writer.WritePropertyName("applicableEnvironmentsMode"u8); + writer.WriteStringValue(ApplicableEnvironmentsMode); + } + if (Optional.IsCollectionDefined(Environments)) + { + writer.WritePropertyName("environments"u8); + writer.WriteStartArray(); + foreach (var item in Environments) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(SecretState)) + { + writer.WritePropertyName("secretState"u8); + writer.WriteStringValue(SecretState); + } + writer.WriteEndObject(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + StaticSiteBasicAuthPropertyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(StaticSiteBasicAuthPropertyData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeStaticSiteBasicAuthPropertyData(document.RootElement, options); + } + + internal static StaticSiteBasicAuthPropertyData DeserializeStaticSiteBasicAuthPropertyData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string kind = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + string password = default; + Uri secretUrl = default; + string applicableEnvironmentsMode = default; + IList environments = default; + string secretState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("kind"u8)) + { + kind = property.Value.GetString(); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("password"u8)) + { + password = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("secretUrl"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + secretUrl = new Uri(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("applicableEnvironmentsMode"u8)) + { + applicableEnvironmentsMode = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("environments"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + environments = array; + continue; + } + if (property0.NameEquals("secretState"u8)) + { + secretState = property0.Value.GetString(); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new StaticSiteBasicAuthPropertyData( + id, + name, + type, + systemData, + password, + secretUrl, + applicableEnvironmentsMode, + environments ?? new ChangeTrackingList(), + secretState, + kind, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Kind), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" kind: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Kind)) + { + builder.Append(" kind: "); + if (Kind.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Kind}'''"); + } + else + { + builder.AppendLine($"'{Kind}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Password), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" password: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Password)) + { + builder.Append(" password: "); + if (Password.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Password}'''"); + } + else + { + builder.AppendLine($"'{Password}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SecretUri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" secretUrl: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SecretUri)) + { + builder.Append(" secretUrl: "); + builder.AppendLine($"'{SecretUri.AbsoluteUri}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApplicableEnvironmentsMode), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" applicableEnvironmentsMode: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApplicableEnvironmentsMode)) + { + builder.Append(" applicableEnvironmentsMode: "); + if (ApplicableEnvironmentsMode.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ApplicableEnvironmentsMode}'''"); + } + else + { + builder.AppendLine($"'{ApplicableEnvironmentsMode}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Environments), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" environments: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Environments)) + { + if (Environments.Any()) + { + builder.Append(" environments: "); + builder.AppendLine("["); + foreach (var item in Environments) + { + if (item == null) + { + builder.Append("null"); + continue; + } + if (item.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item}'''"); + } + else + { + builder.AppendLine($" '{item}'"); + } + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SecretState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" secretState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SecretState)) + { + builder.Append(" secretState: "); + if (SecretState.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{SecretState}'''"); + } + else + { + builder.AppendLine($"'{SecretState}'"); + } + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(StaticSiteBasicAuthPropertyData)} does not support writing '{options.Format}' format."); + } + } + + StaticSiteBasicAuthPropertyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeStaticSiteBasicAuthPropertyData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(StaticSiteBasicAuthPropertyData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBasicAuthPropertyData.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBasicAuthPropertyData.cs new file mode 100644 index 0000000000000..ef0cb84ab30cb --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBasicAuthPropertyData.cs @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A class representing the StaticSiteBasicAuthProperty data model. + /// Static site basic auth properties ARM resource. + /// + public partial class StaticSiteBasicAuthPropertyData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public StaticSiteBasicAuthPropertyData() + { + Environments = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The password for basic auth. + /// Url to the secret in Key Vault. + /// State indicating if basic auth is enabled and for what environments it is active. + /// The list of enabled environments for Basic Auth if ApplicableEnvironmentsMode is set to SpecifiedEnvironments. + /// State indicating if basic auth has a secret and what type it is. + /// Kind of resource. + /// Keeps track of any properties unknown to the library. + internal StaticSiteBasicAuthPropertyData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string password, Uri secretUri, string applicableEnvironmentsMode, IList environments, string secretState, string kind, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Password = password; + SecretUri = secretUri; + ApplicableEnvironmentsMode = applicableEnvironmentsMode; + Environments = environments; + SecretState = secretState; + Kind = kind; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The password for basic auth. + [WirePath("properties.password")] + public string Password { get; set; } + /// Url to the secret in Key Vault. + [WirePath("properties.secretUrl")] + public Uri SecretUri { get; set; } + /// State indicating if basic auth is enabled and for what environments it is active. + [WirePath("properties.applicableEnvironmentsMode")] + public string ApplicableEnvironmentsMode { get; set; } + /// The list of enabled environments for Basic Auth if ApplicableEnvironmentsMode is set to SpecifiedEnvironments. + [WirePath("properties.environments")] + public IList Environments { get; } + /// State indicating if basic auth has a secret and what type it is. + [WirePath("properties.secretState")] + public string SecretState { get; } + /// Kind of resource. + [WirePath("kind")] + public string Kind { get; set; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBasicAuthPropertyResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBasicAuthPropertyResource.Serialization.cs new file mode 100644 index 0000000000000..e538670865d8d --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBasicAuthPropertyResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.AppService +{ + public partial class StaticSiteBasicAuthPropertyResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + StaticSiteBasicAuthPropertyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + StaticSiteBasicAuthPropertyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBasicAuthPropertyResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBasicAuthPropertyResource.cs new file mode 100644 index 0000000000000..b4c33e085bf67 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBasicAuthPropertyResource.cs @@ -0,0 +1,268 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A Class representing a StaticSiteBasicAuthProperty along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetStaticSiteBasicAuthPropertyResource method. + /// Otherwise you can get one from its parent resource using the GetStaticSiteBasicAuthProperty method. + /// + public partial class StaticSiteBasicAuthPropertyResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The name. + /// The basicAuthName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name, StaticSiteBasicAuthName basicAuthName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/basicAuth/{basicAuthName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _staticSiteBasicAuthPropertyStaticSitesClientDiagnostics; + private readonly StaticSitesRestOperations _staticSiteBasicAuthPropertyStaticSitesRestClient; + private readonly StaticSiteBasicAuthPropertyData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Web/staticSites/basicAuth"; + + /// Initializes a new instance of the class for mocking. + protected StaticSiteBasicAuthPropertyResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal StaticSiteBasicAuthPropertyResource(ArmClient client, StaticSiteBasicAuthPropertyData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal StaticSiteBasicAuthPropertyResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _staticSiteBasicAuthPropertyStaticSitesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppService", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string staticSiteBasicAuthPropertyStaticSitesApiVersion); + _staticSiteBasicAuthPropertyStaticSitesRestClient = new StaticSitesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, staticSiteBasicAuthPropertyStaticSitesApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual StaticSiteBasicAuthPropertyData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Description for Gets the basic auth properties for a static site. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/basicAuth/{basicAuthName} + /// + /// + /// Operation Id + /// StaticSites_GetBasicAuth + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _staticSiteBasicAuthPropertyStaticSitesClientDiagnostics.CreateScope("StaticSiteBasicAuthPropertyResource.Get"); + scope.Start(); + try + { + var response = await _staticSiteBasicAuthPropertyStaticSitesRestClient.GetBasicAuthAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new StaticSiteBasicAuthPropertyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Description for Gets the basic auth properties for a static site. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/basicAuth/{basicAuthName} + /// + /// + /// Operation Id + /// StaticSites_GetBasicAuth + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _staticSiteBasicAuthPropertyStaticSitesClientDiagnostics.CreateScope("StaticSiteBasicAuthPropertyResource.Get"); + scope.Start(); + try + { + var response = _staticSiteBasicAuthPropertyStaticSitesRestClient.GetBasicAuth(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new StaticSiteBasicAuthPropertyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Description for Adds or updates basic auth for a static site. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/basicAuth/{basicAuthName} + /// + /// + /// Operation Id + /// StaticSites_CreateOrUpdateBasicAuth + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// A JSON representation of the basic auth properties. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, StaticSiteBasicAuthPropertyData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _staticSiteBasicAuthPropertyStaticSitesClientDiagnostics.CreateScope("StaticSiteBasicAuthPropertyResource.Update"); + scope.Start(); + try + { + var response = await _staticSiteBasicAuthPropertyStaticSitesRestClient.CreateOrUpdateBasicAuthAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var uri = _staticSiteBasicAuthPropertyStaticSitesRestClient.CreateCreateOrUpdateBasicAuthRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppServiceArmOperation(Response.FromValue(new StaticSiteBasicAuthPropertyResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Description for Adds or updates basic auth for a static site. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/basicAuth/{basicAuthName} + /// + /// + /// Operation Id + /// StaticSites_CreateOrUpdateBasicAuth + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// A JSON representation of the basic auth properties. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, StaticSiteBasicAuthPropertyData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _staticSiteBasicAuthPropertyStaticSitesClientDiagnostics.CreateScope("StaticSiteBasicAuthPropertyResource.Update"); + scope.Start(); + try + { + var response = _staticSiteBasicAuthPropertyStaticSitesRestClient.CreateOrUpdateBasicAuth(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var uri = _staticSiteBasicAuthPropertyStaticSitesRestClient.CreateCreateOrUpdateBasicAuthRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppServiceArmOperation(Response.FromValue(new StaticSiteBasicAuthPropertyResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildCollection.cs index c0f1e25c07e2a..251a5715b1267 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(string env /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string environmentName, Can /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(CancellationTo /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string environmentName, Ca /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string environmentName, CancellationToken c /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> GetIfExists /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildData.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildData.Serialization.cs index ef612433acc37..8455146808795 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildData.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildData.Serialization.cs @@ -102,6 +102,26 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri } writer.WriteEndArray(); } + if (options.Format != "W" && Optional.IsCollectionDefined(LinkedBackends)) + { + writer.WritePropertyName("linkedBackends"u8); + writer.WriteStartArray(); + foreach (var item in LinkedBackends) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsCollectionDefined(DatabaseConnections)) + { + writer.WritePropertyName("databaseConnections"u8); + writer.WriteStartArray(); + foreach (var item in DatabaseConnections) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } writer.WriteEndObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -154,6 +174,8 @@ internal static StaticSiteBuildData DeserializeStaticSiteBuildData(JsonElement e DateTimeOffset? lastUpdatedOn = default; StaticSiteBuildStatus? status = default; IReadOnlyList userProvidedFunctionApps = default; + IReadOnlyList linkedBackends = default; + IReadOnlyList databaseConnections = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -257,6 +279,34 @@ internal static StaticSiteBuildData DeserializeStaticSiteBuildData(JsonElement e userProvidedFunctionApps = array; continue; } + if (property0.NameEquals("linkedBackends"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(StaticSiteLinkedBackendInfo.DeserializeStaticSiteLinkedBackendInfo(item, options)); + } + linkedBackends = array; + continue; + } + if (property0.NameEquals("databaseConnections"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(StaticSiteDatabaseConnectionOverview.DeserializeStaticSiteDatabaseConnectionOverview(item, options)); + } + databaseConnections = array; + continue; + } } continue; } @@ -279,6 +329,8 @@ internal static StaticSiteBuildData DeserializeStaticSiteBuildData(JsonElement e lastUpdatedOn, status, userProvidedFunctionApps ?? new ChangeTrackingList(), + linkedBackends ?? new ChangeTrackingList(), + databaseConnections ?? new ChangeTrackingList(), kind, serializedAdditionalRawData); } @@ -534,6 +586,52 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(LinkedBackends), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" linkedBackends: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(LinkedBackends)) + { + if (LinkedBackends.Any()) + { + builder.Append(" linkedBackends: "); + builder.AppendLine("["); + foreach (var item in LinkedBackends) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " linkedBackends: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DatabaseConnections), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" databaseConnections: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(DatabaseConnections)) + { + if (DatabaseConnections.Any()) + { + builder.Append(" databaseConnections: "); + builder.AppendLine("["); + foreach (var item in DatabaseConnections) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " databaseConnections: "); + } + builder.AppendLine(" ]"); + } + } + } + builder.AppendLine(" }"); builder.AppendLine("}"); return BinaryData.FromString(builder.ToString()); diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildData.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildData.cs index eb73b6cda5e75..77e64989a4685 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildData.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildData.cs @@ -55,6 +55,8 @@ public partial class StaticSiteBuildData : ResourceData public StaticSiteBuildData() { UserProvidedFunctionApps = new ChangeTrackingList(); + LinkedBackends = new ChangeTrackingList(); + DatabaseConnections = new ChangeTrackingList(); } /// Initializes a new instance of . @@ -70,9 +72,11 @@ public StaticSiteBuildData() /// When this build was updated. /// The status of the static site build. /// User provided function apps registered with the static site build. + /// Backends linked to the static side build. + /// Database connections for the static site build. /// Kind of resource. /// Keeps track of any properties unknown to the library. - internal StaticSiteBuildData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string buildId, string sourceBranch, string pullRequestTitle, string hostname, DateTimeOffset? createdOn, DateTimeOffset? lastUpdatedOn, StaticSiteBuildStatus? status, IReadOnlyList userProvidedFunctionApps, string kind, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal StaticSiteBuildData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string buildId, string sourceBranch, string pullRequestTitle, string hostname, DateTimeOffset? createdOn, DateTimeOffset? lastUpdatedOn, StaticSiteBuildStatus? status, IReadOnlyList userProvidedFunctionApps, IReadOnlyList linkedBackends, IReadOnlyList databaseConnections, string kind, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { BuildId = buildId; SourceBranch = sourceBranch; @@ -82,6 +86,8 @@ internal StaticSiteBuildData(ResourceIdentifier id, string name, ResourceType re LastUpdatedOn = lastUpdatedOn; Status = status; UserProvidedFunctionApps = userProvidedFunctionApps; + LinkedBackends = linkedBackends; + DatabaseConnections = databaseConnections; Kind = kind; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -110,6 +116,12 @@ internal StaticSiteBuildData(ResourceIdentifier id, string name, ResourceType re /// User provided function apps registered with the static site build. [WirePath("properties.userProvidedFunctionApps")] public IReadOnlyList UserProvidedFunctionApps { get; } + /// Backends linked to the static side build. + [WirePath("properties.linkedBackends")] + public IReadOnlyList LinkedBackends { get; } + /// Database connections for the static site build. + [WirePath("properties.databaseConnections")] + public IReadOnlyList DatabaseConnections { get; } /// Kind of resource. [WirePath("kind")] public string Kind { get; set; } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildDatabaseConnectionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildDatabaseConnectionCollection.cs new file mode 100644 index 0000000000000..87f3bd8e814d2 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildDatabaseConnectionCollection.cs @@ -0,0 +1,497 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetStaticSiteBuildDatabaseConnections method from an instance of . + /// + public partial class StaticSiteBuildDatabaseConnectionCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _staticSiteBuildDatabaseConnectionStaticSitesClientDiagnostics; + private readonly StaticSitesRestOperations _staticSiteBuildDatabaseConnectionStaticSitesRestClient; + + /// Initializes a new instance of the class for mocking. + protected StaticSiteBuildDatabaseConnectionCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal StaticSiteBuildDatabaseConnectionCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _staticSiteBuildDatabaseConnectionStaticSitesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppService", StaticSiteBuildDatabaseConnectionResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(StaticSiteBuildDatabaseConnectionResource.ResourceType, out string staticSiteBuildDatabaseConnectionStaticSitesApiVersion); + _staticSiteBuildDatabaseConnectionStaticSitesRestClient = new StaticSitesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, staticSiteBuildDatabaseConnectionStaticSitesApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != StaticSiteBuildResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, StaticSiteBuildResource.ResourceType), nameof(id)); + } + + /// + /// Description for Create or update a database connection for a static site build + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/databaseConnections/{databaseConnectionName} + /// + /// + /// Operation Id + /// StaticSites_CreateOrUpdateBuildDatabaseConnection + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Name of the database connection. + /// A JSON representation of the database connection request properties. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string databaseConnectionName, StaticSiteDatabaseConnectionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(databaseConnectionName, nameof(databaseConnectionName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _staticSiteBuildDatabaseConnectionStaticSitesClientDiagnostics.CreateScope("StaticSiteBuildDatabaseConnectionCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _staticSiteBuildDatabaseConnectionStaticSitesRestClient.CreateOrUpdateBuildDatabaseConnectionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, databaseConnectionName, data, cancellationToken).ConfigureAwait(false); + var uri = _staticSiteBuildDatabaseConnectionStaticSitesRestClient.CreateCreateOrUpdateBuildDatabaseConnectionRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, databaseConnectionName, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppServiceArmOperation(Response.FromValue(new StaticSiteBuildDatabaseConnectionResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Description for Create or update a database connection for a static site build + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/databaseConnections/{databaseConnectionName} + /// + /// + /// Operation Id + /// StaticSites_CreateOrUpdateBuildDatabaseConnection + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Name of the database connection. + /// A JSON representation of the database connection request properties. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string databaseConnectionName, StaticSiteDatabaseConnectionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(databaseConnectionName, nameof(databaseConnectionName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _staticSiteBuildDatabaseConnectionStaticSitesClientDiagnostics.CreateScope("StaticSiteBuildDatabaseConnectionCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _staticSiteBuildDatabaseConnectionStaticSitesRestClient.CreateOrUpdateBuildDatabaseConnection(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, databaseConnectionName, data, cancellationToken); + var uri = _staticSiteBuildDatabaseConnectionStaticSitesRestClient.CreateCreateOrUpdateBuildDatabaseConnectionRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, databaseConnectionName, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppServiceArmOperation(Response.FromValue(new StaticSiteBuildDatabaseConnectionResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Returns overview of a database connection for a static site build by name + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/databaseConnections/{databaseConnectionName} + /// + /// + /// Operation Id + /// StaticSites_GetBuildDatabaseConnection + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the database connection. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string databaseConnectionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(databaseConnectionName, nameof(databaseConnectionName)); + + using var scope = _staticSiteBuildDatabaseConnectionStaticSitesClientDiagnostics.CreateScope("StaticSiteBuildDatabaseConnectionCollection.Get"); + scope.Start(); + try + { + var response = await _staticSiteBuildDatabaseConnectionStaticSitesRestClient.GetBuildDatabaseConnectionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, databaseConnectionName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new StaticSiteBuildDatabaseConnectionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Returns overview of a database connection for a static site build by name + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/databaseConnections/{databaseConnectionName} + /// + /// + /// Operation Id + /// StaticSites_GetBuildDatabaseConnection + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the database connection. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string databaseConnectionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(databaseConnectionName, nameof(databaseConnectionName)); + + using var scope = _staticSiteBuildDatabaseConnectionStaticSitesClientDiagnostics.CreateScope("StaticSiteBuildDatabaseConnectionCollection.Get"); + scope.Start(); + try + { + var response = _staticSiteBuildDatabaseConnectionStaticSitesRestClient.GetBuildDatabaseConnection(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, databaseConnectionName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new StaticSiteBuildDatabaseConnectionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Returns overviews of database connections for a static site build + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/databaseConnections + /// + /// + /// Operation Id + /// StaticSites_GetBuildDatabaseConnections + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _staticSiteBuildDatabaseConnectionStaticSitesRestClient.CreateGetBuildDatabaseConnectionsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _staticSiteBuildDatabaseConnectionStaticSitesRestClient.CreateGetBuildDatabaseConnectionsNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new StaticSiteBuildDatabaseConnectionResource(Client, StaticSiteDatabaseConnectionData.DeserializeStaticSiteDatabaseConnectionData(e)), _staticSiteBuildDatabaseConnectionStaticSitesClientDiagnostics, Pipeline, "StaticSiteBuildDatabaseConnectionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Returns overviews of database connections for a static site build + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/databaseConnections + /// + /// + /// Operation Id + /// StaticSites_GetBuildDatabaseConnections + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _staticSiteBuildDatabaseConnectionStaticSitesRestClient.CreateGetBuildDatabaseConnectionsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _staticSiteBuildDatabaseConnectionStaticSitesRestClient.CreateGetBuildDatabaseConnectionsNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new StaticSiteBuildDatabaseConnectionResource(Client, StaticSiteDatabaseConnectionData.DeserializeStaticSiteDatabaseConnectionData(e)), _staticSiteBuildDatabaseConnectionStaticSitesClientDiagnostics, Pipeline, "StaticSiteBuildDatabaseConnectionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/databaseConnections/{databaseConnectionName} + /// + /// + /// Operation Id + /// StaticSites_GetBuildDatabaseConnection + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the database connection. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string databaseConnectionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(databaseConnectionName, nameof(databaseConnectionName)); + + using var scope = _staticSiteBuildDatabaseConnectionStaticSitesClientDiagnostics.CreateScope("StaticSiteBuildDatabaseConnectionCollection.Exists"); + scope.Start(); + try + { + var response = await _staticSiteBuildDatabaseConnectionStaticSitesRestClient.GetBuildDatabaseConnectionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, databaseConnectionName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/databaseConnections/{databaseConnectionName} + /// + /// + /// Operation Id + /// StaticSites_GetBuildDatabaseConnection + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the database connection. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string databaseConnectionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(databaseConnectionName, nameof(databaseConnectionName)); + + using var scope = _staticSiteBuildDatabaseConnectionStaticSitesClientDiagnostics.CreateScope("StaticSiteBuildDatabaseConnectionCollection.Exists"); + scope.Start(); + try + { + var response = _staticSiteBuildDatabaseConnectionStaticSitesRestClient.GetBuildDatabaseConnection(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, databaseConnectionName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/databaseConnections/{databaseConnectionName} + /// + /// + /// Operation Id + /// StaticSites_GetBuildDatabaseConnection + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the database connection. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string databaseConnectionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(databaseConnectionName, nameof(databaseConnectionName)); + + using var scope = _staticSiteBuildDatabaseConnectionStaticSitesClientDiagnostics.CreateScope("StaticSiteBuildDatabaseConnectionCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _staticSiteBuildDatabaseConnectionStaticSitesRestClient.GetBuildDatabaseConnectionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, databaseConnectionName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new StaticSiteBuildDatabaseConnectionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/databaseConnections/{databaseConnectionName} + /// + /// + /// Operation Id + /// StaticSites_GetBuildDatabaseConnection + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the database connection. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string databaseConnectionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(databaseConnectionName, nameof(databaseConnectionName)); + + using var scope = _staticSiteBuildDatabaseConnectionStaticSitesClientDiagnostics.CreateScope("StaticSiteBuildDatabaseConnectionCollection.GetIfExists"); + scope.Start(); + try + { + var response = _staticSiteBuildDatabaseConnectionStaticSitesRestClient.GetBuildDatabaseConnection(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, databaseConnectionName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new StaticSiteBuildDatabaseConnectionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildDatabaseConnectionResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildDatabaseConnectionResource.Serialization.cs new file mode 100644 index 0000000000000..70e8ca7593bf9 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildDatabaseConnectionResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.AppService +{ + public partial class StaticSiteBuildDatabaseConnectionResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + StaticSiteDatabaseConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + StaticSiteDatabaseConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildDatabaseConnectionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildDatabaseConnectionResource.cs new file mode 100644 index 0000000000000..424c42768eb7c --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildDatabaseConnectionResource.cs @@ -0,0 +1,421 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A Class representing a StaticSiteBuildDatabaseConnection along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetStaticSiteBuildDatabaseConnectionResource method. + /// Otherwise you can get one from its parent resource using the GetStaticSiteBuildDatabaseConnection method. + /// + public partial class StaticSiteBuildDatabaseConnectionResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The name. + /// The environmentName. + /// The databaseConnectionName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name, string environmentName, string databaseConnectionName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/databaseConnections/{databaseConnectionName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _staticSiteBuildDatabaseConnectionStaticSitesClientDiagnostics; + private readonly StaticSitesRestOperations _staticSiteBuildDatabaseConnectionStaticSitesRestClient; + private readonly StaticSiteDatabaseConnectionData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Web/staticSites/builds/databaseConnections"; + + /// Initializes a new instance of the class for mocking. + protected StaticSiteBuildDatabaseConnectionResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal StaticSiteBuildDatabaseConnectionResource(ArmClient client, StaticSiteDatabaseConnectionData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal StaticSiteBuildDatabaseConnectionResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _staticSiteBuildDatabaseConnectionStaticSitesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppService", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string staticSiteBuildDatabaseConnectionStaticSitesApiVersion); + _staticSiteBuildDatabaseConnectionStaticSitesRestClient = new StaticSitesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, staticSiteBuildDatabaseConnectionStaticSitesApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual StaticSiteDatabaseConnectionData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Returns overview of a database connection for a static site build by name + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/databaseConnections/{databaseConnectionName} + /// + /// + /// Operation Id + /// StaticSites_GetBuildDatabaseConnection + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _staticSiteBuildDatabaseConnectionStaticSitesClientDiagnostics.CreateScope("StaticSiteBuildDatabaseConnectionResource.Get"); + scope.Start(); + try + { + var response = await _staticSiteBuildDatabaseConnectionStaticSitesRestClient.GetBuildDatabaseConnectionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new StaticSiteBuildDatabaseConnectionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Returns overview of a database connection for a static site build by name + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/databaseConnections/{databaseConnectionName} + /// + /// + /// Operation Id + /// StaticSites_GetBuildDatabaseConnection + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _staticSiteBuildDatabaseConnectionStaticSitesClientDiagnostics.CreateScope("StaticSiteBuildDatabaseConnectionResource.Get"); + scope.Start(); + try + { + var response = _staticSiteBuildDatabaseConnectionStaticSitesRestClient.GetBuildDatabaseConnection(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new StaticSiteBuildDatabaseConnectionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a database connection for a static site build + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/databaseConnections/{databaseConnectionName} + /// + /// + /// Operation Id + /// StaticSites_DeleteBuildDatabaseConnection + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _staticSiteBuildDatabaseConnectionStaticSitesClientDiagnostics.CreateScope("StaticSiteBuildDatabaseConnectionResource.Delete"); + scope.Start(); + try + { + var response = await _staticSiteBuildDatabaseConnectionStaticSitesRestClient.DeleteBuildDatabaseConnectionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var uri = _staticSiteBuildDatabaseConnectionStaticSitesRestClient.CreateDeleteBuildDatabaseConnectionRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppServiceArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a database connection for a static site build + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/databaseConnections/{databaseConnectionName} + /// + /// + /// Operation Id + /// StaticSites_DeleteBuildDatabaseConnection + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _staticSiteBuildDatabaseConnectionStaticSitesClientDiagnostics.CreateScope("StaticSiteBuildDatabaseConnectionResource.Delete"); + scope.Start(); + try + { + var response = _staticSiteBuildDatabaseConnectionStaticSitesRestClient.DeleteBuildDatabaseConnection(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var uri = _staticSiteBuildDatabaseConnectionStaticSitesRestClient.CreateDeleteBuildDatabaseConnectionRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppServiceArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Description for Create or update a database connection for a static site build + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/databaseConnections/{databaseConnectionName} + /// + /// + /// Operation Id + /// StaticSites_UpdateBuildDatabaseConnection + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// A JSON representation of the database connection request properties. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(StaticSiteDatabaseConnectionPatchContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _staticSiteBuildDatabaseConnectionStaticSitesClientDiagnostics.CreateScope("StaticSiteBuildDatabaseConnectionResource.Update"); + scope.Start(); + try + { + var response = await _staticSiteBuildDatabaseConnectionStaticSitesRestClient.UpdateBuildDatabaseConnectionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new StaticSiteBuildDatabaseConnectionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Description for Create or update a database connection for a static site build + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/databaseConnections/{databaseConnectionName} + /// + /// + /// Operation Id + /// StaticSites_UpdateBuildDatabaseConnection + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// A JSON representation of the database connection request properties. + /// The cancellation token to use. + /// is null. + public virtual Response Update(StaticSiteDatabaseConnectionPatchContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _staticSiteBuildDatabaseConnectionStaticSitesClientDiagnostics.CreateScope("StaticSiteBuildDatabaseConnectionResource.Update"); + scope.Start(); + try + { + var response = _staticSiteBuildDatabaseConnectionStaticSitesRestClient.UpdateBuildDatabaseConnection(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, content, cancellationToken); + return Response.FromValue(new StaticSiteBuildDatabaseConnectionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Returns details of a database connection for a static site build by name + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/databaseConnections/{databaseConnectionName}/show + /// + /// + /// Operation Id + /// StaticSites_GetBuildDatabaseConnectionWithDetails + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetBuildDatabaseConnectionWithDetailsAsync(CancellationToken cancellationToken = default) + { + using var scope = _staticSiteBuildDatabaseConnectionStaticSitesClientDiagnostics.CreateScope("StaticSiteBuildDatabaseConnectionResource.GetBuildDatabaseConnectionWithDetails"); + scope.Start(); + try + { + var response = await _staticSiteBuildDatabaseConnectionStaticSitesRestClient.GetBuildDatabaseConnectionWithDetailsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new StaticSiteBuildDatabaseConnectionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Returns details of a database connection for a static site build by name + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/databaseConnections/{databaseConnectionName}/show + /// + /// + /// Operation Id + /// StaticSites_GetBuildDatabaseConnectionWithDetails + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response GetBuildDatabaseConnectionWithDetails(CancellationToken cancellationToken = default) + { + using var scope = _staticSiteBuildDatabaseConnectionStaticSitesClientDiagnostics.CreateScope("StaticSiteBuildDatabaseConnectionResource.GetBuildDatabaseConnectionWithDetails"); + scope.Start(); + try + { + var response = _staticSiteBuildDatabaseConnectionStaticSitesRestClient.GetBuildDatabaseConnectionWithDetails(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new StaticSiteBuildDatabaseConnectionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildLinkedBackendCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildLinkedBackendCollection.cs new file mode 100644 index 0000000000000..d65a695516446 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildLinkedBackendCollection.cs @@ -0,0 +1,493 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetStaticSiteBuildLinkedBackends method from an instance of . + /// + public partial class StaticSiteBuildLinkedBackendCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _staticSiteBuildLinkedBackendStaticSitesClientDiagnostics; + private readonly StaticSitesRestOperations _staticSiteBuildLinkedBackendStaticSitesRestClient; + + /// Initializes a new instance of the class for mocking. + protected StaticSiteBuildLinkedBackendCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal StaticSiteBuildLinkedBackendCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _staticSiteBuildLinkedBackendStaticSitesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppService", StaticSiteBuildLinkedBackendResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(StaticSiteBuildLinkedBackendResource.ResourceType, out string staticSiteBuildLinkedBackendStaticSitesApiVersion); + _staticSiteBuildLinkedBackendStaticSitesRestClient = new StaticSitesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, staticSiteBuildLinkedBackendStaticSitesApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != StaticSiteBuildResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, StaticSiteBuildResource.ResourceType), nameof(id)); + } + + /// + /// Link backend to a static site build + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/linkedBackends/{linkedBackendName} + /// + /// + /// Operation Id + /// StaticSites_LinkBackendToBuild + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Name of the backend to link to the static site. + /// A JSON representation of the linked backend request properties. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string linkedBackendName, StaticSiteLinkedBackendData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(linkedBackendName, nameof(linkedBackendName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _staticSiteBuildLinkedBackendStaticSitesClientDiagnostics.CreateScope("StaticSiteBuildLinkedBackendCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _staticSiteBuildLinkedBackendStaticSitesRestClient.LinkBackendToBuildAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, linkedBackendName, data, cancellationToken).ConfigureAwait(false); + var operation = new AppServiceArmOperation(new StaticSiteBuildLinkedBackendOperationSource(Client), _staticSiteBuildLinkedBackendStaticSitesClientDiagnostics, Pipeline, _staticSiteBuildLinkedBackendStaticSitesRestClient.CreateLinkBackendToBuildRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, linkedBackendName, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Link backend to a static site build + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/linkedBackends/{linkedBackendName} + /// + /// + /// Operation Id + /// StaticSites_LinkBackendToBuild + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Name of the backend to link to the static site. + /// A JSON representation of the linked backend request properties. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string linkedBackendName, StaticSiteLinkedBackendData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(linkedBackendName, nameof(linkedBackendName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _staticSiteBuildLinkedBackendStaticSitesClientDiagnostics.CreateScope("StaticSiteBuildLinkedBackendCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _staticSiteBuildLinkedBackendStaticSitesRestClient.LinkBackendToBuild(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, linkedBackendName, data, cancellationToken); + var operation = new AppServiceArmOperation(new StaticSiteBuildLinkedBackendOperationSource(Client), _staticSiteBuildLinkedBackendStaticSitesClientDiagnostics, Pipeline, _staticSiteBuildLinkedBackendStaticSitesRestClient.CreateLinkBackendToBuildRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, linkedBackendName, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Returns the details of a linked backend linked to a static site build by name + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/linkedBackends/{linkedBackendName} + /// + /// + /// Operation Id + /// StaticSites_GetLinkedBackendForBuild + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the linked backend that should be retrieved. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string linkedBackendName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(linkedBackendName, nameof(linkedBackendName)); + + using var scope = _staticSiteBuildLinkedBackendStaticSitesClientDiagnostics.CreateScope("StaticSiteBuildLinkedBackendCollection.Get"); + scope.Start(); + try + { + var response = await _staticSiteBuildLinkedBackendStaticSitesRestClient.GetLinkedBackendForBuildAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, linkedBackendName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new StaticSiteBuildLinkedBackendResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Returns the details of a linked backend linked to a static site build by name + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/linkedBackends/{linkedBackendName} + /// + /// + /// Operation Id + /// StaticSites_GetLinkedBackendForBuild + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the linked backend that should be retrieved. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string linkedBackendName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(linkedBackendName, nameof(linkedBackendName)); + + using var scope = _staticSiteBuildLinkedBackendStaticSitesClientDiagnostics.CreateScope("StaticSiteBuildLinkedBackendCollection.Get"); + scope.Start(); + try + { + var response = _staticSiteBuildLinkedBackendStaticSitesRestClient.GetLinkedBackendForBuild(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, linkedBackendName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new StaticSiteBuildLinkedBackendResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Returns details of all backends linked to a static site build + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/linkedBackends + /// + /// + /// Operation Id + /// StaticSites_GetLinkedBackendsForBuild + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _staticSiteBuildLinkedBackendStaticSitesRestClient.CreateGetLinkedBackendsForBuildRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _staticSiteBuildLinkedBackendStaticSitesRestClient.CreateGetLinkedBackendsForBuildNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new StaticSiteBuildLinkedBackendResource(Client, StaticSiteLinkedBackendData.DeserializeStaticSiteLinkedBackendData(e)), _staticSiteBuildLinkedBackendStaticSitesClientDiagnostics, Pipeline, "StaticSiteBuildLinkedBackendCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Returns details of all backends linked to a static site build + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/linkedBackends + /// + /// + /// Operation Id + /// StaticSites_GetLinkedBackendsForBuild + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _staticSiteBuildLinkedBackendStaticSitesRestClient.CreateGetLinkedBackendsForBuildRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _staticSiteBuildLinkedBackendStaticSitesRestClient.CreateGetLinkedBackendsForBuildNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new StaticSiteBuildLinkedBackendResource(Client, StaticSiteLinkedBackendData.DeserializeStaticSiteLinkedBackendData(e)), _staticSiteBuildLinkedBackendStaticSitesClientDiagnostics, Pipeline, "StaticSiteBuildLinkedBackendCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/linkedBackends/{linkedBackendName} + /// + /// + /// Operation Id + /// StaticSites_GetLinkedBackendForBuild + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the linked backend that should be retrieved. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string linkedBackendName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(linkedBackendName, nameof(linkedBackendName)); + + using var scope = _staticSiteBuildLinkedBackendStaticSitesClientDiagnostics.CreateScope("StaticSiteBuildLinkedBackendCollection.Exists"); + scope.Start(); + try + { + var response = await _staticSiteBuildLinkedBackendStaticSitesRestClient.GetLinkedBackendForBuildAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, linkedBackendName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/linkedBackends/{linkedBackendName} + /// + /// + /// Operation Id + /// StaticSites_GetLinkedBackendForBuild + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the linked backend that should be retrieved. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string linkedBackendName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(linkedBackendName, nameof(linkedBackendName)); + + using var scope = _staticSiteBuildLinkedBackendStaticSitesClientDiagnostics.CreateScope("StaticSiteBuildLinkedBackendCollection.Exists"); + scope.Start(); + try + { + var response = _staticSiteBuildLinkedBackendStaticSitesRestClient.GetLinkedBackendForBuild(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, linkedBackendName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/linkedBackends/{linkedBackendName} + /// + /// + /// Operation Id + /// StaticSites_GetLinkedBackendForBuild + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the linked backend that should be retrieved. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string linkedBackendName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(linkedBackendName, nameof(linkedBackendName)); + + using var scope = _staticSiteBuildLinkedBackendStaticSitesClientDiagnostics.CreateScope("StaticSiteBuildLinkedBackendCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _staticSiteBuildLinkedBackendStaticSitesRestClient.GetLinkedBackendForBuildAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, linkedBackendName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new StaticSiteBuildLinkedBackendResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/linkedBackends/{linkedBackendName} + /// + /// + /// Operation Id + /// StaticSites_GetLinkedBackendForBuild + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the linked backend that should be retrieved. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string linkedBackendName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(linkedBackendName, nameof(linkedBackendName)); + + using var scope = _staticSiteBuildLinkedBackendStaticSitesClientDiagnostics.CreateScope("StaticSiteBuildLinkedBackendCollection.GetIfExists"); + scope.Start(); + try + { + var response = _staticSiteBuildLinkedBackendStaticSitesRestClient.GetLinkedBackendForBuild(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, linkedBackendName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new StaticSiteBuildLinkedBackendResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildLinkedBackendResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildLinkedBackendResource.Serialization.cs new file mode 100644 index 0000000000000..c980b4cb4948b --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildLinkedBackendResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.AppService +{ + public partial class StaticSiteBuildLinkedBackendResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + StaticSiteLinkedBackendData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + StaticSiteLinkedBackendData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildLinkedBackendResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildLinkedBackendResource.cs new file mode 100644 index 0000000000000..84141b94bf063 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildLinkedBackendResource.cs @@ -0,0 +1,446 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A Class representing a StaticSiteBuildLinkedBackend along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetStaticSiteBuildLinkedBackendResource method. + /// Otherwise you can get one from its parent resource using the GetStaticSiteBuildLinkedBackend method. + /// + public partial class StaticSiteBuildLinkedBackendResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The name. + /// The environmentName. + /// The linkedBackendName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name, string environmentName, string linkedBackendName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/linkedBackends/{linkedBackendName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _staticSiteBuildLinkedBackendStaticSitesClientDiagnostics; + private readonly StaticSitesRestOperations _staticSiteBuildLinkedBackendStaticSitesRestClient; + private readonly StaticSiteLinkedBackendData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Web/staticSites/builds/linkedBackends"; + + /// Initializes a new instance of the class for mocking. + protected StaticSiteBuildLinkedBackendResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal StaticSiteBuildLinkedBackendResource(ArmClient client, StaticSiteLinkedBackendData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal StaticSiteBuildLinkedBackendResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _staticSiteBuildLinkedBackendStaticSitesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppService", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string staticSiteBuildLinkedBackendStaticSitesApiVersion); + _staticSiteBuildLinkedBackendStaticSitesRestClient = new StaticSitesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, staticSiteBuildLinkedBackendStaticSitesApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual StaticSiteLinkedBackendData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Returns the details of a linked backend linked to a static site build by name + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/linkedBackends/{linkedBackendName} + /// + /// + /// Operation Id + /// StaticSites_GetLinkedBackendForBuild + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _staticSiteBuildLinkedBackendStaticSitesClientDiagnostics.CreateScope("StaticSiteBuildLinkedBackendResource.Get"); + scope.Start(); + try + { + var response = await _staticSiteBuildLinkedBackendStaticSitesRestClient.GetLinkedBackendForBuildAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new StaticSiteBuildLinkedBackendResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Returns the details of a linked backend linked to a static site build by name + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/linkedBackends/{linkedBackendName} + /// + /// + /// Operation Id + /// StaticSites_GetLinkedBackendForBuild + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _staticSiteBuildLinkedBackendStaticSitesClientDiagnostics.CreateScope("StaticSiteBuildLinkedBackendResource.Get"); + scope.Start(); + try + { + var response = _staticSiteBuildLinkedBackendStaticSitesRestClient.GetLinkedBackendForBuild(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new StaticSiteBuildLinkedBackendResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Unlink a backend from a static site build + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/linkedBackends/{linkedBackendName} + /// + /// + /// Operation Id + /// StaticSites_UnlinkBackendFromBuild + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Decides if auth will be removed from backend configuration. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, bool? isCleaningAuthConfig = null, CancellationToken cancellationToken = default) + { + using var scope = _staticSiteBuildLinkedBackendStaticSitesClientDiagnostics.CreateScope("StaticSiteBuildLinkedBackendResource.Delete"); + scope.Start(); + try + { + var response = await _staticSiteBuildLinkedBackendStaticSitesRestClient.UnlinkBackendFromBuildAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, isCleaningAuthConfig, cancellationToken).ConfigureAwait(false); + var uri = _staticSiteBuildLinkedBackendStaticSitesRestClient.CreateUnlinkBackendFromBuildRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, isCleaningAuthConfig); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppServiceArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Unlink a backend from a static site build + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/linkedBackends/{linkedBackendName} + /// + /// + /// Operation Id + /// StaticSites_UnlinkBackendFromBuild + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Decides if auth will be removed from backend configuration. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, bool? isCleaningAuthConfig = null, CancellationToken cancellationToken = default) + { + using var scope = _staticSiteBuildLinkedBackendStaticSitesClientDiagnostics.CreateScope("StaticSiteBuildLinkedBackendResource.Delete"); + scope.Start(); + try + { + var response = _staticSiteBuildLinkedBackendStaticSitesRestClient.UnlinkBackendFromBuild(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, isCleaningAuthConfig, cancellationToken); + var uri = _staticSiteBuildLinkedBackendStaticSitesRestClient.CreateUnlinkBackendFromBuildRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, isCleaningAuthConfig); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppServiceArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Link backend to a static site build + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/linkedBackends/{linkedBackendName} + /// + /// + /// Operation Id + /// StaticSites_LinkBackendToBuild + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// A JSON representation of the linked backend request properties. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, StaticSiteLinkedBackendData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _staticSiteBuildLinkedBackendStaticSitesClientDiagnostics.CreateScope("StaticSiteBuildLinkedBackendResource.Update"); + scope.Start(); + try + { + var response = await _staticSiteBuildLinkedBackendStaticSitesRestClient.LinkBackendToBuildAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new AppServiceArmOperation(new StaticSiteBuildLinkedBackendOperationSource(Client), _staticSiteBuildLinkedBackendStaticSitesClientDiagnostics, Pipeline, _staticSiteBuildLinkedBackendStaticSitesRestClient.CreateLinkBackendToBuildRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Link backend to a static site build + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/linkedBackends/{linkedBackendName} + /// + /// + /// Operation Id + /// StaticSites_LinkBackendToBuild + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// A JSON representation of the linked backend request properties. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, StaticSiteLinkedBackendData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _staticSiteBuildLinkedBackendStaticSitesClientDiagnostics.CreateScope("StaticSiteBuildLinkedBackendResource.Update"); + scope.Start(); + try + { + var response = _staticSiteBuildLinkedBackendStaticSitesRestClient.LinkBackendToBuild(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new AppServiceArmOperation(new StaticSiteBuildLinkedBackendOperationSource(Client), _staticSiteBuildLinkedBackendStaticSitesClientDiagnostics, Pipeline, _staticSiteBuildLinkedBackendStaticSitesRestClient.CreateLinkBackendToBuildRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Validates that a backend can be linked to a static site build + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/linkedBackends/{linkedBackendName}/validate + /// + /// + /// Operation Id + /// StaticSites_ValidateBackendForBuild + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// A JSON representation of the linked backend request properties. + /// The cancellation token to use. + /// is null. + public virtual async Task ValidateBackendForBuildAsync(WaitUntil waitUntil, StaticSiteLinkedBackendData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _staticSiteBuildLinkedBackendStaticSitesClientDiagnostics.CreateScope("StaticSiteBuildLinkedBackendResource.ValidateBackendForBuild"); + scope.Start(); + try + { + var response = await _staticSiteBuildLinkedBackendStaticSitesRestClient.ValidateBackendForBuildAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new AppServiceArmOperation(_staticSiteBuildLinkedBackendStaticSitesClientDiagnostics, Pipeline, _staticSiteBuildLinkedBackendStaticSitesRestClient.CreateValidateBackendForBuildRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Validates that a backend can be linked to a static site build + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/linkedBackends/{linkedBackendName}/validate + /// + /// + /// Operation Id + /// StaticSites_ValidateBackendForBuild + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// A JSON representation of the linked backend request properties. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation ValidateBackendForBuild(WaitUntil waitUntil, StaticSiteLinkedBackendData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _staticSiteBuildLinkedBackendStaticSitesClientDiagnostics.CreateScope("StaticSiteBuildLinkedBackendResource.ValidateBackendForBuild"); + scope.Start(); + try + { + var response = _staticSiteBuildLinkedBackendStaticSitesRestClient.ValidateBackendForBuild(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new AppServiceArmOperation(_staticSiteBuildLinkedBackendStaticSitesClientDiagnostics, Pipeline, _staticSiteBuildLinkedBackendStaticSitesRestClient.CreateValidateBackendForBuildRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildResource.cs index aa6629f760655..6717adee0d127 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildResource.cs @@ -90,6 +90,75 @@ internal static void ValidateResourceId(ResourceIdentifier id) throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); } + /// Gets a collection of StaticSiteBuildDatabaseConnectionResources in the StaticSiteBuild. + /// An object representing collection of StaticSiteBuildDatabaseConnectionResources and their operations over a StaticSiteBuildDatabaseConnectionResource. + public virtual StaticSiteBuildDatabaseConnectionCollection GetStaticSiteBuildDatabaseConnections() + { + return GetCachedClient(client => new StaticSiteBuildDatabaseConnectionCollection(client, Id)); + } + + /// + /// Returns overview of a database connection for a static site build by name + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/databaseConnections/{databaseConnectionName} + /// + /// + /// Operation Id + /// StaticSites_GetBuildDatabaseConnection + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the database connection. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetStaticSiteBuildDatabaseConnectionAsync(string databaseConnectionName, CancellationToken cancellationToken = default) + { + return await GetStaticSiteBuildDatabaseConnections().GetAsync(databaseConnectionName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Returns overview of a database connection for a static site build by name + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/databaseConnections/{databaseConnectionName} + /// + /// + /// Operation Id + /// StaticSites_GetBuildDatabaseConnection + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the database connection. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetStaticSiteBuildDatabaseConnection(string databaseConnectionName, CancellationToken cancellationToken = default) + { + return GetStaticSiteBuildDatabaseConnections().Get(databaseConnectionName, cancellationToken); + } + /// Gets a collection of StaticSiteBuildUserProvidedFunctionAppResources in the StaticSiteBuild. /// An object representing collection of StaticSiteBuildUserProvidedFunctionAppResources and their operations over a StaticSiteBuildUserProvidedFunctionAppResource. public virtual StaticSiteBuildUserProvidedFunctionAppCollection GetStaticSiteBuildUserProvidedFunctionApps() @@ -110,7 +179,7 @@ public virtual StaticSiteBuildUserProvidedFunctionAppCollection GetStaticSiteBui /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -141,7 +210,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -159,6 +228,75 @@ public virtual Response GetStati return GetStaticSiteBuildUserProvidedFunctionApps().Get(functionAppName, cancellationToken); } + /// Gets a collection of StaticSiteBuildLinkedBackendResources in the StaticSiteBuild. + /// An object representing collection of StaticSiteBuildLinkedBackendResources and their operations over a StaticSiteBuildLinkedBackendResource. + public virtual StaticSiteBuildLinkedBackendCollection GetStaticSiteBuildLinkedBackends() + { + return GetCachedClient(client => new StaticSiteBuildLinkedBackendCollection(client, Id)); + } + + /// + /// Returns the details of a linked backend linked to a static site build by name + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/linkedBackends/{linkedBackendName} + /// + /// + /// Operation Id + /// StaticSites_GetLinkedBackendForBuild + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the linked backend that should be retrieved. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetStaticSiteBuildLinkedBackendAsync(string linkedBackendName, CancellationToken cancellationToken = default) + { + return await GetStaticSiteBuildLinkedBackends().GetAsync(linkedBackendName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Returns the details of a linked backend linked to a static site build by name + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/linkedBackends/{linkedBackendName} + /// + /// + /// Operation Id + /// StaticSites_GetLinkedBackendForBuild + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the linked backend that should be retrieved. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetStaticSiteBuildLinkedBackend(string linkedBackendName, CancellationToken cancellationToken = default) + { + return GetStaticSiteBuildLinkedBackends().Get(linkedBackendName, cancellationToken); + } + /// /// Description for Gets the details of a static site build. /// @@ -172,7 +310,7 @@ public virtual Response GetStati /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -212,7 +350,7 @@ public virtual async Task> GetAsync(Cancellati /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -252,7 +390,7 @@ public virtual Response Get(CancellationToken cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -294,7 +432,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -336,7 +474,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -374,7 +512,7 @@ public virtual async Task> CreateOrU /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -412,7 +550,7 @@ public virtual Response CreateOrUpdateAppSett /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -450,7 +588,7 @@ public virtual async Task> CreateOrU /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -488,7 +626,7 @@ public virtual Response CreateOrUpdateFunctio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -518,7 +656,7 @@ public virtual AsyncPageable GetFunctionsAsync(Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -548,7 +686,7 @@ public virtual Pageable GetFunctions(CancellationTok /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -586,7 +724,7 @@ public virtual async Task> GetStatic /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -624,7 +762,7 @@ public virtual Response GetStaticSiteBuildApp /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -662,7 +800,7 @@ public virtual async Task> GetFuncti /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -687,6 +825,66 @@ public virtual Response GetFunctionAppSetting } } + /// + /// Returns details of database connections for a static site build + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/showDatabaseConnections + /// + /// + /// Operation Id + /// StaticSites_GetBuildDatabaseConnectionsWithDetails + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetBuildDatabaseConnectionsWithDetailsAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _staticSiteBuildStaticSitesRestClient.CreateGetBuildDatabaseConnectionsWithDetailsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _staticSiteBuildStaticSitesRestClient.CreateGetBuildDatabaseConnectionsWithDetailsNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => StaticSiteDatabaseConnectionData.DeserializeStaticSiteDatabaseConnectionData(e), _staticSiteBuildStaticSitesClientDiagnostics, Pipeline, "StaticSiteBuildResource.GetBuildDatabaseConnectionsWithDetails", "value", "nextLink", cancellationToken); + } + + /// + /// Returns details of database connections for a static site build + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/showDatabaseConnections + /// + /// + /// Operation Id + /// StaticSites_GetBuildDatabaseConnectionsWithDetails + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetBuildDatabaseConnectionsWithDetails(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _staticSiteBuildStaticSitesRestClient.CreateGetBuildDatabaseConnectionsWithDetailsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _staticSiteBuildStaticSitesRestClient.CreateGetBuildDatabaseConnectionsWithDetailsNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => StaticSiteDatabaseConnectionData.DeserializeStaticSiteDatabaseConnectionData(e), _staticSiteBuildStaticSitesClientDiagnostics, Pipeline, "StaticSiteBuildResource.GetBuildDatabaseConnectionsWithDetails", "value", "nextLink", cancellationToken); + } + /// /// Description for Deploys zipped content to a specific environment of a static site. /// @@ -700,7 +898,7 @@ public virtual Response GetFunctionAppSetting /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -746,7 +944,7 @@ public virtual async Task CreateZipDeploymentAsync(WaitUntil waitU /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildUserProvidedFunctionAppCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildUserProvidedFunctionAppCollection.cs index 623ffbe377bc4..18b176bddf38f 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildUserProvidedFunctionAppCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildUserProvidedFunctionAppCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -164,7 +164,7 @@ public virtual ArmOperation Crea /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -209,7 +209,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -254,7 +254,7 @@ public virtual Response Get(stri /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -284,7 +284,7 @@ public virtual AsyncPageable Get /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -314,7 +314,7 @@ public virtual Pageable GetAll(C /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -357,7 +357,7 @@ public virtual async Task> ExistsAsync(string functionAppName, Ca /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -400,7 +400,7 @@ public virtual Response Exists(string functionAppName, CancellationToken c /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -445,7 +445,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildUserProvidedFunctionAppResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildUserProvidedFunctionAppResource.cs index 71db582727bd3..2661319bb8516 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildUserProvidedFunctionAppResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildUserProvidedFunctionAppResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(Canc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -270,7 +270,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -317,7 +317,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteCollection.cs index a44c270655e8f..416b8e91f296c 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateAsync( /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUnt /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string name, Ca /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string name, CancellationToken c /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken c /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken cancellatio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string name, CancellationT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string name, CancellationToken cancellation /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIfExistsAsync /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteCustomDomainOverviewCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteCustomDomainOverviewCollection.cs index 252c0a55ebd26..3354aa819add8 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteCustomDomainOverviewCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteCustomDomainOverviewCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpda /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetA /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string domai /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(Cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string domainName, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string domainName, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteCustomDomainOverviewResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteCustomDomainOverviewResource.cs index d16e22b953695..166965853d5e4 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteCustomDomainOverviewResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteCustomDomainOverviewResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetA /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(Cancellation /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -266,7 +266,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -358,7 +358,7 @@ public virtual ArmOperation Update(WaitU /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -404,7 +404,7 @@ public virtual async Task ValidateCustomDomainCanBeAddedToStaticSi /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteData.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteData.Serialization.cs index 3d6cde41c1bbc..bf4a2fb984853 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteData.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteData.Serialization.cs @@ -160,11 +160,41 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp } writer.WriteEndArray(); } - if (options.Format != "W" && Optional.IsDefined(Provider)) + if (options.Format != "W" && Optional.IsCollectionDefined(LinkedBackends)) + { + writer.WritePropertyName("linkedBackends"u8); + writer.WriteStartArray(); + foreach (var item in LinkedBackends) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Provider)) { writer.WritePropertyName("provider"u8); writer.WriteStringValue(Provider); } + if (Optional.IsDefined(EnterpriseGradeCdnStatus)) + { + writer.WritePropertyName("enterpriseGradeCdnStatus"u8); + writer.WriteStringValue(EnterpriseGradeCdnStatus.Value.ToString()); + } + if (Optional.IsDefined(PublicNetworkAccess)) + { + writer.WritePropertyName("publicNetworkAccess"u8); + writer.WriteStringValue(PublicNetworkAccess); + } + if (options.Format != "W" && Optional.IsCollectionDefined(DatabaseConnections)) + { + writer.WritePropertyName("databaseConnections"u8); + writer.WriteStartArray(); + foreach (var item in DatabaseConnections) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } writer.WriteEndObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -226,7 +256,11 @@ internal static StaticSiteData DeserializeStaticSiteData(JsonElement element, Mo string contentDistributionEndpoint = default; string keyVaultReferenceIdentity = default; IReadOnlyList userProvidedFunctionApps = default; + IReadOnlyList linkedBackends = default; string provider = default; + EnterpriseGradeCdnStatus? enterpriseGradeCdnStatus = default; + string publicNetworkAccess = default; + IReadOnlyList databaseConnections = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -418,11 +452,53 @@ internal static StaticSiteData DeserializeStaticSiteData(JsonElement element, Mo userProvidedFunctionApps = array; continue; } + if (property0.NameEquals("linkedBackends"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(StaticSiteLinkedBackendInfo.DeserializeStaticSiteLinkedBackendInfo(item, options)); + } + linkedBackends = array; + continue; + } if (property0.NameEquals("provider"u8)) { provider = property0.Value.GetString(); continue; } + if (property0.NameEquals("enterpriseGradeCdnStatus"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enterpriseGradeCdnStatus = new EnterpriseGradeCdnStatus(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("publicNetworkAccess"u8)) + { + publicNetworkAccess = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("databaseConnections"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(StaticSiteDatabaseConnectionOverview.DeserializeStaticSiteDatabaseConnectionOverview(item, options)); + } + databaseConnections = array; + continue; + } } continue; } @@ -454,7 +530,11 @@ internal static StaticSiteData DeserializeStaticSiteData(JsonElement element, Mo contentDistributionEndpoint, keyVaultReferenceIdentity, userProvidedFunctionApps ?? new ChangeTrackingList(), + linkedBackends ?? new ChangeTrackingList(), provider, + enterpriseGradeCdnStatus, + publicNetworkAccess, + databaseConnections ?? new ChangeTrackingList(), kind, serializedAdditionalRawData); } @@ -900,6 +980,29 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(LinkedBackends), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" linkedBackends: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(LinkedBackends)) + { + if (LinkedBackends.Any()) + { + builder.Append(" linkedBackends: "); + builder.AppendLine("["); + foreach (var item in LinkedBackends) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " linkedBackends: "); + } + builder.AppendLine(" ]"); + } + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Provider), out propertyOverride); if (hasPropertyOverride) { @@ -923,6 +1026,67 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EnterpriseGradeCdnStatus), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" enterpriseGradeCdnStatus: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(EnterpriseGradeCdnStatus)) + { + builder.Append(" enterpriseGradeCdnStatus: "); + builder.AppendLine($"'{EnterpriseGradeCdnStatus.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PublicNetworkAccess), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" publicNetworkAccess: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PublicNetworkAccess)) + { + builder.Append(" publicNetworkAccess: "); + if (PublicNetworkAccess.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{PublicNetworkAccess}'''"); + } + else + { + builder.AppendLine($"'{PublicNetworkAccess}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DatabaseConnections), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" databaseConnections: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(DatabaseConnections)) + { + if (DatabaseConnections.Any()) + { + builder.Append(" databaseConnections: "); + builder.AppendLine("["); + foreach (var item in DatabaseConnections) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " databaseConnections: "); + } + builder.AppendLine(" ]"); + } + } + } + builder.AppendLine(" }"); builder.AppendLine("}"); return BinaryData.FromString(builder.ToString()); diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteData.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteData.cs index 770aec2210130..dc7ccbc11ce68 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteData.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteData.cs @@ -58,6 +58,8 @@ public StaticSiteData(AzureLocation location) : base(location) CustomDomains = new ChangeTrackingList(); PrivateEndpointConnections = new ChangeTrackingList(); UserProvidedFunctionApps = new ChangeTrackingList(); + LinkedBackends = new ChangeTrackingList(); + DatabaseConnections = new ChangeTrackingList(); } /// Initializes a new instance of . @@ -82,10 +84,14 @@ public StaticSiteData(AzureLocation location) : base(location) /// The content distribution endpoint for the static site. /// Identity to use for Key Vault Reference authentication. /// User provided function apps registered with the static site. + /// Backends linked to the static side. /// The provider that submitted the last deployment to the primary environment of the static site. + /// State indicating the status of the enterprise grade CDN serving traffic to the static web app. + /// State indicating whether public traffic are allowed or not for a static web app. Allowed Values: 'Enabled', 'Disabled' or an empty string. + /// Database connections for the static site. /// Kind of resource. /// Keeps track of any properties unknown to the library. - internal StaticSiteData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, AppServiceSkuDescription sku, ManagedServiceIdentity identity, string defaultHostname, Uri repositoryUri, string branch, IReadOnlyList customDomains, string repositoryToken, StaticSiteBuildProperties buildProperties, IReadOnlyList privateEndpointConnections, StagingEnvironmentPolicy? stagingEnvironmentPolicy, bool? allowConfigFileUpdates, StaticSiteTemplate templateProperties, string contentDistributionEndpoint, string keyVaultReferenceIdentity, IReadOnlyList userProvidedFunctionApps, string provider, string kind, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal StaticSiteData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, AppServiceSkuDescription sku, ManagedServiceIdentity identity, string defaultHostname, Uri repositoryUri, string branch, IReadOnlyList customDomains, string repositoryToken, StaticSiteBuildProperties buildProperties, IReadOnlyList privateEndpointConnections, StagingEnvironmentPolicy? stagingEnvironmentPolicy, bool? allowConfigFileUpdates, StaticSiteTemplate templateProperties, string contentDistributionEndpoint, string keyVaultReferenceIdentity, IReadOnlyList userProvidedFunctionApps, IReadOnlyList linkedBackends, string provider, EnterpriseGradeCdnStatus? enterpriseGradeCdnStatus, string publicNetworkAccess, IReadOnlyList databaseConnections, string kind, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { Sku = sku; Identity = identity; @@ -102,7 +108,11 @@ internal StaticSiteData(ResourceIdentifier id, string name, ResourceType resourc ContentDistributionEndpoint = contentDistributionEndpoint; KeyVaultReferenceIdentity = keyVaultReferenceIdentity; UserProvidedFunctionApps = userProvidedFunctionApps; + LinkedBackends = linkedBackends; Provider = provider; + EnterpriseGradeCdnStatus = enterpriseGradeCdnStatus; + PublicNetworkAccess = publicNetworkAccess; + DatabaseConnections = databaseConnections; Kind = kind; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -157,9 +167,21 @@ internal StaticSiteData() /// User provided function apps registered with the static site. [WirePath("properties.userProvidedFunctionApps")] public IReadOnlyList UserProvidedFunctionApps { get; } + /// Backends linked to the static side. + [WirePath("properties.linkedBackends")] + public IReadOnlyList LinkedBackends { get; } /// The provider that submitted the last deployment to the primary environment of the static site. [WirePath("properties.provider")] - public string Provider { get; } + public string Provider { get; set; } + /// State indicating the status of the enterprise grade CDN serving traffic to the static web app. + [WirePath("properties.enterpriseGradeCdnStatus")] + public EnterpriseGradeCdnStatus? EnterpriseGradeCdnStatus { get; set; } + /// State indicating whether public traffic are allowed or not for a static web app. Allowed Values: 'Enabled', 'Disabled' or an empty string. + [WirePath("properties.publicNetworkAccess")] + public string PublicNetworkAccess { get; set; } + /// Database connections for the static site. + [WirePath("properties.databaseConnections")] + public IReadOnlyList DatabaseConnections { get; } /// Kind of resource. [WirePath("kind")] public string Kind { get; set; } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteDatabaseConnectionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteDatabaseConnectionCollection.cs new file mode 100644 index 0000000000000..1520f3d4bb3e9 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteDatabaseConnectionCollection.cs @@ -0,0 +1,497 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetStaticSiteDatabaseConnections method from an instance of . + /// + public partial class StaticSiteDatabaseConnectionCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _staticSiteDatabaseConnectionStaticSitesClientDiagnostics; + private readonly StaticSitesRestOperations _staticSiteDatabaseConnectionStaticSitesRestClient; + + /// Initializes a new instance of the class for mocking. + protected StaticSiteDatabaseConnectionCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal StaticSiteDatabaseConnectionCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _staticSiteDatabaseConnectionStaticSitesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppService", StaticSiteDatabaseConnectionResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(StaticSiteDatabaseConnectionResource.ResourceType, out string staticSiteDatabaseConnectionStaticSitesApiVersion); + _staticSiteDatabaseConnectionStaticSitesRestClient = new StaticSitesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, staticSiteDatabaseConnectionStaticSitesApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != StaticSiteResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, StaticSiteResource.ResourceType), nameof(id)); + } + + /// + /// Description for Create or update a database connection for a static site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/databaseConnections/{databaseConnectionName} + /// + /// + /// Operation Id + /// StaticSites_CreateOrUpdateDatabaseConnection + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Name of the database connection. + /// A JSON representation of the database connection request properties. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string databaseConnectionName, StaticSiteDatabaseConnectionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(databaseConnectionName, nameof(databaseConnectionName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _staticSiteDatabaseConnectionStaticSitesClientDiagnostics.CreateScope("StaticSiteDatabaseConnectionCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _staticSiteDatabaseConnectionStaticSitesRestClient.CreateOrUpdateDatabaseConnectionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, databaseConnectionName, data, cancellationToken).ConfigureAwait(false); + var uri = _staticSiteDatabaseConnectionStaticSitesRestClient.CreateCreateOrUpdateDatabaseConnectionRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, databaseConnectionName, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppServiceArmOperation(Response.FromValue(new StaticSiteDatabaseConnectionResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Description for Create or update a database connection for a static site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/databaseConnections/{databaseConnectionName} + /// + /// + /// Operation Id + /// StaticSites_CreateOrUpdateDatabaseConnection + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Name of the database connection. + /// A JSON representation of the database connection request properties. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string databaseConnectionName, StaticSiteDatabaseConnectionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(databaseConnectionName, nameof(databaseConnectionName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _staticSiteDatabaseConnectionStaticSitesClientDiagnostics.CreateScope("StaticSiteDatabaseConnectionCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _staticSiteDatabaseConnectionStaticSitesRestClient.CreateOrUpdateDatabaseConnection(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, databaseConnectionName, data, cancellationToken); + var uri = _staticSiteDatabaseConnectionStaticSitesRestClient.CreateCreateOrUpdateDatabaseConnectionRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, databaseConnectionName, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppServiceArmOperation(Response.FromValue(new StaticSiteDatabaseConnectionResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Returns overview of a database connection for a static site by name + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/databaseConnections/{databaseConnectionName} + /// + /// + /// Operation Id + /// StaticSites_GetDatabaseConnection + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the database connection. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string databaseConnectionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(databaseConnectionName, nameof(databaseConnectionName)); + + using var scope = _staticSiteDatabaseConnectionStaticSitesClientDiagnostics.CreateScope("StaticSiteDatabaseConnectionCollection.Get"); + scope.Start(); + try + { + var response = await _staticSiteDatabaseConnectionStaticSitesRestClient.GetDatabaseConnectionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, databaseConnectionName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new StaticSiteDatabaseConnectionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Returns overview of a database connection for a static site by name + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/databaseConnections/{databaseConnectionName} + /// + /// + /// Operation Id + /// StaticSites_GetDatabaseConnection + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the database connection. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string databaseConnectionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(databaseConnectionName, nameof(databaseConnectionName)); + + using var scope = _staticSiteDatabaseConnectionStaticSitesClientDiagnostics.CreateScope("StaticSiteDatabaseConnectionCollection.Get"); + scope.Start(); + try + { + var response = _staticSiteDatabaseConnectionStaticSitesRestClient.GetDatabaseConnection(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, databaseConnectionName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new StaticSiteDatabaseConnectionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Returns overviews of database connections for a static site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/databaseConnections + /// + /// + /// Operation Id + /// StaticSites_GetDatabaseConnections + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _staticSiteDatabaseConnectionStaticSitesRestClient.CreateGetDatabaseConnectionsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _staticSiteDatabaseConnectionStaticSitesRestClient.CreateGetDatabaseConnectionsNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new StaticSiteDatabaseConnectionResource(Client, StaticSiteDatabaseConnectionData.DeserializeStaticSiteDatabaseConnectionData(e)), _staticSiteDatabaseConnectionStaticSitesClientDiagnostics, Pipeline, "StaticSiteDatabaseConnectionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Returns overviews of database connections for a static site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/databaseConnections + /// + /// + /// Operation Id + /// StaticSites_GetDatabaseConnections + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _staticSiteDatabaseConnectionStaticSitesRestClient.CreateGetDatabaseConnectionsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _staticSiteDatabaseConnectionStaticSitesRestClient.CreateGetDatabaseConnectionsNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new StaticSiteDatabaseConnectionResource(Client, StaticSiteDatabaseConnectionData.DeserializeStaticSiteDatabaseConnectionData(e)), _staticSiteDatabaseConnectionStaticSitesClientDiagnostics, Pipeline, "StaticSiteDatabaseConnectionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/databaseConnections/{databaseConnectionName} + /// + /// + /// Operation Id + /// StaticSites_GetDatabaseConnection + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the database connection. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string databaseConnectionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(databaseConnectionName, nameof(databaseConnectionName)); + + using var scope = _staticSiteDatabaseConnectionStaticSitesClientDiagnostics.CreateScope("StaticSiteDatabaseConnectionCollection.Exists"); + scope.Start(); + try + { + var response = await _staticSiteDatabaseConnectionStaticSitesRestClient.GetDatabaseConnectionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, databaseConnectionName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/databaseConnections/{databaseConnectionName} + /// + /// + /// Operation Id + /// StaticSites_GetDatabaseConnection + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the database connection. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string databaseConnectionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(databaseConnectionName, nameof(databaseConnectionName)); + + using var scope = _staticSiteDatabaseConnectionStaticSitesClientDiagnostics.CreateScope("StaticSiteDatabaseConnectionCollection.Exists"); + scope.Start(); + try + { + var response = _staticSiteDatabaseConnectionStaticSitesRestClient.GetDatabaseConnection(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, databaseConnectionName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/databaseConnections/{databaseConnectionName} + /// + /// + /// Operation Id + /// StaticSites_GetDatabaseConnection + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the database connection. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string databaseConnectionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(databaseConnectionName, nameof(databaseConnectionName)); + + using var scope = _staticSiteDatabaseConnectionStaticSitesClientDiagnostics.CreateScope("StaticSiteDatabaseConnectionCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _staticSiteDatabaseConnectionStaticSitesRestClient.GetDatabaseConnectionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, databaseConnectionName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new StaticSiteDatabaseConnectionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/databaseConnections/{databaseConnectionName} + /// + /// + /// Operation Id + /// StaticSites_GetDatabaseConnection + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the database connection. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string databaseConnectionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(databaseConnectionName, nameof(databaseConnectionName)); + + using var scope = _staticSiteDatabaseConnectionStaticSitesClientDiagnostics.CreateScope("StaticSiteDatabaseConnectionCollection.GetIfExists"); + scope.Start(); + try + { + var response = _staticSiteDatabaseConnectionStaticSitesRestClient.GetDatabaseConnection(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, databaseConnectionName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new StaticSiteDatabaseConnectionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteDatabaseConnectionData.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteDatabaseConnectionData.Serialization.cs new file mode 100644 index 0000000000000..28809cad1df6d --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteDatabaseConnectionData.Serialization.cs @@ -0,0 +1,476 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.AppService.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppService +{ + public partial class StaticSiteDatabaseConnectionData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(StaticSiteDatabaseConnectionData)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Kind)) + { + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind); + } + if (options.Format != "W") + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (options.Format != "W") + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W") + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(ResourceType); + } + if (options.Format != "W" && Optional.IsDefined(SystemData)) + { + writer.WritePropertyName("systemData"u8); + JsonSerializer.Serialize(writer, SystemData); + } + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(ResourceId)) + { + writer.WritePropertyName("resourceId"u8); + writer.WriteStringValue(ResourceId); + } + if (Optional.IsDefined(ConnectionIdentity)) + { + writer.WritePropertyName("connectionIdentity"u8); + writer.WriteStringValue(ConnectionIdentity); + } + if (Optional.IsDefined(ConnectionString)) + { + writer.WritePropertyName("connectionString"u8); + writer.WriteStringValue(ConnectionString); + } + if (Optional.IsDefined(Region)) + { + writer.WritePropertyName("region"u8); + writer.WriteStringValue(Region); + } + if (options.Format != "W" && Optional.IsCollectionDefined(ConfigurationFiles)) + { + writer.WritePropertyName("configurationFiles"u8); + writer.WriteStartArray(); + foreach (var item in ConfigurationFiles) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + StaticSiteDatabaseConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(StaticSiteDatabaseConnectionData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeStaticSiteDatabaseConnectionData(document.RootElement, options); + } + + internal static StaticSiteDatabaseConnectionData DeserializeStaticSiteDatabaseConnectionData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string kind = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + ResourceIdentifier resourceId = default; + string connectionIdentity = default; + string connectionString = default; + string region = default; + IReadOnlyList configurationFiles = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("kind"u8)) + { + kind = property.Value.GetString(); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("resourceId"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resourceId = new ResourceIdentifier(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("connectionIdentity"u8)) + { + connectionIdentity = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("connectionString"u8)) + { + connectionString = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("region"u8)) + { + region = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("configurationFiles"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(StaticSiteDatabaseConnectionConfigurationFileOverview.DeserializeStaticSiteDatabaseConnectionConfigurationFileOverview(item, options)); + } + configurationFiles = array; + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new StaticSiteDatabaseConnectionData( + id, + name, + type, + systemData, + resourceId, + connectionIdentity, + connectionString, + region, + configurationFiles ?? new ChangeTrackingList(), + kind, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Kind), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" kind: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Kind)) + { + builder.Append(" kind: "); + if (Kind.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Kind}'''"); + } + else + { + builder.AppendLine($"'{Kind}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ResourceId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" resourceId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ResourceId)) + { + builder.Append(" resourceId: "); + builder.AppendLine($"'{ResourceId.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ConnectionIdentity), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" connectionIdentity: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ConnectionIdentity)) + { + builder.Append(" connectionIdentity: "); + if (ConnectionIdentity.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ConnectionIdentity}'''"); + } + else + { + builder.AppendLine($"'{ConnectionIdentity}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ConnectionString), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" connectionString: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ConnectionString)) + { + builder.Append(" connectionString: "); + if (ConnectionString.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ConnectionString}'''"); + } + else + { + builder.AppendLine($"'{ConnectionString}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Region), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" region: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Region)) + { + builder.Append(" region: "); + if (Region.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Region}'''"); + } + else + { + builder.AppendLine($"'{Region}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ConfigurationFiles), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" configurationFiles: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(ConfigurationFiles)) + { + if (ConfigurationFiles.Any()) + { + builder.Append(" configurationFiles: "); + builder.AppendLine("["); + foreach (var item in ConfigurationFiles) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " configurationFiles: "); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(StaticSiteDatabaseConnectionData)} does not support writing '{options.Format}' format."); + } + } + + StaticSiteDatabaseConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeStaticSiteDatabaseConnectionData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(StaticSiteDatabaseConnectionData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteDatabaseConnectionData.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteDatabaseConnectionData.cs new file mode 100644 index 0000000000000..7b90e93fb4045 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteDatabaseConnectionData.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.AppService.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A class representing the StaticSiteDatabaseConnection data model. + /// Static Site Database Connection resource. + /// + public partial class StaticSiteDatabaseConnectionData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public StaticSiteDatabaseConnectionData() + { + ConfigurationFiles = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource id of the database. + /// If present, the identity is used in conjunction with connection string to connect to the database. Use of the system-assigned managed identity is indicated with the string 'SystemAssigned', while use of a user-assigned managed identity is indicated with the resource id of the managed identity resource. + /// The connection string to use to connect to the database. + /// The region of the database resource. + /// A list of configuration files associated with this database connection. + /// Kind of resource. + /// Keeps track of any properties unknown to the library. + internal StaticSiteDatabaseConnectionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ResourceIdentifier resourceId, string connectionIdentity, string connectionString, string region, IReadOnlyList configurationFiles, string kind, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + ResourceId = resourceId; + ConnectionIdentity = connectionIdentity; + ConnectionString = connectionString; + Region = region; + ConfigurationFiles = configurationFiles; + Kind = kind; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource id of the database. + [WirePath("properties.resourceId")] + public ResourceIdentifier ResourceId { get; set; } + /// If present, the identity is used in conjunction with connection string to connect to the database. Use of the system-assigned managed identity is indicated with the string 'SystemAssigned', while use of a user-assigned managed identity is indicated with the resource id of the managed identity resource. + [WirePath("properties.connectionIdentity")] + public string ConnectionIdentity { get; set; } + /// The connection string to use to connect to the database. + [WirePath("properties.connectionString")] + public string ConnectionString { get; set; } + /// The region of the database resource. + [WirePath("properties.region")] + public string Region { get; set; } + /// A list of configuration files associated with this database connection. + [WirePath("properties.configurationFiles")] + public IReadOnlyList ConfigurationFiles { get; } + /// Kind of resource. + [WirePath("kind")] + public string Kind { get; set; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteDatabaseConnectionResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteDatabaseConnectionResource.Serialization.cs new file mode 100644 index 0000000000000..8819cbd2df3a4 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteDatabaseConnectionResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.AppService +{ + public partial class StaticSiteDatabaseConnectionResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + StaticSiteDatabaseConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + StaticSiteDatabaseConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteDatabaseConnectionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteDatabaseConnectionResource.cs new file mode 100644 index 0000000000000..eb222840bd1ed --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteDatabaseConnectionResource.cs @@ -0,0 +1,420 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A Class representing a StaticSiteDatabaseConnection along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetStaticSiteDatabaseConnectionResource method. + /// Otherwise you can get one from its parent resource using the GetStaticSiteDatabaseConnection method. + /// + public partial class StaticSiteDatabaseConnectionResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The name. + /// The databaseConnectionName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name, string databaseConnectionName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/databaseConnections/{databaseConnectionName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _staticSiteDatabaseConnectionStaticSitesClientDiagnostics; + private readonly StaticSitesRestOperations _staticSiteDatabaseConnectionStaticSitesRestClient; + private readonly StaticSiteDatabaseConnectionData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Web/staticSites/databaseConnections"; + + /// Initializes a new instance of the class for mocking. + protected StaticSiteDatabaseConnectionResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal StaticSiteDatabaseConnectionResource(ArmClient client, StaticSiteDatabaseConnectionData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal StaticSiteDatabaseConnectionResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _staticSiteDatabaseConnectionStaticSitesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppService", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string staticSiteDatabaseConnectionStaticSitesApiVersion); + _staticSiteDatabaseConnectionStaticSitesRestClient = new StaticSitesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, staticSiteDatabaseConnectionStaticSitesApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual StaticSiteDatabaseConnectionData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Returns overview of a database connection for a static site by name + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/databaseConnections/{databaseConnectionName} + /// + /// + /// Operation Id + /// StaticSites_GetDatabaseConnection + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _staticSiteDatabaseConnectionStaticSitesClientDiagnostics.CreateScope("StaticSiteDatabaseConnectionResource.Get"); + scope.Start(); + try + { + var response = await _staticSiteDatabaseConnectionStaticSitesRestClient.GetDatabaseConnectionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new StaticSiteDatabaseConnectionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Returns overview of a database connection for a static site by name + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/databaseConnections/{databaseConnectionName} + /// + /// + /// Operation Id + /// StaticSites_GetDatabaseConnection + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _staticSiteDatabaseConnectionStaticSitesClientDiagnostics.CreateScope("StaticSiteDatabaseConnectionResource.Get"); + scope.Start(); + try + { + var response = _staticSiteDatabaseConnectionStaticSitesRestClient.GetDatabaseConnection(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new StaticSiteDatabaseConnectionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a database connection for a static site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/databaseConnections/{databaseConnectionName} + /// + /// + /// Operation Id + /// StaticSites_DeleteDatabaseConnection + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _staticSiteDatabaseConnectionStaticSitesClientDiagnostics.CreateScope("StaticSiteDatabaseConnectionResource.Delete"); + scope.Start(); + try + { + var response = await _staticSiteDatabaseConnectionStaticSitesRestClient.DeleteDatabaseConnectionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var uri = _staticSiteDatabaseConnectionStaticSitesRestClient.CreateDeleteDatabaseConnectionRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppServiceArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a database connection for a static site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/databaseConnections/{databaseConnectionName} + /// + /// + /// Operation Id + /// StaticSites_DeleteDatabaseConnection + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _staticSiteDatabaseConnectionStaticSitesClientDiagnostics.CreateScope("StaticSiteDatabaseConnectionResource.Delete"); + scope.Start(); + try + { + var response = _staticSiteDatabaseConnectionStaticSitesRestClient.DeleteDatabaseConnection(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var uri = _staticSiteDatabaseConnectionStaticSitesRestClient.CreateDeleteDatabaseConnectionRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppServiceArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Description for Create or update a database connection for a static site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/databaseConnections/{databaseConnectionName} + /// + /// + /// Operation Id + /// StaticSites_UpdateDatabaseConnection + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// A JSON representation of the database connection request properties. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(StaticSiteDatabaseConnectionPatchContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _staticSiteDatabaseConnectionStaticSitesClientDiagnostics.CreateScope("StaticSiteDatabaseConnectionResource.Update"); + scope.Start(); + try + { + var response = await _staticSiteDatabaseConnectionStaticSitesRestClient.UpdateDatabaseConnectionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new StaticSiteDatabaseConnectionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Description for Create or update a database connection for a static site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/databaseConnections/{databaseConnectionName} + /// + /// + /// Operation Id + /// StaticSites_UpdateDatabaseConnection + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// A JSON representation of the database connection request properties. + /// The cancellation token to use. + /// is null. + public virtual Response Update(StaticSiteDatabaseConnectionPatchContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _staticSiteDatabaseConnectionStaticSitesClientDiagnostics.CreateScope("StaticSiteDatabaseConnectionResource.Update"); + scope.Start(); + try + { + var response = _staticSiteDatabaseConnectionStaticSitesRestClient.UpdateDatabaseConnection(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken); + return Response.FromValue(new StaticSiteDatabaseConnectionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Returns details of a database connection for a static site by name + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/databaseConnections/{databaseConnectionName}/show + /// + /// + /// Operation Id + /// StaticSites_GetDatabaseConnectionWithDetails + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetDatabaseConnectionWithDetailsAsync(CancellationToken cancellationToken = default) + { + using var scope = _staticSiteDatabaseConnectionStaticSitesClientDiagnostics.CreateScope("StaticSiteDatabaseConnectionResource.GetDatabaseConnectionWithDetails"); + scope.Start(); + try + { + var response = await _staticSiteDatabaseConnectionStaticSitesRestClient.GetDatabaseConnectionWithDetailsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new StaticSiteDatabaseConnectionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Returns details of a database connection for a static site by name + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/databaseConnections/{databaseConnectionName}/show + /// + /// + /// Operation Id + /// StaticSites_GetDatabaseConnectionWithDetails + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response GetDatabaseConnectionWithDetails(CancellationToken cancellationToken = default) + { + using var scope = _staticSiteDatabaseConnectionStaticSitesClientDiagnostics.CreateScope("StaticSiteDatabaseConnectionResource.GetDatabaseConnectionWithDetails"); + scope.Start(); + try + { + var response = _staticSiteDatabaseConnectionStaticSitesRestClient.GetDatabaseConnectionWithDetails(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new StaticSiteDatabaseConnectionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteLinkedBackendCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteLinkedBackendCollection.cs new file mode 100644 index 0000000000000..8cc2003c72ca0 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteLinkedBackendCollection.cs @@ -0,0 +1,493 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetStaticSiteLinkedBackends method from an instance of . + /// + public partial class StaticSiteLinkedBackendCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _staticSiteLinkedBackendStaticSitesClientDiagnostics; + private readonly StaticSitesRestOperations _staticSiteLinkedBackendStaticSitesRestClient; + + /// Initializes a new instance of the class for mocking. + protected StaticSiteLinkedBackendCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal StaticSiteLinkedBackendCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _staticSiteLinkedBackendStaticSitesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppService", StaticSiteLinkedBackendResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(StaticSiteLinkedBackendResource.ResourceType, out string staticSiteLinkedBackendStaticSitesApiVersion); + _staticSiteLinkedBackendStaticSitesRestClient = new StaticSitesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, staticSiteLinkedBackendStaticSitesApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != StaticSiteResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, StaticSiteResource.ResourceType), nameof(id)); + } + + /// + /// Link backend to a static site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/linkedBackends/{linkedBackendName} + /// + /// + /// Operation Id + /// StaticSites_LinkBackend + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Name of the backend to link to the static site. + /// A JSON representation of the linked backend request properties. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string linkedBackendName, StaticSiteLinkedBackendData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(linkedBackendName, nameof(linkedBackendName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _staticSiteLinkedBackendStaticSitesClientDiagnostics.CreateScope("StaticSiteLinkedBackendCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _staticSiteLinkedBackendStaticSitesRestClient.LinkBackendAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, linkedBackendName, data, cancellationToken).ConfigureAwait(false); + var operation = new AppServiceArmOperation(new StaticSiteLinkedBackendOperationSource(Client), _staticSiteLinkedBackendStaticSitesClientDiagnostics, Pipeline, _staticSiteLinkedBackendStaticSitesRestClient.CreateLinkBackendRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, linkedBackendName, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Link backend to a static site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/linkedBackends/{linkedBackendName} + /// + /// + /// Operation Id + /// StaticSites_LinkBackend + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Name of the backend to link to the static site. + /// A JSON representation of the linked backend request properties. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string linkedBackendName, StaticSiteLinkedBackendData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(linkedBackendName, nameof(linkedBackendName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _staticSiteLinkedBackendStaticSitesClientDiagnostics.CreateScope("StaticSiteLinkedBackendCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _staticSiteLinkedBackendStaticSitesRestClient.LinkBackend(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, linkedBackendName, data, cancellationToken); + var operation = new AppServiceArmOperation(new StaticSiteLinkedBackendOperationSource(Client), _staticSiteLinkedBackendStaticSitesClientDiagnostics, Pipeline, _staticSiteLinkedBackendStaticSitesRestClient.CreateLinkBackendRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, linkedBackendName, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Returns the details of a linked backend linked to a static site by name + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/linkedBackends/{linkedBackendName} + /// + /// + /// Operation Id + /// StaticSites_GetLinkedBackend + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the linked backend that should be retrieved. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string linkedBackendName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(linkedBackendName, nameof(linkedBackendName)); + + using var scope = _staticSiteLinkedBackendStaticSitesClientDiagnostics.CreateScope("StaticSiteLinkedBackendCollection.Get"); + scope.Start(); + try + { + var response = await _staticSiteLinkedBackendStaticSitesRestClient.GetLinkedBackendAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, linkedBackendName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new StaticSiteLinkedBackendResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Returns the details of a linked backend linked to a static site by name + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/linkedBackends/{linkedBackendName} + /// + /// + /// Operation Id + /// StaticSites_GetLinkedBackend + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the linked backend that should be retrieved. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string linkedBackendName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(linkedBackendName, nameof(linkedBackendName)); + + using var scope = _staticSiteLinkedBackendStaticSitesClientDiagnostics.CreateScope("StaticSiteLinkedBackendCollection.Get"); + scope.Start(); + try + { + var response = _staticSiteLinkedBackendStaticSitesRestClient.GetLinkedBackend(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, linkedBackendName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new StaticSiteLinkedBackendResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Returns details of all backends linked to a static site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/linkedBackends + /// + /// + /// Operation Id + /// StaticSites_GetLinkedBackends + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _staticSiteLinkedBackendStaticSitesRestClient.CreateGetLinkedBackendsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _staticSiteLinkedBackendStaticSitesRestClient.CreateGetLinkedBackendsNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new StaticSiteLinkedBackendResource(Client, StaticSiteLinkedBackendData.DeserializeStaticSiteLinkedBackendData(e)), _staticSiteLinkedBackendStaticSitesClientDiagnostics, Pipeline, "StaticSiteLinkedBackendCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Returns details of all backends linked to a static site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/linkedBackends + /// + /// + /// Operation Id + /// StaticSites_GetLinkedBackends + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _staticSiteLinkedBackendStaticSitesRestClient.CreateGetLinkedBackendsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _staticSiteLinkedBackendStaticSitesRestClient.CreateGetLinkedBackendsNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new StaticSiteLinkedBackendResource(Client, StaticSiteLinkedBackendData.DeserializeStaticSiteLinkedBackendData(e)), _staticSiteLinkedBackendStaticSitesClientDiagnostics, Pipeline, "StaticSiteLinkedBackendCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/linkedBackends/{linkedBackendName} + /// + /// + /// Operation Id + /// StaticSites_GetLinkedBackend + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the linked backend that should be retrieved. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string linkedBackendName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(linkedBackendName, nameof(linkedBackendName)); + + using var scope = _staticSiteLinkedBackendStaticSitesClientDiagnostics.CreateScope("StaticSiteLinkedBackendCollection.Exists"); + scope.Start(); + try + { + var response = await _staticSiteLinkedBackendStaticSitesRestClient.GetLinkedBackendAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, linkedBackendName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/linkedBackends/{linkedBackendName} + /// + /// + /// Operation Id + /// StaticSites_GetLinkedBackend + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the linked backend that should be retrieved. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string linkedBackendName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(linkedBackendName, nameof(linkedBackendName)); + + using var scope = _staticSiteLinkedBackendStaticSitesClientDiagnostics.CreateScope("StaticSiteLinkedBackendCollection.Exists"); + scope.Start(); + try + { + var response = _staticSiteLinkedBackendStaticSitesRestClient.GetLinkedBackend(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, linkedBackendName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/linkedBackends/{linkedBackendName} + /// + /// + /// Operation Id + /// StaticSites_GetLinkedBackend + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the linked backend that should be retrieved. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string linkedBackendName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(linkedBackendName, nameof(linkedBackendName)); + + using var scope = _staticSiteLinkedBackendStaticSitesClientDiagnostics.CreateScope("StaticSiteLinkedBackendCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _staticSiteLinkedBackendStaticSitesRestClient.GetLinkedBackendAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, linkedBackendName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new StaticSiteLinkedBackendResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/linkedBackends/{linkedBackendName} + /// + /// + /// Operation Id + /// StaticSites_GetLinkedBackend + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the linked backend that should be retrieved. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string linkedBackendName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(linkedBackendName, nameof(linkedBackendName)); + + using var scope = _staticSiteLinkedBackendStaticSitesClientDiagnostics.CreateScope("StaticSiteLinkedBackendCollection.GetIfExists"); + scope.Start(); + try + { + var response = _staticSiteLinkedBackendStaticSitesRestClient.GetLinkedBackend(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, linkedBackendName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new StaticSiteLinkedBackendResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteLinkedBackendData.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteLinkedBackendData.Serialization.cs new file mode 100644 index 0000000000000..36efe8cec5018 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteLinkedBackendData.Serialization.cs @@ -0,0 +1,422 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppService +{ + public partial class StaticSiteLinkedBackendData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(StaticSiteLinkedBackendData)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Kind)) + { + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind); + } + if (options.Format != "W") + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (options.Format != "W") + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W") + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(ResourceType); + } + if (options.Format != "W" && Optional.IsDefined(SystemData)) + { + writer.WritePropertyName("systemData"u8); + JsonSerializer.Serialize(writer, SystemData); + } + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(BackendResourceId)) + { + writer.WritePropertyName("backendResourceId"u8); + writer.WriteStringValue(BackendResourceId); + } + if (Optional.IsDefined(Region)) + { + writer.WritePropertyName("region"u8); + writer.WriteStringValue(Region); + } + if (options.Format != "W" && Optional.IsDefined(CreatedOn)) + { + writer.WritePropertyName("createdOn"u8); + writer.WriteStringValue(CreatedOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState); + } + writer.WriteEndObject(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + StaticSiteLinkedBackendData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(StaticSiteLinkedBackendData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeStaticSiteLinkedBackendData(document.RootElement, options); + } + + internal static StaticSiteLinkedBackendData DeserializeStaticSiteLinkedBackendData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string kind = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + ResourceIdentifier backendResourceId = default; + string region = default; + DateTimeOffset? createdOn = default; + string provisioningState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("kind"u8)) + { + kind = property.Value.GetString(); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("backendResourceId"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + backendResourceId = new ResourceIdentifier(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("region"u8)) + { + region = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("createdOn"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + createdOn = property0.Value.GetDateTimeOffset("O"); + continue; + } + if (property0.NameEquals("provisioningState"u8)) + { + provisioningState = property0.Value.GetString(); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new StaticSiteLinkedBackendData( + id, + name, + type, + systemData, + backendResourceId, + region, + createdOn, + provisioningState, + kind, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Kind), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" kind: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Kind)) + { + builder.Append(" kind: "); + if (Kind.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Kind}'''"); + } + else + { + builder.AppendLine($"'{Kind}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(BackendResourceId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" backendResourceId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(BackendResourceId)) + { + builder.Append(" backendResourceId: "); + builder.AppendLine($"'{BackendResourceId.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Region), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" region: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Region)) + { + builder.Append(" region: "); + if (Region.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Region}'''"); + } + else + { + builder.AppendLine($"'{Region}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CreatedOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" createdOn: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CreatedOn)) + { + builder.Append(" createdOn: "); + var formattedDateTimeString = TypeFormatters.ToString(CreatedOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProvisioningState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" provisioningState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ProvisioningState)) + { + builder.Append(" provisioningState: "); + if (ProvisioningState.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ProvisioningState}'''"); + } + else + { + builder.AppendLine($"'{ProvisioningState}'"); + } + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(StaticSiteLinkedBackendData)} does not support writing '{options.Format}' format."); + } + } + + StaticSiteLinkedBackendData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeStaticSiteLinkedBackendData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(StaticSiteLinkedBackendData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteLinkedBackendData.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteLinkedBackendData.cs new file mode 100644 index 0000000000000..3c51e800e072d --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteLinkedBackendData.cs @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A class representing the StaticSiteLinkedBackend data model. + /// Static Site Linked Backend ARM resource. + /// + public partial class StaticSiteLinkedBackendData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public StaticSiteLinkedBackendData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource id of the backend linked to the static site. + /// The region of the backend linked to the static site. + /// The date and time on which the backend was linked to the static site. + /// The provisioning state of the linking process. + /// Kind of resource. + /// Keeps track of any properties unknown to the library. + internal StaticSiteLinkedBackendData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ResourceIdentifier backendResourceId, string region, DateTimeOffset? createdOn, string provisioningState, string kind, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + BackendResourceId = backendResourceId; + Region = region; + CreatedOn = createdOn; + ProvisioningState = provisioningState; + Kind = kind; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource id of the backend linked to the static site. + [WirePath("properties.backendResourceId")] + public ResourceIdentifier BackendResourceId { get; set; } + /// The region of the backend linked to the static site. + [WirePath("properties.region")] + public string Region { get; set; } + /// The date and time on which the backend was linked to the static site. + [WirePath("properties.createdOn")] + public DateTimeOffset? CreatedOn { get; } + /// The provisioning state of the linking process. + [WirePath("properties.provisioningState")] + public string ProvisioningState { get; } + /// Kind of resource. + [WirePath("kind")] + public string Kind { get; set; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteLinkedBackendResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteLinkedBackendResource.Serialization.cs new file mode 100644 index 0000000000000..f51d3bf1249b7 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteLinkedBackendResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.AppService +{ + public partial class StaticSiteLinkedBackendResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + StaticSiteLinkedBackendData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + StaticSiteLinkedBackendData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteLinkedBackendResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteLinkedBackendResource.cs new file mode 100644 index 0000000000000..cbea635353211 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteLinkedBackendResource.cs @@ -0,0 +1,445 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A Class representing a StaticSiteLinkedBackend along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetStaticSiteLinkedBackendResource method. + /// Otherwise you can get one from its parent resource using the GetStaticSiteLinkedBackend method. + /// + public partial class StaticSiteLinkedBackendResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The name. + /// The linkedBackendName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name, string linkedBackendName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/linkedBackends/{linkedBackendName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _staticSiteLinkedBackendStaticSitesClientDiagnostics; + private readonly StaticSitesRestOperations _staticSiteLinkedBackendStaticSitesRestClient; + private readonly StaticSiteLinkedBackendData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Web/staticSites/linkedBackends"; + + /// Initializes a new instance of the class for mocking. + protected StaticSiteLinkedBackendResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal StaticSiteLinkedBackendResource(ArmClient client, StaticSiteLinkedBackendData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal StaticSiteLinkedBackendResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _staticSiteLinkedBackendStaticSitesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppService", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string staticSiteLinkedBackendStaticSitesApiVersion); + _staticSiteLinkedBackendStaticSitesRestClient = new StaticSitesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, staticSiteLinkedBackendStaticSitesApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual StaticSiteLinkedBackendData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Returns the details of a linked backend linked to a static site by name + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/linkedBackends/{linkedBackendName} + /// + /// + /// Operation Id + /// StaticSites_GetLinkedBackend + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _staticSiteLinkedBackendStaticSitesClientDiagnostics.CreateScope("StaticSiteLinkedBackendResource.Get"); + scope.Start(); + try + { + var response = await _staticSiteLinkedBackendStaticSitesRestClient.GetLinkedBackendAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new StaticSiteLinkedBackendResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Returns the details of a linked backend linked to a static site by name + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/linkedBackends/{linkedBackendName} + /// + /// + /// Operation Id + /// StaticSites_GetLinkedBackend + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _staticSiteLinkedBackendStaticSitesClientDiagnostics.CreateScope("StaticSiteLinkedBackendResource.Get"); + scope.Start(); + try + { + var response = _staticSiteLinkedBackendStaticSitesRestClient.GetLinkedBackend(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new StaticSiteLinkedBackendResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Unlink a backend from a static site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/linkedBackends/{linkedBackendName} + /// + /// + /// Operation Id + /// StaticSites_UnlinkBackend + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Decides if Easy Auth configuration will be removed from backend configuration. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, bool? isCleaningAuthConfig = null, CancellationToken cancellationToken = default) + { + using var scope = _staticSiteLinkedBackendStaticSitesClientDiagnostics.CreateScope("StaticSiteLinkedBackendResource.Delete"); + scope.Start(); + try + { + var response = await _staticSiteLinkedBackendStaticSitesRestClient.UnlinkBackendAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, isCleaningAuthConfig, cancellationToken).ConfigureAwait(false); + var uri = _staticSiteLinkedBackendStaticSitesRestClient.CreateUnlinkBackendRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, isCleaningAuthConfig); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppServiceArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Unlink a backend from a static site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/linkedBackends/{linkedBackendName} + /// + /// + /// Operation Id + /// StaticSites_UnlinkBackend + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Decides if Easy Auth configuration will be removed from backend configuration. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, bool? isCleaningAuthConfig = null, CancellationToken cancellationToken = default) + { + using var scope = _staticSiteLinkedBackendStaticSitesClientDiagnostics.CreateScope("StaticSiteLinkedBackendResource.Delete"); + scope.Start(); + try + { + var response = _staticSiteLinkedBackendStaticSitesRestClient.UnlinkBackend(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, isCleaningAuthConfig, cancellationToken); + var uri = _staticSiteLinkedBackendStaticSitesRestClient.CreateUnlinkBackendRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, isCleaningAuthConfig); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppServiceArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Link backend to a static site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/linkedBackends/{linkedBackendName} + /// + /// + /// Operation Id + /// StaticSites_LinkBackend + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// A JSON representation of the linked backend request properties. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, StaticSiteLinkedBackendData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _staticSiteLinkedBackendStaticSitesClientDiagnostics.CreateScope("StaticSiteLinkedBackendResource.Update"); + scope.Start(); + try + { + var response = await _staticSiteLinkedBackendStaticSitesRestClient.LinkBackendAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new AppServiceArmOperation(new StaticSiteLinkedBackendOperationSource(Client), _staticSiteLinkedBackendStaticSitesClientDiagnostics, Pipeline, _staticSiteLinkedBackendStaticSitesRestClient.CreateLinkBackendRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Link backend to a static site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/linkedBackends/{linkedBackendName} + /// + /// + /// Operation Id + /// StaticSites_LinkBackend + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// A JSON representation of the linked backend request properties. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, StaticSiteLinkedBackendData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _staticSiteLinkedBackendStaticSitesClientDiagnostics.CreateScope("StaticSiteLinkedBackendResource.Update"); + scope.Start(); + try + { + var response = _staticSiteLinkedBackendStaticSitesRestClient.LinkBackend(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new AppServiceArmOperation(new StaticSiteLinkedBackendOperationSource(Client), _staticSiteLinkedBackendStaticSitesClientDiagnostics, Pipeline, _staticSiteLinkedBackendStaticSitesRestClient.CreateLinkBackendRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Validates that a backend can be linked to a static site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/linkedBackends/{linkedBackendName}/validate + /// + /// + /// Operation Id + /// StaticSites_ValidateBackend + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// A JSON representation of the linked backend request properties. + /// The cancellation token to use. + /// is null. + public virtual async Task ValidateBackendAsync(WaitUntil waitUntil, StaticSiteLinkedBackendData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _staticSiteLinkedBackendStaticSitesClientDiagnostics.CreateScope("StaticSiteLinkedBackendResource.ValidateBackend"); + scope.Start(); + try + { + var response = await _staticSiteLinkedBackendStaticSitesRestClient.ValidateBackendAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new AppServiceArmOperation(_staticSiteLinkedBackendStaticSitesClientDiagnostics, Pipeline, _staticSiteLinkedBackendStaticSitesRestClient.CreateValidateBackendRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Validates that a backend can be linked to a static site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/linkedBackends/{linkedBackendName}/validate + /// + /// + /// Operation Id + /// StaticSites_ValidateBackend + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// A JSON representation of the linked backend request properties. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation ValidateBackend(WaitUntil waitUntil, StaticSiteLinkedBackendData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _staticSiteLinkedBackendStaticSitesClientDiagnostics.CreateScope("StaticSiteLinkedBackendResource.ValidateBackend"); + scope.Start(); + try + { + var response = _staticSiteLinkedBackendStaticSitesRestClient.ValidateBackend(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new AppServiceArmOperation(_staticSiteLinkedBackendStaticSitesClientDiagnostics, Pipeline, _staticSiteLinkedBackendStaticSitesRestClient.CreateValidateBackendRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSitePrivateEndpointConnectionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSitePrivateEndpointConnectionCollection.cs index d91a796851879..061e41c92a444 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSitePrivateEndpointConnectionCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSitePrivateEndpointConnectionCollection.cs @@ -14,7 +14,6 @@ using Autorest.CSharp.Core; using Azure.Core; using Azure.Core.Pipeline; -using Azure.ResourceManager.AppService.Models; namespace Azure.ResourceManager.AppService { @@ -65,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -75,21 +74,21 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// Name of the private endpoint connection. - /// Request body. + /// Request body. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestInfo info, CancellationToken cancellationToken = default) + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string privateEndpointConnectionName, RemotePrivateEndpointConnectionARMResourceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); - Argument.AssertNotNull(info, nameof(info)); + Argument.AssertNotNull(data, nameof(data)); using var scope = _staticSitePrivateEndpointConnectionStaticSitesClientDiagnostics.CreateScope("StaticSitePrivateEndpointConnectionCollection.CreateOrUpdate"); scope.Start(); try { - var response = await _staticSitePrivateEndpointConnectionStaticSitesRestClient.ApproveOrRejectPrivateEndpointConnectionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, info, cancellationToken).ConfigureAwait(false); - var operation = new AppServiceArmOperation(new StaticSitePrivateEndpointConnectionOperationSource(Client), _staticSitePrivateEndpointConnectionStaticSitesClientDiagnostics, Pipeline, _staticSitePrivateEndpointConnectionStaticSitesRestClient.CreateApproveOrRejectPrivateEndpointConnectionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, info).Request, response, OperationFinalStateVia.Location); + var response = await _staticSitePrivateEndpointConnectionStaticSitesRestClient.ApproveOrRejectPrivateEndpointConnectionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, data, cancellationToken).ConfigureAwait(false); + var operation = new AppServiceArmOperation(new StaticSitePrivateEndpointConnectionOperationSource(Client), _staticSitePrivateEndpointConnectionStaticSitesClientDiagnostics, Pipeline, _staticSitePrivateEndpointConnectionStaticSitesRestClient.CreateApproveOrRejectPrivateEndpointConnectionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -114,7 +113,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -124,21 +123,21 @@ public virtual async Task /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// Name of the private endpoint connection. - /// Request body. + /// Request body. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestInfo info, CancellationToken cancellationToken = default) + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string privateEndpointConnectionName, RemotePrivateEndpointConnectionARMResourceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); - Argument.AssertNotNull(info, nameof(info)); + Argument.AssertNotNull(data, nameof(data)); using var scope = _staticSitePrivateEndpointConnectionStaticSitesClientDiagnostics.CreateScope("StaticSitePrivateEndpointConnectionCollection.CreateOrUpdate"); scope.Start(); try { - var response = _staticSitePrivateEndpointConnectionStaticSitesRestClient.ApproveOrRejectPrivateEndpointConnection(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, info, cancellationToken); - var operation = new AppServiceArmOperation(new StaticSitePrivateEndpointConnectionOperationSource(Client), _staticSitePrivateEndpointConnectionStaticSitesClientDiagnostics, Pipeline, _staticSitePrivateEndpointConnectionStaticSitesRestClient.CreateApproveOrRejectPrivateEndpointConnectionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, info).Request, response, OperationFinalStateVia.Location); + var response = _staticSitePrivateEndpointConnectionStaticSitesRestClient.ApproveOrRejectPrivateEndpointConnection(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, data, cancellationToken); + var operation = new AppServiceArmOperation(new StaticSitePrivateEndpointConnectionOperationSource(Client), _staticSitePrivateEndpointConnectionStaticSitesClientDiagnostics, Pipeline, _staticSitePrivateEndpointConnectionStaticSitesRestClient.CreateApproveOrRejectPrivateEndpointConnectionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -163,7 +162,7 @@ public virtual ArmOperation CreateO /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -208,7 +207,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -253,7 +252,7 @@ public virtual Response Get(string /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -283,7 +282,7 @@ public virtual AsyncPageable GetAll /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -313,7 +312,7 @@ public virtual Pageable GetAll(Canc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -356,7 +355,7 @@ public virtual async Task> ExistsAsync(string privateEndpointConn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -399,7 +398,7 @@ public virtual Response Exists(string privateEndpointConnectionName, Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -444,7 +443,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSitePrivateEndpointConnectionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSitePrivateEndpointConnectionResource.cs index 1999eb0a968be..bd25186233960 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSitePrivateEndpointConnectionResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSitePrivateEndpointConnectionResource.cs @@ -11,7 +11,6 @@ using System.Threading.Tasks; using Azure.Core; using Azure.Core.Pipeline; -using Azure.ResourceManager.AppService.Models; namespace Azure.ResourceManager.AppService { @@ -102,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -142,7 +141,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -182,7 +181,7 @@ public virtual Response Get(Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -224,7 +223,7 @@ public virtual async Task> DeleteAsync(WaitUntil waitUn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -266,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, Cancellation /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -275,19 +274,19 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, Cancellation /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Request body. + /// Request body. /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, PrivateLinkConnectionApprovalRequestInfo info, CancellationToken cancellationToken = default) + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, RemotePrivateEndpointConnectionARMResourceData data, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(info, nameof(info)); + Argument.AssertNotNull(data, nameof(data)); using var scope = _staticSitePrivateEndpointConnectionStaticSitesClientDiagnostics.CreateScope("StaticSitePrivateEndpointConnectionResource.Update"); scope.Start(); try { - var response = await _staticSitePrivateEndpointConnectionStaticSitesRestClient.ApproveOrRejectPrivateEndpointConnectionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, info, cancellationToken).ConfigureAwait(false); - var operation = new AppServiceArmOperation(new StaticSitePrivateEndpointConnectionOperationSource(Client), _staticSitePrivateEndpointConnectionStaticSitesClientDiagnostics, Pipeline, _staticSitePrivateEndpointConnectionStaticSitesRestClient.CreateApproveOrRejectPrivateEndpointConnectionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, info).Request, response, OperationFinalStateVia.Location); + var response = await _staticSitePrivateEndpointConnectionStaticSitesRestClient.ApproveOrRejectPrivateEndpointConnectionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new AppServiceArmOperation(new StaticSitePrivateEndpointConnectionOperationSource(Client), _staticSitePrivateEndpointConnectionStaticSitesClientDiagnostics, Pipeline, _staticSitePrivateEndpointConnectionStaticSitesRestClient.CreateApproveOrRejectPrivateEndpointConnectionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -312,7 +311,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -321,19 +320,19 @@ public virtual async Task /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Request body. + /// Request body. /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, PrivateLinkConnectionApprovalRequestInfo info, CancellationToken cancellationToken = default) + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, RemotePrivateEndpointConnectionARMResourceData data, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(info, nameof(info)); + Argument.AssertNotNull(data, nameof(data)); using var scope = _staticSitePrivateEndpointConnectionStaticSitesClientDiagnostics.CreateScope("StaticSitePrivateEndpointConnectionResource.Update"); scope.Start(); try { - var response = _staticSitePrivateEndpointConnectionStaticSitesRestClient.ApproveOrRejectPrivateEndpointConnection(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, info, cancellationToken); - var operation = new AppServiceArmOperation(new StaticSitePrivateEndpointConnectionOperationSource(Client), _staticSitePrivateEndpointConnectionStaticSitesClientDiagnostics, Pipeline, _staticSitePrivateEndpointConnectionStaticSitesRestClient.CreateApproveOrRejectPrivateEndpointConnectionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, info).Request, response, OperationFinalStateVia.Location); + var response = _staticSitePrivateEndpointConnectionStaticSitesRestClient.ApproveOrRejectPrivateEndpointConnection(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new AppServiceArmOperation(new StaticSitePrivateEndpointConnectionOperationSource(Client), _staticSitePrivateEndpointConnectionStaticSitesClientDiagnostics, Pipeline, _staticSitePrivateEndpointConnectionStaticSitesRestClient.CreateApproveOrRejectPrivateEndpointConnectionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteResource.cs index 2dfc14574fbd9..a5183fdd24c8c 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteResource.cs @@ -110,7 +110,7 @@ public virtual StaticSitePrivateEndpointConnectionCollection GetStaticSitePrivat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -179,7 +179,7 @@ public virtual StaticSiteBuildCollection GetStaticSiteBuilds() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task> GetStaticSiteBuildA /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -228,6 +228,75 @@ public virtual Response GetStaticSiteBuild(string envir return GetStaticSiteBuilds().Get(environmentName, cancellationToken); } + /// Gets a collection of StaticSiteDatabaseConnectionResources in the StaticSite. + /// An object representing collection of StaticSiteDatabaseConnectionResources and their operations over a StaticSiteDatabaseConnectionResource. + public virtual StaticSiteDatabaseConnectionCollection GetStaticSiteDatabaseConnections() + { + return GetCachedClient(client => new StaticSiteDatabaseConnectionCollection(client, Id)); + } + + /// + /// Returns overview of a database connection for a static site by name + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/databaseConnections/{databaseConnectionName} + /// + /// + /// Operation Id + /// StaticSites_GetDatabaseConnection + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the database connection. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetStaticSiteDatabaseConnectionAsync(string databaseConnectionName, CancellationToken cancellationToken = default) + { + return await GetStaticSiteDatabaseConnections().GetAsync(databaseConnectionName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Returns overview of a database connection for a static site by name + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/databaseConnections/{databaseConnectionName} + /// + /// + /// Operation Id + /// StaticSites_GetDatabaseConnection + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the database connection. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetStaticSiteDatabaseConnection(string databaseConnectionName, CancellationToken cancellationToken = default) + { + return GetStaticSiteDatabaseConnections().Get(databaseConnectionName, cancellationToken); + } + /// Gets a collection of StaticSiteUserProvidedFunctionAppResources in the StaticSite. /// An object representing collection of StaticSiteUserProvidedFunctionAppResources and their operations over a StaticSiteUserProvidedFunctionAppResource. public virtual StaticSiteUserProvidedFunctionAppCollection GetStaticSiteUserProvidedFunctionApps() @@ -248,7 +317,7 @@ public virtual StaticSiteUserProvidedFunctionAppCollection GetStaticSiteUserProv /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -279,7 +348,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -297,6 +366,71 @@ public virtual Response GetStaticSite return GetStaticSiteUserProvidedFunctionApps().Get(functionAppName, cancellationToken); } + /// Gets a collection of StaticSiteBasicAuthPropertyResources in the StaticSite. + /// An object representing collection of StaticSiteBasicAuthPropertyResources and their operations over a StaticSiteBasicAuthPropertyResource. + public virtual StaticSiteBasicAuthPropertyCollection GetStaticSiteBasicAuthProperties() + { + return GetCachedClient(client => new StaticSiteBasicAuthPropertyCollection(client, Id)); + } + + /// + /// Description for Gets the basic auth properties for a static site. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/basicAuth/{basicAuthName} + /// + /// + /// Operation Id + /// StaticSites_GetBasicAuth + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// name of the basic auth entry. + /// The cancellation token to use. + [ForwardsClientCalls] + public virtual async Task> GetStaticSiteBasicAuthPropertyAsync(StaticSiteBasicAuthName basicAuthName, CancellationToken cancellationToken = default) + { + return await GetStaticSiteBasicAuthProperties().GetAsync(basicAuthName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Description for Gets the basic auth properties for a static site. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/basicAuth/{basicAuthName} + /// + /// + /// Operation Id + /// StaticSites_GetBasicAuth + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// name of the basic auth entry. + /// The cancellation token to use. + [ForwardsClientCalls] + public virtual Response GetStaticSiteBasicAuthProperty(StaticSiteBasicAuthName basicAuthName, CancellationToken cancellationToken = default) + { + return GetStaticSiteBasicAuthProperties().Get(basicAuthName, cancellationToken); + } + /// Gets a collection of StaticSiteCustomDomainOverviewResources in the StaticSite. /// An object representing collection of StaticSiteCustomDomainOverviewResources and their operations over a StaticSiteCustomDomainOverviewResource. public virtual StaticSiteCustomDomainOverviewCollection GetStaticSiteCustomDomainOverviews() @@ -317,7 +451,7 @@ public virtual StaticSiteCustomDomainOverviewCollection GetStaticSiteCustomDomai /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -348,7 +482,7 @@ public virtual async Task> GetS /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -366,6 +500,75 @@ public virtual Response GetStaticSiteCus return GetStaticSiteCustomDomainOverviews().Get(domainName, cancellationToken); } + /// Gets a collection of StaticSiteLinkedBackendResources in the StaticSite. + /// An object representing collection of StaticSiteLinkedBackendResources and their operations over a StaticSiteLinkedBackendResource. + public virtual StaticSiteLinkedBackendCollection GetStaticSiteLinkedBackends() + { + return GetCachedClient(client => new StaticSiteLinkedBackendCollection(client, Id)); + } + + /// + /// Returns the details of a linked backend linked to a static site by name + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/linkedBackends/{linkedBackendName} + /// + /// + /// Operation Id + /// StaticSites_GetLinkedBackend + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the linked backend that should be retrieved. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetStaticSiteLinkedBackendAsync(string linkedBackendName, CancellationToken cancellationToken = default) + { + return await GetStaticSiteLinkedBackends().GetAsync(linkedBackendName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Returns the details of a linked backend linked to a static site by name + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/linkedBackends/{linkedBackendName} + /// + /// + /// Operation Id + /// StaticSites_GetLinkedBackend + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the linked backend that should be retrieved. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetStaticSiteLinkedBackend(string linkedBackendName, CancellationToken cancellationToken = default) + { + return GetStaticSiteLinkedBackends().Get(linkedBackendName, cancellationToken); + } + /// /// Description for Gets the details of a static site. /// @@ -379,7 +582,7 @@ public virtual Response GetStaticSiteCus /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -419,7 +622,7 @@ public virtual async Task> GetAsync(CancellationTok /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -459,7 +662,7 @@ public virtual Response Get(CancellationToken cancellationTo /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -501,7 +704,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -543,7 +746,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -585,7 +788,7 @@ public virtual async Task> UpdateAsync(StaticSitePa /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -627,7 +830,7 @@ public virtual Response Update(StaticSitePatch patch, Cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -658,7 +861,7 @@ public virtual AsyncPageable GetUsersAsync(string authprovider, /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -689,7 +892,7 @@ public virtual Pageable GetUsers(string authprovider, Cancellati /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -730,7 +933,7 @@ public virtual async Task DeleteUserAsync(string authprovider, string /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -771,7 +974,7 @@ public virtual Response DeleteUser(string authprovider, string userid, Cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -814,7 +1017,7 @@ public virtual async Task> UpdateUserAsync(string authp /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -857,7 +1060,7 @@ public virtual Response UpdateUser(string authprovider, string u /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -895,7 +1098,7 @@ public virtual async Task> CreateOrU /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -933,7 +1136,7 @@ public virtual Response CreateOrUpdateAppSett /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -971,7 +1174,7 @@ public virtual async Task> CreateOrU /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -1009,7 +1212,7 @@ public virtual Response CreateOrUpdateFunctio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1051,7 +1254,7 @@ public virtual async Task> CreateUserRo /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1093,7 +1296,7 @@ public virtual Response CreateUserRolesInvitatio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1135,7 +1338,7 @@ public virtual async Task DetachAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1177,7 +1380,7 @@ public virtual ArmOperation Detach(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1207,7 +1410,7 @@ public virtual AsyncPageable GetStaticSiteFunctionsA /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1237,7 +1440,7 @@ public virtual Pageable GetStaticSiteFunctions(Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1275,7 +1478,7 @@ public virtual async Task> GetAppSet /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1313,7 +1516,7 @@ public virtual Response GetAppSettings(Cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1351,7 +1554,7 @@ public virtual async Task> GetConfiguredRolesAsyn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1389,7 +1592,7 @@ public virtual Response GetConfiguredRoles(CancellationTok /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1427,7 +1630,7 @@ public virtual async Task> GetFuncti /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1465,7 +1668,7 @@ public virtual Response GetFunctionAppSetting /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1503,7 +1706,7 @@ public virtual async Task> GetStatic /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1541,7 +1744,7 @@ public virtual Response GetStaticSiteSecrets( /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1570,7 +1773,7 @@ public virtual AsyncPageable GetPrivateLinkRe /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1599,7 +1802,7 @@ public virtual Pageable GetPrivateLinkResourc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1641,7 +1844,7 @@ public virtual async Task ResetApiKeyAsync(StaticSiteResetContent cont /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1670,6 +1873,66 @@ public virtual Response ResetApiKey(StaticSiteResetContent content, Cancellation } } + /// + /// Returns details of database connections for a static site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/showDatabaseConnections + /// + /// + /// Operation Id + /// StaticSites_GetDatabaseConnectionsWithDetails + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetDatabaseConnectionsWithDetailsAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _staticSiteRestClient.CreateGetDatabaseConnectionsWithDetailsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _staticSiteRestClient.CreateGetDatabaseConnectionsWithDetailsNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => StaticSiteDatabaseConnectionData.DeserializeStaticSiteDatabaseConnectionData(e), _staticSiteClientDiagnostics, Pipeline, "StaticSiteResource.GetDatabaseConnectionsWithDetails", "value", "nextLink", cancellationToken); + } + + /// + /// Returns details of database connections for a static site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/showDatabaseConnections + /// + /// + /// Operation Id + /// StaticSites_GetDatabaseConnectionsWithDetails + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetDatabaseConnectionsWithDetails(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _staticSiteRestClient.CreateGetDatabaseConnectionsWithDetailsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _staticSiteRestClient.CreateGetDatabaseConnectionsWithDetailsNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => StaticSiteDatabaseConnectionData.DeserializeStaticSiteDatabaseConnectionData(e), _staticSiteClientDiagnostics, Pipeline, "StaticSiteResource.GetDatabaseConnectionsWithDetails", "value", "nextLink", cancellationToken); + } + /// /// Description for Deploys zipped content to a static site. /// @@ -1683,7 +1946,7 @@ public virtual Response ResetApiKey(StaticSiteResetContent content, Cancellation /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1729,7 +1992,7 @@ public virtual async Task CreateZipDeploymentForStaticSiteAsync(Wa /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteUserProvidedFunctionAppCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteUserProvidedFunctionAppCollection.cs index 734fe35aa09b3..06a979147a288 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteUserProvidedFunctionAppCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteUserProvidedFunctionAppCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -164,7 +164,7 @@ public virtual ArmOperation CreateOrU /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -209,7 +209,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -254,7 +254,7 @@ public virtual Response Get(string fu /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -284,7 +284,7 @@ public virtual AsyncPageable GetAllAs /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -314,7 +314,7 @@ public virtual Pageable GetAll(Cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -357,7 +357,7 @@ public virtual async Task> ExistsAsync(string functionAppName, Ca /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -400,7 +400,7 @@ public virtual Response Exists(string functionAppName, CancellationToken c /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -445,7 +445,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteUserProvidedFunctionAppResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteUserProvidedFunctionAppResource.cs index cf1f8cda45df2..f7380a618deab 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteUserProvidedFunctionAppResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteUserProvidedFunctionAppResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(Cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -269,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -316,7 +316,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/TopLevelDomainCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/TopLevelDomainCollection.cs index 1d155720e543b..379f3b0454ba1 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/TopLevelDomainCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/TopLevelDomainCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -110,7 +110,7 @@ public virtual async Task> GetAsync(string name /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -155,7 +155,7 @@ public virtual Response Get(string name, CancellationTok /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -185,7 +185,7 @@ public virtual AsyncPageable GetAllAsync(CancellationTok /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -215,7 +215,7 @@ public virtual Pageable GetAll(CancellationToken cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -258,7 +258,7 @@ public virtual async Task> ExistsAsync(string name, CancellationT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -301,7 +301,7 @@ public virtual Response Exists(string name, CancellationToken cancellation /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -346,7 +346,7 @@ public virtual async Task> GetIfExistsA /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/TopLevelDomainResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/TopLevelDomainResource.cs index a6527932822d8..b768c2e373ee5 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/TopLevelDomainResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/TopLevelDomainResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Cancellatio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken cancellati /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -216,7 +216,7 @@ public virtual AsyncPageable GetAgreementsAsync(TopLevelDomai /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/TriggeredWebJobData.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/TriggeredWebJobData.Serialization.cs index 551321ebcb190..6d4478c616dbf 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/TriggeredWebJobData.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/TriggeredWebJobData.Serialization.cs @@ -102,6 +102,16 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("using_sdk"u8); writer.WriteBooleanValue(IsUsingSdk.Value); } + if (Optional.IsDefined(PublicNetworkAccess)) + { + writer.WritePropertyName("publicNetworkAccess"u8); + writer.WriteStringValue(PublicNetworkAccess); + } + if (Optional.IsDefined(IsStorageAccountRequired)) + { + writer.WritePropertyName("storageAccountRequired"u8); + writer.WriteBooleanValue(IsStorageAccountRequired.Value); + } if (Optional.IsCollectionDefined(Settings)) { writer.WritePropertyName("settings"u8); @@ -178,6 +188,8 @@ internal static TriggeredWebJobData DeserializeTriggeredWebJobData(JsonElement e WebJobType? webJobType = default; string error = default; bool? usingSdk = default; + string publicNetworkAccess = default; + bool? storageAccountRequired = default; IDictionary settings = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -294,6 +306,20 @@ internal static TriggeredWebJobData DeserializeTriggeredWebJobData(JsonElement e usingSdk = property0.Value.GetBoolean(); continue; } + if (property0.NameEquals("publicNetworkAccess"u8)) + { + publicNetworkAccess = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("storageAccountRequired"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + storageAccountRequired = property0.Value.GetBoolean(); + continue; + } if (property0.NameEquals("settings"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -338,6 +364,8 @@ internal static TriggeredWebJobData DeserializeTriggeredWebJobData(JsonElement e webJobType, error, usingSdk, + publicNetworkAccess, + storageAccountRequired, settings ?? new ChangeTrackingDictionary(), kind, serializedAdditionalRawData); @@ -584,6 +612,45 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PublicNetworkAccess), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" publicNetworkAccess: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PublicNetworkAccess)) + { + builder.Append(" publicNetworkAccess: "); + if (PublicNetworkAccess.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{PublicNetworkAccess}'''"); + } + else + { + builder.AppendLine($"'{PublicNetworkAccess}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsStorageAccountRequired), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" storageAccountRequired: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsStorageAccountRequired)) + { + builder.Append(" storageAccountRequired: "); + var boolValue = IsStorageAccountRequired.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Settings), out propertyOverride); if (hasPropertyOverride) { diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/TriggeredWebJobData.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/TriggeredWebJobData.cs index 03717229c71ff..280d8b7d77f2f 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/TriggeredWebJobData.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/TriggeredWebJobData.cs @@ -71,10 +71,12 @@ public TriggeredWebJobData() /// Job type. /// Error information. /// Using SDK?. + /// Property to allow or block all public traffic. Allowed Values: 'Enabled', 'Disabled' or an empty string. + /// Checks if Customer provided storage account is required. /// Job settings. /// Kind of resource. /// Keeps track of any properties unknown to the library. - internal TriggeredWebJobData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, TriggeredJobRun latestRun, Uri historyUri, Uri schedulerLogsUri, string runCommand, Uri uri, Uri extraInfoUri, WebJobType? webJobType, string error, bool? isUsingSdk, IDictionary settings, string kind, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal TriggeredWebJobData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, TriggeredJobRun latestRun, Uri historyUri, Uri schedulerLogsUri, string runCommand, Uri uri, Uri extraInfoUri, WebJobType? webJobType, string error, bool? isUsingSdk, string publicNetworkAccess, bool? isStorageAccountRequired, IDictionary settings, string kind, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { LatestRun = latestRun; HistoryUri = historyUri; @@ -85,6 +87,8 @@ internal TriggeredWebJobData(ResourceIdentifier id, string name, ResourceType re WebJobType = webJobType; Error = error; IsUsingSdk = isUsingSdk; + PublicNetworkAccess = publicNetworkAccess; + IsStorageAccountRequired = isStorageAccountRequired; Settings = settings; Kind = kind; _serializedAdditionalRawData = serializedAdditionalRawData; @@ -117,6 +121,12 @@ internal TriggeredWebJobData(ResourceIdentifier id, string name, ResourceType re /// Using SDK?. [WirePath("properties.using_sdk")] public bool? IsUsingSdk { get; set; } + /// Property to allow or block all public traffic. Allowed Values: 'Enabled', 'Disabled' or an empty string. + [WirePath("properties.publicNetworkAccess")] + public string PublicNetworkAccess { get; set; } + /// Checks if Customer provided storage account is required. + [WirePath("properties.storageAccountRequired")] + public bool? IsStorageAccountRequired { get; set; } /// /// Job settings. /// diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebAppRequestHistoryCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebAppRequestHistoryCollection.cs new file mode 100644 index 0000000000000..2b5f9c0546af8 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebAppRequestHistoryCollection.cs @@ -0,0 +1,395 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetWebAppRequestHistories method from an instance of . + /// + public partial class WebAppRequestHistoryCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _webAppRequestHistoryWorkflowRunActionRepetitionsRequestHistoriesClientDiagnostics; + private readonly WorkflowRunActionRepetitionsRequestHistoriesRestOperations _webAppRequestHistoryWorkflowRunActionRepetitionsRequestHistoriesRestClient; + + /// Initializes a new instance of the class for mocking. + protected WebAppRequestHistoryCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal WebAppRequestHistoryCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _webAppRequestHistoryWorkflowRunActionRepetitionsRequestHistoriesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppService", WebAppRequestHistoryResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(WebAppRequestHistoryResource.ResourceType, out string webAppRequestHistoryWorkflowRunActionRepetitionsRequestHistoriesApiVersion); + _webAppRequestHistoryWorkflowRunActionRepetitionsRequestHistoriesRestClient = new WorkflowRunActionRepetitionsRequestHistoriesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, webAppRequestHistoryWorkflowRunActionRepetitionsRequestHistoriesApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != WorkflowRunActionRepetitionResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, WorkflowRunActionRepetitionResource.ResourceType), nameof(id)); + } + + /// + /// Gets a workflow run repetition request history. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/requestHistories/{requestHistoryName} + /// + /// + /// Operation Id + /// WorkflowRunActionRepetitionsRequestHistories_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The request history name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string requestHistoryName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(requestHistoryName, nameof(requestHistoryName)); + + using var scope = _webAppRequestHistoryWorkflowRunActionRepetitionsRequestHistoriesClientDiagnostics.CreateScope("WebAppRequestHistoryCollection.Get"); + scope.Start(); + try + { + var response = await _webAppRequestHistoryWorkflowRunActionRepetitionsRequestHistoriesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, requestHistoryName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WebAppRequestHistoryResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a workflow run repetition request history. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/requestHistories/{requestHistoryName} + /// + /// + /// Operation Id + /// WorkflowRunActionRepetitionsRequestHistories_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The request history name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string requestHistoryName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(requestHistoryName, nameof(requestHistoryName)); + + using var scope = _webAppRequestHistoryWorkflowRunActionRepetitionsRequestHistoriesClientDiagnostics.CreateScope("WebAppRequestHistoryCollection.Get"); + scope.Start(); + try + { + var response = _webAppRequestHistoryWorkflowRunActionRepetitionsRequestHistoriesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, requestHistoryName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WebAppRequestHistoryResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List a workflow run repetition request history. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/requestHistories + /// + /// + /// Operation Id + /// WorkflowRunActionRepetitionsRequestHistories_List + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _webAppRequestHistoryWorkflowRunActionRepetitionsRequestHistoriesRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _webAppRequestHistoryWorkflowRunActionRepetitionsRequestHistoriesRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new WebAppRequestHistoryResource(Client, WebAppRequestHistoryData.DeserializeWebAppRequestHistoryData(e)), _webAppRequestHistoryWorkflowRunActionRepetitionsRequestHistoriesClientDiagnostics, Pipeline, "WebAppRequestHistoryCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List a workflow run repetition request history. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/requestHistories + /// + /// + /// Operation Id + /// WorkflowRunActionRepetitionsRequestHistories_List + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _webAppRequestHistoryWorkflowRunActionRepetitionsRequestHistoriesRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _webAppRequestHistoryWorkflowRunActionRepetitionsRequestHistoriesRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new WebAppRequestHistoryResource(Client, WebAppRequestHistoryData.DeserializeWebAppRequestHistoryData(e)), _webAppRequestHistoryWorkflowRunActionRepetitionsRequestHistoriesClientDiagnostics, Pipeline, "WebAppRequestHistoryCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/requestHistories/{requestHistoryName} + /// + /// + /// Operation Id + /// WorkflowRunActionRepetitionsRequestHistories_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The request history name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string requestHistoryName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(requestHistoryName, nameof(requestHistoryName)); + + using var scope = _webAppRequestHistoryWorkflowRunActionRepetitionsRequestHistoriesClientDiagnostics.CreateScope("WebAppRequestHistoryCollection.Exists"); + scope.Start(); + try + { + var response = await _webAppRequestHistoryWorkflowRunActionRepetitionsRequestHistoriesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, requestHistoryName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/requestHistories/{requestHistoryName} + /// + /// + /// Operation Id + /// WorkflowRunActionRepetitionsRequestHistories_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The request history name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string requestHistoryName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(requestHistoryName, nameof(requestHistoryName)); + + using var scope = _webAppRequestHistoryWorkflowRunActionRepetitionsRequestHistoriesClientDiagnostics.CreateScope("WebAppRequestHistoryCollection.Exists"); + scope.Start(); + try + { + var response = _webAppRequestHistoryWorkflowRunActionRepetitionsRequestHistoriesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, requestHistoryName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/requestHistories/{requestHistoryName} + /// + /// + /// Operation Id + /// WorkflowRunActionRepetitionsRequestHistories_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The request history name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string requestHistoryName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(requestHistoryName, nameof(requestHistoryName)); + + using var scope = _webAppRequestHistoryWorkflowRunActionRepetitionsRequestHistoriesClientDiagnostics.CreateScope("WebAppRequestHistoryCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _webAppRequestHistoryWorkflowRunActionRepetitionsRequestHistoriesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, requestHistoryName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new WebAppRequestHistoryResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/requestHistories/{requestHistoryName} + /// + /// + /// Operation Id + /// WorkflowRunActionRepetitionsRequestHistories_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The request history name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string requestHistoryName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(requestHistoryName, nameof(requestHistoryName)); + + using var scope = _webAppRequestHistoryWorkflowRunActionRepetitionsRequestHistoriesClientDiagnostics.CreateScope("WebAppRequestHistoryCollection.GetIfExists"); + scope.Start(); + try + { + var response = _webAppRequestHistoryWorkflowRunActionRepetitionsRequestHistoriesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, requestHistoryName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new WebAppRequestHistoryResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebAppRequestHistoryData.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebAppRequestHistoryData.Serialization.cs new file mode 100644 index 0000000000000..47750e624ec70 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebAppRequestHistoryData.Serialization.cs @@ -0,0 +1,354 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.AppService.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppService +{ + public partial class WebAppRequestHistoryData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WebAppRequestHistoryData)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WritePropertyName("location"u8); + writer.WriteStringValue(Location); + if (options.Format != "W") + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (options.Format != "W") + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W") + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(ResourceType); + } + if (options.Format != "W" && Optional.IsDefined(SystemData)) + { + writer.WritePropertyName("systemData"u8); + JsonSerializer.Serialize(writer, SystemData); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WebAppRequestHistoryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WebAppRequestHistoryData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWebAppRequestHistoryData(document.RootElement, options); + } + + internal static WebAppRequestHistoryData DeserializeWebAppRequestHistoryData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + WebAppRequestHistoryProperties properties = default; + IDictionary tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = WebAppRequestHistoryProperties.DeserializeWebAppRequestHistoryProperties(property.Value, options); + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("location"u8)) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WebAppRequestHistoryData( + id, + name, + type, + systemData, + tags ?? new ChangeTrackingDictionary(), + location, + properties, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Location), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" location: "); + builder.AppendLine(propertyOverride); + } + else + { + builder.Append(" location: "); + builder.AppendLine($"'{Location.ToString()}'"); + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Tags), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" tags: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Tags)) + { + if (Tags.Any()) + { + builder.Append(" tags: "); + builder.AppendLine("{"); + foreach (var item in Tags) + { + builder.Append($" '{item.Key}': "); + if (item.Value == null) + { + builder.Append("null"); + continue; + } + if (item.Value.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{item.Value}'''"); + } + else + { + builder.AppendLine($"'{item.Value}'"); + } + } + builder.AppendLine(" }"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Properties), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" properties: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Properties)) + { + builder.Append(" properties: "); + BicepSerializationHelpers.AppendChildObject(builder, Properties, options, 2, false, " properties: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WebAppRequestHistoryData)} does not support writing '{options.Format}' format."); + } + } + + WebAppRequestHistoryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWebAppRequestHistoryData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WebAppRequestHistoryData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebAppRequestHistoryData.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebAppRequestHistoryData.cs new file mode 100644 index 0000000000000..1897092057948 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebAppRequestHistoryData.cs @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.AppService.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A class representing the WebAppRequestHistory data model. + /// The request history. + /// + public partial class WebAppRequestHistoryData : TrackedResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The location. + public WebAppRequestHistoryData(AzureLocation location) : base(location) + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The request history properties. + /// Keeps track of any properties unknown to the library. + internal WebAppRequestHistoryData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, WebAppRequestHistoryProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal WebAppRequestHistoryData() + { + } + + /// The request history properties. + [WirePath("properties")] + public WebAppRequestHistoryProperties Properties { get; set; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebAppRequestHistoryResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebAppRequestHistoryResource.Serialization.cs new file mode 100644 index 0000000000000..b209735115c68 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebAppRequestHistoryResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.AppService +{ + public partial class WebAppRequestHistoryResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + WebAppRequestHistoryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + WebAppRequestHistoryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebAppRequestHistoryResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebAppRequestHistoryResource.cs new file mode 100644 index 0000000000000..008f639e76287 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebAppRequestHistoryResource.cs @@ -0,0 +1,175 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A Class representing a WebAppRequestHistory along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetWebAppRequestHistoryResource method. + /// Otherwise you can get one from its parent resource using the GetWebAppRequestHistory method. + /// + public partial class WebAppRequestHistoryResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The name. + /// The workflowName. + /// The runName. + /// The actionName. + /// The repetitionName. + /// The requestHistoryName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, string repetitionName, string requestHistoryName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/requestHistories/{requestHistoryName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _webAppRequestHistoryWorkflowRunActionRepetitionsRequestHistoriesClientDiagnostics; + private readonly WorkflowRunActionRepetitionsRequestHistoriesRestOperations _webAppRequestHistoryWorkflowRunActionRepetitionsRequestHistoriesRestClient; + private readonly WebAppRequestHistoryData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Web/sites/hostruntime/webhooks/api/workflows/runs/actions/repetitions/requestHistories"; + + /// Initializes a new instance of the class for mocking. + protected WebAppRequestHistoryResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal WebAppRequestHistoryResource(ArmClient client, WebAppRequestHistoryData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal WebAppRequestHistoryResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _webAppRequestHistoryWorkflowRunActionRepetitionsRequestHistoriesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppService", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string webAppRequestHistoryWorkflowRunActionRepetitionsRequestHistoriesApiVersion); + _webAppRequestHistoryWorkflowRunActionRepetitionsRequestHistoriesRestClient = new WorkflowRunActionRepetitionsRequestHistoriesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, webAppRequestHistoryWorkflowRunActionRepetitionsRequestHistoriesApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual WebAppRequestHistoryData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Gets a workflow run repetition request history. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/requestHistories/{requestHistoryName} + /// + /// + /// Operation Id + /// WorkflowRunActionRepetitionsRequestHistories_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _webAppRequestHistoryWorkflowRunActionRepetitionsRequestHistoriesClientDiagnostics.CreateScope("WebAppRequestHistoryResource.Get"); + scope.Start(); + try + { + var response = await _webAppRequestHistoryWorkflowRunActionRepetitionsRequestHistoriesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WebAppRequestHistoryResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a workflow run repetition request history. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/requestHistories/{requestHistoryName} + /// + /// + /// Operation Id + /// WorkflowRunActionRepetitionsRequestHistories_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _webAppRequestHistoryWorkflowRunActionRepetitionsRequestHistoriesClientDiagnostics.CreateScope("WebAppRequestHistoryResource.Get"); + scope.Start(); + try + { + var response = _webAppRequestHistoryWorkflowRunActionRepetitionsRequestHistoriesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WebAppRequestHistoryResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteCollection.cs index 34a8558c8bf8b..48474526310a2 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateAsync(Wai /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string name, Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string name, CancellationToken canc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -284,7 +284,7 @@ public virtual AsyncPageable GetAllAsync(bool? includeSlots = n /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual Pageable GetAll(bool? includeSlots = null, Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -358,7 +358,7 @@ public virtual async Task> ExistsAsync(string name, CancellationT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -401,7 +401,7 @@ public virtual Response Exists(string name, CancellationToken cancellation /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -446,7 +446,7 @@ public virtual async Task> GetIfExistsAsync(st /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteConfigConnectionStringCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteConfigConnectionStringCollection.cs index e5619a8d39122..24ee1d0ca8e67 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteConfigConnectionStringCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteConfigConnectionStringCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAs /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string connec /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync( /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(Cancellati /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string connectionStringKey /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string connectionStringKey, CancellationTok /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteConfigConnectionStringResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteConfigConnectionStringResource.cs index 8dbf29c8f152a..dc163cf30324a 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteConfigConnectionStringResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteConfigConnectionStringResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAs /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteConfigResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteConfigResource.cs index 168f3284ab933..ff5cef9b6b0e7 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteConfigResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteConfigResource.cs @@ -114,7 +114,7 @@ public virtual SiteConfigSnapshotCollection GetSiteConfigSnapshots() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -145,7 +145,7 @@ public virtual async Task> GetSiteConfigSna /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -176,7 +176,7 @@ public virtual Response GetSiteConfigSnapshot(string /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -216,7 +216,7 @@ public virtual async Task> GetAsync(Cancellation /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(CancellationToken cancellatio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -298,7 +298,7 @@ public virtual async Task> UpdateAsync(SiteConfi /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -340,7 +340,7 @@ public virtual Response Update(SiteConfigData data, Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -388,7 +388,7 @@ public virtual async Task> CreateOrUpdateAsy /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -436,7 +436,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wait /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -466,7 +466,7 @@ public virtual AsyncPageable GetConfigurationSnap /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteContinuousWebJobCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteContinuousWebJobCollection.cs index 50ec32d032a35..262dae22f6788 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteContinuousWebJobCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteContinuousWebJobCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(st /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string webJobName, /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(Cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationToke /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string webJobName, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string webJobName, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteContinuousWebJobResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteContinuousWebJobResource.cs index f3a6561df8ed1..59b76cefaf8a8 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteContinuousWebJobResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteContinuousWebJobResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Ca /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken c /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -269,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -307,7 +307,7 @@ public virtual async Task StartContinuousWebJobAsync(CancellationToken /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual Response StartContinuousWebJob(CancellationToken cancellationToke /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -383,7 +383,7 @@ public virtual async Task StopContinuousWebJobAsync(CancellationToken /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteData.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteData.Serialization.cs index a7dc7999ee94c..06ce19c85b31b 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteData.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteData.Serialization.cs @@ -161,11 +161,56 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio writer.WritePropertyName("lastModifiedTimeUtc"u8); writer.WriteStringValue(LastModifiedTimeUtc.Value, "O"); } + if (Optional.IsDefined(DnsConfiguration)) + { + writer.WritePropertyName("dnsConfiguration"u8); + writer.WriteObjectValue(DnsConfiguration, options); + } + if (Optional.IsDefined(IsVnetRouteAllEnabled)) + { + writer.WritePropertyName("vnetRouteAllEnabled"u8); + writer.WriteBooleanValue(IsVnetRouteAllEnabled.Value); + } + if (Optional.IsDefined(IsVnetImagePullEnabled)) + { + writer.WritePropertyName("vnetImagePullEnabled"u8); + writer.WriteBooleanValue(IsVnetImagePullEnabled.Value); + } + if (Optional.IsDefined(IsVnetContentShareEnabled)) + { + writer.WritePropertyName("vnetContentShareEnabled"u8); + writer.WriteBooleanValue(IsVnetContentShareEnabled.Value); + } + if (Optional.IsDefined(IsVnetBackupRestoreEnabled)) + { + writer.WritePropertyName("vnetBackupRestoreEnabled"u8); + writer.WriteBooleanValue(IsVnetBackupRestoreEnabled.Value); + } if (Optional.IsDefined(SiteConfig)) { writer.WritePropertyName("siteConfig"u8); writer.WriteObjectValue(SiteConfig, options); } + if (Optional.IsDefined(FunctionAppConfig)) + { + writer.WritePropertyName("functionAppConfig"u8); + writer.WriteObjectValue(FunctionAppConfig, options); + } + if (Optional.IsDefined(DaprConfig)) + { + writer.WritePropertyName("daprConfig"u8); + writer.WriteObjectValue(DaprConfig, options); + } + if (Optional.IsDefined(WorkloadProfileName)) + { + writer.WritePropertyName("workloadProfileName"u8); + writer.WriteStringValue(WorkloadProfileName); + } + if (Optional.IsDefined(ResourceConfig)) + { + writer.WritePropertyName("resourceConfig"u8); + writer.WriteObjectValue(ResourceConfig, options); + } if (options.Format != "W" && Optional.IsCollectionDefined(TrafficManagerHostNames)) { if (TrafficManagerHostNames != null) @@ -340,6 +385,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio writer.WriteNull("inProgressOperationId"); } } + if (Optional.IsDefined(PublicNetworkAccess)) + { + writer.WritePropertyName("publicNetworkAccess"u8); + writer.WriteStringValue(PublicNetworkAccess); + } if (Optional.IsDefined(IsStorageAccountRequired)) { writer.WritePropertyName("storageAccountRequired"u8); @@ -355,6 +405,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio writer.WritePropertyName("virtualNetworkSubnetId"u8); writer.WriteStringValue(VirtualNetworkSubnetId); } + if (Optional.IsDefined(ManagedEnvironmentId)) + { + writer.WritePropertyName("managedEnvironmentId"u8); + writer.WriteStringValue(ManagedEnvironmentId); + } writer.WriteEndObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -416,7 +471,16 @@ internal static WebSiteData DeserializeWebSiteData(JsonElement element, ModelRea bool? isXenon = default; bool? hyperV = default; DateTimeOffset? lastModifiedTimeUtc = default; + SiteDnsConfig dnsConfiguration = default; + bool? vnetRouteAllEnabled = default; + bool? vnetImagePullEnabled = default; + bool? vnetContentShareEnabled = default; + bool? vnetBackupRestoreEnabled = default; SiteConfigProperties siteConfig = default; + FunctionAppConfig functionAppConfig = default; + AppDaprConfig daprConfig = default; + string workloadProfileName = default; + FunctionAppResourceConfig resourceConfig = default; IReadOnlyList trafficManagerHostNames = default; bool? scmSiteAlsoStopped = default; string targetSwapSlot = default; @@ -441,9 +505,11 @@ internal static WebSiteData DeserializeWebSiteData(JsonElement element, ModelRea bool? httpsOnly = default; RedundancyMode? redundancyMode = default; Guid? inProgressOperationId = default; + string publicNetworkAccess = default; bool? storageAccountRequired = default; string keyVaultReferenceIdentity = default; ResourceIdentifier virtualNetworkSubnetId = default; + string managedEnvironmentId = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -647,6 +713,51 @@ internal static WebSiteData DeserializeWebSiteData(JsonElement element, ModelRea lastModifiedTimeUtc = property0.Value.GetDateTimeOffset("O"); continue; } + if (property0.NameEquals("dnsConfiguration"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dnsConfiguration = SiteDnsConfig.DeserializeSiteDnsConfig(property0.Value, options); + continue; + } + if (property0.NameEquals("vnetRouteAllEnabled"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + vnetRouteAllEnabled = property0.Value.GetBoolean(); + continue; + } + if (property0.NameEquals("vnetImagePullEnabled"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + vnetImagePullEnabled = property0.Value.GetBoolean(); + continue; + } + if (property0.NameEquals("vnetContentShareEnabled"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + vnetContentShareEnabled = property0.Value.GetBoolean(); + continue; + } + if (property0.NameEquals("vnetBackupRestoreEnabled"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + vnetBackupRestoreEnabled = property0.Value.GetBoolean(); + continue; + } if (property0.NameEquals("siteConfig"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -656,6 +767,38 @@ internal static WebSiteData DeserializeWebSiteData(JsonElement element, ModelRea siteConfig = SiteConfigProperties.DeserializeSiteConfigProperties(property0.Value, options); continue; } + if (property0.NameEquals("functionAppConfig"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + functionAppConfig = FunctionAppConfig.DeserializeFunctionAppConfig(property0.Value, options); + continue; + } + if (property0.NameEquals("daprConfig"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + daprConfig = AppDaprConfig.DeserializeAppDaprConfig(property0.Value, options); + continue; + } + if (property0.NameEquals("workloadProfileName"u8)) + { + workloadProfileName = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("resourceConfig"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resourceConfig = FunctionAppResourceConfig.DeserializeFunctionAppResourceConfig(property0.Value, options); + continue; + } if (property0.NameEquals("trafficManagerHostNames"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -856,6 +999,11 @@ internal static WebSiteData DeserializeWebSiteData(JsonElement element, ModelRea inProgressOperationId = property0.Value.GetGuid(); continue; } + if (property0.NameEquals("publicNetworkAccess"u8)) + { + publicNetworkAccess = property0.Value.GetString(); + continue; + } if (property0.NameEquals("storageAccountRequired"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -879,6 +1027,11 @@ internal static WebSiteData DeserializeWebSiteData(JsonElement element, ModelRea virtualNetworkSubnetId = new ResourceIdentifier(property0.Value.GetString()); continue; } + if (property0.NameEquals("managedEnvironmentId"u8)) + { + managedEnvironmentId = property0.Value.GetString(); + continue; + } } continue; } @@ -910,7 +1063,16 @@ internal static WebSiteData DeserializeWebSiteData(JsonElement element, ModelRea isXenon, hyperV, lastModifiedTimeUtc, + dnsConfiguration, + vnetRouteAllEnabled, + vnetImagePullEnabled, + vnetContentShareEnabled, + vnetBackupRestoreEnabled, siteConfig, + functionAppConfig, + daprConfig, + workloadProfileName, + resourceConfig, trafficManagerHostNames ?? new ChangeTrackingList(), scmSiteAlsoStopped, targetSwapSlot, @@ -935,9 +1097,11 @@ internal static WebSiteData DeserializeWebSiteData(JsonElement element, ModelRea httpsOnly, redundancyMode, inProgressOperationId, + publicNetworkAccess, storageAccountRequired, keyVaultReferenceIdentity, virtualNetworkSubnetId, + managedEnvironmentId, kind, serializedAdditionalRawData); } @@ -1376,6 +1540,85 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DnsConfiguration), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" dnsConfiguration: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DnsConfiguration)) + { + builder.Append(" dnsConfiguration: "); + BicepSerializationHelpers.AppendChildObject(builder, DnsConfiguration, options, 4, false, " dnsConfiguration: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsVnetRouteAllEnabled), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" vnetRouteAllEnabled: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsVnetRouteAllEnabled)) + { + builder.Append(" vnetRouteAllEnabled: "); + var boolValue = IsVnetRouteAllEnabled.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsVnetImagePullEnabled), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" vnetImagePullEnabled: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsVnetImagePullEnabled)) + { + builder.Append(" vnetImagePullEnabled: "); + var boolValue = IsVnetImagePullEnabled.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsVnetContentShareEnabled), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" vnetContentShareEnabled: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsVnetContentShareEnabled)) + { + builder.Append(" vnetContentShareEnabled: "); + var boolValue = IsVnetContentShareEnabled.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsVnetBackupRestoreEnabled), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" vnetBackupRestoreEnabled: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsVnetBackupRestoreEnabled)) + { + builder.Append(" vnetBackupRestoreEnabled: "); + var boolValue = IsVnetBackupRestoreEnabled.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SiteConfig), out propertyOverride); if (hasPropertyOverride) { @@ -1391,6 +1634,74 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(FunctionAppConfig), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" functionAppConfig: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(FunctionAppConfig)) + { + builder.Append(" functionAppConfig: "); + BicepSerializationHelpers.AppendChildObject(builder, FunctionAppConfig, options, 4, false, " functionAppConfig: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DaprConfig), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" daprConfig: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DaprConfig)) + { + builder.Append(" daprConfig: "); + BicepSerializationHelpers.AppendChildObject(builder, DaprConfig, options, 4, false, " daprConfig: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(WorkloadProfileName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" workloadProfileName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(WorkloadProfileName)) + { + builder.Append(" workloadProfileName: "); + if (WorkloadProfileName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{WorkloadProfileName}'''"); + } + else + { + builder.AppendLine($"'{WorkloadProfileName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ResourceConfig), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" resourceConfig: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ResourceConfig)) + { + builder.Append(" resourceConfig: "); + BicepSerializationHelpers.AppendChildObject(builder, ResourceConfig, options, 4, false, " resourceConfig: "); + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TrafficManagerHostNames), out propertyOverride); if (hasPropertyOverride) { @@ -1835,6 +2146,29 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PublicNetworkAccess), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" publicNetworkAccess: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PublicNetworkAccess)) + { + builder.Append(" publicNetworkAccess: "); + if (PublicNetworkAccess.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{PublicNetworkAccess}'''"); + } + else + { + builder.AppendLine($"'{PublicNetworkAccess}'"); + } + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsStorageAccountRequired), out propertyOverride); if (hasPropertyOverride) { @@ -1889,6 +2223,29 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ManagedEnvironmentId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" managedEnvironmentId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ManagedEnvironmentId)) + { + builder.Append(" managedEnvironmentId: "); + if (ManagedEnvironmentId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ManagedEnvironmentId}'''"); + } + else + { + builder.AppendLine($"'{ManagedEnvironmentId}'"); + } + } + } + builder.AppendLine(" }"); builder.AppendLine("}"); return BinaryData.FromString(builder.ToString()); diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteData.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteData.cs index fb45542cca012..b8229ca4c4e86 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteData.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteData.cs @@ -87,7 +87,16 @@ public WebSiteData(AzureLocation location) : base(location) /// Obsolete: Hyper-V sandbox. /// Hyper-V sandbox. /// Last time the app was modified, in UTC. Read-only. + /// Property to configure various DNS related settings for a site. + /// Virtual Network Route All enabled. This causes all outbound traffic to have Virtual Network Security Groups and User Defined Routes applied. + /// To enable pulling image over Virtual Network. + /// To enable accessing content over virtual network. + /// To enable Backup and Restore operations over virtual network. /// Configuration of the app. + /// Configuration specific of the Azure Function app. + /// Dapr configuration of the app. + /// Workload profile name for function app to execute on. + /// Function app resource requirements. /// Azure Traffic Manager hostnames associated with the app. Read-only. /// <code>true</code> to stop SCM (KUDU) site when the app is stopped; otherwise, <code>false</code>. The default is <code>false</code>. /// Specifies which deployment slot this app will swap into. Read-only. @@ -126,15 +135,17 @@ public WebSiteData(AzureLocation location) : base(location) /// /// Site redundancy mode. /// Specifies an operation id if this site has a pending operation. + /// Property to allow or block all public traffic. Allowed Values: 'Enabled', 'Disabled' or an empty string. /// Checks if Customer provided storage account is required. /// Identity to use for Key Vault Reference authentication. /// /// Azure Resource Manager ID of the Virtual network and subnet to be joined by Regional VNET Integration. /// This must be of the form /subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName} /// + /// Azure Resource Manager ID of the customer's selected Managed Environment on which to host this app. This must be of the form /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName}. /// Kind of resource. /// Keeps track of any properties unknown to the library. - internal WebSiteData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, ExtendedLocation extendedLocation, string state, IReadOnlyList hostNames, string repositorySiteName, AppServiceUsageState? usageState, bool? isEnabled, IReadOnlyList enabledHostNames, WebSiteAvailabilityState? availabilityState, IList hostNameSslStates, ResourceIdentifier appServicePlanId, bool? isReserved, bool? isXenon, bool? isHyperV, DateTimeOffset? lastModifiedTimeUtc, SiteConfigProperties siteConfig, IReadOnlyList trafficManagerHostNames, bool? isScmSiteAlsoStopped, string targetSwapSlot, HostingEnvironmentProfile hostingEnvironmentProfile, bool? isClientAffinityEnabled, bool? isClientCertEnabled, ClientCertMode? clientCertMode, string clientCertExclusionPaths, bool? isHostNameDisabled, string customDomainVerificationId, string outboundIPAddresses, string possibleOutboundIPAddresses, int? containerSize, int? dailyMemoryTimeQuota, DateTimeOffset? suspendOn, int? maxNumberOfWorkers, CloningInfo cloningInfo, string resourceGroup, bool? isDefaultContainer, string defaultHostName, SlotSwapStatus slotSwapStatus, bool? isHttpsOnly, RedundancyMode? redundancyMode, Guid? inProgressOperationId, bool? isStorageAccountRequired, string keyVaultReferenceIdentity, ResourceIdentifier virtualNetworkSubnetId, string kind, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal WebSiteData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, ExtendedLocation extendedLocation, string state, IReadOnlyList hostNames, string repositorySiteName, AppServiceUsageState? usageState, bool? isEnabled, IReadOnlyList enabledHostNames, WebSiteAvailabilityState? availabilityState, IList hostNameSslStates, ResourceIdentifier appServicePlanId, bool? isReserved, bool? isXenon, bool? isHyperV, DateTimeOffset? lastModifiedTimeUtc, SiteDnsConfig dnsConfiguration, bool? isVnetRouteAllEnabled, bool? isVnetImagePullEnabled, bool? isVnetContentShareEnabled, bool? isVnetBackupRestoreEnabled, SiteConfigProperties siteConfig, FunctionAppConfig functionAppConfig, AppDaprConfig daprConfig, string workloadProfileName, FunctionAppResourceConfig resourceConfig, IReadOnlyList trafficManagerHostNames, bool? isScmSiteAlsoStopped, string targetSwapSlot, HostingEnvironmentProfile hostingEnvironmentProfile, bool? isClientAffinityEnabled, bool? isClientCertEnabled, ClientCertMode? clientCertMode, string clientCertExclusionPaths, bool? isHostNameDisabled, string customDomainVerificationId, string outboundIPAddresses, string possibleOutboundIPAddresses, int? containerSize, int? dailyMemoryTimeQuota, DateTimeOffset? suspendOn, int? maxNumberOfWorkers, CloningInfo cloningInfo, string resourceGroup, bool? isDefaultContainer, string defaultHostName, SlotSwapStatus slotSwapStatus, bool? isHttpsOnly, RedundancyMode? redundancyMode, Guid? inProgressOperationId, string publicNetworkAccess, bool? isStorageAccountRequired, string keyVaultReferenceIdentity, ResourceIdentifier virtualNetworkSubnetId, string managedEnvironmentId, string kind, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { Identity = identity; ExtendedLocation = extendedLocation; @@ -151,7 +162,16 @@ internal WebSiteData(ResourceIdentifier id, string name, ResourceType resourceTy IsXenon = isXenon; IsHyperV = isHyperV; LastModifiedTimeUtc = lastModifiedTimeUtc; + DnsConfiguration = dnsConfiguration; + IsVnetRouteAllEnabled = isVnetRouteAllEnabled; + IsVnetImagePullEnabled = isVnetImagePullEnabled; + IsVnetContentShareEnabled = isVnetContentShareEnabled; + IsVnetBackupRestoreEnabled = isVnetBackupRestoreEnabled; SiteConfig = siteConfig; + FunctionAppConfig = functionAppConfig; + DaprConfig = daprConfig; + WorkloadProfileName = workloadProfileName; + ResourceConfig = resourceConfig; TrafficManagerHostNames = trafficManagerHostNames; IsScmSiteAlsoStopped = isScmSiteAlsoStopped; TargetSwapSlot = targetSwapSlot; @@ -176,9 +196,11 @@ internal WebSiteData(ResourceIdentifier id, string name, ResourceType resourceTy IsHttpsOnly = isHttpsOnly; RedundancyMode = redundancyMode; InProgressOperationId = inProgressOperationId; + PublicNetworkAccess = publicNetworkAccess; IsStorageAccountRequired = isStorageAccountRequired; KeyVaultReferenceIdentity = keyVaultReferenceIdentity; VirtualNetworkSubnetId = virtualNetworkSubnetId; + ManagedEnvironmentId = managedEnvironmentId; Kind = kind; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -236,9 +258,36 @@ internal WebSiteData() /// Last time the app was modified, in UTC. Read-only. [WirePath("properties.lastModifiedTimeUtc")] public DateTimeOffset? LastModifiedTimeUtc { get; } + /// Property to configure various DNS related settings for a site. + [WirePath("properties.dnsConfiguration")] + public SiteDnsConfig DnsConfiguration { get; set; } + /// Virtual Network Route All enabled. This causes all outbound traffic to have Virtual Network Security Groups and User Defined Routes applied. + [WirePath("properties.vnetRouteAllEnabled")] + public bool? IsVnetRouteAllEnabled { get; set; } + /// To enable pulling image over Virtual Network. + [WirePath("properties.vnetImagePullEnabled")] + public bool? IsVnetImagePullEnabled { get; set; } + /// To enable accessing content over virtual network. + [WirePath("properties.vnetContentShareEnabled")] + public bool? IsVnetContentShareEnabled { get; set; } + /// To enable Backup and Restore operations over virtual network. + [WirePath("properties.vnetBackupRestoreEnabled")] + public bool? IsVnetBackupRestoreEnabled { get; set; } /// Configuration of the app. [WirePath("properties.siteConfig")] public SiteConfigProperties SiteConfig { get; set; } + /// Configuration specific of the Azure Function app. + [WirePath("properties.functionAppConfig")] + public FunctionAppConfig FunctionAppConfig { get; set; } + /// Dapr configuration of the app. + [WirePath("properties.daprConfig")] + public AppDaprConfig DaprConfig { get; set; } + /// Workload profile name for function app to execute on. + [WirePath("properties.workloadProfileName")] + public string WorkloadProfileName { get; set; } + /// Function app resource requirements. + [WirePath("properties.resourceConfig")] + public FunctionAppResourceConfig ResourceConfig { get; set; } /// Azure Traffic Manager hostnames associated with the app. Read-only. [WirePath("properties.trafficManagerHostNames")] public IReadOnlyList TrafficManagerHostNames { get; } @@ -325,6 +374,9 @@ internal WebSiteData() /// Specifies an operation id if this site has a pending operation. [WirePath("properties.inProgressOperationId")] public Guid? InProgressOperationId { get; } + /// Property to allow or block all public traffic. Allowed Values: 'Enabled', 'Disabled' or an empty string. + [WirePath("properties.publicNetworkAccess")] + public string PublicNetworkAccess { get; set; } /// Checks if Customer provided storage account is required. [WirePath("properties.storageAccountRequired")] public bool? IsStorageAccountRequired { get; set; } @@ -337,6 +389,9 @@ internal WebSiteData() /// [WirePath("properties.virtualNetworkSubnetId")] public ResourceIdentifier VirtualNetworkSubnetId { get; set; } + /// Azure Resource Manager ID of the customer's selected Managed Environment on which to host this app. This must be of the form /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName}. + [WirePath("properties.managedEnvironmentId")] + public string ManagedEnvironmentId { get; set; } /// Kind of resource. [WirePath("kind")] public string Kind { get; set; } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteExtensionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteExtensionCollection.cs index a815ad4751714..8df855cb0c5bd 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteExtensionCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteExtensionCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -111,7 +111,7 @@ public virtual async Task> CreateOrUpdate /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -158,7 +158,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil w /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -203,7 +203,7 @@ public virtual async Task> GetAsync(string si /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -248,7 +248,7 @@ public virtual Response Get(string siteExtensionId, Ca /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -278,7 +278,7 @@ public virtual AsyncPageable GetAllAsync(CancellationT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -308,7 +308,7 @@ public virtual Pageable GetAll(CancellationToken cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -351,7 +351,7 @@ public virtual async Task> ExistsAsync(string siteExtensionId, Ca /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -394,7 +394,7 @@ public virtual Response Exists(string siteExtensionId, CancellationToken c /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -439,7 +439,7 @@ public virtual async Task> GetIfExist /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteExtensionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteExtensionResource.cs index 7f8912c595e91..959a9d5bd305b 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteExtensionResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteExtensionResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -269,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> UpdateAsync(Wa /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteFtpPublishingCredentialsPolicyResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteFtpPublishingCredentialsPolicyResource.cs index 098b8e17a57b1..63f3f0d220c23 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteFtpPublishingCredentialsPolicyResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteFtpPublishingCredentialsPolicyResource.cs @@ -100,7 +100,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -180,7 +180,7 @@ public virtual Response Get(Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -228,7 +228,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteHybridConnectionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteHybridConnectionCollection.cs index 6ac9ff59eb102..a8fe5b2e86040 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteHybridConnectionCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteHybridConnectionCollection.cs @@ -61,7 +61,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -112,7 +112,7 @@ public virtual async Task> CreateO /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(Wait /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(st /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string entityName, /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -296,7 +296,7 @@ public virtual async Task> ExistsAsync(string entityName, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -339,7 +339,7 @@ public virtual Response Exists(string entityName, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -384,7 +384,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteHybridConnectionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteHybridConnectionResource.cs index b8732869abdfa..260822ecbaf8d 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteHybridConnectionResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteHybridConnectionResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Ca /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken c /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -269,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> UpdateAsync /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSitePremierAddonCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSitePremierAddonCollection.cs index 102b8d6b146f8..a01acded6afea 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSitePremierAddonCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSitePremierAddonCollection.cs @@ -61,7 +61,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -112,7 +112,7 @@ public virtual async Task> CreateOrUpd /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnti /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string premierAddOnName /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -296,7 +296,7 @@ public virtual async Task> ExistsAsync(string premierAddOnName, C /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -339,7 +339,7 @@ public virtual Response Exists(string premierAddOnName, CancellationToken /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -384,7 +384,7 @@ public virtual async Task> GetIfEx /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSitePremierAddonResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSitePremierAddonResource.cs index fbb96d2e70246..10c93e058cb09 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSitePremierAddonResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSitePremierAddonResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -270,7 +270,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task> UpdateAsync(Pre /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSitePrivateAccessResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSitePrivateAccessResource.cs index 73671bc8ff032..0d3a88595494d 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSitePrivateAccessResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSitePrivateAccessResource.cs @@ -100,7 +100,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> GetAsync(Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -180,7 +180,7 @@ public virtual Response Get(CancellationToken canc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -228,7 +228,7 @@ public virtual async Task> CreateOrUp /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteResource.cs index 9deca7c3d854d..4be71701e5987 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteResource.cs @@ -43,6 +43,10 @@ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, private readonly RecommendationsRestOperations _recommendationsRestClient; private readonly ClientDiagnostics _siteRecommendationRecommendationsClientDiagnostics; private readonly RecommendationsRestOperations _siteRecommendationRecommendationsRestClient; + private readonly ClientDiagnostics _siteExtensionWebAppsClientDiagnostics; + private readonly WebAppsRestOperations _siteExtensionWebAppsRestClient; + private readonly ClientDiagnostics _workflowsClientDiagnostics; + private readonly WorkflowsRestOperations _workflowsRestClient; private readonly WebSiteData _data; /// Gets the resource type for the operations. @@ -75,6 +79,11 @@ internal WebSiteResource(ArmClient client, ResourceIdentifier id) : base(client, _siteRecommendationRecommendationsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppService", SiteRecommendationResource.ResourceType.Namespace, Diagnostics); TryGetApiVersion(SiteRecommendationResource.ResourceType, out string siteRecommendationRecommendationsApiVersion); _siteRecommendationRecommendationsRestClient = new RecommendationsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, siteRecommendationRecommendationsApiVersion); + _siteExtensionWebAppsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppService", SiteExtensionResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(SiteExtensionResource.ResourceType, out string siteExtensionWebAppsApiVersion); + _siteExtensionWebAppsRestClient = new WebAppsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, siteExtensionWebAppsApiVersion); + _workflowsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppService", ProviderConstants.DefaultProviderNamespace, Diagnostics); + _workflowsRestClient = new WorkflowsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); #if DEBUG ValidateResourceId(Id); #endif @@ -121,7 +130,7 @@ public virtual SiteDetectorCollection GetSiteDetectors() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -155,7 +164,7 @@ public virtual async Task> GetSiteDetectorAsync(s /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -196,7 +205,7 @@ public virtual SitePrivateEndpointConnectionCollection GetSitePrivateEndpointCon /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -227,7 +236,7 @@ public virtual async Task> GetSi /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -265,7 +274,7 @@ public virtual SiteHybridConnectionNamespaceRelayCollection GetSiteHybridConnect /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -297,7 +306,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -336,7 +345,7 @@ public virtual SiteVirtualNetworkConnectionCollection GetSiteVirtualNetworkConne /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -367,7 +376,7 @@ public virtual async Task> GetSit /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -405,7 +414,7 @@ public virtual SiteDiagnosticCollection GetSiteDiagnostics() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -436,7 +445,7 @@ public virtual async Task> GetSiteDiagnosticAsy /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -474,7 +483,7 @@ public virtual SiteRecommendationCollection GetSiteRecommendations() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -507,7 +516,7 @@ public virtual async Task> GetSiteRecommend /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -554,7 +563,7 @@ public virtual WebSiteSlotCollection GetWebSiteSlots() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -585,7 +594,7 @@ public virtual async Task> GetWebSiteSlotAsync(str /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -623,7 +632,7 @@ public virtual SiteBackupCollection GetSiteBackups() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -654,7 +663,7 @@ public virtual async Task> GetSiteBackupAsync(strin /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -706,7 +715,7 @@ public virtual SiteConfigAppsettingCollection GetSiteConfigAppsettings() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -737,7 +746,7 @@ public virtual async Task> GetSiteConfigA /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -775,7 +784,7 @@ public virtual WebSiteConfigConnectionStringCollection GetWebSiteConfigConnectio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -806,7 +815,7 @@ public virtual async Task> GetWe /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -865,7 +874,7 @@ public virtual WebSiteContinuousWebJobCollection GetWebSiteContinuousWebJobs() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -896,7 +905,7 @@ public virtual async Task> GetWebSiteC /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -934,7 +943,7 @@ public virtual SiteDeploymentCollection GetSiteDeployments() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -965,7 +974,7 @@ public virtual async Task> GetSiteDeploymentAsy /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1003,7 +1012,7 @@ public virtual SiteDomainOwnershipIdentifierCollection GetSiteDomainOwnershipIde /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1034,7 +1043,7 @@ public virtual async Task> GetSi /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1079,7 +1088,7 @@ public virtual SiteFunctionCollection GetSiteFunctions() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1110,7 +1119,7 @@ public virtual async Task> GetSiteFunctionAsync(s /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1148,7 +1157,7 @@ public virtual SiteHostNameBindingCollection GetSiteHostNameBindings() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1179,7 +1188,7 @@ public virtual async Task> GetSiteHostName /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1217,7 +1226,7 @@ public virtual WebSiteHybridConnectionCollection GetWebSiteHybridConnections() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1248,7 +1257,7 @@ public virtual async Task> GetWebSiteH /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1286,7 +1295,7 @@ public virtual SiteInstanceCollection GetSiteInstances() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1317,7 +1326,7 @@ public virtual async Task> GetSiteInstanceAsync(s /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1355,7 +1364,7 @@ public virtual SiteProcessCollection GetSiteProcesses() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1386,7 +1395,7 @@ public virtual async Task> GetSiteProcessAsync(str /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1431,7 +1440,7 @@ public virtual WebSitePremierAddonCollection GetWebSitePremierAddons() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1462,7 +1471,7 @@ public virtual async Task> GetWebSitePremi /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1507,7 +1516,7 @@ public virtual SitePublicCertificateCollection GetSitePublicCertificates() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1538,7 +1547,7 @@ public virtual async Task> GetSitePublic /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1556,6 +1565,75 @@ public virtual Response GetSitePublicCertificate( return GetSitePublicCertificates().Get(publicCertificateName, cancellationToken); } + /// Gets a collection of SiteContainerResources in the WebSite. + /// An object representing collection of SiteContainerResources and their operations over a SiteContainerResource. + public virtual SiteContainerCollection GetSiteContainers() + { + return GetCachedClient(client => new SiteContainerCollection(client, Id)); + } + + /// + /// Gets a site container of a site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sitecontainers/{containerName} + /// + /// + /// Operation Id + /// WebApps_GetSiteContainer + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Site Container Name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetSiteContainerAsync(string containerName, CancellationToken cancellationToken = default) + { + return await GetSiteContainers().GetAsync(containerName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets a site container of a site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sitecontainers/{containerName} + /// + /// + /// Operation Id + /// WebApps_GetSiteContainer + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Site Container Name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetSiteContainer(string containerName, CancellationToken cancellationToken = default) + { + return GetSiteContainers().Get(containerName, cancellationToken); + } + /// Gets a collection of WebSiteExtensionResources in the WebSite. /// An object representing collection of WebSiteExtensionResources and their operations over a WebSiteExtensionResource. public virtual WebSiteExtensionCollection GetWebSiteExtensions() @@ -1576,7 +1654,7 @@ public virtual WebSiteExtensionCollection GetWebSiteExtensions() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1607,7 +1685,7 @@ public virtual async Task> GetWebSiteExtensio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1652,7 +1730,7 @@ public virtual WebSiteTriggeredwebJobCollection GetWebSiteTriggeredwebJobs() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1683,7 +1761,7 @@ public virtual async Task> GetWebSiteTr /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1721,7 +1799,7 @@ public virtual WebSiteWebJobCollection GetWebSiteWebJobs() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1752,7 +1830,7 @@ public virtual async Task> GetWebSiteWebJobAsync /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1770,6 +1848,297 @@ public virtual Response GetWebSiteWebJob(string webJobNam return GetWebSiteWebJobs().Get(webJobName, cancellationToken); } + /// Gets a collection of SiteWorkflowResources in the WebSite. + /// An object representing collection of SiteWorkflowResources and their operations over a SiteWorkflowResource. + public virtual SiteWorkflowCollection GetSiteWorkflows() + { + return GetCachedClient(client => new SiteWorkflowCollection(client, Id)); + } + + /// + /// Get workflow information by its ID for web site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/workflows/{workflowName} + /// + /// + /// Operation Id + /// WebApps_GetWorkflow + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Workflow name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetSiteWorkflowAsync(string workflowName, CancellationToken cancellationToken = default) + { + return await GetSiteWorkflows().GetAsync(workflowName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get workflow information by its ID for web site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/workflows/{workflowName} + /// + /// + /// Operation Id + /// WebApps_GetWorkflow + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Workflow name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetSiteWorkflow(string workflowName, CancellationToken cancellationToken = default) + { + return GetSiteWorkflows().Get(workflowName, cancellationToken); + } + + /// Gets a collection of WorkflowRunResources in the WebSite. + /// The workflow name. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// An object representing collection of WorkflowRunResources and their operations over a WorkflowRunResource. + public virtual WorkflowRunCollection GetWorkflowRuns(string workflowName) + { + return new WorkflowRunCollection(Client, Id, workflowName); + } + + /// + /// Gets a workflow run. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName} + /// + /// + /// Operation Id + /// WorkflowRuns_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow name. + /// The workflow run name. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetWorkflowRunAsync(string workflowName, string runName, CancellationToken cancellationToken = default) + { + return await GetWorkflowRuns(workflowName).GetAsync(runName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets a workflow run. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName} + /// + /// + /// Operation Id + /// WorkflowRuns_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow name. + /// The workflow run name. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetWorkflowRun(string workflowName, string runName, CancellationToken cancellationToken = default) + { + return GetWorkflowRuns(workflowName).Get(runName, cancellationToken); + } + + /// Gets a collection of WorkflowTriggerResources in the WebSite. + /// The workflow name. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// An object representing collection of WorkflowTriggerResources and their operations over a WorkflowTriggerResource. + public virtual WorkflowTriggerCollection GetWorkflowTriggers(string workflowName) + { + return new WorkflowTriggerCollection(Client, Id, workflowName); + } + + /// + /// Gets a workflow trigger. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName} + /// + /// + /// Operation Id + /// WorkflowTriggers_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow name. + /// The workflow trigger name. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetWorkflowTriggerAsync(string workflowName, string triggerName, CancellationToken cancellationToken = default) + { + return await GetWorkflowTriggers(workflowName).GetAsync(triggerName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets a workflow trigger. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName} + /// + /// + /// Operation Id + /// WorkflowTriggers_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow name. + /// The workflow trigger name. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetWorkflowTrigger(string workflowName, string triggerName, CancellationToken cancellationToken = default) + { + return GetWorkflowTriggers(workflowName).Get(triggerName, cancellationToken); + } + + /// Gets a collection of WorkflowVersionResources in the WebSite. + /// The workflow name. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// An object representing collection of WorkflowVersionResources and their operations over a WorkflowVersionResource. + public virtual WorkflowVersionCollection GetWorkflowVersions(string workflowName) + { + return new WorkflowVersionCollection(Client, Id, workflowName); + } + + /// + /// Gets a workflow version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/versions/{versionId} + /// + /// + /// Operation Id + /// WorkflowVersions_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow name. + /// The workflow versionId. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetWorkflowVersionAsync(string workflowName, string versionId, CancellationToken cancellationToken = default) + { + return await GetWorkflowVersions(workflowName).GetAsync(versionId, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets a workflow version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/versions/{versionId} + /// + /// + /// Operation Id + /// WorkflowVersions_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow name. + /// The workflow versionId. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetWorkflowVersion(string workflowName, string versionId, CancellationToken cancellationToken = default) + { + return GetWorkflowVersions(workflowName).Get(versionId, cancellationToken); + } + /// /// Description for Gets the details of a web, mobile, or API app. /// @@ -1783,7 +2152,7 @@ public virtual Response GetWebSiteWebJob(string webJobNam /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1823,7 +2192,7 @@ public virtual async Task> GetAsync(CancellationToken /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1863,7 +2232,7 @@ public virtual Response Get(CancellationToken cancellationToken /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1909,7 +2278,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, bool? d /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1955,7 +2324,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, bool? deleteMetrics = nu /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1997,7 +2366,7 @@ public virtual async Task> UpdateAsync(SitePatchInfo i /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2039,7 +2408,7 @@ public virtual Response Update(SitePatchInfo info, Cancellation /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -2067,7 +2436,7 @@ public virtual AsyncPageable GetHistoryForWebAppRecomm /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -2095,7 +2464,7 @@ public virtual Pageable GetHistoryForWebAppRecommendat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2127,7 +2496,7 @@ public virtual AsyncPageable GetRecommendedRulesForWeb /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2159,7 +2528,7 @@ public virtual Pageable GetRecommendedRulesForWebAppRe /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -2193,7 +2562,7 @@ public virtual async Task DisableAllForWebAppRecommendationAsync(Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -2227,7 +2596,7 @@ public virtual Response DisableAllForWebAppRecommendation(CancellationToken canc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -2261,7 +2630,7 @@ public virtual async Task ResetAllFiltersForWebAppRecommendationAsync( /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -2295,7 +2664,7 @@ public virtual Response ResetAllFiltersForWebAppRecommendation(CancellationToken /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2334,7 +2703,7 @@ public virtual async Task> AnalyzeCustomH /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2373,7 +2742,7 @@ public virtual Response AnalyzeCustomHostname(stri /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2415,7 +2784,7 @@ public virtual async Task ApplySlotConfigToProductionAsync(CsmSlotEnti /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2457,7 +2826,7 @@ public virtual Response ApplySlotConfigToProduction(CsmSlotEntity slotSwapEntity /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2499,7 +2868,7 @@ public virtual async Task> BackupAsync(WebAppBackupIn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2541,7 +2910,7 @@ public virtual Response Backup(WebAppBackupInfo info, Cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2583,7 +2952,7 @@ public virtual async Task> UpdateApp /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2625,7 +2994,7 @@ public virtual Response UpdateApplicationSett /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -2659,7 +3028,7 @@ public virtual async Task> GetApplic /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -2693,7 +3062,7 @@ public virtual Response GetApplicationSetting /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2735,7 +3104,7 @@ public virtual async Task> UpdateAuthSettingsAsync(Si /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2777,7 +3146,7 @@ public virtual Response UpdateAuthSettings(SiteAuthSettings si /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -2811,7 +3180,7 @@ public virtual async Task> GetAuthSettingsAsync(Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -2833,7 +3202,7 @@ public virtual Response GetAuthSettings(CancellationToken canc } /// - /// Description for Updates site's Authentication / Authorization settings for apps via the V2 format + /// Description for Gets site's Authentication / Authorization settings for apps via the V2 format /// /// /// Request Path @@ -2841,30 +3210,22 @@ public virtual Response GetAuthSettings(CancellationToken canc /// /// /// Operation Id - /// WebApps_UpdateAuthSettingsV2 + /// WebApps_GetAuthSettingsV2WithoutSecrets /// /// /// Default Api Version - /// 2021-02-01 - /// - /// - /// Resource - /// + /// 2023-12-01 /// /// /// - /// Auth settings associated with web app. /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAuthSettingsV2Async(SiteAuthSettingsV2 siteAuthSettingsV2, CancellationToken cancellationToken = default) + public virtual async Task> GetAuthSettingsV2WithoutSecretsAsync(CancellationToken cancellationToken = default) { - Argument.AssertNotNull(siteAuthSettingsV2, nameof(siteAuthSettingsV2)); - - using var scope = _webSiteWebAppsClientDiagnostics.CreateScope("WebSiteResource.UpdateAuthSettingsV2"); + using var scope = _webSiteWebAppsClientDiagnostics.CreateScope("WebSiteResource.GetAuthSettingsV2WithoutSecrets"); scope.Start(); try { - var response = await _webSiteWebAppsRestClient.UpdateAuthSettingsV2Async(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, siteAuthSettingsV2, cancellationToken).ConfigureAwait(false); + var response = await _webSiteWebAppsRestClient.GetAuthSettingsV2WithoutSecretsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); return response; } catch (Exception e) @@ -2875,7 +3236,7 @@ public virtual async Task> UpdateAuthSettingsV2Asyn } /// - /// Description for Updates site's Authentication / Authorization settings for apps via the V2 format + /// Description for Gets site's Authentication / Authorization settings for apps via the V2 format /// /// /// Request Path @@ -2883,30 +3244,22 @@ public virtual async Task> UpdateAuthSettingsV2Asyn /// /// /// Operation Id - /// WebApps_UpdateAuthSettingsV2 + /// WebApps_GetAuthSettingsV2WithoutSecrets /// /// /// Default Api Version - /// 2021-02-01 - /// - /// - /// Resource - /// + /// 2023-12-01 /// /// /// - /// Auth settings associated with web app. /// The cancellation token to use. - /// is null. - public virtual Response UpdateAuthSettingsV2(SiteAuthSettingsV2 siteAuthSettingsV2, CancellationToken cancellationToken = default) + public virtual Response GetAuthSettingsV2WithoutSecrets(CancellationToken cancellationToken = default) { - Argument.AssertNotNull(siteAuthSettingsV2, nameof(siteAuthSettingsV2)); - - using var scope = _webSiteWebAppsClientDiagnostics.CreateScope("WebSiteResource.UpdateAuthSettingsV2"); + using var scope = _webSiteWebAppsClientDiagnostics.CreateScope("WebSiteResource.GetAuthSettingsV2WithoutSecrets"); scope.Start(); try { - var response = _webSiteWebAppsRestClient.UpdateAuthSettingsV2(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, siteAuthSettingsV2, cancellationToken); + var response = _webSiteWebAppsRestClient.GetAuthSettingsV2WithoutSecrets(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); return response; } catch (Exception e) @@ -2917,11 +3270,95 @@ public virtual Response UpdateAuthSettingsV2(SiteAuthSetting } /// - /// Description for Gets site's Authentication / Authorization settings for apps via the V2 format + /// Description for Updates site's Authentication / Authorization settings for apps via the V2 format /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2/list + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2 + /// + /// + /// Operation Id + /// WebApps_UpdateAuthSettingsV2 + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Auth settings associated with web app. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAuthSettingsV2Async(SiteAuthSettingsV2 siteAuthSettingsV2, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(siteAuthSettingsV2, nameof(siteAuthSettingsV2)); + + using var scope = _webSiteWebAppsClientDiagnostics.CreateScope("WebSiteResource.UpdateAuthSettingsV2"); + scope.Start(); + try + { + var response = await _webSiteWebAppsRestClient.UpdateAuthSettingsV2Async(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, siteAuthSettingsV2, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Description for Updates site's Authentication / Authorization settings for apps via the V2 format + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2 + /// + /// + /// Operation Id + /// WebApps_UpdateAuthSettingsV2 + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Auth settings associated with web app. + /// The cancellation token to use. + /// is null. + public virtual Response UpdateAuthSettingsV2(SiteAuthSettingsV2 siteAuthSettingsV2, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(siteAuthSettingsV2, nameof(siteAuthSettingsV2)); + + using var scope = _webSiteWebAppsClientDiagnostics.CreateScope("WebSiteResource.UpdateAuthSettingsV2"); + scope.Start(); + try + { + var response = _webSiteWebAppsRestClient.UpdateAuthSettingsV2(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, siteAuthSettingsV2, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Description for Gets site's Authentication / Authorization settings for apps via the V2 format + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2/list /// /// /// Operation Id @@ -2929,7 +3366,7 @@ public virtual Response UpdateAuthSettingsV2(SiteAuthSetting /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -2963,7 +3400,7 @@ public virtual async Task> GetAuthSettingsV2Async(C /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -2997,7 +3434,7 @@ public virtual Response GetAuthSettingsV2(CancellationToken /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3039,7 +3476,7 @@ public virtual async Task> UpdateAzureS /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3081,7 +3518,7 @@ public virtual Response UpdateAzureStorageAccoun /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -3115,7 +3552,7 @@ public virtual async Task> GetAzureStor /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -3149,7 +3586,7 @@ public virtual Response GetAzureStorageAccounts( /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3191,7 +3628,7 @@ public virtual async Task> UpdateBackupConfigurationA /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3233,7 +3670,7 @@ public virtual Response UpdateBackupConfiguration(WebAppBackup /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3271,7 +3708,7 @@ public virtual async Task DeleteBackupConfigurationAsync(CancellationT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3309,7 +3746,7 @@ public virtual Response DeleteBackupConfiguration(CancellationToken cancellation /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -3343,7 +3780,7 @@ public virtual async Task> GetBackupConfigurationAsyn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -3377,7 +3814,7 @@ public virtual Response GetBackupConfiguration(CancellationTok /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3419,7 +3856,7 @@ public virtual async Task> UpdateConnection /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3461,7 +3898,7 @@ public virtual Response UpdateConnectionStrings(Conn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -3495,7 +3932,7 @@ public virtual async Task> GetConnectionStr /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -3529,7 +3966,7 @@ public virtual Response GetConnectionStrings(Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3571,7 +4008,7 @@ public virtual async Task> UpdateMet /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3613,7 +4050,7 @@ public virtual Response UpdateMetadata(AppSer /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -3647,7 +4084,7 @@ public virtual async Task> GetMetada /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -3681,7 +4118,7 @@ public virtual Response GetMetadata(Cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -3719,7 +4156,7 @@ public virtual async Task> GetPublishingCre /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -3757,7 +4194,7 @@ public virtual ArmOperation GetPublishingCredentials(Wai /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3799,7 +4236,7 @@ public virtual async Task> UpdateSitePushSettingsAs /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3841,7 +4278,7 @@ public virtual Response UpdateSitePushSettings(WebAppPushSet /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -3875,7 +4312,7 @@ public virtual async Task> GetSitePushSettingsAsync /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -3909,7 +4346,7 @@ public virtual Response GetSitePushSettings(CancellationToke /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3947,7 +4384,7 @@ public virtual async Task> GetWebSiteContainerLogsAsync(Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3985,7 +4422,7 @@ public virtual Response GetWebSiteContainerLogs(CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4019,7 +4456,7 @@ public virtual async Task> GetContainerLogsZipAsync(Cancellatio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4040,6 +4477,194 @@ public virtual Response GetContainerLogsZip(CancellationToken cancellati } } + /// + /// List deployment statuses for an app (or deployment slot, if specified). + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deploymentStatus + /// + /// + /// Operation Id + /// WebApps_ListProductionSiteDeploymentStatuses + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetProductionSiteDeploymentStatusesAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _webSiteWebAppsRestClient.CreateListProductionSiteDeploymentStatusesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _webSiteWebAppsRestClient.CreateListProductionSiteDeploymentStatusesNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => CsmDeploymentStatus.DeserializeCsmDeploymentStatus(e), _webSiteWebAppsClientDiagnostics, Pipeline, "WebSiteResource.GetProductionSiteDeploymentStatuses", "value", "nextLink", cancellationToken); + } + + /// + /// List deployment statuses for an app (or deployment slot, if specified). + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deploymentStatus + /// + /// + /// Operation Id + /// WebApps_ListProductionSiteDeploymentStatuses + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetProductionSiteDeploymentStatuses(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _webSiteWebAppsRestClient.CreateListProductionSiteDeploymentStatusesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _webSiteWebAppsRestClient.CreateListProductionSiteDeploymentStatusesNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => CsmDeploymentStatus.DeserializeCsmDeploymentStatus(e), _webSiteWebAppsClientDiagnostics, Pipeline, "WebSiteResource.GetProductionSiteDeploymentStatuses", "value", "nextLink", cancellationToken); + } + + /// + /// Gets the deployment status for an app (or deployment slot, if specified). + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deploymentStatus/{deploymentStatusId} + /// + /// + /// Operation Id + /// WebApps_GetProductionSiteDeploymentStatus + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// GUID of the deployment operation. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetProductionSiteDeploymentStatusAsync(WaitUntil waitUntil, string deploymentStatusId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(deploymentStatusId, nameof(deploymentStatusId)); + + using var scope = _webSiteWebAppsClientDiagnostics.CreateScope("WebSiteResource.GetProductionSiteDeploymentStatus"); + scope.Start(); + try + { + var response = await _webSiteWebAppsRestClient.GetProductionSiteDeploymentStatusAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, deploymentStatusId, cancellationToken).ConfigureAwait(false); + var operation = new AppServiceArmOperation(new CsmDeploymentStatusOperationSource(), _webSiteWebAppsClientDiagnostics, Pipeline, _webSiteWebAppsRestClient.CreateGetProductionSiteDeploymentStatusRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, deploymentStatusId).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the deployment status for an app (or deployment slot, if specified). + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deploymentStatus/{deploymentStatusId} + /// + /// + /// Operation Id + /// WebApps_GetProductionSiteDeploymentStatus + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// GUID of the deployment operation. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual ArmOperation GetProductionSiteDeploymentStatus(WaitUntil waitUntil, string deploymentStatusId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(deploymentStatusId, nameof(deploymentStatusId)); + + using var scope = _webSiteWebAppsClientDiagnostics.CreateScope("WebSiteResource.GetProductionSiteDeploymentStatus"); + scope.Start(); + try + { + var response = _webSiteWebAppsRestClient.GetProductionSiteDeploymentStatus(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, deploymentStatusId, cancellationToken); + var operation = new AppServiceArmOperation(new CsmDeploymentStatusOperationSource(), _webSiteWebAppsClientDiagnostics, Pipeline, _webSiteWebAppsRestClient.CreateGetProductionSiteDeploymentStatusRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, deploymentStatusId).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Description for Discovers an existing app backup that can be restored from a blob in Azure storage. Use this to get information about the databases stored in a backup. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/discoverbackup + /// + /// + /// Operation Id + /// WebApps_DiscoverBackup + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// A RestoreRequest object that includes Azure storage URL and blog name for discovery of backup. + /// The cancellation token to use. + /// is null. + public virtual async Task> DiscoverBackupAsync(RestoreRequestInfo info, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(info, nameof(info)); + + using var scope = _webSiteWebAppsClientDiagnostics.CreateScope("WebSiteResource.DiscoverBackup"); + scope.Start(); + try + { + var response = await _webSiteWebAppsRestClient.DiscoverBackupAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, info, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + /// /// Description for Discovers an existing app backup that can be restored from a blob in Azure storage. Use this to get information about the databases stored in a backup. /// @@ -4053,7 +4678,7 @@ public virtual Response GetContainerLogsZip(CancellationToken cancellati /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -4061,18 +4686,124 @@ public virtual Response GetContainerLogsZip(CancellationToken cancellati /// /// /// - /// A RestoreRequest object that includes Azure storage URL and blog name for discovery of backup. + /// A RestoreRequest object that includes Azure storage URL and blog name for discovery of backup. + /// The cancellation token to use. + /// is null. + public virtual Response DiscoverBackup(RestoreRequestInfo info, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(info, nameof(info)); + + using var scope = _webSiteWebAppsClientDiagnostics.CreateScope("WebSiteResource.DiscoverBackup"); + scope.Start(); + try + { + var response = _webSiteWebAppsRestClient.DiscoverBackup(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, info, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Description for Invoke onedeploy status API /api/deployments and gets the deployment status for the site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/onedeploy + /// + /// + /// Operation Id + /// WebApps_GetOneDeployStatus + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetOneDeployStatusAsync(CancellationToken cancellationToken = default) + { + using var scope = _webSiteWebAppsClientDiagnostics.CreateScope("WebSiteResource.GetOneDeployStatus"); + scope.Start(); + try + { + var response = await _webSiteWebAppsRestClient.GetOneDeployStatusAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Description for Invoke onedeploy status API /api/deployments and gets the deployment status for the site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/onedeploy + /// + /// + /// Operation Id + /// WebApps_GetOneDeployStatus + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// + /// The cancellation token to use. + public virtual Response GetOneDeployStatus(CancellationToken cancellationToken = default) + { + using var scope = _webSiteWebAppsClientDiagnostics.CreateScope("WebSiteResource.GetOneDeployStatus"); + scope.Start(); + try + { + var response = _webSiteWebAppsRestClient.GetOneDeployStatus(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Description for Invoke the OneDeploy publish web app extension. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/onedeploy + /// + /// + /// Operation Id + /// WebApps_CreateOneDeployOperation + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// /// The cancellation token to use. - /// is null. - public virtual async Task> DiscoverBackupAsync(RestoreRequestInfo info, CancellationToken cancellationToken = default) + public virtual async Task> CreateOneDeployOperationAsync(CancellationToken cancellationToken = default) { - Argument.AssertNotNull(info, nameof(info)); - - using var scope = _webSiteWebAppsClientDiagnostics.CreateScope("WebSiteResource.DiscoverBackup"); + using var scope = _siteExtensionWebAppsClientDiagnostics.CreateScope("WebSiteResource.CreateOneDeployOperation"); scope.Start(); try { - var response = await _webSiteWebAppsRestClient.DiscoverBackupAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, info, cancellationToken).ConfigureAwait(false); + var response = await _siteExtensionWebAppsRestClient.CreateOneDeployOperationAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); return response; } catch (Exception e) @@ -4083,38 +4814,34 @@ public virtual async Task> DiscoverBackupAsync(Rest } /// - /// Description for Discovers an existing app backup that can be restored from a blob in Azure storage. Use this to get information about the databases stored in a backup. + /// Description for Invoke the OneDeploy publish web app extension. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/discoverbackup + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/onedeploy /// /// /// Operation Id - /// WebApps_DiscoverBackup + /// WebApps_CreateOneDeployOperation /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource - /// + /// /// /// /// - /// A RestoreRequest object that includes Azure storage URL and blog name for discovery of backup. /// The cancellation token to use. - /// is null. - public virtual Response DiscoverBackup(RestoreRequestInfo info, CancellationToken cancellationToken = default) + public virtual Response CreateOneDeployOperation(CancellationToken cancellationToken = default) { - Argument.AssertNotNull(info, nameof(info)); - - using var scope = _webSiteWebAppsClientDiagnostics.CreateScope("WebSiteResource.DiscoverBackup"); + using var scope = _siteExtensionWebAppsClientDiagnostics.CreateScope("WebSiteResource.CreateOneDeployOperation"); scope.Start(); try { - var response = _webSiteWebAppsRestClient.DiscoverBackup(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, info, cancellationToken); + var response = _siteExtensionWebAppsRestClient.CreateOneDeployOperation(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); return response; } catch (Exception e) @@ -4137,7 +4864,7 @@ public virtual Response DiscoverBackup(RestoreRequestInfo in /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4171,7 +4898,7 @@ public virtual async Task> GetFunctionsAdminTokenAsync(Cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4205,7 +4932,7 @@ public virtual Response GetFunctionsAdminToken(CancellationToken cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4239,7 +4966,7 @@ public virtual async Task> GetHostKeysAsync(Cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4273,7 +5000,7 @@ public virtual Response GetHostKeys(CancellationToken cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4307,7 +5034,7 @@ public virtual async Task GetSyncStatusAsync(CancellationToken cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4341,7 +5068,7 @@ public virtual Response GetSyncStatus(CancellationToken cancellationToken = defa /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4375,7 +5102,7 @@ public virtual async Task SyncFunctionsAsync(CancellationToken cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4409,7 +5136,7 @@ public virtual Response SyncFunctions(CancellationToken cancellationToken = defa /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4452,7 +5179,7 @@ public virtual async Task> CreateOrUpdateHostSecretAsync /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4495,7 +5222,7 @@ public virtual Response CreateOrUpdateHostSecret(string keyType, /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4536,7 +5263,7 @@ public virtual async Task DeleteHostSecretAsync(string keyType, string /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4577,7 +5304,7 @@ public virtual Response DeleteHostSecret(string keyType, string keyName, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -4606,7 +5333,7 @@ public virtual AsyncPageable GetHybridConnectionsAsync(Can /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -4635,7 +5362,7 @@ public virtual Pageable GetHybridConnections(CancellationT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -4673,7 +5400,7 @@ public virtual async Task> IsCloneableAsync(Cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -4711,7 +5438,7 @@ public virtual Response IsCloneable(CancellationToken cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -4749,7 +5476,7 @@ public virtual async Task> GetSyncFunctionTriggersAsyn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -4787,7 +5514,7 @@ public virtual Response GetSyncFunctionTriggers(CancellationTok /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -4835,7 +5562,7 @@ public virtual async Task> MigrateStorageAs /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -4883,7 +5610,7 @@ public virtual ArmOperation MigrateStorage(WaitUntil wai /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -4929,7 +5656,7 @@ public virtual async Task> MigrateMySqlAsync(W /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -4975,7 +5702,7 @@ public virtual ArmOperation MigrateMySql(WaitUntil waitUnti /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -5009,7 +5736,7 @@ public virtual async Task> GetMigrateMySqlS /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -5043,7 +5770,7 @@ public virtual Response GetMigrateMySqlStatus(Cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -5082,7 +5809,7 @@ public virtual async Task> GetNetworkFeaturesAs /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -5121,7 +5848,7 @@ public virtual Response GetNetworkFeatures(string view, /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -5151,7 +5878,7 @@ public virtual AsyncPageable GetNetworkTraceOperationAsync(s /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -5181,7 +5908,7 @@ public virtual Pageable GetNetworkTraceOperation(string oper /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -5218,7 +5945,7 @@ public virtual async Task> StartWebSiteNetworkTraceAsync(int? d /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -5255,7 +5982,7 @@ public virtual Response StartWebSiteNetworkTrace(int? durationInSeconds /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -5296,7 +6023,7 @@ public virtual async Task>> StartWebSiteN /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -5337,7 +6064,7 @@ public virtual ArmOperation> StartWebSiteNetworkTraceO /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -5371,7 +6098,7 @@ public virtual async Task StopWebSiteNetworkTraceAsync(CancellationTok /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -5405,7 +6132,7 @@ public virtual Response StopWebSiteNetworkTrace(CancellationToken cancellationTo /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -5435,7 +6162,7 @@ public virtual AsyncPageable GetNetworkTracesAsync(string op /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -5465,7 +6192,7 @@ public virtual Pageable GetNetworkTraces(string operationId, /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -5495,7 +6222,7 @@ public virtual AsyncPageable GetNetworkTraceOperationV2Async /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -5525,7 +6252,7 @@ public virtual Pageable GetNetworkTraceOperationV2(string op /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -5555,7 +6282,7 @@ public virtual AsyncPageable GetNetworkTracesV2Async(string /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -5585,7 +6312,7 @@ public virtual Pageable GetNetworkTracesV2(string operationI /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -5623,7 +6350,7 @@ public virtual async Task GenerateNewSitePublishingPasswordAsync(Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -5661,7 +6388,7 @@ public virtual Response GenerateNewSitePublishingPassword(CancellationToken canc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -5692,7 +6419,7 @@ public virtual AsyncPageable GetPerfMonCountersAsync(string /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -5723,7 +6450,7 @@ public virtual Pageable GetPerfMonCounters(string filter = /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -5761,7 +6488,7 @@ public virtual async Task> GetSitePhpErrorLogFlagA /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -5799,7 +6526,7 @@ public virtual Response GetSitePhpErrorLogFlag(Cancellation /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -5828,7 +6555,7 @@ public virtual AsyncPageable GetPrivateLinkRe /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -5857,7 +6584,7 @@ public virtual Pageable GetPrivateLinkResourc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -5899,7 +6626,7 @@ public virtual async Task> GetPublishingProfileXmlWithSecretsAs /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -5941,7 +6668,7 @@ public virtual Response GetPublishingProfileXmlWithSecrets(CsmPublishing /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -5979,7 +6706,7 @@ public virtual async Task ResetProductionSlotConfigAsync(CancellationT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -6017,7 +6744,7 @@ public virtual Response ResetProductionSlotConfig(CancellationToken cancellation /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -6057,7 +6784,7 @@ public virtual async Task RestartAsync(bool? softRestart = null, bool? /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -6097,7 +6824,7 @@ public virtual Response Restart(bool? softRestart = null, bool? synchronous = nu /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -6143,7 +6870,7 @@ public virtual async Task RestoreFromBackupBlobAsync(WaitUntil wai /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -6189,7 +6916,7 @@ public virtual ArmOperation RestoreFromBackupBlob(WaitUntil waitUntil, RestoreRe /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -6235,7 +6962,7 @@ public virtual async Task RestoreFromDeletedAppAsync(WaitUntil wai /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -6281,7 +7008,7 @@ public virtual ArmOperation RestoreFromDeletedApp(WaitUntil waitUntil, DeletedAp /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -6327,7 +7054,7 @@ public virtual async Task RestoreSnapshotAsync(WaitUntil waitUntil /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -6373,7 +7100,7 @@ public virtual ArmOperation RestoreSnapshot(WaitUntil waitUntil, SnapshotRestore /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -6407,7 +7134,7 @@ public virtual AsyncPageable GetSlotDifferencesFromProductionAsy /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -6441,7 +7168,7 @@ public virtual Pageable GetSlotDifferencesFromProduction(CsmSlot /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -6487,7 +7214,7 @@ public virtual async Task SwapSlotWithProductionAsync(WaitUntil wa /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -6533,7 +7260,7 @@ public virtual ArmOperation SwapSlotWithProduction(WaitUntil waitUntil, CsmSlotE /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -6563,7 +7290,7 @@ public virtual AsyncPageable GetSnapshotsAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -6593,7 +7320,7 @@ public virtual Pageable GetSnapshots(CancellationToken cancellation /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -6623,7 +7350,7 @@ public virtual AsyncPageable GetSnapshotsFromDRSecondaryAsync(Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -6653,7 +7380,7 @@ public virtual Pageable GetSnapshotsFromDRSecondary(CancellationTok /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -6691,7 +7418,7 @@ public virtual async Task StartAsync(CancellationToken cancellationTok /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -6729,7 +7456,7 @@ public virtual Response Start(CancellationToken cancellationToken = default) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -6774,7 +7501,7 @@ public virtual async Task>> StartNetworkT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -6819,7 +7546,7 @@ public virtual ArmOperation> StartNetworkTrace(WaitUnt /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -6857,7 +7584,7 @@ public virtual async Task StopAsync(CancellationToken cancellationToke /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -6895,7 +7622,7 @@ public virtual Response Stop(CancellationToken cancellationToken = default) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -6933,7 +7660,7 @@ public virtual async Task StopNetworkTraceAsync(CancellationToken canc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -6971,7 +7698,7 @@ public virtual Response StopNetworkTrace(CancellationToken cancellationToken = d /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -7009,7 +7736,7 @@ public virtual async Task SyncRepositoryAsync(CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -7047,7 +7774,7 @@ public virtual Response SyncRepository(CancellationToken cancellationToken = def /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -7085,7 +7812,7 @@ public virtual async Task SyncFunctionTriggersAsync(CancellationToken /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -7123,7 +7850,7 @@ public virtual Response SyncFunctionTriggers(CancellationToken cancellationToken /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -7154,7 +7881,7 @@ public virtual AsyncPageable GetUsagesAsync(string filter = null, /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -7171,5 +7898,323 @@ public virtual Pageable GetUsages(string filter = null, Cancellat HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _webSiteWebAppsRestClient.CreateListUsagesNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter); return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => CsmUsageQuota.DeserializeCsmUsageQuota(e), _webSiteWebAppsClientDiagnostics, Pipeline, "WebSiteResource.GetUsages", "value", "nextLink", cancellationToken); } + + /// + /// Description for Creates the artifacts for web site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployWorkflowArtifacts + /// + /// + /// Operation Id + /// WebApps_DeployWorkflowArtifacts + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Application settings and files of the workflow. + /// The cancellation token to use. + public virtual async Task DeployWorkflowArtifactsAsync(WorkflowArtifacts workflowArtifacts = null, CancellationToken cancellationToken = default) + { + using var scope = _webSiteWebAppsClientDiagnostics.CreateScope("WebSiteResource.DeployWorkflowArtifacts"); + scope.Start(); + try + { + var response = await _webSiteWebAppsRestClient.DeployWorkflowArtifactsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, workflowArtifacts, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Description for Creates the artifacts for web site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployWorkflowArtifacts + /// + /// + /// Operation Id + /// WebApps_DeployWorkflowArtifacts + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Application settings and files of the workflow. + /// The cancellation token to use. + public virtual Response DeployWorkflowArtifacts(WorkflowArtifacts workflowArtifacts = null, CancellationToken cancellationToken = default) + { + using var scope = _webSiteWebAppsClientDiagnostics.CreateScope("WebSiteResource.DeployWorkflowArtifacts"); + scope.Start(); + try + { + var response = _webSiteWebAppsRestClient.DeployWorkflowArtifacts(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, workflowArtifacts, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists logic app's connections for web site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listWorkflowsConnections + /// + /// + /// Operation Id + /// WebApps_ListWorkflowsConnections + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetWorkflowsConnectionsAsync(CancellationToken cancellationToken = default) + { + using var scope = _webSiteWebAppsClientDiagnostics.CreateScope("WebSiteResource.GetWorkflowsConnections"); + scope.Start(); + try + { + var response = await _webSiteWebAppsRestClient.ListWorkflowsConnectionsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists logic app's connections for web site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listWorkflowsConnections + /// + /// + /// Operation Id + /// WebApps_ListWorkflowsConnections + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response GetWorkflowsConnections(CancellationToken cancellationToken = default) + { + using var scope = _webSiteWebAppsClientDiagnostics.CreateScope("WebSiteResource.GetWorkflowsConnections"); + scope.Start(); + try + { + var response = _webSiteWebAppsRestClient.ListWorkflowsConnections(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Regenerates the callback URL access key for request triggers. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/regenerateAccessKey + /// + /// + /// Operation Id + /// Workflows_RegenerateAccessKey + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// + /// The workflow name. + /// The access key type. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task RegenerateAccessKeyWorkflowAsync(string workflowName, WorkflowRegenerateActionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _workflowsClientDiagnostics.CreateScope("WebSiteResource.RegenerateAccessKeyWorkflow"); + scope.Start(); + try + { + var response = await _workflowsRestClient.RegenerateAccessKeyAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, workflowName, content, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Regenerates the callback URL access key for request triggers. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/regenerateAccessKey + /// + /// + /// Operation Id + /// Workflows_RegenerateAccessKey + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// + /// The workflow name. + /// The access key type. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual Response RegenerateAccessKeyWorkflow(string workflowName, WorkflowRegenerateActionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _workflowsClientDiagnostics.CreateScope("WebSiteResource.RegenerateAccessKeyWorkflow"); + scope.Start(); + try + { + var response = _workflowsRestClient.RegenerateAccessKey(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, workflowName, content, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Validates the workflow definition. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/validate + /// + /// + /// Operation Id + /// Workflows_Validate + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// + /// The workflow name. + /// The workflow. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task ValidateWorkflowAsync(string workflowName, WorkflowData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _workflowsClientDiagnostics.CreateScope("WebSiteResource.ValidateWorkflow"); + scope.Start(); + try + { + var response = await _workflowsRestClient.ValidateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, workflowName, data, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Validates the workflow definition. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/validate + /// + /// + /// Operation Id + /// Workflows_Validate + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// + /// The workflow name. + /// The workflow. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual Response ValidateWorkflow(string workflowName, WorkflowData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _workflowsClientDiagnostics.CreateScope("WebSiteResource.ValidateWorkflow"); + scope.Start(); + try + { + var response = _workflowsRestClient.Validate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, workflowName, data, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteResourceHealthMetadataResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteResourceHealthMetadataResource.cs index cbe9bb2ab4793..71234e52cbea8 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteResourceHealthMetadataResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteResourceHealthMetadataResource.cs @@ -100,7 +100,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> GetAs /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotCollection.cs index 1cfe819efb3b6..56169d1bf83f1 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdateAsync /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string slot, C /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string slot, CancellationToken /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken cancellati /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string slot, CancellationT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string slot, CancellationToken cancellation /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIfExistsAsyn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotConfigAppSettingCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotConfigAppSettingCollection.cs index 42ee47c22561c..b5b7dce56e576 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotConfigAppSettingCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotConfigAppSettingCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsyn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string appSetti /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(Ca /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(Cancellation /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string appSettingKey, Canc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string appSettingKey, CancellationToken can /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotConfigAppSettingResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotConfigAppSettingResource.cs index 2d7892495e519..e4f64b80d7ebd 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotConfigAppSettingResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotConfigAppSettingResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsyn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotConfigConnectionStringCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotConfigConnectionStringCollection.cs index 1eea86aafc791..e513f77349810 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotConfigConnectionStringCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotConfigConnectionStringCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string co /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAs /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(Cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string connectionStringKey /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string connectionStringKey, CancellationTok /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotConfigConnectionStringResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotConfigConnectionStringResource.cs index c8848401df843..82b8576f94cdd 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotConfigConnectionStringResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotConfigConnectionStringResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotConfigResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotConfigResource.cs index 0a0481fa16a29..63f2757badc9f 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotConfigResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotConfigResource.cs @@ -115,7 +115,7 @@ public virtual SiteSlotConfigSnapshotCollection GetSiteSlotConfigSnapshots() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -146,7 +146,7 @@ public virtual async Task> GetSiteSlotC /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -177,7 +177,7 @@ public virtual Response GetSiteSlotConfigSnapsho /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -217,7 +217,7 @@ public virtual async Task> GetAsync(Cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual Response Get(CancellationToken cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -299,7 +299,7 @@ public virtual async Task> UpdateAsync(SiteC /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -341,7 +341,7 @@ public virtual Response Update(SiteConfigData data, C /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -389,7 +389,7 @@ public virtual async Task> CreateOrUpdat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -437,7 +437,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -467,7 +467,7 @@ public virtual AsyncPageable GetConfigurationSnap /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotContinuousWebJobCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotContinuousWebJobCollection.cs index 28a5ac1195302..1333a42127f60 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotContinuousWebJobCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotContinuousWebJobCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsyn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string webJobNa /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(Ca /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(Cancellation /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string webJobName, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string webJobName, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotContinuousWebJobResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotContinuousWebJobResource.cs index 0e9760bbd99b5..0b6073fcfcd5b 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotContinuousWebJobResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotContinuousWebJobResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsyn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationTok /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -270,7 +270,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -308,7 +308,7 @@ public virtual async Task StartContinuousWebJobSlotAsync(CancellationT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -346,7 +346,7 @@ public virtual Response StartContinuousWebJobSlot(CancellationToken cancellation /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -384,7 +384,7 @@ public virtual async Task StopContinuousWebJobSlotAsync(CancellationTo /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotExtensionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotExtensionCollection.cs index b370bcbcb5699..c54e6b5dba8d1 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotExtensionCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotExtensionCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -111,7 +111,7 @@ public virtual async Task> CreateOrUp /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -158,7 +158,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnt /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -203,7 +203,7 @@ public virtual async Task> GetAsync(strin /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -248,7 +248,7 @@ public virtual Response Get(string siteExtensionId /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -278,7 +278,7 @@ public virtual AsyncPageable GetAllAsync(Cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -308,7 +308,7 @@ public virtual Pageable GetAll(CancellationToken c /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -351,7 +351,7 @@ public virtual async Task> ExistsAsync(string siteExtensionId, Ca /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -394,7 +394,7 @@ public virtual Response Exists(string siteExtensionId, CancellationToken c /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -439,7 +439,7 @@ public virtual async Task> GetIfE /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotExtensionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotExtensionResource.cs index a0511269092a4..c233f08d5552e 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotExtensionResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotExtensionResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken canc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -270,7 +270,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task> UpdateAsyn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotFtpPublishingCredentialsPolicyResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotFtpPublishingCredentialsPolicyResource.cs index 392c598307d4e..2bf5bc981c946 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotFtpPublishingCredentialsPolicyResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotFtpPublishingCredentialsPolicyResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(C /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -229,7 +229,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotHybridConnectionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotHybridConnectionCollection.cs index 12598197f5c49..29c858ba1161f 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotHybridConnectionCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotHybridConnectionCollection.cs @@ -61,7 +61,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -112,7 +112,7 @@ public virtual async Task> Cre /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate( /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsyn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string entityNa /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -296,7 +296,7 @@ public virtual async Task> ExistsAsync(string entityName, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -339,7 +339,7 @@ public virtual Response Exists(string entityName, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -384,7 +384,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotHybridConnectionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotHybridConnectionResource.cs index 4ca2c222671e6..d5338e77b6642 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotHybridConnectionResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotHybridConnectionResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsyn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationTok /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -270,7 +270,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task> UpdateA /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotPremierAddOnCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotPremierAddOnCollection.cs index 0053469719658..e153c9e213b97 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotPremierAddOnCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotPremierAddOnCollection.cs @@ -61,7 +61,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -112,7 +112,7 @@ public virtual async Task> CreateO /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(Wait /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(st /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string premierAddOn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -296,7 +296,7 @@ public virtual async Task> ExistsAsync(string premierAddOnName, C /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -339,7 +339,7 @@ public virtual Response Exists(string premierAddOnName, CancellationToken /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -384,7 +384,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotPremierAddOnResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotPremierAddOnResource.cs index 838ba79a92f51..859402b962c46 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotPremierAddOnResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotPremierAddOnResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Ca /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken c /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -271,7 +271,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual async Task> UpdateAsync /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotPrivateAccessResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotPrivateAccessResource.cs index 4952b42e0618d..0cd66e680fc25 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotPrivateAccessResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotPrivateAccessResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(C /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -229,7 +229,7 @@ public virtual async Task> Create /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotPublicCertificateCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotPublicCertificateCollection.cs index 74c80c3a66095..a2417a8c9eac5 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotPublicCertificateCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotPublicCertificateCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> Cr /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsy /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string publicC /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -286,7 +286,7 @@ public virtual AsyncPageable GetAllAsync(C /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -316,7 +316,7 @@ public virtual Pageable GetAll(Cancellatio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string publicCertificateNa /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -402,7 +402,7 @@ public virtual Response Exists(string publicCertificateName, CancellationT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -447,7 +447,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotPublicCertificateResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotPublicCertificateResource.cs index c9b63a3eecc06..466e93446fad7 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotPublicCertificateResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotPublicCertificateResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsy /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationTo /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -270,7 +270,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -318,7 +318,7 @@ public virtual async Task> Up /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotResource.cs index 1b4684cd83437..cc334f17b16b1 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotResource.cs @@ -112,7 +112,7 @@ public virtual SiteSlotDetectorCollection GetSiteSlotDetectors() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -146,7 +146,7 @@ public virtual async Task> GetSiteSlotDetecto /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -187,7 +187,7 @@ public virtual SiteSlotPrivateEndpointConnectionCollection GetSiteSlotPrivateEnd /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -218,7 +218,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual SiteSlotHybridConnectionNamespaceRelayCollection GetSiteSlotHybri /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -288,7 +288,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -327,7 +327,7 @@ public virtual SiteSlotVirtualNetworkConnectionCollection GetSiteSlotVirtualNetw /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -358,7 +358,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -396,7 +396,7 @@ public virtual SiteSlotDiagnosticCollection GetSiteSlotDiagnostics() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -427,7 +427,7 @@ public virtual async Task> GetSiteSlotDiagn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -472,7 +472,7 @@ public virtual SiteSlotBackupCollection GetSiteSlotBackups() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -503,7 +503,7 @@ public virtual async Task> GetSiteSlotBackupAsy /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -555,7 +555,7 @@ public virtual WebSiteSlotConfigAppSettingCollection GetWebSiteSlotConfigAppSett /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -586,7 +586,7 @@ public virtual async Task> GetWebS /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -624,7 +624,7 @@ public virtual WebSiteSlotConfigConnectionStringCollection GetWebSiteSlotConfigC /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -655,7 +655,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -707,7 +707,7 @@ public virtual WebSiteSlotContinuousWebJobCollection GetWebSiteSlotContinuousWeb /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -738,7 +738,7 @@ public virtual async Task> GetWebS /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -776,7 +776,7 @@ public virtual SiteSlotDeploymentCollection GetSiteSlotDeployments() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -807,7 +807,7 @@ public virtual async Task> GetSiteSlotDeplo /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -845,7 +845,7 @@ public virtual SiteSlotDomainOwnershipIdentifierCollection GetSiteSlotDomainOwne /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -876,7 +876,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -921,7 +921,7 @@ public virtual SiteSlotFunctionCollection GetSiteSlotFunctions() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -952,7 +952,7 @@ public virtual async Task> GetSiteSlotFunctio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -990,7 +990,7 @@ public virtual SiteSlotHostNameBindingCollection GetSiteSlotHostNameBindings() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1021,7 +1021,7 @@ public virtual async Task> GetSiteSlot /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1059,7 +1059,7 @@ public virtual WebSiteSlotHybridConnectionCollection GetWebSiteSlotHybridConnect /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1090,7 +1090,7 @@ public virtual async Task> GetWebS /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1128,7 +1128,7 @@ public virtual SiteSlotInstanceCollection GetSiteSlotInstances() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1159,7 +1159,7 @@ public virtual async Task> GetSiteSlotInstanc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1197,7 +1197,7 @@ public virtual SiteSlotProcessCollection GetSiteSlotProcesses() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1228,7 +1228,7 @@ public virtual async Task> GetSiteSlotProcessA /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1273,7 +1273,7 @@ public virtual WebSiteSlotPremierAddOnCollection GetWebSiteSlotPremierAddOns() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1304,7 +1304,7 @@ public virtual async Task> GetWebSiteS /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1349,7 +1349,7 @@ public virtual WebSiteSlotPublicCertificateCollection GetWebSiteSlotPublicCertif /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1380,7 +1380,7 @@ public virtual async Task> GetWeb /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1398,6 +1398,75 @@ public virtual Response GetWebSiteSlotPubl return GetWebSiteSlotPublicCertificates().Get(publicCertificateName, cancellationToken); } + /// Gets a collection of SiteSlotSiteContainerResources in the WebSiteSlot. + /// An object representing collection of SiteSlotSiteContainerResources and their operations over a SiteSlotSiteContainerResource. + public virtual SiteSlotSiteContainerCollection GetSiteSlotSiteContainers() + { + return GetCachedClient(client => new SiteSlotSiteContainerCollection(client, Id)); + } + + /// + /// Gets a site container of a site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sitecontainers/{containerName} + /// + /// + /// Operation Id + /// WebApps_GetSiteContainerSlot + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Site Container Name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetSiteSlotSiteContainerAsync(string containerName, CancellationToken cancellationToken = default) + { + return await GetSiteSlotSiteContainers().GetAsync(containerName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets a site container of a site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sitecontainers/{containerName} + /// + /// + /// Operation Id + /// WebApps_GetSiteContainerSlot + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Site Container Name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetSiteSlotSiteContainer(string containerName, CancellationToken cancellationToken = default) + { + return GetSiteSlotSiteContainers().Get(containerName, cancellationToken); + } + /// Gets a collection of WebSiteSlotExtensionResources in the WebSiteSlot. /// An object representing collection of WebSiteSlotExtensionResources and their operations over a WebSiteSlotExtensionResource. public virtual WebSiteSlotExtensionCollection GetWebSiteSlotExtensions() @@ -1418,7 +1487,7 @@ public virtual WebSiteSlotExtensionCollection GetWebSiteSlotExtensions() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1449,7 +1518,7 @@ public virtual async Task> GetWebSiteSlot /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1494,7 +1563,7 @@ public virtual NetworkFeatureCollection GetNetworkFeatures() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1525,7 +1594,7 @@ public virtual async Task> GetNetworkFeatureAsy /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1570,7 +1639,7 @@ public virtual WebSiteSlotTriggeredWebJobCollection GetWebSiteSlotTriggeredWebJo /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1601,7 +1670,7 @@ public virtual async Task> GetWebSi /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1639,7 +1708,7 @@ public virtual WebSiteSlotWebJobCollection GetWebSiteSlotWebJobs() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1670,7 +1739,7 @@ public virtual async Task> GetWebSiteSlotWeb /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1688,6 +1757,75 @@ public virtual Response GetWebSiteSlotWebJob(string w return GetWebSiteSlotWebJobs().Get(webJobName, cancellationToken); } + /// Gets a collection of SiteSlotWorkflowResources in the WebSiteSlot. + /// An object representing collection of SiteSlotWorkflowResources and their operations over a SiteSlotWorkflowResource. + public virtual SiteSlotWorkflowCollection GetSiteSlotWorkflows() + { + return GetCachedClient(client => new SiteSlotWorkflowCollection(client, Id)); + } + + /// + /// Get workflow information by its ID for web site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/workflows/{workflowName} + /// + /// + /// Operation Id + /// WebApps_GetInstanceWorkflowSlot + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Workflow name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetSiteSlotWorkflowAsync(string workflowName, CancellationToken cancellationToken = default) + { + return await GetSiteSlotWorkflows().GetAsync(workflowName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get workflow information by its ID for web site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/workflows/{workflowName} + /// + /// + /// Operation Id + /// WebApps_GetInstanceWorkflowSlot + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Workflow name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetSiteSlotWorkflow(string workflowName, CancellationToken cancellationToken = default) + { + return GetSiteSlotWorkflows().Get(workflowName, cancellationToken); + } + /// /// Description for Gets the details of a web, mobile, or API app. /// @@ -1701,7 +1839,7 @@ public virtual Response GetWebSiteSlotWebJob(string w /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1741,7 +1879,7 @@ public virtual async Task> GetAsync(CancellationTo /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1781,7 +1919,7 @@ public virtual Response Get(CancellationToken cancellationT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1827,7 +1965,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, bool? d /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1873,7 +2011,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, bool? deleteMetrics = nu /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1915,7 +2053,7 @@ public virtual async Task> UpdateAsync(SitePatchIn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1957,7 +2095,7 @@ public virtual Response Update(SitePatchInfo info, Cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1996,7 +2134,7 @@ public virtual async Task> AnalyzeCustomH /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2035,7 +2173,7 @@ public virtual Response AnalyzeCustomHostnameSlot( /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2077,7 +2215,7 @@ public virtual async Task ApplySlotConfigurationSlotAsync(CsmSlotEntit /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2119,7 +2257,7 @@ public virtual Response ApplySlotConfigurationSlot(CsmSlotEntity slotSwapEntity, /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2161,7 +2299,7 @@ public virtual async Task> BackupSlotAsync(WebAppBack /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2203,7 +2341,7 @@ public virtual Response BackupSlot(WebAppBackupInfo info, Canc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2245,7 +2383,7 @@ public virtual async Task> UpdateApp /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2287,7 +2425,7 @@ public virtual Response UpdateApplicationSett /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -2321,7 +2459,7 @@ public virtual async Task> GetApplic /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -2355,7 +2493,7 @@ public virtual Response GetApplicationSetting /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2397,7 +2535,7 @@ public virtual async Task> UpdateAuthSettingsSlotAsyn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2439,7 +2577,7 @@ public virtual Response UpdateAuthSettingsSlot(SiteAuthSetting /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -2473,7 +2611,7 @@ public virtual async Task> GetAuthSettingsSlotAsync(C /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -2494,6 +2632,74 @@ public virtual Response GetAuthSettingsSlot(CancellationToken } } + /// + /// Gets site's Authentication / Authorization settings for apps via the V2 format + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2 + /// + /// + /// Operation Id + /// WebApps_GetAuthSettingsV2WithoutSecretsSlot + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAuthSettingsV2WithoutSecretsSlotAsync(CancellationToken cancellationToken = default) + { + using var scope = _webSiteSlotWebAppsClientDiagnostics.CreateScope("WebSiteSlotResource.GetAuthSettingsV2WithoutSecretsSlot"); + scope.Start(); + try + { + var response = await _webSiteSlotWebAppsRestClient.GetAuthSettingsV2WithoutSecretsSlotAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets site's Authentication / Authorization settings for apps via the V2 format + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2 + /// + /// + /// Operation Id + /// WebApps_GetAuthSettingsV2WithoutSecretsSlot + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// + /// The cancellation token to use. + public virtual Response GetAuthSettingsV2WithoutSecretsSlot(CancellationToken cancellationToken = default) + { + using var scope = _webSiteSlotWebAppsClientDiagnostics.CreateScope("WebSiteSlotResource.GetAuthSettingsV2WithoutSecretsSlot"); + scope.Start(); + try + { + var response = _webSiteSlotWebAppsRestClient.GetAuthSettingsV2WithoutSecretsSlot(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + /// /// Description for Updates site's Authentication / Authorization settings for apps via the V2 format /// @@ -2507,7 +2713,7 @@ public virtual Response GetAuthSettingsSlot(CancellationToken /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2549,7 +2755,7 @@ public virtual async Task> UpdateAuthSettingsV2Slot /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2591,7 +2797,7 @@ public virtual Response UpdateAuthSettingsV2Slot(SiteAuthSet /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -2625,7 +2831,7 @@ public virtual async Task> GetAuthSettingsV2SlotAsy /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -2659,7 +2865,7 @@ public virtual Response GetAuthSettingsV2Slot(CancellationTo /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2701,7 +2907,7 @@ public virtual async Task> UpdateAzureS /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2743,7 +2949,7 @@ public virtual Response UpdateAzureStorageAccoun /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -2777,7 +2983,7 @@ public virtual async Task> GetAzureStor /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -2811,7 +3017,7 @@ public virtual Response GetAzureStorageAccountsS /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2853,7 +3059,7 @@ public virtual async Task> UpdateBackupConfigurationS /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2895,7 +3101,7 @@ public virtual Response UpdateBackupConfigurationSlot(WebAppBa /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2933,7 +3139,7 @@ public virtual async Task DeleteBackupConfigurationSlotAsync(Cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2971,7 +3177,7 @@ public virtual Response DeleteBackupConfigurationSlot(CancellationToken cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -3005,7 +3211,7 @@ public virtual async Task> GetBackupConfigurationSlot /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -3039,7 +3245,7 @@ public virtual Response GetBackupConfigurationSlot(Cancellatio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3081,7 +3287,7 @@ public virtual async Task> UpdateConnection /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3123,7 +3329,7 @@ public virtual Response UpdateConnectionStringsSlot( /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -3157,7 +3363,7 @@ public virtual async Task> GetConnectionStr /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -3191,7 +3397,7 @@ public virtual Response GetConnectionStringsSlot(Can /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3233,7 +3439,7 @@ public virtual async Task> UpdateMet /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3275,7 +3481,7 @@ public virtual Response UpdateMetadataSlot(Ap /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -3309,7 +3515,7 @@ public virtual async Task> GetMetada /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -3343,7 +3549,7 @@ public virtual Response GetMetadataSlot(Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -3381,7 +3587,7 @@ public virtual async Task> GetPublishingCre /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -3419,7 +3625,7 @@ public virtual ArmOperation GetPublishingCredentialsSlot /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3461,7 +3667,7 @@ public virtual async Task> UpdateSitePushSettingsSl /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3503,7 +3709,7 @@ public virtual Response UpdateSitePushSettingsSlot(WebAppPus /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -3537,7 +3743,7 @@ public virtual async Task> GetSitePushSettingsSlotA /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -3571,7 +3777,7 @@ public virtual Response GetSitePushSettingsSlot(Cancellation /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3609,7 +3815,7 @@ public virtual async Task> GetWebSiteContainerLogsSlotAsync(Can /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3647,7 +3853,7 @@ public virtual Response GetWebSiteContainerLogsSlot(CancellationToken ca /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -3681,7 +3887,7 @@ public virtual async Task> GetContainerLogsZipSlotAsync(Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -3702,6 +3908,152 @@ public virtual Response GetContainerLogsZipSlot(CancellationToken cancel } } + /// + /// List deployment statuses for an app (or deployment slot, if specified). + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deploymentStatus + /// + /// + /// Operation Id + /// WebApps_ListSlotSiteDeploymentStatusesSlot + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetSlotSiteDeploymentStatusesSlotAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _webSiteSlotWebAppsRestClient.CreateListSlotSiteDeploymentStatusesSlotRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _webSiteSlotWebAppsRestClient.CreateListSlotSiteDeploymentStatusesSlotNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => CsmDeploymentStatus.DeserializeCsmDeploymentStatus(e), _webSiteSlotWebAppsClientDiagnostics, Pipeline, "WebSiteSlotResource.GetSlotSiteDeploymentStatusesSlot", "value", "nextLink", cancellationToken); + } + + /// + /// List deployment statuses for an app (or deployment slot, if specified). + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deploymentStatus + /// + /// + /// Operation Id + /// WebApps_ListSlotSiteDeploymentStatusesSlot + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetSlotSiteDeploymentStatusesSlot(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _webSiteSlotWebAppsRestClient.CreateListSlotSiteDeploymentStatusesSlotRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _webSiteSlotWebAppsRestClient.CreateListSlotSiteDeploymentStatusesSlotNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => CsmDeploymentStatus.DeserializeCsmDeploymentStatus(e), _webSiteSlotWebAppsClientDiagnostics, Pipeline, "WebSiteSlotResource.GetSlotSiteDeploymentStatusesSlot", "value", "nextLink", cancellationToken); + } + + /// + /// Gets the deployment status for an app (or deployment slot, if specified). + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deploymentStatus/{deploymentStatusId} + /// + /// + /// Operation Id + /// WebApps_GetSlotSiteDeploymentStatusSlot + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// GUID of the deployment operation. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetSlotSiteDeploymentStatusSlotAsync(WaitUntil waitUntil, string deploymentStatusId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(deploymentStatusId, nameof(deploymentStatusId)); + + using var scope = _webSiteSlotWebAppsClientDiagnostics.CreateScope("WebSiteSlotResource.GetSlotSiteDeploymentStatusSlot"); + scope.Start(); + try + { + var response = await _webSiteSlotWebAppsRestClient.GetSlotSiteDeploymentStatusSlotAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, deploymentStatusId, cancellationToken).ConfigureAwait(false); + var operation = new AppServiceArmOperation(new CsmDeploymentStatusOperationSource(), _webSiteSlotWebAppsClientDiagnostics, Pipeline, _webSiteSlotWebAppsRestClient.CreateGetSlotSiteDeploymentStatusSlotRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, deploymentStatusId).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the deployment status for an app (or deployment slot, if specified). + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deploymentStatus/{deploymentStatusId} + /// + /// + /// Operation Id + /// WebApps_GetSlotSiteDeploymentStatusSlot + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// GUID of the deployment operation. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual ArmOperation GetSlotSiteDeploymentStatusSlot(WaitUntil waitUntil, string deploymentStatusId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(deploymentStatusId, nameof(deploymentStatusId)); + + using var scope = _webSiteSlotWebAppsClientDiagnostics.CreateScope("WebSiteSlotResource.GetSlotSiteDeploymentStatusSlot"); + scope.Start(); + try + { + var response = _webSiteSlotWebAppsRestClient.GetSlotSiteDeploymentStatusSlot(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, deploymentStatusId, cancellationToken); + var operation = new AppServiceArmOperation(new CsmDeploymentStatusOperationSource(), _webSiteSlotWebAppsClientDiagnostics, Pipeline, _webSiteSlotWebAppsRestClient.CreateGetSlotSiteDeploymentStatusSlotRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, deploymentStatusId).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + /// /// Description for Discovers an existing app backup that can be restored from a blob in Azure storage. Use this to get information about the databases stored in a backup. /// @@ -3715,7 +4067,7 @@ public virtual Response GetContainerLogsZipSlot(CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3757,7 +4109,7 @@ public virtual async Task> DiscoverBackupSlotAsync( /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3799,7 +4151,7 @@ public virtual Response DiscoverBackupSlot(RestoreRequestInf /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -3833,7 +4185,7 @@ public virtual async Task> GetFunctionsAdminTokenSlotAsync(Canc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -3867,7 +4219,7 @@ public virtual Response GetFunctionsAdminTokenSlot(CancellationToken can /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -3901,7 +4253,7 @@ public virtual async Task> GetHostKeysSlotAsync(Ca /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -3935,7 +4287,7 @@ public virtual Response GetHostKeysSlot(CancellationToken c /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -3969,7 +4321,7 @@ public virtual async Task GetSyncStatusSlotAsync(CancellationToken can /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4003,7 +4355,7 @@ public virtual Response GetSyncStatusSlot(CancellationToken cancellationToken = /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4037,7 +4389,7 @@ public virtual async Task SyncFunctionsSlotAsync(CancellationToken can /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4071,7 +4423,7 @@ public virtual Response SyncFunctionsSlot(CancellationToken cancellationToken = /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4114,7 +4466,7 @@ public virtual async Task> CreateOrUpdateHostSecretSlotA /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4157,7 +4509,7 @@ public virtual Response CreateOrUpdateHostSecretSlot(string keyTy /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4198,7 +4550,7 @@ public virtual async Task DeleteHostSecretSlotAsync(string keyType, st /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4239,7 +4591,7 @@ public virtual Response DeleteHostSecretSlot(string keyType, string keyName, Can /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -4268,7 +4620,7 @@ public virtual AsyncPageable GetHybridConnectionsSlotAsync /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -4297,7 +4649,7 @@ public virtual Pageable GetHybridConnectionsSlot(Cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -4335,7 +4687,7 @@ public virtual async Task> IsCloneableSlotAsync(Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -4373,7 +4725,7 @@ public virtual Response IsCloneableSlot(CancellationToken canc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -4411,7 +4763,7 @@ public virtual async Task> GetSyncFunctionTriggersSlot /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -4449,7 +4801,7 @@ public virtual Response GetSyncFunctionTriggersSlot(Cancellatio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4479,7 +4831,7 @@ public virtual AsyncPageable GetNetworkTraceOperationSlotAsy /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4509,7 +4861,7 @@ public virtual Pageable GetNetworkTraceOperationSlot(string /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4546,7 +4898,7 @@ public virtual async Task> StartWebSiteNetworkTraceSlotAsync(in /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4583,7 +4935,7 @@ public virtual Response StartWebSiteNetworkTraceSlot(int? durationInSeco /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4624,7 +4976,7 @@ public virtual async Task>> StartWebSiteN /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4665,7 +5017,7 @@ public virtual ArmOperation> StartWebSiteNetworkTraceO /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4699,7 +5051,7 @@ public virtual async Task StopWebSiteNetworkTraceSlotAsync(Cancellatio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4733,7 +5085,7 @@ public virtual Response StopWebSiteNetworkTraceSlot(CancellationToken cancellati /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4763,7 +5115,7 @@ public virtual AsyncPageable GetNetworkTracesSlotAsync(strin /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4793,7 +5145,7 @@ public virtual Pageable GetNetworkTracesSlot(string operatio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4823,7 +5175,7 @@ public virtual AsyncPageable GetNetworkTraceOperationSlotV2A /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4853,7 +5205,7 @@ public virtual Pageable GetNetworkTraceOperationSlotV2(strin /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4883,7 +5235,7 @@ public virtual AsyncPageable GetNetworkTracesSlotV2Async(str /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4913,7 +5265,7 @@ public virtual Pageable GetNetworkTracesSlotV2(string operat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -4951,7 +5303,7 @@ public virtual async Task GenerateNewSitePublishingPasswordSlotAsync(C /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -4989,7 +5341,7 @@ public virtual Response GenerateNewSitePublishingPasswordSlot(CancellationToken /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -5020,7 +5372,7 @@ public virtual AsyncPageable GetPerfMonCountersSlotAsync(st /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -5051,7 +5403,7 @@ public virtual Pageable GetPerfMonCountersSlot(string filte /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -5089,7 +5441,7 @@ public virtual async Task> GetSitePhpErrorLogFlagS /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -5127,7 +5479,7 @@ public virtual Response GetSitePhpErrorLogFlagSlot(Cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -5156,7 +5508,7 @@ public virtual AsyncPageable GetPrivateLinkRe /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -5185,7 +5537,7 @@ public virtual Pageable GetPrivateLinkResourc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -5227,7 +5579,7 @@ public virtual async Task> GetPublishingProfileXmlWithSecretsSl /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -5269,7 +5621,7 @@ public virtual Response GetPublishingProfileXmlWithSecretsSlot(CsmPublis /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -5307,7 +5659,7 @@ public virtual async Task ResetSlotConfigurationSlotAsync(Cancellation /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -5345,7 +5697,7 @@ public virtual Response ResetSlotConfigurationSlot(CancellationToken cancellatio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -5385,7 +5737,7 @@ public virtual async Task RestartSlotAsync(bool? softRestart = null, b /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -5425,7 +5777,7 @@ public virtual Response RestartSlot(bool? softRestart = null, bool? synchronous /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -5471,7 +5823,7 @@ public virtual async Task RestoreFromBackupBlobSlotAsync(WaitUntil /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -5517,7 +5869,7 @@ public virtual ArmOperation RestoreFromBackupBlobSlot(WaitUntil waitUntil, Resto /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -5563,7 +5915,7 @@ public virtual async Task RestoreFromDeletedAppSlotAsync(WaitUntil /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -5609,7 +5961,7 @@ public virtual ArmOperation RestoreFromDeletedAppSlot(WaitUntil waitUntil, Delet /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -5655,7 +6007,7 @@ public virtual async Task RestoreSnapshotSlotAsync(WaitUntil waitU /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -5701,7 +6053,7 @@ public virtual ArmOperation RestoreSnapshotSlot(WaitUntil waitUntil, SnapshotRes /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -5735,7 +6087,7 @@ public virtual AsyncPageable GetSlotDifferencesSlotAsync(CsmSlot /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -5769,7 +6121,7 @@ public virtual Pageable GetSlotDifferencesSlot(CsmSlotEntity slo /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -5815,7 +6167,7 @@ public virtual async Task SwapSlotAsync(WaitUntil waitUntil, CsmSl /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -5861,7 +6213,7 @@ public virtual ArmOperation SwapSlot(WaitUntil waitUntil, CsmSlotEntity slotSwap /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -5891,7 +6243,7 @@ public virtual AsyncPageable GetSlotSnapshotsAsync(CancellationToke /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -5921,7 +6273,7 @@ public virtual Pageable GetSlotSnapshots(CancellationToken cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -5951,7 +6303,7 @@ public virtual AsyncPageable GetSlotSnapshotsFromDRSecondaryAsync(C /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -5981,7 +6333,7 @@ public virtual Pageable GetSlotSnapshotsFromDRSecondary(Cancellatio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -6019,7 +6371,7 @@ public virtual async Task StartSlotAsync(CancellationToken cancellatio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -6057,7 +6409,7 @@ public virtual Response StartSlot(CancellationToken cancellationToken = default) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -6102,7 +6454,7 @@ public virtual async Task>> StartNetworkT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -6147,7 +6499,7 @@ public virtual ArmOperation> StartNetworkTraceSlot(Wai /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -6185,7 +6537,7 @@ public virtual async Task StopSlotAsync(CancellationToken cancellation /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -6223,7 +6575,7 @@ public virtual Response StopSlot(CancellationToken cancellationToken = default) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -6261,7 +6613,7 @@ public virtual async Task StopNetworkTraceSlotAsync(CancellationToken /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -6299,7 +6651,7 @@ public virtual Response StopNetworkTraceSlot(CancellationToken cancellationToken /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -6337,7 +6689,7 @@ public virtual async Task SyncRepositorySlotAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -6375,7 +6727,7 @@ public virtual Response SyncRepositorySlot(CancellationToken cancellationToken = /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -6413,7 +6765,7 @@ public virtual async Task SyncFunctionTriggersSlotAsync(CancellationTo /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -6451,7 +6803,7 @@ public virtual Response SyncFunctionTriggersSlot(CancellationToken cancellationT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -6482,7 +6834,7 @@ public virtual AsyncPageable GetUsagesSlotAsync(string filter = n /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -6499,5 +6851,159 @@ public virtual Pageable GetUsagesSlot(string filter = null, Cance HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _webSiteSlotWebAppsRestClient.CreateListUsagesSlotNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, filter); return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => CsmUsageQuota.DeserializeCsmUsageQuota(e), _webSiteSlotWebAppsClientDiagnostics, Pipeline, "WebSiteSlotResource.GetUsagesSlot", "value", "nextLink", cancellationToken); } + + /// + /// Description for Creates the artifacts for web site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployWorkflowArtifacts + /// + /// + /// Operation Id + /// WebApps_DeployWorkflowArtifactsSlot + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Application settings and files of the workflow. + /// The cancellation token to use. + public virtual async Task DeployWorkflowArtifactsSlotAsync(WorkflowArtifacts workflowArtifacts = null, CancellationToken cancellationToken = default) + { + using var scope = _webSiteSlotWebAppsClientDiagnostics.CreateScope("WebSiteSlotResource.DeployWorkflowArtifactsSlot"); + scope.Start(); + try + { + var response = await _webSiteSlotWebAppsRestClient.DeployWorkflowArtifactsSlotAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, workflowArtifacts, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Description for Creates the artifacts for web site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployWorkflowArtifacts + /// + /// + /// Operation Id + /// WebApps_DeployWorkflowArtifactsSlot + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Application settings and files of the workflow. + /// The cancellation token to use. + public virtual Response DeployWorkflowArtifactsSlot(WorkflowArtifacts workflowArtifacts = null, CancellationToken cancellationToken = default) + { + using var scope = _webSiteSlotWebAppsClientDiagnostics.CreateScope("WebSiteSlotResource.DeployWorkflowArtifactsSlot"); + scope.Start(); + try + { + var response = _webSiteSlotWebAppsRestClient.DeployWorkflowArtifactsSlot(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, workflowArtifacts, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists logic app's connections for web site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listWorkflowsConnections + /// + /// + /// Operation Id + /// WebApps_ListWorkflowsConnectionsSlot + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetWorkflowsConnectionsSlotAsync(CancellationToken cancellationToken = default) + { + using var scope = _webSiteSlotWebAppsClientDiagnostics.CreateScope("WebSiteSlotResource.GetWorkflowsConnectionsSlot"); + scope.Start(); + try + { + var response = await _webSiteSlotWebAppsRestClient.ListWorkflowsConnectionsSlotAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists logic app's connections for web site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listWorkflowsConnections + /// + /// + /// Operation Id + /// WebApps_ListWorkflowsConnectionsSlot + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response GetWorkflowsConnectionsSlot(CancellationToken cancellationToken = default) + { + using var scope = _webSiteSlotWebAppsClientDiagnostics.CreateScope("WebSiteSlotResource.GetWorkflowsConnectionsSlot"); + scope.Start(); + try + { + var response = _webSiteSlotWebAppsRestClient.ListWorkflowsConnectionsSlot(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotResourceHealthMetadataResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotResourceHealthMetadataResource.cs index 1922c942489c0..40a7d17291a8f 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotResourceHealthMetadataResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotResourceHealthMetadataResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotSourceControlResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotSourceControlResource.cs index f975ef9adfc33..b8ea88cccc4e8 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotSourceControlResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotSourceControlResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(C /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, string /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -271,7 +271,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, string additionalFlags = /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual async Task> UpdateAsyn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual Response Update(SiteSourceContr /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -401,7 +401,7 @@ public virtual async Task> Create /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotTriggeredWebJobCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotTriggeredWebJobCollection.cs index 7421fb44fda6f..cf1c7692ce349 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotTriggeredWebJobCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotTriggeredWebJobCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string webJobNam /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(Can /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string webJobName, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string webJobName, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotTriggeredWebJobHistoryCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotTriggeredWebJobHistoryCollection.cs index 51f799bd4d927..4398e4f24590f 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotTriggeredWebJobHistoryCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotTriggeredWebJobHistoryCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string id /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAs /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(Cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string id, CancellationTok /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string id, CancellationToken cancellationTo /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotTriggeredWebJobHistoryResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotTriggeredWebJobHistoryResource.cs index c8def7b07922e..12d4456c88c2e 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotTriggeredWebJobHistoryResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotTriggeredWebJobHistoryResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotTriggeredWebJobResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotTriggeredWebJobResource.cs index ee4f39e4c96ff..ad707fe0a75d5 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotTriggeredWebJobResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotTriggeredWebJobResource.cs @@ -109,7 +109,7 @@ public virtual WebSiteSlotTriggeredWebJobHistoryCollection GetWebSiteSlotTrigger /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -171,7 +171,7 @@ public virtual Response GetWebSiteSlo /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -251,7 +251,7 @@ public virtual Response Get(CancellationToke /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -295,7 +295,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -339,7 +339,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -377,7 +377,7 @@ public virtual async Task RunTriggeredWebJobSlotAsync(CancellationToke /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotWebJobCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotWebJobCollection.cs index 767b019ea26a6..5edbe6003612c 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotWebJobCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotWebJobCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(string w /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string webJobName, Cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(Cancellation /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationToken canc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string webJobName, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string webJobName, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> GetIfExis /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotWebJobResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotWebJobResource.cs index b08f6ef075f38..372a5a4757755 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotWebJobResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotWebJobResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSourceControlResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSourceControlResource.cs index a01f4e9db96c2..b04c9896f6231 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSourceControlResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSourceControlResource.cs @@ -100,7 +100,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> GetAsync(Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -180,7 +180,7 @@ public virtual Response Get(CancellationToken canc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, string /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -270,7 +270,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, string additionalFlags = /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task> UpdateAsync(Si /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -354,7 +354,7 @@ public virtual Response Update(SiteSourceControlDa /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -400,7 +400,7 @@ public virtual async Task> CreateOrUp /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteTriggeredWebJobHistoryCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteTriggeredWebJobHistoryCollection.cs index e2a11c396ec1a..8ff71e9c34986 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteTriggeredWebJobHistoryCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteTriggeredWebJobHistoryCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAs /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string id, Ca /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync( /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(Cancellati /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string id, CancellationTok /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string id, CancellationToken cancellationTo /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteTriggeredWebJobHistoryResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteTriggeredWebJobHistoryResource.cs index 2411ee2b53e0d..6a22f388702d0 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteTriggeredWebJobHistoryResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteTriggeredWebJobHistoryResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAs /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteTriggeredwebJobCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteTriggeredwebJobCollection.cs index 5aef21849da3e..04e8d7ff1e163 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteTriggeredwebJobCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteTriggeredwebJobCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(str /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string webJobName, C /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationToken /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string webJobName, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string webJobName, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> GetI /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteTriggeredwebJobResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteTriggeredwebJobResource.cs index 8624781a2ed31..0cfeda7df51db 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteTriggeredwebJobResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteTriggeredwebJobResource.cs @@ -108,7 +108,7 @@ public virtual WebSiteTriggeredWebJobHistoryCollection GetWebSiteTriggeredWebJob /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -139,7 +139,7 @@ public virtual async Task> GetWe /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -170,7 +170,7 @@ public virtual Response GetWebSiteTrigger /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task> GetAsync(Can /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -250,7 +250,7 @@ public virtual Response Get(CancellationToken ca /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -294,7 +294,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -338,7 +338,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -376,7 +376,7 @@ public virtual async Task RunTriggeredWebJobAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteWebJobCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteWebJobCollection.cs index bf31deba70895..5ac83b4f590b5 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteWebJobCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteWebJobCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(string webJo /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string webJobName, Cancellati /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToke /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationToken cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string webJobName, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string webJobName, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> GetIfExistsAs /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteWebJobResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteWebJobResource.cs index d3331128b5faa..2d430b1729dcb 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteWebJobResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteWebJobResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancellation /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowEnvelopeData.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowEnvelopeData.Serialization.cs new file mode 100644 index 0000000000000..2d66198a64844 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowEnvelopeData.Serialization.cs @@ -0,0 +1,334 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.AppService.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppService +{ + public partial class WorkflowEnvelopeData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowEnvelopeData)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Kind)) + { + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind); + } + if (Optional.IsDefined(Location)) + { + writer.WritePropertyName("location"u8); + writer.WriteStringValue(Location.Value); + } + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (options.Format != "W") + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (options.Format != "W") + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W") + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(ResourceType); + } + if (options.Format != "W" && Optional.IsDefined(SystemData)) + { + writer.WritePropertyName("systemData"u8); + JsonSerializer.Serialize(writer, SystemData); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WorkflowEnvelopeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowEnvelopeData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWorkflowEnvelopeData(document.RootElement, options); + } + + internal static WorkflowEnvelopeData DeserializeWorkflowEnvelopeData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string kind = default; + AzureLocation? location = default; + WorkflowEnvelopeProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("kind"u8)) + { + kind = property.Value.GetString(); + continue; + } + if (property.NameEquals("location"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = WorkflowEnvelopeProperties.DeserializeWorkflowEnvelopeProperties(property.Value, options); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WorkflowEnvelopeData( + id, + name, + type, + systemData, + kind, + location, + properties, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Location), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" location: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Location)) + { + builder.Append(" location: "); + builder.AppendLine($"'{Location.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Kind), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" kind: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Kind)) + { + builder.Append(" kind: "); + if (Kind.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Kind}'''"); + } + else + { + builder.AppendLine($"'{Kind}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Properties), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" properties: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Properties)) + { + builder.Append(" properties: "); + BicepSerializationHelpers.AppendChildObject(builder, Properties, options, 2, false, " properties: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WorkflowEnvelopeData)} does not support writing '{options.Format}' format."); + } + } + + WorkflowEnvelopeData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWorkflowEnvelopeData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WorkflowEnvelopeData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowEnvelopeData.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowEnvelopeData.cs new file mode 100644 index 0000000000000..d11e693edeb20 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowEnvelopeData.cs @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.AppService.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A class representing the WorkflowEnvelope data model. + /// Workflow properties definition. + /// + public partial class WorkflowEnvelopeData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal WorkflowEnvelopeData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource kind. + /// The resource location. + /// Additional workflow properties. + /// Keeps track of any properties unknown to the library. + internal WorkflowEnvelopeData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string kind, AzureLocation? location, WorkflowEnvelopeProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Kind = kind; + Location = location; + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource kind. + [WirePath("kind")] + public string Kind { get; } + /// The resource location. + [WirePath("location")] + public AzureLocation? Location { get; } + /// Additional workflow properties. + [WirePath("properties")] + public WorkflowEnvelopeProperties Properties { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionCollection.cs new file mode 100644 index 0000000000000..10eff88e0f77a --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionCollection.cs @@ -0,0 +1,399 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetWorkflowRunActions method from an instance of . + /// + public partial class WorkflowRunActionCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _workflowRunActionClientDiagnostics; + private readonly WorkflowRunActionsRestOperations _workflowRunActionRestClient; + + /// Initializes a new instance of the class for mocking. + protected WorkflowRunActionCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal WorkflowRunActionCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _workflowRunActionClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppService", WorkflowRunActionResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(WorkflowRunActionResource.ResourceType, out string workflowRunActionApiVersion); + _workflowRunActionRestClient = new WorkflowRunActionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, workflowRunActionApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != WorkflowRunResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, WorkflowRunResource.ResourceType), nameof(id)); + } + + /// + /// Gets a workflow run action. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName} + /// + /// + /// Operation Id + /// WorkflowRunActions_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow action name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string actionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(actionName, nameof(actionName)); + + using var scope = _workflowRunActionClientDiagnostics.CreateScope("WorkflowRunActionCollection.Get"); + scope.Start(); + try + { + var response = await _workflowRunActionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Name, Id.Name, actionName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WorkflowRunActionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a workflow run action. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName} + /// + /// + /// Operation Id + /// WorkflowRunActions_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow action name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string actionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(actionName, nameof(actionName)); + + using var scope = _workflowRunActionClientDiagnostics.CreateScope("WorkflowRunActionCollection.Get"); + scope.Start(); + try + { + var response = _workflowRunActionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Name, Id.Name, actionName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WorkflowRunActionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a list of workflow run actions. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions + /// + /// + /// Operation Id + /// WorkflowRunActions_List + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The number of items to be included in the result. + /// The filter to apply on the operation. Options for filters include: Status. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(int? top = null, string filter = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _workflowRunActionRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Name, Id.Name, top, filter); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workflowRunActionRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Name, Id.Name, top, filter); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new WorkflowRunActionResource(Client, WorkflowRunActionData.DeserializeWorkflowRunActionData(e)), _workflowRunActionClientDiagnostics, Pipeline, "WorkflowRunActionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Gets a list of workflow run actions. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions + /// + /// + /// Operation Id + /// WorkflowRunActions_List + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The number of items to be included in the result. + /// The filter to apply on the operation. Options for filters include: Status. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(int? top = null, string filter = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _workflowRunActionRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Name, Id.Name, top, filter); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workflowRunActionRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Name, Id.Name, top, filter); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new WorkflowRunActionResource(Client, WorkflowRunActionData.DeserializeWorkflowRunActionData(e)), _workflowRunActionClientDiagnostics, Pipeline, "WorkflowRunActionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName} + /// + /// + /// Operation Id + /// WorkflowRunActions_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow action name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string actionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(actionName, nameof(actionName)); + + using var scope = _workflowRunActionClientDiagnostics.CreateScope("WorkflowRunActionCollection.Exists"); + scope.Start(); + try + { + var response = await _workflowRunActionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Name, Id.Name, actionName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName} + /// + /// + /// Operation Id + /// WorkflowRunActions_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow action name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string actionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(actionName, nameof(actionName)); + + using var scope = _workflowRunActionClientDiagnostics.CreateScope("WorkflowRunActionCollection.Exists"); + scope.Start(); + try + { + var response = _workflowRunActionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Name, Id.Name, actionName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName} + /// + /// + /// Operation Id + /// WorkflowRunActions_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow action name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string actionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(actionName, nameof(actionName)); + + using var scope = _workflowRunActionClientDiagnostics.CreateScope("WorkflowRunActionCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _workflowRunActionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Name, Id.Name, actionName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new WorkflowRunActionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName} + /// + /// + /// Operation Id + /// WorkflowRunActions_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow action name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string actionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(actionName, nameof(actionName)); + + using var scope = _workflowRunActionClientDiagnostics.CreateScope("WorkflowRunActionCollection.GetIfExists"); + scope.Start(); + try + { + var response = _workflowRunActionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Name, Id.Name, actionName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new WorkflowRunActionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionData.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionData.Serialization.cs new file mode 100644 index 0000000000000..1acfbaa887152 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionData.Serialization.cs @@ -0,0 +1,639 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.AppService.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppService +{ + public partial class WorkflowRunActionData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowRunActionData)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (options.Format != "W") + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (options.Format != "W") + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W") + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(ResourceType); + } + if (options.Format != "W" && Optional.IsDefined(SystemData)) + { + writer.WritePropertyName("systemData"u8); + JsonSerializer.Serialize(writer, SystemData); + } + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsDefined(StartOn)) + { + writer.WritePropertyName("startTime"u8); + writer.WriteStringValue(StartOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(EndOn)) + { + writer.WritePropertyName("endTime"u8); + writer.WriteStringValue(EndOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(Code)) + { + writer.WritePropertyName("code"u8); + writer.WriteStringValue(Code); + } + if (options.Format != "W" && Optional.IsDefined(Error)) + { + writer.WritePropertyName("error"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Error); +#else + using (JsonDocument document = JsonDocument.Parse(Error)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + if (options.Format != "W" && Optional.IsDefined(TrackingId)) + { + writer.WritePropertyName("trackingId"u8); + writer.WriteStringValue(TrackingId); + } + if (Optional.IsDefined(Correlation)) + { + writer.WritePropertyName("correlation"u8); + writer.WriteObjectValue(Correlation, options); + } + if (options.Format != "W" && Optional.IsDefined(InputsLink)) + { + writer.WritePropertyName("inputsLink"u8); + writer.WriteObjectValue(InputsLink, options); + } + if (options.Format != "W" && Optional.IsDefined(OutputsLink)) + { + writer.WritePropertyName("outputsLink"u8); + writer.WriteObjectValue(OutputsLink, options); + } + if (options.Format != "W" && Optional.IsDefined(TrackedProperties)) + { + writer.WritePropertyName("trackedProperties"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(TrackedProperties); +#else + using (JsonDocument document = JsonDocument.Parse(TrackedProperties)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + if (Optional.IsCollectionDefined(RetryHistory)) + { + writer.WritePropertyName("retryHistory"u8); + writer.WriteStartArray(); + foreach (var item in RetryHistory) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WorkflowRunActionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowRunActionData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWorkflowRunActionData(document.RootElement, options); + } + + internal static WorkflowRunActionData DeserializeWorkflowRunActionData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + DateTimeOffset? startTime = default; + DateTimeOffset? endTime = default; + WorkflowStatus? status = default; + string code = default; + BinaryData error = default; + string trackingId = default; + WebAppRunActionCorrelation correlation = default; + WebAppContentLink inputsLink = default; + WebAppContentLink outputsLink = default; + BinaryData trackedProperties = default; + IReadOnlyList retryHistory = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("startTime"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + startTime = property0.Value.GetDateTimeOffset("O"); + continue; + } + if (property0.NameEquals("endTime"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endTime = property0.Value.GetDateTimeOffset("O"); + continue; + } + if (property0.NameEquals("status"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = new WorkflowStatus(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("code"u8)) + { + code = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("error"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + error = BinaryData.FromString(property0.Value.GetRawText()); + continue; + } + if (property0.NameEquals("trackingId"u8)) + { + trackingId = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("correlation"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + correlation = WebAppRunActionCorrelation.DeserializeWebAppRunActionCorrelation(property0.Value, options); + continue; + } + if (property0.NameEquals("inputsLink"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + inputsLink = WebAppContentLink.DeserializeWebAppContentLink(property0.Value, options); + continue; + } + if (property0.NameEquals("outputsLink"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + outputsLink = WebAppContentLink.DeserializeWebAppContentLink(property0.Value, options); + continue; + } + if (property0.NameEquals("trackedProperties"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + trackedProperties = BinaryData.FromString(property0.Value.GetRawText()); + continue; + } + if (property0.NameEquals("retryHistory"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(WebAppRetryHistory.DeserializeWebAppRetryHistory(item, options)); + } + retryHistory = array; + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WorkflowRunActionData( + id, + name, + type, + systemData, + startTime, + endTime, + status, + code, + error, + trackingId, + correlation, + inputsLink, + outputsLink, + trackedProperties, + retryHistory ?? new ChangeTrackingList(), + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(StartOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" startTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(StartOn)) + { + builder.Append(" startTime: "); + var formattedDateTimeString = TypeFormatters.ToString(StartOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EndOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" endTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(EndOn)) + { + builder.Append(" endTime: "); + var formattedDateTimeString = TypeFormatters.ToString(EndOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Status), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" status: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Status)) + { + builder.Append(" status: "); + builder.AppendLine($"'{Status.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Code), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" code: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Code)) + { + builder.Append(" code: "); + if (Code.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Code}'''"); + } + else + { + builder.AppendLine($"'{Code}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Error), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" error: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Error)) + { + builder.Append(" error: "); + builder.AppendLine($"'{Error.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TrackingId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" trackingId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TrackingId)) + { + builder.Append(" trackingId: "); + if (TrackingId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{TrackingId}'''"); + } + else + { + builder.AppendLine($"'{TrackingId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Correlation), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" correlation: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Correlation)) + { + builder.Append(" correlation: "); + BicepSerializationHelpers.AppendChildObject(builder, Correlation, options, 4, false, " correlation: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(InputsLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" inputsLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(InputsLink)) + { + builder.Append(" inputsLink: "); + BicepSerializationHelpers.AppendChildObject(builder, InputsLink, options, 4, false, " inputsLink: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(OutputsLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" outputsLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(OutputsLink)) + { + builder.Append(" outputsLink: "); + BicepSerializationHelpers.AppendChildObject(builder, OutputsLink, options, 4, false, " outputsLink: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TrackedProperties), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" trackedProperties: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TrackedProperties)) + { + builder.Append(" trackedProperties: "); + builder.AppendLine($"'{TrackedProperties.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(RetryHistory), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" retryHistory: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(RetryHistory)) + { + if (RetryHistory.Any()) + { + builder.Append(" retryHistory: "); + builder.AppendLine("["); + foreach (var item in RetryHistory) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " retryHistory: "); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WorkflowRunActionData)} does not support writing '{options.Format}' format."); + } + } + + WorkflowRunActionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWorkflowRunActionData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WorkflowRunActionData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionData.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionData.cs new file mode 100644 index 0000000000000..74652e8c8c93c --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionData.cs @@ -0,0 +1,185 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.AppService.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A class representing the WorkflowRunAction data model. + /// The workflow run action. + /// + public partial class WorkflowRunActionData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal WorkflowRunActionData() + { + RetryHistory = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Gets the start time. + /// Gets the end time. + /// Gets the status. + /// Gets the code. + /// Gets the error. + /// Gets the tracking id. + /// The correlation properties. + /// Gets the link to inputs. + /// Gets the link to outputs. + /// Gets the tracked properties. + /// Gets the retry histories. + /// Keeps track of any properties unknown to the library. + internal WorkflowRunActionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DateTimeOffset? startOn, DateTimeOffset? endOn, WorkflowStatus? status, string code, BinaryData error, string trackingId, WebAppRunActionCorrelation correlation, WebAppContentLink inputsLink, WebAppContentLink outputsLink, BinaryData trackedProperties, IReadOnlyList retryHistory, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + StartOn = startOn; + EndOn = endOn; + Status = status; + Code = code; + Error = error; + TrackingId = trackingId; + Correlation = correlation; + InputsLink = inputsLink; + OutputsLink = outputsLink; + TrackedProperties = trackedProperties; + RetryHistory = retryHistory; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets the start time. + [WirePath("properties.startTime")] + public DateTimeOffset? StartOn { get; } + /// Gets the end time. + [WirePath("properties.endTime")] + public DateTimeOffset? EndOn { get; } + /// Gets the status. + [WirePath("properties.status")] + public WorkflowStatus? Status { get; } + /// Gets the code. + [WirePath("properties.code")] + public string Code { get; } + /// + /// Gets the error. + /// + /// To assign an object to this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + [WirePath("properties.error")] + public BinaryData Error { get; } + /// Gets the tracking id. + [WirePath("properties.trackingId")] + public string TrackingId { get; } + /// The correlation properties. + [WirePath("properties.correlation")] + public WebAppRunActionCorrelation Correlation { get; } + /// Gets the link to inputs. + [WirePath("properties.inputsLink")] + public WebAppContentLink InputsLink { get; } + /// Gets the link to outputs. + [WirePath("properties.outputsLink")] + public WebAppContentLink OutputsLink { get; } + /// + /// Gets the tracked properties. + /// + /// To assign an object to this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + [WirePath("properties.trackedProperties")] + public BinaryData TrackedProperties { get; } + /// Gets the retry histories. + [WirePath("properties.retryHistory")] + public IReadOnlyList RetryHistory { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionRepetitionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionRepetitionCollection.cs new file mode 100644 index 0000000000000..26665e30a25ce --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionRepetitionCollection.cs @@ -0,0 +1,395 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetWorkflowRunActionRepetitions method from an instance of . + /// + public partial class WorkflowRunActionRepetitionCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _workflowRunActionRepetitionClientDiagnostics; + private readonly WorkflowRunActionRepetitionsRestOperations _workflowRunActionRepetitionRestClient; + + /// Initializes a new instance of the class for mocking. + protected WorkflowRunActionRepetitionCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal WorkflowRunActionRepetitionCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _workflowRunActionRepetitionClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppService", WorkflowRunActionRepetitionResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(WorkflowRunActionRepetitionResource.ResourceType, out string workflowRunActionRepetitionApiVersion); + _workflowRunActionRepetitionRestClient = new WorkflowRunActionRepetitionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, workflowRunActionRepetitionApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != WorkflowRunActionResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, WorkflowRunActionResource.ResourceType), nameof(id)); + } + + /// + /// Get a workflow run action repetition. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName} + /// + /// + /// Operation Id + /// WorkflowRunActionRepetitions_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow repetition. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string repetitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(repetitionName, nameof(repetitionName)); + + using var scope = _workflowRunActionRepetitionClientDiagnostics.CreateScope("WorkflowRunActionRepetitionCollection.Get"); + scope.Start(); + try + { + var response = await _workflowRunActionRepetitionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, repetitionName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WorkflowRunActionRepetitionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a workflow run action repetition. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName} + /// + /// + /// Operation Id + /// WorkflowRunActionRepetitions_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow repetition. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string repetitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(repetitionName, nameof(repetitionName)); + + using var scope = _workflowRunActionRepetitionClientDiagnostics.CreateScope("WorkflowRunActionRepetitionCollection.Get"); + scope.Start(); + try + { + var response = _workflowRunActionRepetitionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, repetitionName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WorkflowRunActionRepetitionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get all of a workflow run action repetitions. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions + /// + /// + /// Operation Id + /// WorkflowRunActionRepetitions_List + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _workflowRunActionRepetitionRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workflowRunActionRepetitionRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new WorkflowRunActionRepetitionResource(Client, WorkflowRunActionRepetitionDefinitionData.DeserializeWorkflowRunActionRepetitionDefinitionData(e)), _workflowRunActionRepetitionClientDiagnostics, Pipeline, "WorkflowRunActionRepetitionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Get all of a workflow run action repetitions. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions + /// + /// + /// Operation Id + /// WorkflowRunActionRepetitions_List + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _workflowRunActionRepetitionRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workflowRunActionRepetitionRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new WorkflowRunActionRepetitionResource(Client, WorkflowRunActionRepetitionDefinitionData.DeserializeWorkflowRunActionRepetitionDefinitionData(e)), _workflowRunActionRepetitionClientDiagnostics, Pipeline, "WorkflowRunActionRepetitionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName} + /// + /// + /// Operation Id + /// WorkflowRunActionRepetitions_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow repetition. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string repetitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(repetitionName, nameof(repetitionName)); + + using var scope = _workflowRunActionRepetitionClientDiagnostics.CreateScope("WorkflowRunActionRepetitionCollection.Exists"); + scope.Start(); + try + { + var response = await _workflowRunActionRepetitionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, repetitionName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName} + /// + /// + /// Operation Id + /// WorkflowRunActionRepetitions_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow repetition. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string repetitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(repetitionName, nameof(repetitionName)); + + using var scope = _workflowRunActionRepetitionClientDiagnostics.CreateScope("WorkflowRunActionRepetitionCollection.Exists"); + scope.Start(); + try + { + var response = _workflowRunActionRepetitionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, repetitionName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName} + /// + /// + /// Operation Id + /// WorkflowRunActionRepetitions_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow repetition. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string repetitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(repetitionName, nameof(repetitionName)); + + using var scope = _workflowRunActionRepetitionClientDiagnostics.CreateScope("WorkflowRunActionRepetitionCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _workflowRunActionRepetitionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, repetitionName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new WorkflowRunActionRepetitionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName} + /// + /// + /// Operation Id + /// WorkflowRunActionRepetitions_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow repetition. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string repetitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(repetitionName, nameof(repetitionName)); + + using var scope = _workflowRunActionRepetitionClientDiagnostics.CreateScope("WorkflowRunActionRepetitionCollection.GetIfExists"); + scope.Start(); + try + { + var response = _workflowRunActionRepetitionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, repetitionName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new WorkflowRunActionRepetitionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionRepetitionDefinitionData.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionRepetitionDefinitionData.Serialization.cs new file mode 100644 index 0000000000000..52521bba75e81 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionRepetitionDefinitionData.Serialization.cs @@ -0,0 +1,880 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.AppService.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppService +{ + public partial class WorkflowRunActionRepetitionDefinitionData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowRunActionRepetitionDefinitionData)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WritePropertyName("location"u8); + writer.WriteStringValue(Location); + if (options.Format != "W") + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (options.Format != "W") + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W") + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(ResourceType); + } + if (options.Format != "W" && Optional.IsDefined(SystemData)) + { + writer.WritePropertyName("systemData"u8); + JsonSerializer.Serialize(writer, SystemData); + } + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(StartOn)) + { + writer.WritePropertyName("startTime"u8); + writer.WriteStringValue(StartOn.Value, "O"); + } + if (Optional.IsDefined(EndOn)) + { + writer.WritePropertyName("endTime"u8); + writer.WriteStringValue(EndOn.Value, "O"); + } + if (Optional.IsDefined(Correlation)) + { + writer.WritePropertyName("correlation"u8); + writer.WriteObjectValue(Correlation, options); + } + if (Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + if (Optional.IsDefined(Code)) + { + writer.WritePropertyName("code"u8); + writer.WriteStringValue(Code); + } + if (Optional.IsDefined(Error)) + { + writer.WritePropertyName("error"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Error); +#else + using (JsonDocument document = JsonDocument.Parse(Error)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + if (options.Format != "W" && Optional.IsDefined(TrackingId)) + { + writer.WritePropertyName("trackingId"u8); + writer.WriteStringValue(TrackingId); + } + if (options.Format != "W" && Optional.IsDefined(Inputs)) + { + writer.WritePropertyName("inputs"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Inputs); +#else + using (JsonDocument document = JsonDocument.Parse(Inputs)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + if (options.Format != "W" && Optional.IsDefined(InputsLink)) + { + writer.WritePropertyName("inputsLink"u8); + writer.WriteObjectValue(InputsLink, options); + } + if (options.Format != "W" && Optional.IsDefined(Outputs)) + { + writer.WritePropertyName("outputs"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Outputs); +#else + using (JsonDocument document = JsonDocument.Parse(Outputs)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + if (options.Format != "W" && Optional.IsDefined(OutputsLink)) + { + writer.WritePropertyName("outputsLink"u8); + writer.WriteObjectValue(OutputsLink, options); + } + if (options.Format != "W" && Optional.IsDefined(TrackedProperties)) + { + writer.WritePropertyName("trackedProperties"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(TrackedProperties); +#else + using (JsonDocument document = JsonDocument.Parse(TrackedProperties)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + if (Optional.IsCollectionDefined(RetryHistory)) + { + writer.WritePropertyName("retryHistory"u8); + writer.WriteStartArray(); + foreach (var item in RetryHistory) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(IterationCount)) + { + writer.WritePropertyName("iterationCount"u8); + writer.WriteNumberValue(IterationCount.Value); + } + if (Optional.IsCollectionDefined(RepetitionIndexes)) + { + writer.WritePropertyName("repetitionIndexes"u8); + writer.WriteStartArray(); + foreach (var item in RepetitionIndexes) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WorkflowRunActionRepetitionDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowRunActionRepetitionDefinitionData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWorkflowRunActionRepetitionDefinitionData(document.RootElement, options); + } + + internal static WorkflowRunActionRepetitionDefinitionData DeserializeWorkflowRunActionRepetitionDefinitionData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + DateTimeOffset? startTime = default; + DateTimeOffset? endTime = default; + WebAppRunActionCorrelation correlation = default; + WorkflowStatus? status = default; + string code = default; + BinaryData error = default; + string trackingId = default; + BinaryData inputs = default; + WebAppContentLink inputsLink = default; + BinaryData outputs = default; + WebAppContentLink outputsLink = default; + BinaryData trackedProperties = default; + IList retryHistory = default; + int? iterationCount = default; + IList repetitionIndexes = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("location"u8)) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("startTime"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + startTime = property0.Value.GetDateTimeOffset("O"); + continue; + } + if (property0.NameEquals("endTime"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endTime = property0.Value.GetDateTimeOffset("O"); + continue; + } + if (property0.NameEquals("correlation"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + correlation = WebAppRunActionCorrelation.DeserializeWebAppRunActionCorrelation(property0.Value, options); + continue; + } + if (property0.NameEquals("status"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = new WorkflowStatus(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("code"u8)) + { + code = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("error"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + error = BinaryData.FromString(property0.Value.GetRawText()); + continue; + } + if (property0.NameEquals("trackingId"u8)) + { + trackingId = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("inputs"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + inputs = BinaryData.FromString(property0.Value.GetRawText()); + continue; + } + if (property0.NameEquals("inputsLink"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + inputsLink = WebAppContentLink.DeserializeWebAppContentLink(property0.Value, options); + continue; + } + if (property0.NameEquals("outputs"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + outputs = BinaryData.FromString(property0.Value.GetRawText()); + continue; + } + if (property0.NameEquals("outputsLink"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + outputsLink = WebAppContentLink.DeserializeWebAppContentLink(property0.Value, options); + continue; + } + if (property0.NameEquals("trackedProperties"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + trackedProperties = BinaryData.FromString(property0.Value.GetRawText()); + continue; + } + if (property0.NameEquals("retryHistory"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(WebAppRetryHistory.DeserializeWebAppRetryHistory(item, options)); + } + retryHistory = array; + continue; + } + if (property0.NameEquals("iterationCount"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + iterationCount = property0.Value.GetInt32(); + continue; + } + if (property0.NameEquals("repetitionIndexes"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(WorkflowRunActionRepetitionIndex.DeserializeWorkflowRunActionRepetitionIndex(item, options)); + } + repetitionIndexes = array; + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WorkflowRunActionRepetitionDefinitionData( + id, + name, + type, + systemData, + tags ?? new ChangeTrackingDictionary(), + location, + startTime, + endTime, + correlation, + status, + code, + error, + trackingId, + inputs, + inputsLink, + outputs, + outputsLink, + trackedProperties, + retryHistory ?? new ChangeTrackingList(), + iterationCount, + repetitionIndexes ?? new ChangeTrackingList(), + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Location), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" location: "); + builder.AppendLine(propertyOverride); + } + else + { + builder.Append(" location: "); + builder.AppendLine($"'{Location.ToString()}'"); + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Tags), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" tags: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Tags)) + { + if (Tags.Any()) + { + builder.Append(" tags: "); + builder.AppendLine("{"); + foreach (var item in Tags) + { + builder.Append($" '{item.Key}': "); + if (item.Value == null) + { + builder.Append("null"); + continue; + } + if (item.Value.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{item.Value}'''"); + } + else + { + builder.AppendLine($"'{item.Value}'"); + } + } + builder.AppendLine(" }"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(StartOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" startTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(StartOn)) + { + builder.Append(" startTime: "); + var formattedDateTimeString = TypeFormatters.ToString(StartOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EndOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" endTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(EndOn)) + { + builder.Append(" endTime: "); + var formattedDateTimeString = TypeFormatters.ToString(EndOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Correlation), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" correlation: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Correlation)) + { + builder.Append(" correlation: "); + BicepSerializationHelpers.AppendChildObject(builder, Correlation, options, 4, false, " correlation: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Status), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" status: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Status)) + { + builder.Append(" status: "); + builder.AppendLine($"'{Status.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Code), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" code: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Code)) + { + builder.Append(" code: "); + if (Code.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Code}'''"); + } + else + { + builder.AppendLine($"'{Code}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Error), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" error: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Error)) + { + builder.Append(" error: "); + builder.AppendLine($"'{Error.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TrackingId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" trackingId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TrackingId)) + { + builder.Append(" trackingId: "); + if (TrackingId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{TrackingId}'''"); + } + else + { + builder.AppendLine($"'{TrackingId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Inputs), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" inputs: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Inputs)) + { + builder.Append(" inputs: "); + builder.AppendLine($"'{Inputs.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(InputsLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" inputsLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(InputsLink)) + { + builder.Append(" inputsLink: "); + BicepSerializationHelpers.AppendChildObject(builder, InputsLink, options, 4, false, " inputsLink: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Outputs), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" outputs: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Outputs)) + { + builder.Append(" outputs: "); + builder.AppendLine($"'{Outputs.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(OutputsLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" outputsLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(OutputsLink)) + { + builder.Append(" outputsLink: "); + BicepSerializationHelpers.AppendChildObject(builder, OutputsLink, options, 4, false, " outputsLink: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TrackedProperties), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" trackedProperties: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TrackedProperties)) + { + builder.Append(" trackedProperties: "); + builder.AppendLine($"'{TrackedProperties.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(RetryHistory), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" retryHistory: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(RetryHistory)) + { + if (RetryHistory.Any()) + { + builder.Append(" retryHistory: "); + builder.AppendLine("["); + foreach (var item in RetryHistory) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " retryHistory: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IterationCount), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" iterationCount: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IterationCount)) + { + builder.Append(" iterationCount: "); + builder.AppendLine($"{IterationCount.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(RepetitionIndexes), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" repetitionIndexes: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(RepetitionIndexes)) + { + if (RepetitionIndexes.Any()) + { + builder.Append(" repetitionIndexes: "); + builder.AppendLine("["); + foreach (var item in RepetitionIndexes) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " repetitionIndexes: "); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WorkflowRunActionRepetitionDefinitionData)} does not support writing '{options.Format}' format."); + } + } + + WorkflowRunActionRepetitionDefinitionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWorkflowRunActionRepetitionDefinitionData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WorkflowRunActionRepetitionDefinitionData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionRepetitionDefinitionData.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionRepetitionDefinitionData.cs new file mode 100644 index 0000000000000..0aa18c19e9b4e --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionRepetitionDefinitionData.cs @@ -0,0 +1,272 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.AppService.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A class representing the WorkflowRunActionRepetitionDefinition data model. + /// The workflow run action repetition definition. + /// + public partial class WorkflowRunActionRepetitionDefinitionData : TrackedResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The location. + public WorkflowRunActionRepetitionDefinitionData(AzureLocation location) : base(location) + { + RetryHistory = new ChangeTrackingList(); + RepetitionIndexes = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The start time of the workflow scope repetition. + /// The end time of the workflow scope repetition. + /// The correlation properties. + /// The status of the workflow scope repetition. + /// The workflow scope repetition code. + /// Anything. + /// Gets the tracking id. + /// Gets the inputs. + /// Gets the link to inputs. + /// Gets the outputs. + /// Gets the link to outputs. + /// Gets the tracked properties. + /// Gets the retry histories. + /// + /// The repetition indexes. + /// Keeps track of any properties unknown to the library. + internal WorkflowRunActionRepetitionDefinitionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, DateTimeOffset? startOn, DateTimeOffset? endOn, WebAppRunActionCorrelation correlation, WorkflowStatus? status, string code, BinaryData error, string trackingId, BinaryData inputs, WebAppContentLink inputsLink, BinaryData outputs, WebAppContentLink outputsLink, BinaryData trackedProperties, IList retryHistory, int? iterationCount, IList repetitionIndexes, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + { + StartOn = startOn; + EndOn = endOn; + Correlation = correlation; + Status = status; + Code = code; + Error = error; + TrackingId = trackingId; + Inputs = inputs; + InputsLink = inputsLink; + Outputs = outputs; + OutputsLink = outputsLink; + TrackedProperties = trackedProperties; + RetryHistory = retryHistory; + IterationCount = iterationCount; + RepetitionIndexes = repetitionIndexes; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal WorkflowRunActionRepetitionDefinitionData() + { + } + + /// The start time of the workflow scope repetition. + [WirePath("properties.startTime")] + public DateTimeOffset? StartOn { get; set; } + /// The end time of the workflow scope repetition. + [WirePath("properties.endTime")] + public DateTimeOffset? EndOn { get; set; } + /// The correlation properties. + [WirePath("properties.correlation")] + public WebAppRunActionCorrelation Correlation { get; set; } + /// The status of the workflow scope repetition. + [WirePath("properties.status")] + public WorkflowStatus? Status { get; set; } + /// The workflow scope repetition code. + [WirePath("properties.code")] + public string Code { get; set; } + /// + /// Anything + /// + /// To assign an object to this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + [WirePath("properties.error")] + public BinaryData Error { get; set; } + /// Gets the tracking id. + [WirePath("properties.trackingId")] + public string TrackingId { get; } + /// + /// Gets the inputs. + /// + /// To assign an object to this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + [WirePath("properties.inputs")] + public BinaryData Inputs { get; } + /// Gets the link to inputs. + [WirePath("properties.inputsLink")] + public WebAppContentLink InputsLink { get; } + /// + /// Gets the outputs. + /// + /// To assign an object to this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + [WirePath("properties.outputs")] + public BinaryData Outputs { get; } + /// Gets the link to outputs. + [WirePath("properties.outputsLink")] + public WebAppContentLink OutputsLink { get; } + /// + /// Gets the tracked properties. + /// + /// To assign an object to this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + [WirePath("properties.trackedProperties")] + public BinaryData TrackedProperties { get; } + /// Gets the retry histories. + [WirePath("properties.retryHistory")] + public IList RetryHistory { get; } + /// Gets or sets the iteration count. + [WirePath("properties.iterationCount")] + public int? IterationCount { get; set; } + /// The repetition indexes. + [WirePath("properties.repetitionIndexes")] + public IList RepetitionIndexes { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionRepetitionResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionRepetitionResource.Serialization.cs new file mode 100644 index 0000000000000..09a98f4062e39 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionRepetitionResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.AppService +{ + public partial class WorkflowRunActionRepetitionResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + WorkflowRunActionRepetitionDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + WorkflowRunActionRepetitionDefinitionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionRepetitionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionRepetitionResource.cs new file mode 100644 index 0000000000000..fff1f9170548c --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionRepetitionResource.cs @@ -0,0 +1,305 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A Class representing a WorkflowRunActionRepetition along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetWorkflowRunActionRepetitionResource method. + /// Otherwise you can get one from its parent resource using the GetWorkflowRunActionRepetition method. + /// + public partial class WorkflowRunActionRepetitionResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The name. + /// The workflowName. + /// The runName. + /// The actionName. + /// The repetitionName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, string repetitionName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _workflowRunActionRepetitionClientDiagnostics; + private readonly WorkflowRunActionRepetitionsRestOperations _workflowRunActionRepetitionRestClient; + private readonly WorkflowRunActionRepetitionDefinitionData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Web/sites/hostruntime/webhooks/api/workflows/runs/actions/repetitions"; + + /// Initializes a new instance of the class for mocking. + protected WorkflowRunActionRepetitionResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal WorkflowRunActionRepetitionResource(ArmClient client, WorkflowRunActionRepetitionDefinitionData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal WorkflowRunActionRepetitionResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _workflowRunActionRepetitionClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppService", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string workflowRunActionRepetitionApiVersion); + _workflowRunActionRepetitionRestClient = new WorkflowRunActionRepetitionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, workflowRunActionRepetitionApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual WorkflowRunActionRepetitionDefinitionData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// Gets a collection of WebAppRequestHistoryResources in the WorkflowRunActionRepetition. + /// An object representing collection of WebAppRequestHistoryResources and their operations over a WebAppRequestHistoryResource. + public virtual WebAppRequestHistoryCollection GetWebAppRequestHistories() + { + return GetCachedClient(client => new WebAppRequestHistoryCollection(client, Id)); + } + + /// + /// Gets a workflow run repetition request history. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/requestHistories/{requestHistoryName} + /// + /// + /// Operation Id + /// WorkflowRunActionRepetitionsRequestHistories_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The request history name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetWebAppRequestHistoryAsync(string requestHistoryName, CancellationToken cancellationToken = default) + { + return await GetWebAppRequestHistories().GetAsync(requestHistoryName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets a workflow run repetition request history. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/requestHistories/{requestHistoryName} + /// + /// + /// Operation Id + /// WorkflowRunActionRepetitionsRequestHistories_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The request history name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetWebAppRequestHistory(string requestHistoryName, CancellationToken cancellationToken = default) + { + return GetWebAppRequestHistories().Get(requestHistoryName, cancellationToken); + } + + /// + /// Get a workflow run action repetition. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName} + /// + /// + /// Operation Id + /// WorkflowRunActionRepetitions_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _workflowRunActionRepetitionClientDiagnostics.CreateScope("WorkflowRunActionRepetitionResource.Get"); + scope.Start(); + try + { + var response = await _workflowRunActionRepetitionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WorkflowRunActionRepetitionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a workflow run action repetition. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName} + /// + /// + /// Operation Id + /// WorkflowRunActionRepetitions_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _workflowRunActionRepetitionClientDiagnostics.CreateScope("WorkflowRunActionRepetitionResource.Get"); + scope.Start(); + try + { + var response = _workflowRunActionRepetitionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WorkflowRunActionRepetitionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists a workflow run expression trace. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/listExpressionTraces + /// + /// + /// Operation Id + /// WorkflowRunActionRepetitions_ListExpressionTraces + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetExpressionTracesAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _workflowRunActionRepetitionRestClient.CreateListExpressionTracesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workflowRunActionRepetitionRestClient.CreateListExpressionTracesNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => WorkflowExpressionRoot.DeserializeWorkflowExpressionRoot(e), _workflowRunActionRepetitionClientDiagnostics, Pipeline, "WorkflowRunActionRepetitionResource.GetExpressionTraces", "inputs", "nextLink", cancellationToken); + } + + /// + /// Lists a workflow run expression trace. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/listExpressionTraces + /// + /// + /// Operation Id + /// WorkflowRunActionRepetitions_ListExpressionTraces + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetExpressionTraces(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _workflowRunActionRepetitionRestClient.CreateListExpressionTracesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workflowRunActionRepetitionRestClient.CreateListExpressionTracesNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => WorkflowExpressionRoot.DeserializeWorkflowExpressionRoot(e), _workflowRunActionRepetitionClientDiagnostics, Pipeline, "WorkflowRunActionRepetitionResource.GetExpressionTraces", "inputs", "nextLink", cancellationToken); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionResource.Serialization.cs new file mode 100644 index 0000000000000..28f422d0e80d5 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.AppService +{ + public partial class WorkflowRunActionResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + WorkflowRunActionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + WorkflowRunActionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionResource.cs new file mode 100644 index 0000000000000..fe5ae36f76fca --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionResource.cs @@ -0,0 +1,373 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A Class representing a WorkflowRunAction along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetWorkflowRunActionResource method. + /// Otherwise you can get one from its parent resource using the GetWorkflowRunAction method. + /// + public partial class WorkflowRunActionResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The name. + /// The workflowName. + /// The runName. + /// The actionName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _workflowRunActionClientDiagnostics; + private readonly WorkflowRunActionsRestOperations _workflowRunActionRestClient; + private readonly WorkflowRunActionData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Web/sites/hostruntime/webhooks/api/workflows/runs/actions"; + + /// Initializes a new instance of the class for mocking. + protected WorkflowRunActionResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal WorkflowRunActionResource(ArmClient client, WorkflowRunActionData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal WorkflowRunActionResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _workflowRunActionClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppService", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string workflowRunActionApiVersion); + _workflowRunActionRestClient = new WorkflowRunActionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, workflowRunActionApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual WorkflowRunActionData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// Gets a collection of WorkflowRunActionRepetitionResources in the WorkflowRunAction. + /// An object representing collection of WorkflowRunActionRepetitionResources and their operations over a WorkflowRunActionRepetitionResource. + public virtual WorkflowRunActionRepetitionCollection GetWorkflowRunActionRepetitions() + { + return GetCachedClient(client => new WorkflowRunActionRepetitionCollection(client, Id)); + } + + /// + /// Get a workflow run action repetition. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName} + /// + /// + /// Operation Id + /// WorkflowRunActionRepetitions_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow repetition. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetWorkflowRunActionRepetitionAsync(string repetitionName, CancellationToken cancellationToken = default) + { + return await GetWorkflowRunActionRepetitions().GetAsync(repetitionName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a workflow run action repetition. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName} + /// + /// + /// Operation Id + /// WorkflowRunActionRepetitions_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow repetition. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetWorkflowRunActionRepetition(string repetitionName, CancellationToken cancellationToken = default) + { + return GetWorkflowRunActionRepetitions().Get(repetitionName, cancellationToken); + } + + /// Gets a collection of WorkflowRunActionScopeRepetitionResources in the WorkflowRunAction. + /// An object representing collection of WorkflowRunActionScopeRepetitionResources and their operations over a WorkflowRunActionScopeRepetitionResource. + public virtual WorkflowRunActionScopeRepetitionCollection GetWorkflowRunActionScopeRepetitions() + { + return GetCachedClient(client => new WorkflowRunActionScopeRepetitionCollection(client, Id)); + } + + /// + /// Get a workflow run action scoped repetition. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/scopeRepetitions/{repetitionName} + /// + /// + /// Operation Id + /// WorkflowRunActionScopeRepetitions_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow repetition. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetWorkflowRunActionScopeRepetitionAsync(string repetitionName, CancellationToken cancellationToken = default) + { + return await GetWorkflowRunActionScopeRepetitions().GetAsync(repetitionName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a workflow run action scoped repetition. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/scopeRepetitions/{repetitionName} + /// + /// + /// Operation Id + /// WorkflowRunActionScopeRepetitions_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow repetition. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetWorkflowRunActionScopeRepetition(string repetitionName, CancellationToken cancellationToken = default) + { + return GetWorkflowRunActionScopeRepetitions().Get(repetitionName, cancellationToken); + } + + /// + /// Gets a workflow run action. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName} + /// + /// + /// Operation Id + /// WorkflowRunActions_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _workflowRunActionClientDiagnostics.CreateScope("WorkflowRunActionResource.Get"); + scope.Start(); + try + { + var response = await _workflowRunActionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WorkflowRunActionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a workflow run action. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName} + /// + /// + /// Operation Id + /// WorkflowRunActions_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _workflowRunActionClientDiagnostics.CreateScope("WorkflowRunActionResource.Get"); + scope.Start(); + try + { + var response = _workflowRunActionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WorkflowRunActionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists a workflow run expression trace. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/listExpressionTraces + /// + /// + /// Operation Id + /// WorkflowRunActions_ListExpressionTraces + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetExpressionTracesAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _workflowRunActionRestClient.CreateListExpressionTracesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workflowRunActionRestClient.CreateListExpressionTracesNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => WorkflowExpressionRoot.DeserializeWorkflowExpressionRoot(e), _workflowRunActionClientDiagnostics, Pipeline, "WorkflowRunActionResource.GetExpressionTraces", "inputs", "nextLink", cancellationToken); + } + + /// + /// Lists a workflow run expression trace. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/listExpressionTraces + /// + /// + /// Operation Id + /// WorkflowRunActions_ListExpressionTraces + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetExpressionTraces(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _workflowRunActionRestClient.CreateListExpressionTracesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workflowRunActionRestClient.CreateListExpressionTracesNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => WorkflowExpressionRoot.DeserializeWorkflowExpressionRoot(e), _workflowRunActionClientDiagnostics, Pipeline, "WorkflowRunActionResource.GetExpressionTraces", "inputs", "nextLink", cancellationToken); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionScopeRepetitionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionScopeRepetitionCollection.cs new file mode 100644 index 0000000000000..9c864f66b4e6e --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionScopeRepetitionCollection.cs @@ -0,0 +1,395 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetWorkflowRunActionScopeRepetitions method from an instance of . + /// + public partial class WorkflowRunActionScopeRepetitionCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _workflowRunActionScopeRepetitionClientDiagnostics; + private readonly WorkflowRunActionScopeRepetitionsRestOperations _workflowRunActionScopeRepetitionRestClient; + + /// Initializes a new instance of the class for mocking. + protected WorkflowRunActionScopeRepetitionCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal WorkflowRunActionScopeRepetitionCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _workflowRunActionScopeRepetitionClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppService", WorkflowRunActionScopeRepetitionResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(WorkflowRunActionScopeRepetitionResource.ResourceType, out string workflowRunActionScopeRepetitionApiVersion); + _workflowRunActionScopeRepetitionRestClient = new WorkflowRunActionScopeRepetitionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, workflowRunActionScopeRepetitionApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != WorkflowRunActionResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, WorkflowRunActionResource.ResourceType), nameof(id)); + } + + /// + /// Get a workflow run action scoped repetition. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/scopeRepetitions/{repetitionName} + /// + /// + /// Operation Id + /// WorkflowRunActionScopeRepetitions_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow repetition. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string repetitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(repetitionName, nameof(repetitionName)); + + using var scope = _workflowRunActionScopeRepetitionClientDiagnostics.CreateScope("WorkflowRunActionScopeRepetitionCollection.Get"); + scope.Start(); + try + { + var response = await _workflowRunActionScopeRepetitionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, repetitionName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WorkflowRunActionScopeRepetitionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a workflow run action scoped repetition. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/scopeRepetitions/{repetitionName} + /// + /// + /// Operation Id + /// WorkflowRunActionScopeRepetitions_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow repetition. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string repetitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(repetitionName, nameof(repetitionName)); + + using var scope = _workflowRunActionScopeRepetitionClientDiagnostics.CreateScope("WorkflowRunActionScopeRepetitionCollection.Get"); + scope.Start(); + try + { + var response = _workflowRunActionScopeRepetitionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, repetitionName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WorkflowRunActionScopeRepetitionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List the workflow run action scoped repetitions. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/scopeRepetitions + /// + /// + /// Operation Id + /// WorkflowRunActionScopeRepetitions_List + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _workflowRunActionScopeRepetitionRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workflowRunActionScopeRepetitionRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new WorkflowRunActionScopeRepetitionResource(Client, WorkflowRunActionRepetitionDefinitionData.DeserializeWorkflowRunActionRepetitionDefinitionData(e)), _workflowRunActionScopeRepetitionClientDiagnostics, Pipeline, "WorkflowRunActionScopeRepetitionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List the workflow run action scoped repetitions. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/scopeRepetitions + /// + /// + /// Operation Id + /// WorkflowRunActionScopeRepetitions_List + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _workflowRunActionScopeRepetitionRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workflowRunActionScopeRepetitionRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new WorkflowRunActionScopeRepetitionResource(Client, WorkflowRunActionRepetitionDefinitionData.DeserializeWorkflowRunActionRepetitionDefinitionData(e)), _workflowRunActionScopeRepetitionClientDiagnostics, Pipeline, "WorkflowRunActionScopeRepetitionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/scopeRepetitions/{repetitionName} + /// + /// + /// Operation Id + /// WorkflowRunActionScopeRepetitions_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow repetition. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string repetitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(repetitionName, nameof(repetitionName)); + + using var scope = _workflowRunActionScopeRepetitionClientDiagnostics.CreateScope("WorkflowRunActionScopeRepetitionCollection.Exists"); + scope.Start(); + try + { + var response = await _workflowRunActionScopeRepetitionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, repetitionName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/scopeRepetitions/{repetitionName} + /// + /// + /// Operation Id + /// WorkflowRunActionScopeRepetitions_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow repetition. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string repetitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(repetitionName, nameof(repetitionName)); + + using var scope = _workflowRunActionScopeRepetitionClientDiagnostics.CreateScope("WorkflowRunActionScopeRepetitionCollection.Exists"); + scope.Start(); + try + { + var response = _workflowRunActionScopeRepetitionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, repetitionName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/scopeRepetitions/{repetitionName} + /// + /// + /// Operation Id + /// WorkflowRunActionScopeRepetitions_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow repetition. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string repetitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(repetitionName, nameof(repetitionName)); + + using var scope = _workflowRunActionScopeRepetitionClientDiagnostics.CreateScope("WorkflowRunActionScopeRepetitionCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _workflowRunActionScopeRepetitionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, repetitionName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new WorkflowRunActionScopeRepetitionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/scopeRepetitions/{repetitionName} + /// + /// + /// Operation Id + /// WorkflowRunActionScopeRepetitions_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow repetition. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string repetitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(repetitionName, nameof(repetitionName)); + + using var scope = _workflowRunActionScopeRepetitionClientDiagnostics.CreateScope("WorkflowRunActionScopeRepetitionCollection.GetIfExists"); + scope.Start(); + try + { + var response = _workflowRunActionScopeRepetitionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, repetitionName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new WorkflowRunActionScopeRepetitionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionScopeRepetitionResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionScopeRepetitionResource.Serialization.cs new file mode 100644 index 0000000000000..5341bc08a3c46 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionScopeRepetitionResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.AppService +{ + public partial class WorkflowRunActionScopeRepetitionResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + WorkflowRunActionRepetitionDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + WorkflowRunActionRepetitionDefinitionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionScopeRepetitionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionScopeRepetitionResource.cs new file mode 100644 index 0000000000000..3e18c122ddfcc --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionScopeRepetitionResource.cs @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A Class representing a WorkflowRunActionScopeRepetition along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetWorkflowRunActionScopeRepetitionResource method. + /// Otherwise you can get one from its parent resource using the GetWorkflowRunActionScopeRepetition method. + /// + public partial class WorkflowRunActionScopeRepetitionResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The name. + /// The workflowName. + /// The runName. + /// The actionName. + /// The repetitionName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, string repetitionName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/scopeRepetitions/{repetitionName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _workflowRunActionScopeRepetitionClientDiagnostics; + private readonly WorkflowRunActionScopeRepetitionsRestOperations _workflowRunActionScopeRepetitionRestClient; + private readonly WorkflowRunActionRepetitionDefinitionData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Web/sites/hostruntime/webhooks/api/workflows/runs/actions/scopeRepetitions"; + + /// Initializes a new instance of the class for mocking. + protected WorkflowRunActionScopeRepetitionResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal WorkflowRunActionScopeRepetitionResource(ArmClient client, WorkflowRunActionRepetitionDefinitionData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal WorkflowRunActionScopeRepetitionResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _workflowRunActionScopeRepetitionClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppService", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string workflowRunActionScopeRepetitionApiVersion); + _workflowRunActionScopeRepetitionRestClient = new WorkflowRunActionScopeRepetitionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, workflowRunActionScopeRepetitionApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual WorkflowRunActionRepetitionDefinitionData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get a workflow run action scoped repetition. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/scopeRepetitions/{repetitionName} + /// + /// + /// Operation Id + /// WorkflowRunActionScopeRepetitions_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _workflowRunActionScopeRepetitionClientDiagnostics.CreateScope("WorkflowRunActionScopeRepetitionResource.Get"); + scope.Start(); + try + { + var response = await _workflowRunActionScopeRepetitionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WorkflowRunActionScopeRepetitionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a workflow run action scoped repetition. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/scopeRepetitions/{repetitionName} + /// + /// + /// Operation Id + /// WorkflowRunActionScopeRepetitions_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _workflowRunActionScopeRepetitionClientDiagnostics.CreateScope("WorkflowRunActionScopeRepetitionResource.Get"); + scope.Start(); + try + { + var response = _workflowRunActionScopeRepetitionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WorkflowRunActionScopeRepetitionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunCollection.cs new file mode 100644 index 0000000000000..e3abf161a9422 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunCollection.cs @@ -0,0 +1,404 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetWorkflowRuns method from an instance of . + /// + public partial class WorkflowRunCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _workflowRunClientDiagnostics; + private readonly WorkflowRunsRestOperations _workflowRunRestClient; + private readonly string _workflowName; + + /// Initializes a new instance of the class for mocking. + protected WorkflowRunCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + /// The workflow name. + /// is null. + /// is an empty string, and was expected to be non-empty. + internal WorkflowRunCollection(ArmClient client, ResourceIdentifier id, string workflowName) : base(client, id) + { + _workflowName = workflowName; + _workflowRunClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppService", WorkflowRunResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(WorkflowRunResource.ResourceType, out string workflowRunApiVersion); + _workflowRunRestClient = new WorkflowRunsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, workflowRunApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != WebSiteResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, WebSiteResource.ResourceType), nameof(id)); + } + + /// + /// Gets a workflow run. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName} + /// + /// + /// Operation Id + /// WorkflowRuns_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow run name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string runName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + + using var scope = _workflowRunClientDiagnostics.CreateScope("WorkflowRunCollection.Get"); + scope.Start(); + try + { + var response = await _workflowRunRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, _workflowName, runName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WorkflowRunResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a workflow run. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName} + /// + /// + /// Operation Id + /// WorkflowRuns_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow run name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string runName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + + using var scope = _workflowRunClientDiagnostics.CreateScope("WorkflowRunCollection.Get"); + scope.Start(); + try + { + var response = _workflowRunRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, _workflowName, runName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WorkflowRunResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a list of workflow runs. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs + /// + /// + /// Operation Id + /// WorkflowRuns_List + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The number of items to be included in the result. + /// The filter to apply on the operation. Options for filters include: Status, StartTime, and ClientTrackingId. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(int? top = null, string filter = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _workflowRunRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, _workflowName, top, filter); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workflowRunRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, _workflowName, top, filter); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new WorkflowRunResource(Client, WorkflowRunData.DeserializeWorkflowRunData(e)), _workflowRunClientDiagnostics, Pipeline, "WorkflowRunCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Gets a list of workflow runs. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs + /// + /// + /// Operation Id + /// WorkflowRuns_List + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The number of items to be included in the result. + /// The filter to apply on the operation. Options for filters include: Status, StartTime, and ClientTrackingId. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(int? top = null, string filter = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _workflowRunRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, _workflowName, top, filter); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workflowRunRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, _workflowName, top, filter); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new WorkflowRunResource(Client, WorkflowRunData.DeserializeWorkflowRunData(e)), _workflowRunClientDiagnostics, Pipeline, "WorkflowRunCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName} + /// + /// + /// Operation Id + /// WorkflowRuns_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow run name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string runName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + + using var scope = _workflowRunClientDiagnostics.CreateScope("WorkflowRunCollection.Exists"); + scope.Start(); + try + { + var response = await _workflowRunRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, _workflowName, runName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName} + /// + /// + /// Operation Id + /// WorkflowRuns_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow run name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string runName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + + using var scope = _workflowRunClientDiagnostics.CreateScope("WorkflowRunCollection.Exists"); + scope.Start(); + try + { + var response = _workflowRunRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, _workflowName, runName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName} + /// + /// + /// Operation Id + /// WorkflowRuns_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow run name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string runName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + + using var scope = _workflowRunClientDiagnostics.CreateScope("WorkflowRunCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _workflowRunRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, _workflowName, runName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new WorkflowRunResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName} + /// + /// + /// Operation Id + /// WorkflowRuns_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow run name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string runName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + + using var scope = _workflowRunClientDiagnostics.CreateScope("WorkflowRunCollection.GetIfExists"); + scope.Start(); + try + { + var response = _workflowRunRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, _workflowName, runName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new WorkflowRunResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunData.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunData.Serialization.cs new file mode 100644 index 0000000000000..33bdf6e9035f0 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunData.Serialization.cs @@ -0,0 +1,671 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.AppService.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppService +{ + public partial class WorkflowRunData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowRunData)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (options.Format != "W") + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (options.Format != "W") + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W") + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(ResourceType); + } + if (options.Format != "W" && Optional.IsDefined(SystemData)) + { + writer.WritePropertyName("systemData"u8); + JsonSerializer.Serialize(writer, SystemData); + } + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsDefined(WaitEndOn)) + { + writer.WritePropertyName("waitEndTime"u8); + writer.WriteStringValue(WaitEndOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(StartOn)) + { + writer.WritePropertyName("startTime"u8); + writer.WriteStringValue(StartOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(EndOn)) + { + writer.WritePropertyName("endTime"u8); + writer.WriteStringValue(EndOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(Code)) + { + writer.WritePropertyName("code"u8); + writer.WriteStringValue(Code); + } + if (options.Format != "W" && Optional.IsDefined(Error)) + { + writer.WritePropertyName("error"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Error); +#else + using (JsonDocument document = JsonDocument.Parse(Error)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + if (options.Format != "W" && Optional.IsDefined(CorrelationId)) + { + writer.WritePropertyName("correlationId"u8); + writer.WriteStringValue(CorrelationId); + } + if (Optional.IsDefined(Correlation)) + { + writer.WritePropertyName("correlation"u8); + writer.WriteObjectValue(Correlation, options); + } + if (options.Format != "W" && Optional.IsDefined(Workflow)) + { + writer.WritePropertyName("workflow"u8); + writer.WriteObjectValue(Workflow, options); + } + if (options.Format != "W" && Optional.IsDefined(Trigger)) + { + writer.WritePropertyName("trigger"u8); + writer.WriteObjectValue(Trigger, options); + } + if (options.Format != "W" && Optional.IsCollectionDefined(Outputs)) + { + writer.WritePropertyName("outputs"u8); + writer.WriteStartObject(); + foreach (var item in Outputs) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } + if (options.Format != "W" && Optional.IsDefined(Response)) + { + writer.WritePropertyName("response"u8); + writer.WriteObjectValue(Response, options); + } + writer.WriteEndObject(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WorkflowRunData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowRunData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWorkflowRunData(document.RootElement, options); + } + + internal static WorkflowRunData DeserializeWorkflowRunData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + DateTimeOffset? waitEndTime = default; + DateTimeOffset? startTime = default; + DateTimeOffset? endTime = default; + WorkflowStatus? status = default; + string code = default; + BinaryData error = default; + string correlationId = default; + Correlation correlation = default; + WorkflowResourceReference workflow = default; + WorkflowRunTrigger trigger = default; + IReadOnlyDictionary outputs = default; + WorkflowRunTrigger response = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("waitEndTime"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + waitEndTime = property0.Value.GetDateTimeOffset("O"); + continue; + } + if (property0.NameEquals("startTime"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + startTime = property0.Value.GetDateTimeOffset("O"); + continue; + } + if (property0.NameEquals("endTime"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endTime = property0.Value.GetDateTimeOffset("O"); + continue; + } + if (property0.NameEquals("status"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = new WorkflowStatus(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("code"u8)) + { + code = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("error"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + error = BinaryData.FromString(property0.Value.GetRawText()); + continue; + } + if (property0.NameEquals("correlationId"u8)) + { + correlationId = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("correlation"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + correlation = Correlation.DeserializeCorrelation(property0.Value, options); + continue; + } + if (property0.NameEquals("workflow"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + workflow = WorkflowResourceReference.DeserializeWorkflowResourceReference(property0.Value, options); + continue; + } + if (property0.NameEquals("trigger"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + trigger = WorkflowRunTrigger.DeserializeWorkflowRunTrigger(property0.Value, options); + continue; + } + if (property0.NameEquals("outputs"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property1 in property0.Value.EnumerateObject()) + { + dictionary.Add(property1.Name, WorkflowOutputContent.DeserializeWorkflowOutputContent(property1.Value, options)); + } + outputs = dictionary; + continue; + } + if (property0.NameEquals("response"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + response = WorkflowRunTrigger.DeserializeWorkflowRunTrigger(property0.Value, options); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WorkflowRunData( + id, + name, + type, + systemData, + waitEndTime, + startTime, + endTime, + status, + code, + error, + correlationId, + correlation, + workflow, + trigger, + outputs ?? new ChangeTrackingDictionary(), + response, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(WaitEndOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" waitEndTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(WaitEndOn)) + { + builder.Append(" waitEndTime: "); + var formattedDateTimeString = TypeFormatters.ToString(WaitEndOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(StartOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" startTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(StartOn)) + { + builder.Append(" startTime: "); + var formattedDateTimeString = TypeFormatters.ToString(StartOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EndOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" endTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(EndOn)) + { + builder.Append(" endTime: "); + var formattedDateTimeString = TypeFormatters.ToString(EndOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Status), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" status: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Status)) + { + builder.Append(" status: "); + builder.AppendLine($"'{Status.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Code), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" code: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Code)) + { + builder.Append(" code: "); + if (Code.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Code}'''"); + } + else + { + builder.AppendLine($"'{Code}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Error), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" error: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Error)) + { + builder.Append(" error: "); + builder.AppendLine($"'{Error.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CorrelationId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" correlationId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CorrelationId)) + { + builder.Append(" correlationId: "); + if (CorrelationId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{CorrelationId}'''"); + } + else + { + builder.AppendLine($"'{CorrelationId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("CorrelationClientTrackingId", out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" correlation: "); + builder.AppendLine("{"); + builder.AppendLine(" correlation: {"); + builder.Append(" clientTrackingId: "); + builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); + builder.AppendLine(" }"); + } + else + { + if (Optional.IsDefined(Correlation)) + { + builder.Append(" correlation: "); + BicepSerializationHelpers.AppendChildObject(builder, Correlation, options, 4, false, " correlation: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Workflow), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" workflow: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Workflow)) + { + builder.Append(" workflow: "); + BicepSerializationHelpers.AppendChildObject(builder, Workflow, options, 4, false, " workflow: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Trigger), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" trigger: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Trigger)) + { + builder.Append(" trigger: "); + BicepSerializationHelpers.AppendChildObject(builder, Trigger, options, 4, false, " trigger: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Outputs), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" outputs: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Outputs)) + { + if (Outputs.Any()) + { + builder.Append(" outputs: "); + builder.AppendLine("{"); + foreach (var item in Outputs) + { + builder.Append($" '{item.Key}': "); + BicepSerializationHelpers.AppendChildObject(builder, item.Value, options, 6, false, " outputs: "); + } + builder.AppendLine(" }"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Response), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" response: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Response)) + { + builder.Append(" response: "); + BicepSerializationHelpers.AppendChildObject(builder, Response, options, 4, false, " response: "); + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WorkflowRunData)} does not support writing '{options.Format}' format."); + } + } + + WorkflowRunData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWorkflowRunData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WorkflowRunData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunData.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunData.cs new file mode 100644 index 0000000000000..5626e56b7fe8f --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunData.cs @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.AppService.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A class representing the WorkflowRun data model. + /// The workflow run. + /// + public partial class WorkflowRunData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal WorkflowRunData() + { + Outputs = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Gets the wait end time. + /// Gets the start time. + /// Gets the end time. + /// Gets the status. + /// Gets the code. + /// Gets the error. + /// Gets the correlation id. + /// The run correlation. + /// Gets the reference to workflow version. + /// Gets the fired trigger. + /// Gets the outputs. + /// Gets the response of the flow run. + /// Keeps track of any properties unknown to the library. + internal WorkflowRunData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DateTimeOffset? waitEndOn, DateTimeOffset? startOn, DateTimeOffset? endOn, WorkflowStatus? status, string code, BinaryData error, string correlationId, Correlation correlation, WorkflowResourceReference workflow, WorkflowRunTrigger trigger, IReadOnlyDictionary outputs, WorkflowRunTrigger response, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + WaitEndOn = waitEndOn; + StartOn = startOn; + EndOn = endOn; + Status = status; + Code = code; + Error = error; + CorrelationId = correlationId; + Correlation = correlation; + Workflow = workflow; + Trigger = trigger; + Outputs = outputs; + Response = response; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets the wait end time. + [WirePath("properties.waitEndTime")] + public DateTimeOffset? WaitEndOn { get; } + /// Gets the start time. + [WirePath("properties.startTime")] + public DateTimeOffset? StartOn { get; } + /// Gets the end time. + [WirePath("properties.endTime")] + public DateTimeOffset? EndOn { get; } + /// Gets the status. + [WirePath("properties.status")] + public WorkflowStatus? Status { get; } + /// Gets the code. + [WirePath("properties.code")] + public string Code { get; } + /// + /// Gets the error. + /// + /// To assign an object to this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + [WirePath("properties.error")] + public BinaryData Error { get; } + /// Gets the correlation id. + [WirePath("properties.correlationId")] + public string CorrelationId { get; } + /// The run correlation. + internal Correlation Correlation { get; } + /// The client tracking id. + [WirePath("properties.correlation.clientTrackingId")] + public string CorrelationClientTrackingId + { + get => Correlation?.ClientTrackingId; + } + + /// Gets the reference to workflow version. + [WirePath("properties.workflow")] + public WorkflowResourceReference Workflow { get; } + /// Gets the fired trigger. + [WirePath("properties.trigger")] + public WorkflowRunTrigger Trigger { get; } + /// Gets the outputs. + [WirePath("properties.outputs")] + public IReadOnlyDictionary Outputs { get; } + /// Gets the response of the flow run. + [WirePath("properties.response")] + public WorkflowRunTrigger Response { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunResource.Serialization.cs new file mode 100644 index 0000000000000..60b4967ae0adc --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.AppService +{ + public partial class WorkflowRunResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + WorkflowRunData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + WorkflowRunData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunResource.cs new file mode 100644 index 0000000000000..9b40ee2f0c27c --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunResource.cs @@ -0,0 +1,317 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A Class representing a WorkflowRun along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetWorkflowRunResource method. + /// Otherwise you can get one from its parent resource using the GetWorkflowRun method. + /// + public partial class WorkflowRunResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The name. + /// The workflowName. + /// The runName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _workflowRunClientDiagnostics; + private readonly WorkflowRunsRestOperations _workflowRunRestClient; + private readonly WorkflowRunData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Web/sites/hostruntime/webhooks/api/workflows/runs"; + + /// Initializes a new instance of the class for mocking. + protected WorkflowRunResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal WorkflowRunResource(ArmClient client, WorkflowRunData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal WorkflowRunResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _workflowRunClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppService", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string workflowRunApiVersion); + _workflowRunRestClient = new WorkflowRunsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, workflowRunApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual WorkflowRunData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// Gets a collection of WorkflowRunActionResources in the WorkflowRun. + /// An object representing collection of WorkflowRunActionResources and their operations over a WorkflowRunActionResource. + public virtual WorkflowRunActionCollection GetWorkflowRunActions() + { + return GetCachedClient(client => new WorkflowRunActionCollection(client, Id)); + } + + /// + /// Gets a workflow run action. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName} + /// + /// + /// Operation Id + /// WorkflowRunActions_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow action name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetWorkflowRunActionAsync(string actionName, CancellationToken cancellationToken = default) + { + return await GetWorkflowRunActions().GetAsync(actionName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets a workflow run action. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName} + /// + /// + /// Operation Id + /// WorkflowRunActions_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow action name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetWorkflowRunAction(string actionName, CancellationToken cancellationToken = default) + { + return GetWorkflowRunActions().Get(actionName, cancellationToken); + } + + /// + /// Gets a workflow run. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName} + /// + /// + /// Operation Id + /// WorkflowRuns_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _workflowRunClientDiagnostics.CreateScope("WorkflowRunResource.Get"); + scope.Start(); + try + { + var response = await _workflowRunRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WorkflowRunResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a workflow run. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName} + /// + /// + /// Operation Id + /// WorkflowRuns_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _workflowRunClientDiagnostics.CreateScope("WorkflowRunResource.Get"); + scope.Start(); + try + { + var response = _workflowRunRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WorkflowRunResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Cancels a workflow run. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/cancel + /// + /// + /// Operation Id + /// WorkflowRuns_Cancel + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task CancelAsync(CancellationToken cancellationToken = default) + { + using var scope = _workflowRunClientDiagnostics.CreateScope("WorkflowRunResource.Cancel"); + scope.Start(); + try + { + var response = await _workflowRunRestClient.CancelAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Cancels a workflow run. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/cancel + /// + /// + /// Operation Id + /// WorkflowRuns_Cancel + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Cancel(CancellationToken cancellationToken = default) + { + using var scope = _workflowRunClientDiagnostics.CreateScope("WorkflowRunResource.Cancel"); + scope.Start(); + try + { + var response = _workflowRunRestClient.Cancel(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowTriggerCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowTriggerCollection.cs new file mode 100644 index 0000000000000..ada54dff1f98b --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowTriggerCollection.cs @@ -0,0 +1,404 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetWorkflowTriggers method from an instance of . + /// + public partial class WorkflowTriggerCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _workflowTriggerClientDiagnostics; + private readonly WorkflowTriggersRestOperations _workflowTriggerRestClient; + private readonly string _workflowName; + + /// Initializes a new instance of the class for mocking. + protected WorkflowTriggerCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + /// The workflow name. + /// is null. + /// is an empty string, and was expected to be non-empty. + internal WorkflowTriggerCollection(ArmClient client, ResourceIdentifier id, string workflowName) : base(client, id) + { + _workflowName = workflowName; + _workflowTriggerClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppService", WorkflowTriggerResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(WorkflowTriggerResource.ResourceType, out string workflowTriggerApiVersion); + _workflowTriggerRestClient = new WorkflowTriggersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, workflowTriggerApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != WebSiteResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, WebSiteResource.ResourceType), nameof(id)); + } + + /// + /// Gets a workflow trigger. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName} + /// + /// + /// Operation Id + /// WorkflowTriggers_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow trigger name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string triggerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(triggerName, nameof(triggerName)); + + using var scope = _workflowTriggerClientDiagnostics.CreateScope("WorkflowTriggerCollection.Get"); + scope.Start(); + try + { + var response = await _workflowTriggerRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, _workflowName, triggerName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WorkflowTriggerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a workflow trigger. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName} + /// + /// + /// Operation Id + /// WorkflowTriggers_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow trigger name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string triggerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(triggerName, nameof(triggerName)); + + using var scope = _workflowTriggerClientDiagnostics.CreateScope("WorkflowTriggerCollection.Get"); + scope.Start(); + try + { + var response = _workflowTriggerRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, _workflowName, triggerName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WorkflowTriggerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a list of workflow triggers. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers + /// + /// + /// Operation Id + /// WorkflowTriggers_List + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The number of items to be included in the result. + /// The filter to apply on the operation. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(int? top = null, string filter = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _workflowTriggerRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, _workflowName, top, filter); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workflowTriggerRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, _workflowName, top, filter); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new WorkflowTriggerResource(Client, WorkflowTriggerData.DeserializeWorkflowTriggerData(e)), _workflowTriggerClientDiagnostics, Pipeline, "WorkflowTriggerCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Gets a list of workflow triggers. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers + /// + /// + /// Operation Id + /// WorkflowTriggers_List + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The number of items to be included in the result. + /// The filter to apply on the operation. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(int? top = null, string filter = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _workflowTriggerRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, _workflowName, top, filter); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workflowTriggerRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, _workflowName, top, filter); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new WorkflowTriggerResource(Client, WorkflowTriggerData.DeserializeWorkflowTriggerData(e)), _workflowTriggerClientDiagnostics, Pipeline, "WorkflowTriggerCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName} + /// + /// + /// Operation Id + /// WorkflowTriggers_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow trigger name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string triggerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(triggerName, nameof(triggerName)); + + using var scope = _workflowTriggerClientDiagnostics.CreateScope("WorkflowTriggerCollection.Exists"); + scope.Start(); + try + { + var response = await _workflowTriggerRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, _workflowName, triggerName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName} + /// + /// + /// Operation Id + /// WorkflowTriggers_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow trigger name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string triggerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(triggerName, nameof(triggerName)); + + using var scope = _workflowTriggerClientDiagnostics.CreateScope("WorkflowTriggerCollection.Exists"); + scope.Start(); + try + { + var response = _workflowTriggerRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, _workflowName, triggerName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName} + /// + /// + /// Operation Id + /// WorkflowTriggers_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow trigger name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string triggerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(triggerName, nameof(triggerName)); + + using var scope = _workflowTriggerClientDiagnostics.CreateScope("WorkflowTriggerCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _workflowTriggerRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, _workflowName, triggerName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new WorkflowTriggerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName} + /// + /// + /// Operation Id + /// WorkflowTriggers_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow trigger name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string triggerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(triggerName, nameof(triggerName)); + + using var scope = _workflowTriggerClientDiagnostics.CreateScope("WorkflowTriggerCollection.GetIfExists"); + scope.Start(); + try + { + var response = _workflowTriggerRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, _workflowName, triggerName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new WorkflowTriggerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowTriggerData.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowTriggerData.Serialization.cs new file mode 100644 index 0000000000000..389d0863840b2 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowTriggerData.Serialization.cs @@ -0,0 +1,538 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.AppService.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppService +{ + public partial class WorkflowTriggerData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowTriggerData)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (options.Format != "W") + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (options.Format != "W") + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W") + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(ResourceType); + } + if (options.Format != "W" && Optional.IsDefined(SystemData)) + { + writer.WritePropertyName("systemData"u8); + JsonSerializer.Serialize(writer, SystemData); + } + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(CreatedOn)) + { + writer.WritePropertyName("createdTime"u8); + writer.WriteStringValue(CreatedOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(ChangedOn)) + { + writer.WritePropertyName("changedTime"u8); + writer.WriteStringValue(ChangedOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(LastExecutionOn)) + { + writer.WritePropertyName("lastExecutionTime"u8); + writer.WriteStringValue(LastExecutionOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(NextExecutionOn)) + { + writer.WritePropertyName("nextExecutionTime"u8); + writer.WriteStringValue(NextExecutionOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(Recurrence)) + { + writer.WritePropertyName("recurrence"u8); + writer.WriteObjectValue(Recurrence, options); + } + if (options.Format != "W" && Optional.IsDefined(Workflow)) + { + writer.WritePropertyName("workflow"u8); + writer.WriteObjectValue(Workflow, options); + } + writer.WriteEndObject(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WorkflowTriggerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowTriggerData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWorkflowTriggerData(document.RootElement, options); + } + + internal static WorkflowTriggerData DeserializeWorkflowTriggerData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + WorkflowTriggerProvisioningState? provisioningState = default; + DateTimeOffset? createdTime = default; + DateTimeOffset? changedTime = default; + WorkflowState? state = default; + WorkflowStatus? status = default; + DateTimeOffset? lastExecutionTime = default; + DateTimeOffset? nextExecutionTime = default; + WorkflowTriggerRecurrence recurrence = default; + WorkflowResourceReference workflow = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("provisioningState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new WorkflowTriggerProvisioningState(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("createdTime"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + createdTime = property0.Value.GetDateTimeOffset("O"); + continue; + } + if (property0.NameEquals("changedTime"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + changedTime = property0.Value.GetDateTimeOffset("O"); + continue; + } + if (property0.NameEquals("state"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + state = new WorkflowState(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("status"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = new WorkflowStatus(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("lastExecutionTime"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lastExecutionTime = property0.Value.GetDateTimeOffset("O"); + continue; + } + if (property0.NameEquals("nextExecutionTime"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextExecutionTime = property0.Value.GetDateTimeOffset("O"); + continue; + } + if (property0.NameEquals("recurrence"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + recurrence = WorkflowTriggerRecurrence.DeserializeWorkflowTriggerRecurrence(property0.Value, options); + continue; + } + if (property0.NameEquals("workflow"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + workflow = WorkflowResourceReference.DeserializeWorkflowResourceReference(property0.Value, options); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WorkflowTriggerData( + id, + name, + type, + systemData, + provisioningState, + createdTime, + changedTime, + state, + status, + lastExecutionTime, + nextExecutionTime, + recurrence, + workflow, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProvisioningState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" provisioningState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ProvisioningState)) + { + builder.Append(" provisioningState: "); + builder.AppendLine($"'{ProvisioningState.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CreatedOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" createdTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CreatedOn)) + { + builder.Append(" createdTime: "); + var formattedDateTimeString = TypeFormatters.ToString(CreatedOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ChangedOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" changedTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ChangedOn)) + { + builder.Append(" changedTime: "); + var formattedDateTimeString = TypeFormatters.ToString(ChangedOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(State), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" state: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(State)) + { + builder.Append(" state: "); + builder.AppendLine($"'{State.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Status), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" status: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Status)) + { + builder.Append(" status: "); + builder.AppendLine($"'{Status.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(LastExecutionOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" lastExecutionTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(LastExecutionOn)) + { + builder.Append(" lastExecutionTime: "); + var formattedDateTimeString = TypeFormatters.ToString(LastExecutionOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextExecutionOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextExecutionTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextExecutionOn)) + { + builder.Append(" nextExecutionTime: "); + var formattedDateTimeString = TypeFormatters.ToString(NextExecutionOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Recurrence), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" recurrence: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Recurrence)) + { + builder.Append(" recurrence: "); + BicepSerializationHelpers.AppendChildObject(builder, Recurrence, options, 4, false, " recurrence: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Workflow), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" workflow: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Workflow)) + { + builder.Append(" workflow: "); + BicepSerializationHelpers.AppendChildObject(builder, Workflow, options, 4, false, " workflow: "); + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WorkflowTriggerData)} does not support writing '{options.Format}' format."); + } + } + + WorkflowTriggerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWorkflowTriggerData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WorkflowTriggerData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowTriggerData.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowTriggerData.cs new file mode 100644 index 0000000000000..7190ba888b7a7 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowTriggerData.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.AppService.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A class representing the WorkflowTrigger data model. + /// The workflow trigger. + /// + public partial class WorkflowTriggerData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal WorkflowTriggerData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Gets the provisioning state. + /// Gets the created time. + /// Gets the changed time. + /// Gets the state. + /// Gets the status. + /// Gets the last execution time. + /// Gets the next execution time. + /// Gets the workflow trigger recurrence. + /// Gets the reference to workflow. + /// Keeps track of any properties unknown to the library. + internal WorkflowTriggerData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, WorkflowTriggerProvisioningState? provisioningState, DateTimeOffset? createdOn, DateTimeOffset? changedOn, WorkflowState? state, WorkflowStatus? status, DateTimeOffset? lastExecutionOn, DateTimeOffset? nextExecutionOn, WorkflowTriggerRecurrence recurrence, WorkflowResourceReference workflow, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + ProvisioningState = provisioningState; + CreatedOn = createdOn; + ChangedOn = changedOn; + State = state; + Status = status; + LastExecutionOn = lastExecutionOn; + NextExecutionOn = nextExecutionOn; + Recurrence = recurrence; + Workflow = workflow; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets the provisioning state. + [WirePath("properties.provisioningState")] + public WorkflowTriggerProvisioningState? ProvisioningState { get; } + /// Gets the created time. + [WirePath("properties.createdTime")] + public DateTimeOffset? CreatedOn { get; } + /// Gets the changed time. + [WirePath("properties.changedTime")] + public DateTimeOffset? ChangedOn { get; } + /// Gets the state. + [WirePath("properties.state")] + public WorkflowState? State { get; } + /// Gets the status. + [WirePath("properties.status")] + public WorkflowStatus? Status { get; } + /// Gets the last execution time. + [WirePath("properties.lastExecutionTime")] + public DateTimeOffset? LastExecutionOn { get; } + /// Gets the next execution time. + [WirePath("properties.nextExecutionTime")] + public DateTimeOffset? NextExecutionOn { get; } + /// Gets the workflow trigger recurrence. + [WirePath("properties.recurrence")] + public WorkflowTriggerRecurrence Recurrence { get; } + /// Gets the reference to workflow. + [WirePath("properties.workflow")] + public WorkflowResourceReference Workflow { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowTriggerHistoryCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowTriggerHistoryCollection.cs new file mode 100644 index 0000000000000..240a1e91a3cdc --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowTriggerHistoryCollection.cs @@ -0,0 +1,399 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetWorkflowTriggerHistories method from an instance of . + /// + public partial class WorkflowTriggerHistoryCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _workflowTriggerHistoryClientDiagnostics; + private readonly WorkflowTriggerHistoriesRestOperations _workflowTriggerHistoryRestClient; + + /// Initializes a new instance of the class for mocking. + protected WorkflowTriggerHistoryCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal WorkflowTriggerHistoryCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _workflowTriggerHistoryClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppService", WorkflowTriggerHistoryResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(WorkflowTriggerHistoryResource.ResourceType, out string workflowTriggerHistoryApiVersion); + _workflowTriggerHistoryRestClient = new WorkflowTriggerHistoriesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, workflowTriggerHistoryApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != WorkflowTriggerResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, WorkflowTriggerResource.ResourceType), nameof(id)); + } + + /// + /// Gets a workflow trigger history. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName}/histories/{historyName} + /// + /// + /// Operation Id + /// WorkflowTriggerHistories_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow trigger history name. Corresponds to the run name for triggers that resulted in a run. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string historyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(historyName, nameof(historyName)); + + using var scope = _workflowTriggerHistoryClientDiagnostics.CreateScope("WorkflowTriggerHistoryCollection.Get"); + scope.Start(); + try + { + var response = await _workflowTriggerHistoryRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Name, Id.Name, historyName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WorkflowTriggerHistoryResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a workflow trigger history. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName}/histories/{historyName} + /// + /// + /// Operation Id + /// WorkflowTriggerHistories_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow trigger history name. Corresponds to the run name for triggers that resulted in a run. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string historyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(historyName, nameof(historyName)); + + using var scope = _workflowTriggerHistoryClientDiagnostics.CreateScope("WorkflowTriggerHistoryCollection.Get"); + scope.Start(); + try + { + var response = _workflowTriggerHistoryRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Name, Id.Name, historyName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WorkflowTriggerHistoryResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a list of workflow trigger histories. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName}/histories + /// + /// + /// Operation Id + /// WorkflowTriggerHistories_List + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The number of items to be included in the result. + /// The filter to apply on the operation. Options for filters include: Status, StartTime, and ClientTrackingId. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(int? top = null, string filter = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _workflowTriggerHistoryRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Name, Id.Name, top, filter); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workflowTriggerHistoryRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Name, Id.Name, top, filter); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new WorkflowTriggerHistoryResource(Client, WorkflowTriggerHistoryData.DeserializeWorkflowTriggerHistoryData(e)), _workflowTriggerHistoryClientDiagnostics, Pipeline, "WorkflowTriggerHistoryCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Gets a list of workflow trigger histories. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName}/histories + /// + /// + /// Operation Id + /// WorkflowTriggerHistories_List + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The number of items to be included in the result. + /// The filter to apply on the operation. Options for filters include: Status, StartTime, and ClientTrackingId. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(int? top = null, string filter = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _workflowTriggerHistoryRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Name, Id.Name, top, filter); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workflowTriggerHistoryRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Name, Id.Name, top, filter); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new WorkflowTriggerHistoryResource(Client, WorkflowTriggerHistoryData.DeserializeWorkflowTriggerHistoryData(e)), _workflowTriggerHistoryClientDiagnostics, Pipeline, "WorkflowTriggerHistoryCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName}/histories/{historyName} + /// + /// + /// Operation Id + /// WorkflowTriggerHistories_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow trigger history name. Corresponds to the run name for triggers that resulted in a run. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string historyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(historyName, nameof(historyName)); + + using var scope = _workflowTriggerHistoryClientDiagnostics.CreateScope("WorkflowTriggerHistoryCollection.Exists"); + scope.Start(); + try + { + var response = await _workflowTriggerHistoryRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Name, Id.Name, historyName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName}/histories/{historyName} + /// + /// + /// Operation Id + /// WorkflowTriggerHistories_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow trigger history name. Corresponds to the run name for triggers that resulted in a run. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string historyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(historyName, nameof(historyName)); + + using var scope = _workflowTriggerHistoryClientDiagnostics.CreateScope("WorkflowTriggerHistoryCollection.Exists"); + scope.Start(); + try + { + var response = _workflowTriggerHistoryRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Name, Id.Name, historyName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName}/histories/{historyName} + /// + /// + /// Operation Id + /// WorkflowTriggerHistories_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow trigger history name. Corresponds to the run name for triggers that resulted in a run. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string historyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(historyName, nameof(historyName)); + + using var scope = _workflowTriggerHistoryClientDiagnostics.CreateScope("WorkflowTriggerHistoryCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _workflowTriggerHistoryRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Name, Id.Name, historyName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new WorkflowTriggerHistoryResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName}/histories/{historyName} + /// + /// + /// Operation Id + /// WorkflowTriggerHistories_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow trigger history name. Corresponds to the run name for triggers that resulted in a run. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string historyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(historyName, nameof(historyName)); + + using var scope = _workflowTriggerHistoryClientDiagnostics.CreateScope("WorkflowTriggerHistoryCollection.GetIfExists"); + scope.Start(); + try + { + var response = _workflowTriggerHistoryRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Name, Id.Name, historyName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new WorkflowTriggerHistoryResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowTriggerHistoryData.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowTriggerHistoryData.Serialization.cs new file mode 100644 index 0000000000000..0ae8a6732f36b --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowTriggerHistoryData.Serialization.cs @@ -0,0 +1,651 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.AppService.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppService +{ + public partial class WorkflowTriggerHistoryData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowTriggerHistoryData)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (options.Format != "W") + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (options.Format != "W") + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W") + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(ResourceType); + } + if (options.Format != "W" && Optional.IsDefined(SystemData)) + { + writer.WritePropertyName("systemData"u8); + JsonSerializer.Serialize(writer, SystemData); + } + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsDefined(StartOn)) + { + writer.WritePropertyName("startTime"u8); + writer.WriteStringValue(StartOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(EndOn)) + { + writer.WritePropertyName("endTime"u8); + writer.WriteStringValue(EndOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(ScheduledOn)) + { + writer.WritePropertyName("scheduledTime"u8); + writer.WriteStringValue(ScheduledOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(Code)) + { + writer.WritePropertyName("code"u8); + writer.WriteStringValue(Code); + } + if (options.Format != "W" && Optional.IsDefined(Error)) + { + writer.WritePropertyName("error"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Error); +#else + using (JsonDocument document = JsonDocument.Parse(Error)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + if (options.Format != "W" && Optional.IsDefined(TrackingId)) + { + writer.WritePropertyName("trackingId"u8); + writer.WriteStringValue(TrackingId); + } + if (Optional.IsDefined(Correlation)) + { + writer.WritePropertyName("correlation"u8); + writer.WriteObjectValue(Correlation, options); + } + if (options.Format != "W" && Optional.IsDefined(InputsLink)) + { + writer.WritePropertyName("inputsLink"u8); + writer.WriteObjectValue(InputsLink, options); + } + if (options.Format != "W" && Optional.IsDefined(OutputsLink)) + { + writer.WritePropertyName("outputsLink"u8); + writer.WriteObjectValue(OutputsLink, options); + } + if (options.Format != "W" && Optional.IsDefined(IsFired)) + { + writer.WritePropertyName("fired"u8); + writer.WriteBooleanValue(IsFired.Value); + } + if (options.Format != "W" && Optional.IsDefined(Run)) + { + writer.WritePropertyName("run"u8); + writer.WriteObjectValue(Run, options); + } + writer.WriteEndObject(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WorkflowTriggerHistoryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowTriggerHistoryData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWorkflowTriggerHistoryData(document.RootElement, options); + } + + internal static WorkflowTriggerHistoryData DeserializeWorkflowTriggerHistoryData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + DateTimeOffset? startTime = default; + DateTimeOffset? endTime = default; + DateTimeOffset? scheduledTime = default; + WorkflowStatus? status = default; + string code = default; + BinaryData error = default; + string trackingId = default; + Correlation correlation = default; + WebAppContentLink inputsLink = default; + WebAppContentLink outputsLink = default; + bool? fired = default; + WorkflowResourceReference run = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("startTime"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + startTime = property0.Value.GetDateTimeOffset("O"); + continue; + } + if (property0.NameEquals("endTime"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endTime = property0.Value.GetDateTimeOffset("O"); + continue; + } + if (property0.NameEquals("scheduledTime"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + scheduledTime = property0.Value.GetDateTimeOffset("O"); + continue; + } + if (property0.NameEquals("status"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = new WorkflowStatus(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("code"u8)) + { + code = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("error"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + error = BinaryData.FromString(property0.Value.GetRawText()); + continue; + } + if (property0.NameEquals("trackingId"u8)) + { + trackingId = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("correlation"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + correlation = Correlation.DeserializeCorrelation(property0.Value, options); + continue; + } + if (property0.NameEquals("inputsLink"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + inputsLink = WebAppContentLink.DeserializeWebAppContentLink(property0.Value, options); + continue; + } + if (property0.NameEquals("outputsLink"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + outputsLink = WebAppContentLink.DeserializeWebAppContentLink(property0.Value, options); + continue; + } + if (property0.NameEquals("fired"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + fired = property0.Value.GetBoolean(); + continue; + } + if (property0.NameEquals("run"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + run = WorkflowResourceReference.DeserializeWorkflowResourceReference(property0.Value, options); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WorkflowTriggerHistoryData( + id, + name, + type, + systemData, + startTime, + endTime, + scheduledTime, + status, + code, + error, + trackingId, + correlation, + inputsLink, + outputsLink, + fired, + run, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(StartOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" startTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(StartOn)) + { + builder.Append(" startTime: "); + var formattedDateTimeString = TypeFormatters.ToString(StartOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EndOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" endTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(EndOn)) + { + builder.Append(" endTime: "); + var formattedDateTimeString = TypeFormatters.ToString(EndOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ScheduledOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" scheduledTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ScheduledOn)) + { + builder.Append(" scheduledTime: "); + var formattedDateTimeString = TypeFormatters.ToString(ScheduledOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Status), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" status: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Status)) + { + builder.Append(" status: "); + builder.AppendLine($"'{Status.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Code), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" code: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Code)) + { + builder.Append(" code: "); + if (Code.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Code}'''"); + } + else + { + builder.AppendLine($"'{Code}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Error), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" error: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Error)) + { + builder.Append(" error: "); + builder.AppendLine($"'{Error.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TrackingId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" trackingId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TrackingId)) + { + builder.Append(" trackingId: "); + if (TrackingId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{TrackingId}'''"); + } + else + { + builder.AppendLine($"'{TrackingId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("CorrelationClientTrackingId", out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" correlation: "); + builder.AppendLine("{"); + builder.AppendLine(" correlation: {"); + builder.Append(" clientTrackingId: "); + builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); + builder.AppendLine(" }"); + } + else + { + if (Optional.IsDefined(Correlation)) + { + builder.Append(" correlation: "); + BicepSerializationHelpers.AppendChildObject(builder, Correlation, options, 4, false, " correlation: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(InputsLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" inputsLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(InputsLink)) + { + builder.Append(" inputsLink: "); + BicepSerializationHelpers.AppendChildObject(builder, InputsLink, options, 4, false, " inputsLink: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(OutputsLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" outputsLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(OutputsLink)) + { + builder.Append(" outputsLink: "); + BicepSerializationHelpers.AppendChildObject(builder, OutputsLink, options, 4, false, " outputsLink: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsFired), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" fired: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsFired)) + { + builder.Append(" fired: "); + var boolValue = IsFired.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Run), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" run: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Run)) + { + builder.Append(" run: "); + BicepSerializationHelpers.AppendChildObject(builder, Run, options, 4, false, " run: "); + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WorkflowTriggerHistoryData)} does not support writing '{options.Format}' format."); + } + } + + WorkflowTriggerHistoryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWorkflowTriggerHistoryData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WorkflowTriggerHistoryData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowTriggerHistoryData.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowTriggerHistoryData.cs new file mode 100644 index 0000000000000..9136530ceaa0a --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowTriggerHistoryData.cs @@ -0,0 +1,166 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.AppService.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A class representing the WorkflowTriggerHistory data model. + /// The workflow trigger history. + /// + public partial class WorkflowTriggerHistoryData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal WorkflowTriggerHistoryData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Gets the start time. + /// Gets the end time. + /// The scheduled time. + /// Gets the status. + /// Gets the code. + /// Gets the error. + /// Gets the tracking id. + /// The run correlation. + /// Gets the link to input parameters. + /// Gets the link to output parameters. + /// The value indicating whether trigger was fired. + /// Gets the reference to workflow run. + /// Keeps track of any properties unknown to the library. + internal WorkflowTriggerHistoryData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DateTimeOffset? startOn, DateTimeOffset? endOn, DateTimeOffset? scheduledOn, WorkflowStatus? status, string code, BinaryData error, string trackingId, Correlation correlation, WebAppContentLink inputsLink, WebAppContentLink outputsLink, bool? isFired, WorkflowResourceReference run, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + StartOn = startOn; + EndOn = endOn; + ScheduledOn = scheduledOn; + Status = status; + Code = code; + Error = error; + TrackingId = trackingId; + Correlation = correlation; + InputsLink = inputsLink; + OutputsLink = outputsLink; + IsFired = isFired; + Run = run; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets the start time. + [WirePath("properties.startTime")] + public DateTimeOffset? StartOn { get; } + /// Gets the end time. + [WirePath("properties.endTime")] + public DateTimeOffset? EndOn { get; } + /// The scheduled time. + [WirePath("properties.scheduledTime")] + public DateTimeOffset? ScheduledOn { get; } + /// Gets the status. + [WirePath("properties.status")] + public WorkflowStatus? Status { get; } + /// Gets the code. + [WirePath("properties.code")] + public string Code { get; } + /// + /// Gets the error. + /// + /// To assign an object to this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + [WirePath("properties.error")] + public BinaryData Error { get; } + /// Gets the tracking id. + [WirePath("properties.trackingId")] + public string TrackingId { get; } + /// The run correlation. + internal Correlation Correlation { get; } + /// The client tracking id. + [WirePath("properties.correlation.clientTrackingId")] + public string CorrelationClientTrackingId + { + get => Correlation?.ClientTrackingId; + } + + /// Gets the link to input parameters. + [WirePath("properties.inputsLink")] + public WebAppContentLink InputsLink { get; } + /// Gets the link to output parameters. + [WirePath("properties.outputsLink")] + public WebAppContentLink OutputsLink { get; } + /// The value indicating whether trigger was fired. + [WirePath("properties.fired")] + public bool? IsFired { get; } + /// Gets the reference to workflow run. + [WirePath("properties.run")] + public WorkflowResourceReference Run { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowTriggerHistoryResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowTriggerHistoryResource.Serialization.cs new file mode 100644 index 0000000000000..b5fd4a7cc8141 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowTriggerHistoryResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.AppService +{ + public partial class WorkflowTriggerHistoryResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + WorkflowTriggerHistoryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + WorkflowTriggerHistoryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowTriggerHistoryResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowTriggerHistoryResource.cs new file mode 100644 index 0000000000000..6c6e1e0d099d0 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowTriggerHistoryResource.cs @@ -0,0 +1,257 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A Class representing a WorkflowTriggerHistory along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetWorkflowTriggerHistoryResource method. + /// Otherwise you can get one from its parent resource using the GetWorkflowTriggerHistory method. + /// + public partial class WorkflowTriggerHistoryResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The name. + /// The workflowName. + /// The triggerName. + /// The historyName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name, string workflowName, string triggerName, string historyName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName}/histories/{historyName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _workflowTriggerHistoryClientDiagnostics; + private readonly WorkflowTriggerHistoriesRestOperations _workflowTriggerHistoryRestClient; + private readonly WorkflowTriggerHistoryData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Web/sites/hostruntime/webhooks/api/workflows/triggers/histories"; + + /// Initializes a new instance of the class for mocking. + protected WorkflowTriggerHistoryResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal WorkflowTriggerHistoryResource(ArmClient client, WorkflowTriggerHistoryData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal WorkflowTriggerHistoryResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _workflowTriggerHistoryClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppService", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string workflowTriggerHistoryApiVersion); + _workflowTriggerHistoryRestClient = new WorkflowTriggerHistoriesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, workflowTriggerHistoryApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual WorkflowTriggerHistoryData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Gets a workflow trigger history. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName}/histories/{historyName} + /// + /// + /// Operation Id + /// WorkflowTriggerHistories_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _workflowTriggerHistoryClientDiagnostics.CreateScope("WorkflowTriggerHistoryResource.Get"); + scope.Start(); + try + { + var response = await _workflowTriggerHistoryRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WorkflowTriggerHistoryResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a workflow trigger history. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName}/histories/{historyName} + /// + /// + /// Operation Id + /// WorkflowTriggerHistories_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _workflowTriggerHistoryClientDiagnostics.CreateScope("WorkflowTriggerHistoryResource.Get"); + scope.Start(); + try + { + var response = _workflowTriggerHistoryRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WorkflowTriggerHistoryResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Resubmits a workflow run based on the trigger history. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName}/histories/{historyName}/resubmit + /// + /// + /// Operation Id + /// WorkflowTriggerHistories_Resubmit + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task ResubmitAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _workflowTriggerHistoryClientDiagnostics.CreateScope("WorkflowTriggerHistoryResource.Resubmit"); + scope.Start(); + try + { + var response = await _workflowTriggerHistoryRestClient.ResubmitAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new AppServiceArmOperation(_workflowTriggerHistoryClientDiagnostics, Pipeline, _workflowTriggerHistoryRestClient.CreateResubmitRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Resubmits a workflow run based on the trigger history. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName}/histories/{historyName}/resubmit + /// + /// + /// Operation Id + /// WorkflowTriggerHistories_Resubmit + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Resubmit(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _workflowTriggerHistoryClientDiagnostics.CreateScope("WorkflowTriggerHistoryResource.Resubmit"); + scope.Start(); + try + { + var response = _workflowTriggerHistoryRestClient.Resubmit(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new AppServiceArmOperation(_workflowTriggerHistoryClientDiagnostics, Pipeline, _workflowTriggerHistoryRestClient.CreateResubmitRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowTriggerResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowTriggerResource.Serialization.cs new file mode 100644 index 0000000000000..ec3adee605fa2 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowTriggerResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.AppService +{ + public partial class WorkflowTriggerResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + WorkflowTriggerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + WorkflowTriggerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowTriggerResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowTriggerResource.cs new file mode 100644 index 0000000000000..ea142cf1f17f8 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowTriggerResource.cs @@ -0,0 +1,478 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A Class representing a WorkflowTrigger along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetWorkflowTriggerResource method. + /// Otherwise you can get one from its parent resource using the GetWorkflowTrigger method. + /// + public partial class WorkflowTriggerResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The name. + /// The workflowName. + /// The triggerName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name, string workflowName, string triggerName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _workflowTriggerClientDiagnostics; + private readonly WorkflowTriggersRestOperations _workflowTriggerRestClient; + private readonly WorkflowTriggerData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Web/sites/hostruntime/webhooks/api/workflows/triggers"; + + /// Initializes a new instance of the class for mocking. + protected WorkflowTriggerResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal WorkflowTriggerResource(ArmClient client, WorkflowTriggerData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal WorkflowTriggerResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _workflowTriggerClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppService", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string workflowTriggerApiVersion); + _workflowTriggerRestClient = new WorkflowTriggersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, workflowTriggerApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual WorkflowTriggerData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// Gets a collection of WorkflowTriggerHistoryResources in the WorkflowTrigger. + /// An object representing collection of WorkflowTriggerHistoryResources and their operations over a WorkflowTriggerHistoryResource. + public virtual WorkflowTriggerHistoryCollection GetWorkflowTriggerHistories() + { + return GetCachedClient(client => new WorkflowTriggerHistoryCollection(client, Id)); + } + + /// + /// Gets a workflow trigger history. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName}/histories/{historyName} + /// + /// + /// Operation Id + /// WorkflowTriggerHistories_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow trigger history name. Corresponds to the run name for triggers that resulted in a run. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetWorkflowTriggerHistoryAsync(string historyName, CancellationToken cancellationToken = default) + { + return await GetWorkflowTriggerHistories().GetAsync(historyName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets a workflow trigger history. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName}/histories/{historyName} + /// + /// + /// Operation Id + /// WorkflowTriggerHistories_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow trigger history name. Corresponds to the run name for triggers that resulted in a run. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetWorkflowTriggerHistory(string historyName, CancellationToken cancellationToken = default) + { + return GetWorkflowTriggerHistories().Get(historyName, cancellationToken); + } + + /// + /// Gets a workflow trigger. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName} + /// + /// + /// Operation Id + /// WorkflowTriggers_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _workflowTriggerClientDiagnostics.CreateScope("WorkflowTriggerResource.Get"); + scope.Start(); + try + { + var response = await _workflowTriggerRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WorkflowTriggerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a workflow trigger. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName} + /// + /// + /// Operation Id + /// WorkflowTriggers_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _workflowTriggerClientDiagnostics.CreateScope("WorkflowTriggerResource.Get"); + scope.Start(); + try + { + var response = _workflowTriggerRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WorkflowTriggerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the callback URL for a workflow trigger. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName}/listCallbackUrl + /// + /// + /// Operation Id + /// WorkflowTriggers_ListCallbackUrl + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetCallbackUrlAsync(CancellationToken cancellationToken = default) + { + using var scope = _workflowTriggerClientDiagnostics.CreateScope("WorkflowTriggerResource.GetCallbackUrl"); + scope.Start(); + try + { + var response = await _workflowTriggerRestClient.ListCallbackUrlAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the callback URL for a workflow trigger. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName}/listCallbackUrl + /// + /// + /// Operation Id + /// WorkflowTriggers_ListCallbackUrl + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response GetCallbackUrl(CancellationToken cancellationToken = default) + { + using var scope = _workflowTriggerClientDiagnostics.CreateScope("WorkflowTriggerResource.GetCallbackUrl"); + scope.Start(); + try + { + var response = _workflowTriggerRestClient.ListCallbackUrl(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Runs a workflow trigger. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName}/run + /// + /// + /// Operation Id + /// WorkflowTriggers_Run + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task RunAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _workflowTriggerClientDiagnostics.CreateScope("WorkflowTriggerResource.Run"); + scope.Start(); + try + { + var response = await _workflowTriggerRestClient.RunAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new AppServiceArmOperation(_workflowTriggerClientDiagnostics, Pipeline, _workflowTriggerRestClient.CreateRunRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Runs a workflow trigger. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName}/run + /// + /// + /// Operation Id + /// WorkflowTriggers_Run + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Run(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _workflowTriggerClientDiagnostics.CreateScope("WorkflowTriggerResource.Run"); + scope.Start(); + try + { + var response = _workflowTriggerRestClient.Run(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new AppServiceArmOperation(_workflowTriggerClientDiagnostics, Pipeline, _workflowTriggerRestClient.CreateRunRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the trigger schema as JSON. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName}/schemas/json + /// + /// + /// Operation Id + /// WorkflowTriggers_GetSchemaJson + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetSchemaJsonAsync(CancellationToken cancellationToken = default) + { + using var scope = _workflowTriggerClientDiagnostics.CreateScope("WorkflowTriggerResource.GetSchemaJson"); + scope.Start(); + try + { + var response = await _workflowTriggerRestClient.GetSchemaJsonAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the trigger schema as JSON. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName}/schemas/json + /// + /// + /// Operation Id + /// WorkflowTriggers_GetSchemaJson + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response GetSchemaJson(CancellationToken cancellationToken = default) + { + using var scope = _workflowTriggerClientDiagnostics.CreateScope("WorkflowTriggerResource.GetSchemaJson"); + scope.Start(); + try + { + var response = _workflowTriggerRestClient.GetSchemaJson(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowVersionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowVersionCollection.cs new file mode 100644 index 0000000000000..5cad63b62f03f --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowVersionCollection.cs @@ -0,0 +1,402 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetWorkflowVersions method from an instance of . + /// + public partial class WorkflowVersionCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _workflowVersionClientDiagnostics; + private readonly WorkflowVersionsRestOperations _workflowVersionRestClient; + private readonly string _workflowName; + + /// Initializes a new instance of the class for mocking. + protected WorkflowVersionCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + /// The workflow name. + /// is null. + /// is an empty string, and was expected to be non-empty. + internal WorkflowVersionCollection(ArmClient client, ResourceIdentifier id, string workflowName) : base(client, id) + { + _workflowName = workflowName; + _workflowVersionClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppService", WorkflowVersionResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(WorkflowVersionResource.ResourceType, out string workflowVersionApiVersion); + _workflowVersionRestClient = new WorkflowVersionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, workflowVersionApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != WebSiteResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, WebSiteResource.ResourceType), nameof(id)); + } + + /// + /// Gets a workflow version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/versions/{versionId} + /// + /// + /// Operation Id + /// WorkflowVersions_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow versionId. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string versionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(versionId, nameof(versionId)); + + using var scope = _workflowVersionClientDiagnostics.CreateScope("WorkflowVersionCollection.Get"); + scope.Start(); + try + { + var response = await _workflowVersionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, _workflowName, versionId, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WorkflowVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a workflow version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/versions/{versionId} + /// + /// + /// Operation Id + /// WorkflowVersions_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow versionId. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string versionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(versionId, nameof(versionId)); + + using var scope = _workflowVersionClientDiagnostics.CreateScope("WorkflowVersionCollection.Get"); + scope.Start(); + try + { + var response = _workflowVersionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, _workflowName, versionId, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WorkflowVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a list of workflow versions. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/versions + /// + /// + /// Operation Id + /// WorkflowVersions_List + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The number of items to be included in the result. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(int? top = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _workflowVersionRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, _workflowName, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workflowVersionRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, _workflowName, top); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new WorkflowVersionResource(Client, WorkflowVersionData.DeserializeWorkflowVersionData(e)), _workflowVersionClientDiagnostics, Pipeline, "WorkflowVersionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Gets a list of workflow versions. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/versions + /// + /// + /// Operation Id + /// WorkflowVersions_List + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The number of items to be included in the result. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(int? top = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _workflowVersionRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, _workflowName, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workflowVersionRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, _workflowName, top); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new WorkflowVersionResource(Client, WorkflowVersionData.DeserializeWorkflowVersionData(e)), _workflowVersionClientDiagnostics, Pipeline, "WorkflowVersionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/versions/{versionId} + /// + /// + /// Operation Id + /// WorkflowVersions_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow versionId. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string versionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(versionId, nameof(versionId)); + + using var scope = _workflowVersionClientDiagnostics.CreateScope("WorkflowVersionCollection.Exists"); + scope.Start(); + try + { + var response = await _workflowVersionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, _workflowName, versionId, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/versions/{versionId} + /// + /// + /// Operation Id + /// WorkflowVersions_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow versionId. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string versionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(versionId, nameof(versionId)); + + using var scope = _workflowVersionClientDiagnostics.CreateScope("WorkflowVersionCollection.Exists"); + scope.Start(); + try + { + var response = _workflowVersionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, _workflowName, versionId, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/versions/{versionId} + /// + /// + /// Operation Id + /// WorkflowVersions_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow versionId. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string versionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(versionId, nameof(versionId)); + + using var scope = _workflowVersionClientDiagnostics.CreateScope("WorkflowVersionCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _workflowVersionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, _workflowName, versionId, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new WorkflowVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/versions/{versionId} + /// + /// + /// Operation Id + /// WorkflowVersions_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow versionId. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string versionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(versionId, nameof(versionId)); + + using var scope = _workflowVersionClientDiagnostics.CreateScope("WorkflowVersionCollection.GetIfExists"); + scope.Start(); + try + { + var response = _workflowVersionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, _workflowName, versionId, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new WorkflowVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowVersionData.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowVersionData.Serialization.cs new file mode 100644 index 0000000000000..496840b17dd06 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowVersionData.Serialization.cs @@ -0,0 +1,750 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.AppService.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppService +{ + public partial class WorkflowVersionData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowVersionData)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WritePropertyName("location"u8); + writer.WriteStringValue(Location); + if (options.Format != "W") + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (options.Format != "W") + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W") + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(ResourceType); + } + if (options.Format != "W" && Optional.IsDefined(SystemData)) + { + writer.WritePropertyName("systemData"u8); + JsonSerializer.Serialize(writer, SystemData); + } + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(CreatedOn)) + { + writer.WritePropertyName("createdTime"u8); + writer.WriteStringValue(CreatedOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(ChangedOn)) + { + writer.WritePropertyName("changedTime"u8); + writer.WriteStringValue(ChangedOn.Value, "O"); + } + if (Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(Version)) + { + writer.WritePropertyName("version"u8); + writer.WriteStringValue(Version); + } + if (options.Format != "W" && Optional.IsDefined(AccessEndpoint)) + { + writer.WritePropertyName("accessEndpoint"u8); + writer.WriteStringValue(AccessEndpoint); + } + if (Optional.IsDefined(EndpointsConfiguration)) + { + writer.WritePropertyName("endpointsConfiguration"u8); + writer.WriteObjectValue(EndpointsConfiguration, options); + } + if (Optional.IsDefined(AccessControl)) + { + writer.WritePropertyName("accessControl"u8); + writer.WriteObjectValue(AccessControl, options); + } + if (options.Format != "W" && Optional.IsDefined(Sku)) + { + writer.WritePropertyName("sku"u8); + writer.WriteObjectValue(Sku, options); + } + if (Optional.IsDefined(IntegrationAccount)) + { + writer.WritePropertyName("integrationAccount"u8); + writer.WriteObjectValue(IntegrationAccount, options); + } + if (Optional.IsDefined(Definition)) + { + writer.WritePropertyName("definition"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Definition); +#else + using (JsonDocument document = JsonDocument.Parse(Definition)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + if (Optional.IsCollectionDefined(Parameters)) + { + writer.WritePropertyName("parameters"u8); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WorkflowVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowVersionData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWorkflowVersionData(document.RootElement, options); + } + + internal static WorkflowVersionData DeserializeWorkflowVersionData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + WorkflowProvisioningState? provisioningState = default; + DateTimeOffset? createdTime = default; + DateTimeOffset? changedTime = default; + WorkflowState? state = default; + string version = default; + string accessEndpoint = default; + FlowEndpointsConfiguration endpointsConfiguration = default; + FlowAccessControlConfiguration accessControl = default; + WorkflowSku sku = default; + WorkflowResourceReference integrationAccount = default; + BinaryData definition = default; + IDictionary parameters = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("location"u8)) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("provisioningState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new WorkflowProvisioningState(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("createdTime"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + createdTime = property0.Value.GetDateTimeOffset("O"); + continue; + } + if (property0.NameEquals("changedTime"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + changedTime = property0.Value.GetDateTimeOffset("O"); + continue; + } + if (property0.NameEquals("state"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + state = new WorkflowState(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("version"u8)) + { + version = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("accessEndpoint"u8)) + { + accessEndpoint = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("endpointsConfiguration"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endpointsConfiguration = FlowEndpointsConfiguration.DeserializeFlowEndpointsConfiguration(property0.Value, options); + continue; + } + if (property0.NameEquals("accessControl"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + accessControl = FlowAccessControlConfiguration.DeserializeFlowAccessControlConfiguration(property0.Value, options); + continue; + } + if (property0.NameEquals("sku"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sku = WorkflowSku.DeserializeWorkflowSku(property0.Value, options); + continue; + } + if (property0.NameEquals("integrationAccount"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + integrationAccount = WorkflowResourceReference.DeserializeWorkflowResourceReference(property0.Value, options); + continue; + } + if (property0.NameEquals("definition"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + definition = BinaryData.FromString(property0.Value.GetRawText()); + continue; + } + if (property0.NameEquals("parameters"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property1 in property0.Value.EnumerateObject()) + { + dictionary.Add(property1.Name, WorkflowContent.DeserializeWorkflowContent(property1.Value, options)); + } + parameters = dictionary; + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WorkflowVersionData( + id, + name, + type, + systemData, + tags ?? new ChangeTrackingDictionary(), + location, + provisioningState, + createdTime, + changedTime, + state, + version, + accessEndpoint, + endpointsConfiguration, + accessControl, + sku, + integrationAccount, + definition, + parameters ?? new ChangeTrackingDictionary(), + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Location), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" location: "); + builder.AppendLine(propertyOverride); + } + else + { + builder.Append(" location: "); + builder.AppendLine($"'{Location.ToString()}'"); + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Tags), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" tags: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Tags)) + { + if (Tags.Any()) + { + builder.Append(" tags: "); + builder.AppendLine("{"); + foreach (var item in Tags) + { + builder.Append($" '{item.Key}': "); + if (item.Value == null) + { + builder.Append("null"); + continue; + } + if (item.Value.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{item.Value}'''"); + } + else + { + builder.AppendLine($"'{item.Value}'"); + } + } + builder.AppendLine(" }"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProvisioningState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" provisioningState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ProvisioningState)) + { + builder.Append(" provisioningState: "); + builder.AppendLine($"'{ProvisioningState.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CreatedOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" createdTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CreatedOn)) + { + builder.Append(" createdTime: "); + var formattedDateTimeString = TypeFormatters.ToString(CreatedOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ChangedOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" changedTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ChangedOn)) + { + builder.Append(" changedTime: "); + var formattedDateTimeString = TypeFormatters.ToString(ChangedOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(State), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" state: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(State)) + { + builder.Append(" state: "); + builder.AppendLine($"'{State.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Version), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" version: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Version)) + { + builder.Append(" version: "); + if (Version.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Version}'''"); + } + else + { + builder.AppendLine($"'{Version}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AccessEndpoint), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" accessEndpoint: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AccessEndpoint)) + { + builder.Append(" accessEndpoint: "); + if (AccessEndpoint.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{AccessEndpoint}'''"); + } + else + { + builder.AppendLine($"'{AccessEndpoint}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EndpointsConfiguration), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" endpointsConfiguration: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(EndpointsConfiguration)) + { + builder.Append(" endpointsConfiguration: "); + BicepSerializationHelpers.AppendChildObject(builder, EndpointsConfiguration, options, 4, false, " endpointsConfiguration: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AccessControl), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" accessControl: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AccessControl)) + { + builder.Append(" accessControl: "); + BicepSerializationHelpers.AppendChildObject(builder, AccessControl, options, 4, false, " accessControl: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Sku), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" sku: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Sku)) + { + builder.Append(" sku: "); + BicepSerializationHelpers.AppendChildObject(builder, Sku, options, 4, false, " sku: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IntegrationAccount), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" integrationAccount: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IntegrationAccount)) + { + builder.Append(" integrationAccount: "); + BicepSerializationHelpers.AppendChildObject(builder, IntegrationAccount, options, 4, false, " integrationAccount: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Definition), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" definition: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Definition)) + { + builder.Append(" definition: "); + builder.AppendLine($"'{Definition.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Parameters), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" parameters: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Parameters)) + { + if (Parameters.Any()) + { + builder.Append(" parameters: "); + builder.AppendLine("{"); + foreach (var item in Parameters) + { + builder.Append($" '{item.Key}': "); + BicepSerializationHelpers.AppendChildObject(builder, item.Value, options, 6, false, " parameters: "); + } + builder.AppendLine(" }"); + } + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WorkflowVersionData)} does not support writing '{options.Format}' format."); + } + } + + WorkflowVersionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWorkflowVersionData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WorkflowVersionData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowVersionData.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowVersionData.cs new file mode 100644 index 0000000000000..8d16d27bc76c1 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowVersionData.cs @@ -0,0 +1,169 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.AppService.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A class representing the WorkflowVersion data model. + /// The workflow version. + /// + public partial class WorkflowVersionData : TrackedResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The location. + public WorkflowVersionData(AzureLocation location) : base(location) + { + Parameters = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The provisioning state. + /// Gets the created time. + /// Gets the changed time. + /// The state. + /// Gets the version. + /// Gets the access endpoint. + /// The endpoints configuration. + /// The access control configuration. + /// The sku. + /// The integration account. + /// The definition. + /// The parameters. + /// Keeps track of any properties unknown to the library. + internal WorkflowVersionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, WorkflowProvisioningState? provisioningState, DateTimeOffset? createdOn, DateTimeOffset? changedOn, WorkflowState? state, string version, string accessEndpoint, FlowEndpointsConfiguration endpointsConfiguration, FlowAccessControlConfiguration accessControl, WorkflowSku sku, WorkflowResourceReference integrationAccount, BinaryData definition, IDictionary parameters, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + { + ProvisioningState = provisioningState; + CreatedOn = createdOn; + ChangedOn = changedOn; + State = state; + Version = version; + AccessEndpoint = accessEndpoint; + EndpointsConfiguration = endpointsConfiguration; + AccessControl = accessControl; + Sku = sku; + IntegrationAccount = integrationAccount; + Definition = definition; + Parameters = parameters; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal WorkflowVersionData() + { + } + + /// The provisioning state. + [WirePath("properties.provisioningState")] + public WorkflowProvisioningState? ProvisioningState { get; } + /// Gets the created time. + [WirePath("properties.createdTime")] + public DateTimeOffset? CreatedOn { get; } + /// Gets the changed time. + [WirePath("properties.changedTime")] + public DateTimeOffset? ChangedOn { get; } + /// The state. + [WirePath("properties.state")] + public WorkflowState? State { get; set; } + /// Gets the version. + [WirePath("properties.version")] + public string Version { get; } + /// Gets the access endpoint. + [WirePath("properties.accessEndpoint")] + public string AccessEndpoint { get; } + /// The endpoints configuration. + [WirePath("properties.endpointsConfiguration")] + public FlowEndpointsConfiguration EndpointsConfiguration { get; set; } + /// The access control configuration. + [WirePath("properties.accessControl")] + public FlowAccessControlConfiguration AccessControl { get; set; } + /// The sku. + [WirePath("properties.sku")] + public WorkflowSku Sku { get; } + /// The integration account. + [WirePath("properties.integrationAccount")] + public WorkflowResourceReference IntegrationAccount { get; set; } + /// + /// The definition. + /// + /// To assign an object to this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + [WirePath("properties.definition")] + public BinaryData Definition { get; set; } + /// The parameters. + [WirePath("properties.parameters")] + public IDictionary Parameters { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowVersionResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowVersionResource.Serialization.cs new file mode 100644 index 0000000000000..4fa7073fafb45 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowVersionResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.AppService +{ + public partial class WorkflowVersionResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + WorkflowVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + WorkflowVersionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowVersionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowVersionResource.cs new file mode 100644 index 0000000000000..36f0d0cfde433 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowVersionResource.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A Class representing a WorkflowVersion along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetWorkflowVersionResource method. + /// Otherwise you can get one from its parent resource using the GetWorkflowVersion method. + /// + public partial class WorkflowVersionResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The name. + /// The workflowName. + /// The versionId. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name, string workflowName, string versionId) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/versions/{versionId}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _workflowVersionClientDiagnostics; + private readonly WorkflowVersionsRestOperations _workflowVersionRestClient; + private readonly WorkflowVersionData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Web/sites/hostruntime/webhooks/api/workflows/versions"; + + /// Initializes a new instance of the class for mocking. + protected WorkflowVersionResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal WorkflowVersionResource(ArmClient client, WorkflowVersionData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal WorkflowVersionResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _workflowVersionClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppService", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string workflowVersionApiVersion); + _workflowVersionRestClient = new WorkflowVersionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, workflowVersionApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual WorkflowVersionData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Gets a workflow version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/versions/{versionId} + /// + /// + /// Operation Id + /// WorkflowVersions_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _workflowVersionClientDiagnostics.CreateScope("WorkflowVersionResource.Get"); + scope.Start(); + try + { + var response = await _workflowVersionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WorkflowVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a workflow version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/versions/{versionId} + /// + /// + /// Operation Id + /// WorkflowVersions_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _workflowVersionClientDiagnostics.CreateScope("WorkflowVersionResource.Get"); + scope.Start(); + try + { + var response = _workflowVersionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WorkflowVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/autorest.md b/sdk/websites/Azure.ResourceManager.AppService/src/autorest.md index 18fe5253d7f06..cda736552b495 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/autorest.md +++ b/sdk/websites/Azure.ResourceManager.AppService/src/autorest.md @@ -10,7 +10,8 @@ Run `dotnet build /t:GenerateCode` to generate code. azure-arm: true library-name: AppService namespace: Azure.ResourceManager.AppService -require: https://github.com/Azure/azure-rest-api-specs/blob/35f8a4df47aedc1ce185c854595cba6b83fa6c71/specification/web/resource-manager/readme.md +require: https://github.com/Azure/azure-rest-api-specs/blob/928047803788f7377fa003a26ba2bdc2e0fcccc0/specification/web/resource-manager/readme.md +#tag: package-2023-12 output-folder: $(this-folder)/Generated clear-output-folder: true sample-gen: @@ -23,7 +24,7 @@ deserialize-null-collection-as-null-value: true use-model-reader-writer: true enable-bicep-serialization: true -# mgmt-debug: +#mgmt-debug: # show-serialized-names: true list-exception: @@ -48,6 +49,10 @@ request-path-is-non-resource: - /subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites/{deletedSiteId} - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view} +- /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deploymentStatus/{deploymentStatusId} +- /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deploymentStatus/{deploymentStatusId} +- /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2 +- /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2 request-path-to-resource-name: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}: WebSite @@ -78,6 +83,10 @@ request-path-to-resource-name: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web: WebSiteSlotSourceControl /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}: WebSiteSlotHybridConnection /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}: WebSiteSlotExtension + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}: WorkflowRunActionRepetition + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/scopeRepetitions/{repetitionName}: WorkflowRunActionScopeRepetition + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sitecontainers/{containerName}: SiteContainer + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sitecontainers/{containerName}: SiteSlotSiteContainer /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}: AppServicePlanHybridConnectionNamespaceRelay /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}: AppServicePlanVirtualNetworkConnection /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}: AppServicePlanVirtualNetworkConnectionGateway @@ -98,7 +107,6 @@ override-operation-name: StaticSites_UpdateStaticSiteUser: UpdateUser CheckNameAvailability: CheckAppServiceNameAvailability AppServicePlans_ListHybridConnections: GetHybridConnectionRelays - AppServicePlans_GetHybridConnection: GetHybridConnectionRelays StaticSites_CreateOrUpdateStaticSiteBuildAppSettings: CreateOrUpdateAppSettings StaticSites_CreateOrUpdateStaticSiteBuildFunctionAppSettings: CreateOrUpdateFunctionAppSettings StaticSites_ListStaticSiteBuildFunctions: GetFunctions @@ -143,6 +151,9 @@ format-by-name-rules: keep-plural-enums: - StackPreferredOS +irregular-plural-words: + status: status + acronym-mapping: CPU: Cpu CPUs: Cpus @@ -226,7 +237,6 @@ rename-mapping: AddressResponse.properties.serviceIpAddress: -|ip-address EndpointDetail.ipAddress: -|ip-address IpSecurityRestriction.ipAddress: IPAddressOrCidr - Operation.idL -|arm-id: -|arm-id AseV3NetworkingConfiguration.properties.windowsOutboundIpAddresses: -|ip-address AseV3NetworkingConfiguration.properties.linuxOutboundIpAddresses: -|ip-address AseV3NetworkingConfiguration.properties.externalInboundIpAddresses: -|ip-address @@ -370,7 +380,112 @@ rename-mapping: CloningInfo.sourceWebAppLocation: -|azure-location AzureTableStorageApplicationLogsConfig.sasUrl: SasUriString WebSiteInstanceStatus.properties.healthCheckUrl: healthCheckUrlString - + # Ambiguity property name due to the faltten + OpenAuthenticationAccessPolicies.policies: OpenAuthenticationPolicyList + AseV3NetworkingConfiguration.properties.ftpEnabled: IsFtpEnabled + AseV3NetworkingConfiguration.properties.remoteDebugEnabled: IsRemoteDebugEnabled + TriggeredWebJob.properties.storageAccountRequired: IsStorageAccountRequired + Site.properties.vnetRouteAllEnabled: IsVnetRouteAllEnabled + Site.properties.vnetImagePullEnabled: IsVnetImagePullEnabled + Site.properties.vnetContentShareEnabled: IsVnetContentShareEnabled + Site.properties.vnetBackupRestoreEnabled: IsVnetBackupRestoreEnabled + WorkflowTriggerHistory.properties.fired: IsFired + IpAddress: WebAppIPAddress + IpAddressRange: WebAppIPAddressRange + JsonSchema: WebAppJsonSchema + Request: WebAppRequest + Response: WebAppResponse + Scale: ContainerAppScale + ScaleRule: ContainerAppScaleRule + ScaleRuleAuth: ContainerAppScaleRuleAuth + Template: ContainerAppTemplate + VolumeMount.readOnly: IsReadOnly + DatabaseConnection: StaticSiteDatabaseConnection + DatabaseConnection.properties.resourceId: -|arm-id + DatabaseConnectionOverview: StaticSiteDatabaseConnectionOverview + DatabaseConnectionOverview.resourceId: -|arm-id + DatabaseConnectionPatchRequest: StaticSiteDatabaseConnectionPatchContent + DatabaseConnectionPatchRequest.properties.resourceId: -|arm-id + RequestHistory: WebAppRequestHistory + RequestHistoryProperties: WebAppRequestHistoryProperties + StaticSiteBasicAuthPropertiesARMResource: StaticSiteBasicAuthProperties + StaticSiteLinkedBackend: StaticSiteLinkedBackendInfo + StaticSiteLinkedBackendARMResource: StaticSiteLinkedBackend + StaticSiteLinkedBackendARMResource.properties.backendResourceId: -|arm-id + AseRegion: AppServiceAseRegion + AseRegion.properties.dedicatedHost: IsDedicatedHostEnabled + AseRegion.properties.standard: IsStandard + AseRegion.properties.zoneRedundant: IsZoneRedundantEnabled + AuthenticationType: FunctionAppStorageAccountAuthenticationType + AuthType: SiteContainerAuthType + AzureResourceErrorInfo: WorkflowExpressionResourceErrorInfo + AzureStorageProtocol: AppServiceStorageProtocol + BasicAuthName: StaticSiteBasicAuthName + ContentHash: WebAppContentHash + ContentLink: WebAppContentLink + Dapr.enabled: IsEnabled + DaprConfig: AppDaprConfig + DaprConfig.enableApiLogging: IsApiLoggingEnabled + DaprConfig.enabled: IsEnabled + DaprLogLevel: AppDaprLogLevel + DayOfWeek: WebAppDayOfWeek + DefaultAction: SiteDefaultAction + EnvironmentVariable: WebAppEnvironmentVariable + ErrorInfo: WebAppErrorInfo + ErrorResponse: WebAppErrorResponse + ErrorResponse.error: ErrorInfo + ErrorProperties: WebAppErrorProperties + Expression: WorkflowExpression + ExpressionRoot: WorkflowExpressionRoot + FunctionsAlwaysReadyConfig: FunctionAppAlwaysReadyConfig + FunctionsDeploymentStorage: FunctionAppStorage + FunctionsDeploymentStorageAuthentication: FunctionAppStorageAuthentication + FunctionsRuntime: FunctionAppRuntime + FunctionsScaleAndConcurrency: FunctionAppScaleAndConcurrency + FunctionStorageType: FunctionAppStorageType + KeyType: WebAppKeyType + ParameterType: WebAppParameterType + RecurrenceFrequency: WorkflowRecurrenceFrequency + RecurrenceSchedule: WorkflowRecurrenceSchedule + RegenerateActionParameter: WorkflowRegenerateActionContent + RepetitionIndex: WorkflowRunActionRepetitionIndex + ResourceConfig: FunctionAppResourceConfig + ResourceReference: WorkflowResourceReference + ResourceReference.id: -|arm-id + ResourceReference.type: -|resource-type + RetryHistory: WebAppRetryHistory + RunActionCorrelation: WebAppRunActionCorrelation + RunCorrelation: WebAppRunCorrelation + RuntimeName: FunctionAppRuntimeName + TlsCipherSuites: AppServiceTlsCipherSuite + TlsCipherSuites.TLS_AES_256_GCM_SHA384: TlsAes256GcmSha384 + TlsCipherSuites.TLS_AES_128_GCM_SHA256: TlsAes128GcmSha256 + TlsCipherSuites.TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384: TlsECDiffieHellmanECDsaWithAes256GcmSha384 + TlsCipherSuites.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256: TlsECDiffieHellmanECDsaWithAes128CbcSha256 + TlsCipherSuites.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256: TlsECDiffieHellmanECDsaWithAes128GcmSha256 + TlsCipherSuites.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384: TlsECDiffieHellmanRsaWithAes256GcmSha384 + TlsCipherSuites.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256: TlsECDiffieHellmanRsaWithAes128GcmSha256 + TlsCipherSuites.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384: TlsECDiffieHellmanRsaWithAes256CbcSha384 + TlsCipherSuites.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256: TlsECDiffieHellmanRsaWithAes128CbcSha256 + TlsCipherSuites.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA: TlsECDiffieHellmanRsaWithAes256CbcSha + TlsCipherSuites.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA: TlsECDiffieHellmanRsaWithAes128CbcSha + TlsCipherSuites.TLS_RSA_WITH_AES_256_GCM_SHA384: TlsRsaWithAes256GcmSha384 + TlsCipherSuites.TLS_RSA_WITH_AES_128_GCM_SHA256: TlsRsaWithAes128GcmSha256 + TlsCipherSuites.TLS_RSA_WITH_AES_256_CBC_SHA256: TlsRsaWithAes256CbcSha256 + TlsCipherSuites.TLS_RSA_WITH_AES_128_CBC_SHA256: TlsRsaWithAes128CbcSha256 + TlsCipherSuites.TLS_RSA_WITH_AES_256_CBC_SHA: TlsRsaWithAes256CbcSha + TlsCipherSuites.TLS_RSA_WITH_AES_128_CBC_SHA: TlsRsaWithAes128CbcSha + UpgradeAvailability: AppServiceEnvironmentUpgradeAvailability + UpgradePreference: AppServiceEnvironmentUpgradePreference + VolumeMount: SiteContainerVolumeMount + Workflow: WorkflowData + WorkflowOutputParameter: WorkflowOutputContent + WorkflowParameter: WorkflowContent + WorkflowTriggerListCallbackUrlQueries: WorkflowTriggerListCallbackUriQueries + WorkflowTriggerListCallbackUrlQueries.sp: SasPermission + WorkflowTriggerListCallbackUrlQueries.sv: SasVersion + WorkflowTriggerListCallbackUrlQueries.sig: SasSignature + WorkflowTriggerListCallbackUrlQueries.se: SasTimestamp # rename resource AppServiceCertificate: AppServiceCertificateProperties AppServiceCertificateResource: AppServiceCertificate @@ -431,7 +546,6 @@ rename-mapping: AzureStaticWebApps: AppServiceStaticWebAppsProvider AzureStaticWebAppsRegistration: AppServiceStaticWebAppsRegistration AzureStorageInfoValue: AppServiceStorageAccessInfo - AzureStoragePropertyDictionary: AppServiceStorageDictionaryResourceData AzureStorageState: AppServiceStorageAccountState AzureStorageType: AppServiceStorageType AzureTableStorageApplicationLogsConfig: AppServiceTableStorageApplicationLogsConfig @@ -569,7 +683,6 @@ rename-mapping: prepend-rp-prefix: - ApiDefinitionInfo - - ApiKeyVaultReferenceData - ArmPlan - BillingMeter - BlobStorageTokenStore @@ -615,6 +728,8 @@ directive: - remove-operation: AppServiceEnvironments_ChangeVnet - remove-operation: AppServiceEnvironments_Resume - remove-operation: AppServiceEnvironments_Suspend + # - remove-operation: WebApps_GetAuthSettingsV2WithoutSecrets + # - remove-operation: WebApps_GetAuthSettingsV2WithoutSecretsSlot # these operations are apparently not operations in Microsoft.Web RP. Instead, their paths look like operations on resource groups - remove-operation: ValidateMove - remove-operation: Move @@ -857,4 +972,35 @@ directive: where: $.paths['/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays'].get transform: > $['responses']['200']['schema']['$ref'] = "./AppServicePlans.json#/definitions/HybridConnectionCollection"; + # The Enum name "StorageType" is shared by artifactsStorageType, cause the apicompat error + - from: CommonDefinitions.json + where: $.definitions.FunctionsDeployment.properties.storage.properties.type + transform: > + $["x-ms-enum"] = { + "name": "functionStorageType", + "modelAsString": true + }; + # Remove ContainerApps.json, ContainerAppsRevisions.json since Container Apps has been separated into another SDK + - from: ContainerApps.json + where: $.paths + transform: > + for (var path in $) + { + delete $[path]; + } + - from: ContainerAppsRevisions.json + where: $.paths + transform: > + for (var path in $) + { + delete $[path]; + } + # Reuse defined DayOfWeek + - from: WebApps.json + where: $.definitions.RecurrenceSchedule.properties.weekDays + transform: > + $.items = { + "$ref": "#/definitions/DayOfWeek", + "description": "The days of the week." + }; ```