diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/CHANGELOG.md b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/CHANGELOG.md index 2b79d09358350..58086577e6a38 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/CHANGELOG.md +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/CHANGELOG.md @@ -1,20 +1,26 @@ # Release History -## 1.2.0-beta.2 (Unreleased) +## 1.2.0 (2024-07-05) ### Features Added -### Breaking Changes +- Upgraded api-version tag from 'package-2021-08' to 'package-2022-08'. Tag detail available at https://github.com/Azure/azure-rest-api-specs/blob/2d973fccf9f28681a481e9760fa12b2334216e21/specification/apimanagement/resource-manager/readme.md. +- Added `ArmOperation.Rehydrate` and `ArmOperation.Rehydrate` static methods to rehydrate a long-running operation. ### Bugs Fixed +- fix bugs caused by applying to the lastest 'require url' for opeartion_Id_:ContentType_CreateOrUpdate and ContentItem_CreateOrUpdate in apimcontenttypes.json + ### Other Changes +- Upgraded Azure.Core from 1.36.0 to 1.40.0 +- Upgraded Azure.ResourceManager from 1.9.0 to 1.12.0 + ## 1.2.0-beta.1 (2024-04-22) ### 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 @@ -25,11 +31,11 @@ ### 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. ### Bugs Fixed -- Add property `PrivateUriString` instead of `PrivateUri` in ApiRevisionContract to fix Uri deserialization issue. +- Added property `PrivateUriString` instead of `PrivateUri` in ApiRevisionContract to fix Uri deserialization issue. ### Other Changes @@ -39,7 +45,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). ### Other Changes @@ -117,5 +123,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/apimanagement/Azure.ResourceManager.ApiManagement/api/Azure.ResourceManager.ApiManagement.netstandard2.0.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/api/Azure.ResourceManager.ApiManagement.netstandard2.0.cs index 50169a25d9ce9..295a457cc1a05 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/api/Azure.ResourceManager.ApiManagement.netstandard2.0.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/api/Azure.ResourceManager.ApiManagement.netstandard2.0.cs @@ -269,6 +269,8 @@ public ApiManagementAuthorizationServerData() { } public string ResourceOwnerUsername { get { throw null; } set { } } public System.Collections.Generic.IList TokenBodyParameters { get { throw null; } } public string TokenEndpoint { get { throw null; } set { } } + public bool? UseInApiDocumentation { get { throw null; } set { } } + public bool? UseInTestConsole { get { throw null; } set { } } Azure.ResourceManager.ApiManagement.ApiManagementAuthorizationServerData 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.ApiManagement.ApiManagementAuthorizationServerData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -657,6 +659,16 @@ public static partial class ApiManagementExtensions public static Azure.ResourceManager.ApiManagement.ApiTagDescriptionResource GetApiTagDescriptionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiTagResource GetApiTagResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiVersionSetResource GetApiVersionSetResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ApiManagement.AuthorizationAccessPolicyContractResource GetAuthorizationAccessPolicyContractResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ApiManagement.AuthorizationContractResource GetAuthorizationContractResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ApiManagement.AuthorizationProviderContractResource GetAuthorizationProviderContractResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ApiManagement.DocumentationContractResource GetDocumentationContractResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ApiManagement.PolicyFragmentContractResource GetPolicyFragmentContractResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ApiManagement.PortalConfigContractResource GetPortalConfigContractResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ApiManagement.ResolverContractResource GetResolverContractResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ApiManagement.ServiceApiResolverPolicyResource GetServiceApiResolverPolicyResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ApiManagement.ServiceApiWikiResource GetServiceApiWikiResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ApiManagement.ServiceProductWikiResource GetServiceProductWikiResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ApiManagement.TenantAccessInfoResource GetTenantAccessInfoResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } } public partial class ApiManagementGatewayCertificateAuthorityCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable @@ -963,6 +975,7 @@ public ApiManagementIdentityProviderData() { } public System.Collections.Generic.IList AllowedTenants { get { throw null; } } public string Authority { get { throw null; } set { } } public string ClientId { get { throw null; } set { } } + public string ClientLibrary { get { throw null; } set { } } public string ClientSecret { get { throw null; } set { } } public Azure.ResourceManager.ApiManagement.Models.IdentityProviderType? IdentityProviderType { get { throw null; } set { } } public string PasswordResetPolicyName { get { throw null; } set { } } @@ -1224,6 +1237,8 @@ public ApiManagementOpenIdConnectProviderData() { } public string Description { get { throw null; } set { } } public string DisplayName { get { throw null; } set { } } public string MetadataEndpoint { get { throw null; } set { } } + public bool? UseInApiDocumentation { get { throw null; } set { } } + public bool? UseInTestConsole { get { throw null; } set { } } Azure.ResourceManager.ApiManagement.ApiManagementOpenIdConnectProviderData 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.ApiManagement.ApiManagementOpenIdConnectProviderData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1639,6 +1654,7 @@ protected ApiManagementProductResource() { } public virtual Azure.AsyncPageable GetProductApisAsync(string filter = null, int? top = default(int?), int? skip = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetProductGroups(string filter = null, int? top = default(int?), int? skip = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetProductGroupsAsync(string filter = null, int? top = default(int?), int? skip = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ApiManagement.ServiceProductWikiResource GetServiceProductWiki() { throw null; } Azure.ResourceManager.ApiManagement.ApiManagementProductData 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.ApiManagement.ApiManagementProductData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1719,7 +1735,9 @@ public ApiManagementServiceData(Azure.Core.AzureLocation location, Azure.Resourc public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public System.Uri ManagementApiUri { get { throw null; } } public string MinApiVersion { get { throw null; } set { } } + public Azure.ResourceManager.ApiManagement.Models.ApiManagementNatGatewayState? NatGatewayState { get { throw null; } set { } } public string NotificationSenderEmail { get { throw null; } set { } } + public System.Collections.Generic.IReadOnlyList OutboundPublicIPAddresses { get { throw null; } } public Azure.ResourceManager.ApiManagement.Models.PlatformVersion? PlatformVersion { get { throw null; } } public System.Uri PortalUri { get { throw null; } } public System.Collections.Generic.IList PrivateEndpointConnections { get { throw null; } } @@ -1853,6 +1871,9 @@ protected ApiManagementServiceResource() { } public virtual System.Threading.Tasks.Task> GetApiVersionSetAsync(string versionSetId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ApiManagement.ApiVersionSetCollection GetApiVersionSets() { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetAuthorizationProviderContract(string authorizationProviderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAuthorizationProviderContractAsync(string authorizationProviderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ApiManagement.AuthorizationProviderContractCollection GetAuthorizationProviderContracts() { throw null; } public virtual Azure.Pageable GetAvailableApiManagementServiceSkus(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetAvailableApiManagementServiceSkusAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetContentItem(string contentTypeId, string contentItemId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -1865,6 +1886,9 @@ protected ApiManagementServiceResource() { } public virtual System.Threading.Tasks.Task> GetContentTypeAsync(string contentTypeId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetContentTypes(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetContentTypesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetDocumentationContract(string documentationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDocumentationContractAsync(string documentationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ApiManagement.DocumentationContractCollection GetDocumentationContracts() { throw null; } public virtual Azure.Response GetNetworkStatusByLocation(Azure.Core.AzureLocation locationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetNetworkStatusByLocationAsync(Azure.Core.AzureLocation locationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetNetworkStatuses(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -1873,6 +1897,12 @@ protected ApiManagementServiceResource() { } public virtual Azure.AsyncPageable GetOutboundNetworkDependenciesEndpointsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetPolicyDescriptions(Azure.ResourceManager.ApiManagement.Models.PolicyScopeContract? scope = default(Azure.ResourceManager.ApiManagement.Models.PolicyScopeContract?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetPolicyDescriptionsAsync(Azure.ResourceManager.ApiManagement.Models.PolicyScopeContract? scope = default(Azure.ResourceManager.ApiManagement.Models.PolicyScopeContract?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetPolicyFragmentContract(string id, Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat? format = default(Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetPolicyFragmentContractAsync(string id, Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat? format = default(Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ApiManagement.PolicyFragmentContractCollection GetPolicyFragmentContracts() { throw null; } + public virtual Azure.Response GetPortalConfigContract(string portalConfigId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetPortalConfigContractAsync(string portalConfigId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ApiManagement.PortalConfigContractCollection GetPortalConfigContracts() { throw null; } public virtual Azure.Pageable GetPortalSettings(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetPortalSettingsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetProductsByTags(string filter = null, int? top = default(int?), int? skip = default(int?), bool? includeNotTaggedProducts = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -1908,6 +1938,8 @@ protected ApiManagementServiceResource() { } public virtual Azure.ResourceManager.ApiManagement.TenantAccessInfoCollection GetTenantAccessInfos() { throw null; } public virtual Azure.Response GetTenantConfigurationSyncState(Azure.ResourceManager.ApiManagement.Models.ConfigurationName configurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetTenantConfigurationSyncStateAsync(Azure.ResourceManager.ApiManagement.Models.ConfigurationName configurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation MigrateToStv2(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> MigrateToStv2Async(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation PerformConnectivityCheckAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ApiManagement.Models.ConnectivityCheckContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> PerformConnectivityCheckAsyncAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ApiManagement.Models.ConnectivityCheckContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -2404,6 +2436,10 @@ protected ApiResource() { } public virtual System.Threading.Tasks.Task> GetEntityTagAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetOperationsByTags(string filter = null, int? top = default(int?), int? skip = default(int?), bool? includeNotTaggedOperations = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetOperationsByTagsAsync(string filter = null, int? top = default(int?), int? skip = default(int?), bool? includeNotTaggedOperations = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetResolverContract(string resolverId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetResolverContractAsync(string resolverId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ApiManagement.ResolverContractCollection GetResolverContracts() { throw null; } + public virtual Azure.ResourceManager.ApiManagement.ServiceApiWikiResource GetServiceApiWiki() { throw null; } Azure.ResourceManager.ApiManagement.ApiData 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.ApiManagement.ApiData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2605,6 +2641,161 @@ protected ApiVersionSetResource() { } public virtual Azure.Response Update(Azure.ETag ifMatch, Azure.ResourceManager.ApiManagement.Models.ApiVersionSetPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ETag ifMatch, Azure.ResourceManager.ApiManagement.Models.ApiVersionSetPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } + public partial class AuthorizationAccessPolicyContractCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected AuthorizationAccessPolicyContractCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string authorizationAccessPolicyId, Azure.ResourceManager.ApiManagement.AuthorizationAccessPolicyContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string authorizationAccessPolicyId, Azure.ResourceManager.ApiManagement.AuthorizationAccessPolicyContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string authorizationAccessPolicyId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string authorizationAccessPolicyId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string authorizationAccessPolicyId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string filter = null, int? top = default(int?), int? skip = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string filter = null, int? top = default(int?), int? skip = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string authorizationAccessPolicyId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string authorizationAccessPolicyId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string authorizationAccessPolicyId, 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 AuthorizationAccessPolicyContractData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AuthorizationAccessPolicyContractData() { } + public string ObjectId { get { throw null; } set { } } + public System.Guid? TenantId { get { throw null; } set { } } + Azure.ResourceManager.ApiManagement.AuthorizationAccessPolicyContractData 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.ApiManagement.AuthorizationAccessPolicyContractData 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 AuthorizationAccessPolicyContractResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected AuthorizationAccessPolicyContractResource() { } + public virtual Azure.ResourceManager.ApiManagement.AuthorizationAccessPolicyContractData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, string authorizationAccessPolicyId) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, Azure.ETag ifMatch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, Azure.ETag ifMatch, 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.ApiManagement.AuthorizationAccessPolicyContractData 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.ApiManagement.AuthorizationAccessPolicyContractData 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.ApiManagement.AuthorizationAccessPolicyContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ApiManagement.AuthorizationAccessPolicyContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class AuthorizationContractCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected AuthorizationContractCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string authorizationId, Azure.ResourceManager.ApiManagement.AuthorizationContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string authorizationId, Azure.ResourceManager.ApiManagement.AuthorizationContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string authorizationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string authorizationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string authorizationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string filter = null, int? top = default(int?), int? skip = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string filter = null, int? top = default(int?), int? skip = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string authorizationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string authorizationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string authorizationId, 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 AuthorizationContractData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AuthorizationContractData() { } + public Azure.ResourceManager.ApiManagement.Models.ApiManagementAuthorizationType? AuthorizationType { get { throw null; } set { } } + public Azure.ResourceManager.ApiManagement.Models.ApiManagementAuthorizationError Error { get { throw null; } set { } } + public Azure.ResourceManager.ApiManagement.Models.OAuth2GrantType? OAuth2GrantType { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Parameters { get { throw null; } } + public string Status { get { throw null; } set { } } + Azure.ResourceManager.ApiManagement.AuthorizationContractData 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.ApiManagement.AuthorizationContractData 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 AuthorizationContractResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected AuthorizationContractResource() { } + public virtual Azure.ResourceManager.ApiManagement.AuthorizationContractData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.Response ConfirmConsentCode(Azure.ResourceManager.ApiManagement.Models.AuthorizationConfirmConsentCodeContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task ConfirmConsentCodeAsync(Azure.ResourceManager.ApiManagement.Models.AuthorizationConfirmConsentCodeContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, Azure.ETag ifMatch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, Azure.ETag ifMatch, 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 GetAuthorizationAccessPolicyContract(string authorizationAccessPolicyId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAuthorizationAccessPolicyContractAsync(string authorizationAccessPolicyId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ApiManagement.AuthorizationAccessPolicyContractCollection GetAuthorizationAccessPolicyContracts() { throw null; } + public virtual Azure.Response PostAuthorizationLoginLink(Azure.ResourceManager.ApiManagement.Models.AuthorizationLoginContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> PostAuthorizationLoginLinkAsync(Azure.ResourceManager.ApiManagement.Models.AuthorizationLoginContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.ApiManagement.AuthorizationContractData 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.ApiManagement.AuthorizationContractData 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.ApiManagement.AuthorizationContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ApiManagement.AuthorizationContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class AuthorizationProviderContractCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected AuthorizationProviderContractCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string authorizationProviderId, Azure.ResourceManager.ApiManagement.AuthorizationProviderContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string authorizationProviderId, Azure.ResourceManager.ApiManagement.AuthorizationProviderContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string authorizationProviderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string authorizationProviderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string authorizationProviderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string filter = null, int? top = default(int?), int? skip = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string filter = null, int? top = default(int?), int? skip = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string authorizationProviderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string authorizationProviderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string authorizationProviderId, 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 AuthorizationProviderContractData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AuthorizationProviderContractData() { } + public string DisplayName { get { throw null; } set { } } + public string IdentityProvider { get { throw null; } set { } } + public Azure.ResourceManager.ApiManagement.Models.AuthorizationProviderOAuth2Settings Oauth2 { get { throw null; } set { } } + Azure.ResourceManager.ApiManagement.AuthorizationProviderContractData 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.ApiManagement.AuthorizationProviderContractData 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 AuthorizationProviderContractResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected AuthorizationProviderContractResource() { } + public virtual Azure.ResourceManager.ApiManagement.AuthorizationProviderContractData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, Azure.ETag ifMatch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, Azure.ETag ifMatch, 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 GetAuthorizationContract(string authorizationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAuthorizationContractAsync(string authorizationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ApiManagement.AuthorizationContractCollection GetAuthorizationContracts() { throw null; } + Azure.ResourceManager.ApiManagement.AuthorizationProviderContractData 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.ApiManagement.AuthorizationProviderContractData 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.ApiManagement.AuthorizationProviderContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ApiManagement.AuthorizationProviderContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public partial class DiagnosticContractData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DiagnosticContractData() { } @@ -2624,6 +2815,55 @@ public DiagnosticContractData() { } 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 DocumentationContractCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DocumentationContractCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string documentationId, Azure.ResourceManager.ApiManagement.DocumentationContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string documentationId, Azure.ResourceManager.ApiManagement.DocumentationContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string documentationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string documentationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string documentationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string filter = null, int? top = default(int?), int? skip = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string filter = null, int? top = default(int?), int? skip = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string documentationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string documentationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string documentationId, 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 DocumentationContractData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DocumentationContractData() { } + public string Content { get { throw null; } set { } } + public string Title { get { throw null; } set { } } + Azure.ResourceManager.ApiManagement.DocumentationContractData 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.ApiManagement.DocumentationContractData 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 DocumentationContractResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DocumentationContractResource() { } + public virtual Azure.ResourceManager.ApiManagement.DocumentationContractData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string documentationId) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, Azure.ETag ifMatch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, Azure.ETag ifMatch, 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 GetEntityTag(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEntityTagAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.ApiManagement.DocumentationContractData 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.ApiManagement.DocumentationContractData 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.ETag ifMatch, Azure.ResourceManager.ApiManagement.Models.DocumentationContractPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ETag ifMatch, Azure.ResourceManager.ApiManagement.Models.DocumentationContractPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public partial class IssueContractData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public IssueContractData() { } @@ -2650,6 +2890,246 @@ public PolicyContractData() { } 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 PolicyFragmentContractCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected PolicyFragmentContractCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string id, Azure.ResourceManager.ApiManagement.PolicyFragmentContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string id, Azure.ResourceManager.ApiManagement.PolicyFragmentContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string id, Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat? format = default(Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string id, Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat? format = default(Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string id, Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat? format = default(Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string filter = null, string orderBy = null, int? top = default(int?), int? skip = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string filter = null, string orderBy = null, int? top = default(int?), int? skip = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string id, Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat? format = default(Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string id, Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat? format = default(Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string id, Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat? format = default(Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat?), 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 PolicyFragmentContractData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PolicyFragmentContractData() { } + public string Description { get { throw null; } set { } } + public Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat? Format { get { throw null; } set { } } + public string Value { get { throw null; } set { } } + Azure.ResourceManager.ApiManagement.PolicyFragmentContractData 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.ApiManagement.PolicyFragmentContractData 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 PolicyFragmentContractResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected PolicyFragmentContractResource() { } + public virtual Azure.ResourceManager.ApiManagement.PolicyFragmentContractData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string id) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, Azure.ETag ifMatch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, Azure.ETag ifMatch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat? format = default(Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat? format = default(Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetEntityTag(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEntityTagAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetReferences(int? top = default(int?), int? skip = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetReferencesAsync(int? top = default(int?), int? skip = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.ApiManagement.PolicyFragmentContractData 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.ApiManagement.PolicyFragmentContractData 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.ApiManagement.PolicyFragmentContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ApiManagement.PolicyFragmentContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class PortalConfigContractCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected PortalConfigContractCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string portalConfigId, Azure.ETag ifMatch, Azure.ResourceManager.ApiManagement.PortalConfigContractData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string portalConfigId, Azure.ETag ifMatch, Azure.ResourceManager.ApiManagement.PortalConfigContractData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string portalConfigId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string portalConfigId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string portalConfigId, 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 portalConfigId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string portalConfigId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string portalConfigId, 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 PortalConfigContractData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PortalConfigContractData() { } + public System.Collections.Generic.IList CorsAllowedOrigins { get { throw null; } } + public Azure.ResourceManager.ApiManagement.Models.PortalConfigCspProperties Csp { get { throw null; } set { } } + public Azure.ResourceManager.ApiManagement.Models.PortalConfigDelegationProperties Delegation { get { throw null; } set { } } + public bool? EnableBasicAuth { get { throw null; } set { } } + public bool? Require { get { throw null; } set { } } + public Azure.ResourceManager.ApiManagement.Models.PortalConfigTermsOfServiceProperties SignupTermsOfService { get { throw null; } set { } } + Azure.ResourceManager.ApiManagement.PortalConfigContractData 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.ApiManagement.PortalConfigContractData 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 PortalConfigContractResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected PortalConfigContractResource() { } + public virtual Azure.ResourceManager.ApiManagement.PortalConfigContractData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string portalConfigId) { 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 GetEntityTag(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEntityTagAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.ApiManagement.PortalConfigContractData 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.ApiManagement.PortalConfigContractData 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.ETag ifMatch, Azure.ResourceManager.ApiManagement.PortalConfigContractData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ETag ifMatch, Azure.ResourceManager.ApiManagement.PortalConfigContractData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class ResolverContractCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ResolverContractCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string resolverId, Azure.ResourceManager.ApiManagement.ResolverContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string resolverId, Azure.ResourceManager.ApiManagement.ResolverContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string resolverId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string resolverId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string resolverId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string filter = null, int? top = default(int?), int? skip = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string filter = null, int? top = default(int?), int? skip = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string resolverId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string resolverId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string resolverId, 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 ResolverContractData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ResolverContractData() { } + public string Description { get { throw null; } set { } } + public string DisplayName { get { throw null; } set { } } + public string Path { get { throw null; } set { } } + Azure.ResourceManager.ApiManagement.ResolverContractData 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.ApiManagement.ResolverContractData 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 ResolverContractResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ResolverContractResource() { } + public virtual Azure.ResourceManager.ApiManagement.ResolverContractData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, Azure.ETag ifMatch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, Azure.ETag ifMatch, 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 GetEntityTag(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEntityTagAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ApiManagement.ServiceApiResolverPolicyCollection GetServiceApiResolverPolicies() { throw null; } + public virtual Azure.Response GetServiceApiResolverPolicy(Azure.ResourceManager.ApiManagement.Models.PolicyName policyId, Azure.ResourceManager.ApiManagement.Models.PolicyExportFormat? format = default(Azure.ResourceManager.ApiManagement.Models.PolicyExportFormat?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetServiceApiResolverPolicyAsync(Azure.ResourceManager.ApiManagement.Models.PolicyName policyId, Azure.ResourceManager.ApiManagement.Models.PolicyExportFormat? format = default(Azure.ResourceManager.ApiManagement.Models.PolicyExportFormat?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.ApiManagement.ResolverContractData 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.ApiManagement.ResolverContractData 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.ETag ifMatch, Azure.ResourceManager.ApiManagement.Models.ResolverContractPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ETag ifMatch, Azure.ResourceManager.ApiManagement.Models.ResolverContractPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class ServiceApiResolverPolicyCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ServiceApiResolverPolicyCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, Azure.ResourceManager.ApiManagement.Models.PolicyName policyId, Azure.ResourceManager.ApiManagement.PolicyContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ApiManagement.Models.PolicyName policyId, Azure.ResourceManager.ApiManagement.PolicyContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(Azure.ResourceManager.ApiManagement.Models.PolicyName policyId, Azure.ResourceManager.ApiManagement.Models.PolicyExportFormat? format = default(Azure.ResourceManager.ApiManagement.Models.PolicyExportFormat?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(Azure.ResourceManager.ApiManagement.Models.PolicyName policyId, Azure.ResourceManager.ApiManagement.Models.PolicyExportFormat? format = default(Azure.ResourceManager.ApiManagement.Models.PolicyExportFormat?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(Azure.ResourceManager.ApiManagement.Models.PolicyName policyId, Azure.ResourceManager.ApiManagement.Models.PolicyExportFormat? format = default(Azure.ResourceManager.ApiManagement.Models.PolicyExportFormat?), 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.ApiManagement.Models.PolicyName policyId, Azure.ResourceManager.ApiManagement.Models.PolicyExportFormat? format = default(Azure.ResourceManager.ApiManagement.Models.PolicyExportFormat?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(Azure.ResourceManager.ApiManagement.Models.PolicyName policyId, Azure.ResourceManager.ApiManagement.Models.PolicyExportFormat? format = default(Azure.ResourceManager.ApiManagement.Models.PolicyExportFormat?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(Azure.ResourceManager.ApiManagement.Models.PolicyName policyId, Azure.ResourceManager.ApiManagement.Models.PolicyExportFormat? format = default(Azure.ResourceManager.ApiManagement.Models.PolicyExportFormat?), 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 ServiceApiResolverPolicyResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ServiceApiResolverPolicyResource() { } + public virtual Azure.ResourceManager.ApiManagement.PolicyContractData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, Azure.ResourceManager.ApiManagement.Models.PolicyName policyId) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, Azure.ETag ifMatch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, Azure.ETag ifMatch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(Azure.ResourceManager.ApiManagement.Models.PolicyExportFormat? format = default(Azure.ResourceManager.ApiManagement.Models.PolicyExportFormat?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(Azure.ResourceManager.ApiManagement.Models.PolicyExportFormat? format = default(Azure.ResourceManager.ApiManagement.Models.PolicyExportFormat?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetEntityTag(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEntityTagAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.ApiManagement.PolicyContractData 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.ApiManagement.PolicyContractData 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.ApiManagement.PolicyContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ApiManagement.PolicyContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class ServiceApiWikiResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ServiceApiWikiResource() { } + public virtual Azure.ResourceManager.ApiManagement.WikiContractData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, Azure.ResourceManager.ApiManagement.WikiContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ApiManagement.WikiContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string apiId) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, Azure.ETag ifMatch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, Azure.ETag ifMatch, 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 GetEntityTag(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEntityTagAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.ApiManagement.WikiContractData 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.ApiManagement.WikiContractData 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.ETag ifMatch, Azure.ResourceManager.ApiManagement.Models.WikiUpdateContract wikiUpdateContract, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ETag ifMatch, Azure.ResourceManager.ApiManagement.Models.WikiUpdateContract wikiUpdateContract, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class ServiceProductWikiResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ServiceProductWikiResource() { } + public virtual Azure.ResourceManager.ApiManagement.WikiContractData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, Azure.ResourceManager.ApiManagement.WikiContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ApiManagement.WikiContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string productId) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, Azure.ETag ifMatch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, Azure.ETag ifMatch, 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 GetEntityTag(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEntityTagAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.ApiManagement.WikiContractData 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.ApiManagement.WikiContractData 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.ETag ifMatch, Azure.ResourceManager.ApiManagement.Models.WikiUpdateContract wikiUpdateContract, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ETag ifMatch, Azure.ResourceManager.ApiManagement.Models.WikiUpdateContract wikiUpdateContract, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public partial class SubscriptionContractData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public SubscriptionContractData() { } @@ -2757,6 +3237,16 @@ public UserContractData() { } 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 WikiContractData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WikiContractData() { } + public System.Collections.Generic.IList Documents { get { throw null; } } + Azure.ResourceManager.ApiManagement.WikiContractData 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.ApiManagement.WikiContractData 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.ApiManagement.Mocking { @@ -2811,6 +3301,16 @@ protected MockableApiManagementArmClient() { } public virtual Azure.ResourceManager.ApiManagement.ApiTagDescriptionResource GetApiTagDescriptionResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ApiManagement.ApiTagResource GetApiTagResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ApiManagement.ApiVersionSetResource GetApiVersionSetResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.ApiManagement.AuthorizationAccessPolicyContractResource GetAuthorizationAccessPolicyContractResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.ApiManagement.AuthorizationContractResource GetAuthorizationContractResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.ApiManagement.AuthorizationProviderContractResource GetAuthorizationProviderContractResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.ApiManagement.DocumentationContractResource GetDocumentationContractResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.ApiManagement.PolicyFragmentContractResource GetPolicyFragmentContractResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.ApiManagement.PortalConfigContractResource GetPortalConfigContractResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.ApiManagement.ResolverContractResource GetResolverContractResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.ApiManagement.ServiceApiResolverPolicyResource GetServiceApiResolverPolicyResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.ApiManagement.ServiceApiWikiResource GetServiceApiWikiResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.ApiManagement.ServiceProductWikiResource GetServiceProductWikiResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ApiManagement.TenantAccessInfoResource GetTenantAccessInfoResource(Azure.Core.ResourceIdentifier id) { throw null; } } public partial class MockableApiManagementResourceGroupResource : Azure.ResourceManager.ArmResource @@ -2864,6 +3364,8 @@ public AdditionalLocation(Azure.Core.AzureLocation location, Azure.ResourceManag public bool? DisableGateway { get { throw null; } set { } } public System.Uri GatewayRegionalUri { get { throw null; } } public Azure.Core.AzureLocation Location { get { throw null; } set { } } + public Azure.ResourceManager.ApiManagement.Models.ApiManagementNatGatewayState? NatGatewayState { get { throw null; } set { } } + public System.Collections.Generic.IReadOnlyList OutboundPublicIPAddresses { get { throw null; } } public Azure.ResourceManager.ApiManagement.Models.PlatformVersion? PlatformVersion { get { throw null; } } public System.Collections.Generic.IReadOnlyList PrivateIPAddresses { get { throw null; } } public System.Collections.Generic.IReadOnlyList PublicIPAddresses { get { throw null; } } @@ -2936,6 +3438,7 @@ public ApiCreateOrUpdateContent() { } public string TermsOfServiceLink { get { throw null; } set { } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public System.Uri TermsOfServiceUri { get { throw null; } set { } } + public Azure.ResourceManager.ApiManagement.Models.TranslateRequiredQueryParametersConduct? TranslateRequiredQueryParametersConduct { get { throw null; } set { } } public string Value { get { throw null; } set { } } public Azure.ResourceManager.ApiManagement.Models.ApiCreateOrUpdatePropertiesWsdlSelector WsdlSelector { get { throw null; } set { } } Azure.ResourceManager.ApiManagement.Models.ApiCreateOrUpdateContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3007,6 +3510,17 @@ public ApiLicenseInformation() { } 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 ApiManagementAuthorizationError : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ApiManagementAuthorizationError() { } + public string Code { get { throw null; } set { } } + public string Message { get { throw null; } set { } } + Azure.ResourceManager.ApiManagement.Models.ApiManagementAuthorizationError 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.ApiManagement.Models.ApiManagementAuthorizationError 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 ApiManagementAuthorizationServerPatch : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ApiManagementAuthorizationServerPatch() { } @@ -3026,12 +3540,31 @@ public ApiManagementAuthorizationServerPatch() { } public string ResourceOwnerUsername { get { throw null; } set { } } public System.Collections.Generic.IList TokenBodyParameters { get { throw null; } } public string TokenEndpoint { get { throw null; } set { } } + public bool? UseInApiDocumentation { get { throw null; } set { } } + public bool? UseInTestConsole { get { throw null; } set { } } Azure.ResourceManager.ApiManagement.Models.ApiManagementAuthorizationServerPatch 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.ApiManagement.Models.ApiManagementAuthorizationServerPatch 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 ApiManagementAuthorizationType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ApiManagementAuthorizationType(string value) { throw null; } + public static Azure.ResourceManager.ApiManagement.Models.ApiManagementAuthorizationType OAuth2 { get { throw null; } } + public bool Equals(Azure.ResourceManager.ApiManagement.Models.ApiManagementAuthorizationType 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.ApiManagement.Models.ApiManagementAuthorizationType left, Azure.ResourceManager.ApiManagement.Models.ApiManagementAuthorizationType right) { throw null; } + public static implicit operator Azure.ResourceManager.ApiManagement.Models.ApiManagementAuthorizationType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ApiManagement.Models.ApiManagementAuthorizationType left, Azure.ResourceManager.ApiManagement.Models.ApiManagementAuthorizationType right) { throw null; } + public override string ToString() { throw null; } + } public partial class ApiManagementBackendPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ApiManagementBackendPatch() { } @@ -3174,6 +3707,7 @@ public ApiManagementIdentityProviderCreateOrUpdateContent() { } public System.Collections.Generic.IList AllowedTenants { get { throw null; } } public string Authority { get { throw null; } set { } } public string ClientId { get { throw null; } set { } } + public string ClientLibrary { get { throw null; } set { } } public string ClientSecret { get { throw null; } set { } } public Azure.ResourceManager.ApiManagement.Models.IdentityProviderType? IdentityProviderType { get { throw null; } set { } } public string PasswordResetPolicyName { get { throw null; } set { } } @@ -3193,6 +3727,7 @@ public ApiManagementIdentityProviderPatch() { } public System.Collections.Generic.IList AllowedTenants { get { throw null; } } public string Authority { get { throw null; } set { } } public string ClientId { get { throw null; } set { } } + public string ClientLibrary { get { throw null; } set { } } public string ClientSecret { get { throw null; } set { } } public Azure.ResourceManager.ApiManagement.Models.IdentityProviderType? IdentityProviderType { get { throw null; } set { } } public string PasswordResetPolicyName { get { throw null; } set { } } @@ -3247,6 +3782,24 @@ public ApiManagementNamedValuePatch() { } 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 ApiManagementNatGatewayState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ApiManagementNatGatewayState(string value) { throw null; } + public static Azure.ResourceManager.ApiManagement.Models.ApiManagementNatGatewayState Disabled { get { throw null; } } + public static Azure.ResourceManager.ApiManagement.Models.ApiManagementNatGatewayState Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.ApiManagement.Models.ApiManagementNatGatewayState 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.ApiManagement.Models.ApiManagementNatGatewayState left, Azure.ResourceManager.ApiManagement.Models.ApiManagementNatGatewayState right) { throw null; } + public static implicit operator Azure.ResourceManager.ApiManagement.Models.ApiManagementNatGatewayState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ApiManagement.Models.ApiManagementNatGatewayState left, Azure.ResourceManager.ApiManagement.Models.ApiManagementNatGatewayState right) { throw null; } + public override string ToString() { throw null; } + } public partial class ApiManagementOpenIdConnectProviderPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ApiManagementOpenIdConnectProviderPatch() { } @@ -3255,6 +3808,8 @@ public ApiManagementOpenIdConnectProviderPatch() { } public string Description { get { throw null; } set { } } public string DisplayName { get { throw null; } set { } } public string MetadataEndpoint { get { throw null; } set { } } + public bool? UseInApiDocumentation { get { throw null; } set { } } + public bool? UseInTestConsole { get { throw null; } set { } } Azure.ResourceManager.ApiManagement.Models.ApiManagementOpenIdConnectProviderPatch 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.ApiManagement.Models.ApiManagementOpenIdConnectProviderPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3466,7 +4021,9 @@ public ApiManagementServicePatch() { } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public System.Uri ManagementApiUri { get { throw null; } } public string MinApiVersion { get { throw null; } set { } } + public Azure.ResourceManager.ApiManagement.Models.ApiManagementNatGatewayState? NatGatewayState { get { throw null; } set { } } public string NotificationSenderEmail { get { throw null; } set { } } + public System.Collections.Generic.IReadOnlyList OutboundPublicIPAddresses { get { throw null; } } public Azure.ResourceManager.ApiManagement.Models.PlatformVersion? PlatformVersion { get { throw null; } } public System.Uri PortalUri { get { throw null; } } public System.Collections.Generic.IList PrivateEndpointConnections { get { throw null; } } @@ -3931,8 +4488,10 @@ public ApiVersionSetPatch() { } } public static partial class ArmApiManagementModelFactory { - public static Azure.ResourceManager.ApiManagement.Models.AdditionalLocation AdditionalLocation(Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.ApiManagement.Models.ApiManagementServiceSkuProperties sku = null, System.Collections.Generic.IEnumerable zones = null, System.Collections.Generic.IEnumerable publicIPAddresses = null, System.Collections.Generic.IEnumerable privateIPAddresses = null, Azure.Core.ResourceIdentifier publicIPAddressId = null, Azure.ResourceManager.ApiManagement.Models.VirtualNetworkConfiguration virtualNetworkConfiguration = null, System.Uri gatewayRegionalUri = null, bool? disableGateway = default(bool?), Azure.ResourceManager.ApiManagement.Models.PlatformVersion? platformVersion = default(Azure.ResourceManager.ApiManagement.Models.PlatformVersion?)) { throw null; } - public static Azure.ResourceManager.ApiManagement.Models.ApiCreateOrUpdateContent ApiCreateOrUpdateContent(string description = null, Azure.ResourceManager.ApiManagement.Models.AuthenticationSettingsContract authenticationSettings = null, Azure.ResourceManager.ApiManagement.Models.SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames = null, Azure.ResourceManager.ApiManagement.Models.ApiType? apiType = default(Azure.ResourceManager.ApiManagement.Models.ApiType?), string apiRevision = null, string apiVersion = null, bool? isCurrent = default(bool?), bool? isOnline = default(bool?), string apiRevisionDescription = null, string apiVersionDescription = null, Azure.Core.ResourceIdentifier apiVersionSetId = null, bool? isSubscriptionRequired = default(bool?), string termsOfServiceLink = null, Azure.ResourceManager.ApiManagement.Models.ApiContactInformation contact = null, Azure.ResourceManager.ApiManagement.Models.ApiLicenseInformation license = null, Azure.Core.ResourceIdentifier sourceApiId = null, string displayName = null, string serviceLink = null, string path = null, System.Collections.Generic.IEnumerable protocols = null, Azure.ResourceManager.ApiManagement.Models.ApiVersionSetContractDetails apiVersionSet = null, string value = null, Azure.ResourceManager.ApiManagement.Models.ContentFormat? format = default(Azure.ResourceManager.ApiManagement.Models.ContentFormat?), Azure.ResourceManager.ApiManagement.Models.ApiCreateOrUpdatePropertiesWsdlSelector wsdlSelector = null, Azure.ResourceManager.ApiManagement.Models.SoapApiType? soapApiType = default(Azure.ResourceManager.ApiManagement.Models.SoapApiType?)) { throw null; } + public static Azure.ResourceManager.ApiManagement.Models.AdditionalLocation AdditionalLocation(Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.ApiManagement.Models.ApiManagementServiceSkuProperties sku = null, System.Collections.Generic.IEnumerable zones = null, System.Collections.Generic.IEnumerable publicIPAddresses = null, System.Collections.Generic.IEnumerable privateIPAddresses = null, Azure.Core.ResourceIdentifier publicIPAddressId = null, Azure.ResourceManager.ApiManagement.Models.VirtualNetworkConfiguration virtualNetworkConfiguration = null, System.Uri gatewayRegionalUri = null, Azure.ResourceManager.ApiManagement.Models.ApiManagementNatGatewayState? natGatewayState = default(Azure.ResourceManager.ApiManagement.Models.ApiManagementNatGatewayState?), System.Collections.Generic.IEnumerable outboundPublicIPAddresses = null, bool? disableGateway = default(bool?), Azure.ResourceManager.ApiManagement.Models.PlatformVersion? platformVersion = default(Azure.ResourceManager.ApiManagement.Models.PlatformVersion?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.ApiManagement.Models.AdditionalLocation AdditionalLocation(Azure.Core.AzureLocation location, Azure.ResourceManager.ApiManagement.Models.ApiManagementServiceSkuProperties sku, System.Collections.Generic.IEnumerable zones, System.Collections.Generic.IEnumerable publicIPAddresses, System.Collections.Generic.IEnumerable privateIPAddresses, Azure.Core.ResourceIdentifier publicIPAddressId, Azure.ResourceManager.ApiManagement.Models.VirtualNetworkConfiguration virtualNetworkConfiguration, System.Uri gatewayRegionalUri, bool? disableGateway, Azure.ResourceManager.ApiManagement.Models.PlatformVersion? platformVersion) { throw null; } + public static Azure.ResourceManager.ApiManagement.Models.ApiCreateOrUpdateContent ApiCreateOrUpdateContent(string description = null, Azure.ResourceManager.ApiManagement.Models.AuthenticationSettingsContract authenticationSettings = null, Azure.ResourceManager.ApiManagement.Models.SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames = null, Azure.ResourceManager.ApiManagement.Models.ApiType? apiType = default(Azure.ResourceManager.ApiManagement.Models.ApiType?), string apiRevision = null, string apiVersion = null, bool? isCurrent = default(bool?), bool? isOnline = default(bool?), string apiRevisionDescription = null, string apiVersionDescription = null, Azure.Core.ResourceIdentifier apiVersionSetId = null, bool? isSubscriptionRequired = default(bool?), string termsOfServiceLink = null, Azure.ResourceManager.ApiManagement.Models.ApiContactInformation contact = null, Azure.ResourceManager.ApiManagement.Models.ApiLicenseInformation license = null, Azure.Core.ResourceIdentifier sourceApiId = null, string displayName = null, string serviceLink = null, string path = null, System.Collections.Generic.IEnumerable protocols = null, Azure.ResourceManager.ApiManagement.Models.ApiVersionSetContractDetails apiVersionSet = null, string value = null, Azure.ResourceManager.ApiManagement.Models.ContentFormat? format = default(Azure.ResourceManager.ApiManagement.Models.ContentFormat?), Azure.ResourceManager.ApiManagement.Models.ApiCreateOrUpdatePropertiesWsdlSelector wsdlSelector = null, Azure.ResourceManager.ApiManagement.Models.SoapApiType? soapApiType = default(Azure.ResourceManager.ApiManagement.Models.SoapApiType?), Azure.ResourceManager.ApiManagement.Models.TranslateRequiredQueryParametersConduct? translateRequiredQueryParametersConduct = default(Azure.ResourceManager.ApiManagement.Models.TranslateRequiredQueryParametersConduct?)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.ApiManagement.Models.ApiCreateOrUpdateContent ApiCreateOrUpdateContent(string description, Azure.ResourceManager.ApiManagement.Models.AuthenticationSettingsContract authenticationSettings, Azure.ResourceManager.ApiManagement.Models.SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames, Azure.ResourceManager.ApiManagement.Models.ApiType? apiType, string apiRevision, string apiVersion, bool? isCurrent, bool? isOnline, string apiRevisionDescription, string apiVersionDescription, Azure.Core.ResourceIdentifier apiVersionSetId, bool? isSubscriptionRequired, System.Uri termsOfServiceUri, Azure.ResourceManager.ApiManagement.Models.ApiContactInformation contact, Azure.ResourceManager.ApiManagement.Models.ApiLicenseInformation license, Azure.Core.ResourceIdentifier sourceApiId, string displayName, System.Uri serviceUri, string path = null, System.Collections.Generic.IEnumerable protocols = null, Azure.ResourceManager.ApiManagement.Models.ApiVersionSetContractDetails apiVersionSet = null, string value = null, Azure.ResourceManager.ApiManagement.Models.ContentFormat? format = default(Azure.ResourceManager.ApiManagement.Models.ContentFormat?), Azure.ResourceManager.ApiManagement.Models.ApiCreateOrUpdatePropertiesWsdlSelector wsdlSelector = null, Azure.ResourceManager.ApiManagement.Models.SoapApiType? soapApiType = default(Azure.ResourceManager.ApiManagement.Models.SoapApiType?)) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiData ApiData(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, Azure.ResourceManager.ApiManagement.Models.AuthenticationSettingsContract authenticationSettings = null, Azure.ResourceManager.ApiManagement.Models.SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames = null, Azure.ResourceManager.ApiManagement.Models.ApiType? apiType = default(Azure.ResourceManager.ApiManagement.Models.ApiType?), string apiRevision = null, string apiVersion = null, bool? isCurrent = default(bool?), bool? isOnline = default(bool?), string apiRevisionDescription = null, string apiVersionDescription = null, Azure.Core.ResourceIdentifier apiVersionSetId = null, bool? isSubscriptionRequired = default(bool?), string termsOfServiceLink = null, Azure.ResourceManager.ApiManagement.Models.ApiContactInformation contact = null, Azure.ResourceManager.ApiManagement.Models.ApiLicenseInformation license = null, Azure.Core.ResourceIdentifier sourceApiId = null, string displayName = null, string serviceLink = null, string path = null, System.Collections.Generic.IEnumerable protocols = null, Azure.ResourceManager.ApiManagement.Models.ApiVersionSetContractDetails apiVersionSet = null) { throw null; } @@ -3943,8 +4502,12 @@ public static partial class ArmApiManagementModelFactory public static Azure.ResourceManager.ApiManagement.Models.ApiEntityBaseContract ApiEntityBaseContract(string description, Azure.ResourceManager.ApiManagement.Models.AuthenticationSettingsContract authenticationSettings, Azure.ResourceManager.ApiManagement.Models.SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames, Azure.ResourceManager.ApiManagement.Models.ApiType? apiType, string apiRevision, string apiVersion, bool? isCurrent, bool? isOnline, string apiRevisionDescription, string apiVersionDescription, Azure.Core.ResourceIdentifier apiVersionSetId, bool? isSubscriptionRequired, System.Uri termsOfServiceUri, Azure.ResourceManager.ApiManagement.Models.ApiContactInformation contact = null, Azure.ResourceManager.ApiManagement.Models.ApiLicenseInformation license = null) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiIssueAttachmentData ApiIssueAttachmentData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string title = null, string contentFormat = null, string content = null) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiIssueCommentData ApiIssueCommentData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string text = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), Azure.Core.ResourceIdentifier userId = null) { throw null; } - public static Azure.ResourceManager.ApiManagement.ApiManagementAuthorizationServerData ApiManagementAuthorizationServerData(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, System.Collections.Generic.IEnumerable authorizationMethods = null, System.Collections.Generic.IEnumerable clientAuthenticationMethods = null, System.Collections.Generic.IEnumerable tokenBodyParameters = null, string tokenEndpoint = null, bool? doesSupportState = default(bool?), string defaultScope = null, System.Collections.Generic.IEnumerable bearerTokenSendingMethods = null, string resourceOwnerUsername = null, string resourceOwnerPassword = null, string displayName = null, string clientRegistrationEndpoint = null, string authorizationEndpoint = null, System.Collections.Generic.IEnumerable grantTypes = null, string clientId = null, string clientSecret = null) { throw null; } - public static Azure.ResourceManager.ApiManagement.Models.ApiManagementAuthorizationServerPatch ApiManagementAuthorizationServerPatch(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, System.Collections.Generic.IEnumerable authorizationMethods = null, System.Collections.Generic.IEnumerable clientAuthenticationMethods = null, System.Collections.Generic.IEnumerable tokenBodyParameters = null, string tokenEndpoint = null, bool? doesSupportState = default(bool?), string defaultScope = null, System.Collections.Generic.IEnumerable bearerTokenSendingMethods = null, string resourceOwnerUsername = null, string resourceOwnerPassword = null, string displayName = null, string clientRegistrationEndpoint = null, string authorizationEndpoint = null, System.Collections.Generic.IEnumerable grantTypes = null, string clientId = null, string clientSecret = null) { throw null; } + public static Azure.ResourceManager.ApiManagement.ApiManagementAuthorizationServerData ApiManagementAuthorizationServerData(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, System.Collections.Generic.IEnumerable authorizationMethods = null, System.Collections.Generic.IEnumerable clientAuthenticationMethods = null, System.Collections.Generic.IEnumerable tokenBodyParameters = null, string tokenEndpoint = null, bool? doesSupportState = default(bool?), string defaultScope = null, System.Collections.Generic.IEnumerable bearerTokenSendingMethods = null, string resourceOwnerUsername = null, string resourceOwnerPassword = null, string displayName = null, bool? useInTestConsole = default(bool?), bool? useInApiDocumentation = default(bool?), string clientRegistrationEndpoint = null, string authorizationEndpoint = null, System.Collections.Generic.IEnumerable grantTypes = null, string clientId = null, string clientSecret = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.ApiManagement.ApiManagementAuthorizationServerData ApiManagementAuthorizationServerData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, string description, System.Collections.Generic.IEnumerable authorizationMethods, System.Collections.Generic.IEnumerable clientAuthenticationMethods, System.Collections.Generic.IEnumerable tokenBodyParameters, string tokenEndpoint, bool? doesSupportState, string defaultScope, System.Collections.Generic.IEnumerable bearerTokenSendingMethods, string resourceOwnerUsername, string resourceOwnerPassword, string displayName, string clientRegistrationEndpoint, string authorizationEndpoint, System.Collections.Generic.IEnumerable grantTypes, string clientId, string clientSecret) { throw null; } + public static Azure.ResourceManager.ApiManagement.Models.ApiManagementAuthorizationServerPatch ApiManagementAuthorizationServerPatch(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, System.Collections.Generic.IEnumerable authorizationMethods = null, System.Collections.Generic.IEnumerable clientAuthenticationMethods = null, System.Collections.Generic.IEnumerable tokenBodyParameters = null, string tokenEndpoint = null, bool? doesSupportState = default(bool?), string defaultScope = null, System.Collections.Generic.IEnumerable bearerTokenSendingMethods = null, string resourceOwnerUsername = null, string resourceOwnerPassword = null, string displayName = null, bool? useInTestConsole = default(bool?), bool? useInApiDocumentation = default(bool?), string clientRegistrationEndpoint = null, string authorizationEndpoint = null, System.Collections.Generic.IEnumerable grantTypes = null, string clientId = null, string clientSecret = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.ApiManagement.Models.ApiManagementAuthorizationServerPatch ApiManagementAuthorizationServerPatch(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, string description, System.Collections.Generic.IEnumerable authorizationMethods, System.Collections.Generic.IEnumerable clientAuthenticationMethods, System.Collections.Generic.IEnumerable tokenBodyParameters, string tokenEndpoint, bool? doesSupportState, string defaultScope, System.Collections.Generic.IEnumerable bearerTokenSendingMethods, string resourceOwnerUsername, string resourceOwnerPassword, string displayName, string clientRegistrationEndpoint, string authorizationEndpoint, System.Collections.Generic.IEnumerable grantTypes, string clientId, string clientSecret) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiManagementBackendData ApiManagementBackendData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string title = null, string description = null, System.Uri resourceUri = null, Azure.ResourceManager.ApiManagement.Models.BackendServiceFabricClusterProperties backendServiceFabricCluster = null, Azure.ResourceManager.ApiManagement.Models.BackendCredentialsContract credentials = null, Azure.ResourceManager.ApiManagement.Models.BackendProxyContract proxy = null, Azure.ResourceManager.ApiManagement.Models.BackendTlsProperties tls = null, System.Uri uri = null, Azure.ResourceManager.ApiManagement.Models.BackendProtocol? protocol = default(Azure.ResourceManager.ApiManagement.Models.BackendProtocol?)) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiManagementCacheData ApiManagementCacheData(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 connectionString = null, string useFromLocation = null, System.Uri resourceUri = null) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiManagementCertificateData ApiManagementCertificateData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string subject = null, string thumbprint = null, System.DateTimeOffset? expireOn = default(System.DateTimeOffset?), Azure.ResourceManager.ApiManagement.Models.KeyVaultContractProperties keyVaultDetails = null) { throw null; } @@ -3956,13 +4519,19 @@ public static partial class ArmApiManagementModelFactory public static Azure.ResourceManager.ApiManagement.ApiManagementGlobalSchemaData ApiManagementGlobalSchemaData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ApiManagement.Models.ApiSchemaType? schemaType = default(Azure.ResourceManager.ApiManagement.Models.ApiSchemaType?), string description = null, System.BinaryData value = null, System.BinaryData document = null) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiManagementGroupData ApiManagementGroupData(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 description = null, bool? isBuiltIn = default(bool?), Azure.ResourceManager.ApiManagement.Models.ApiManagementGroupType? groupType = default(Azure.ResourceManager.ApiManagement.Models.ApiManagementGroupType?), string externalId = null) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.ApiManagementGroupUserData ApiManagementGroupUserData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ApiManagement.Models.ApiManagementUserState? state = default(Azure.ResourceManager.ApiManagement.Models.ApiManagementUserState?), string note = null, System.Collections.Generic.IEnumerable identities = null, string firstName = null, string lastName = null, string email = null, System.DateTimeOffset? registriesOn = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable groups = null) { throw null; } - public static Azure.ResourceManager.ApiManagement.Models.ApiManagementIdentityProviderCreateOrUpdateContent ApiManagementIdentityProviderCreateOrUpdateContent(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ApiManagement.Models.IdentityProviderType? identityProviderType = default(Azure.ResourceManager.ApiManagement.Models.IdentityProviderType?), string signInTenant = null, System.Collections.Generic.IEnumerable allowedTenants = null, string authority = null, string signUpPolicyName = null, string signInPolicyName = null, string profileEditingPolicyName = null, string passwordResetPolicyName = null, string clientId = null, string clientSecret = null) { throw null; } - public static Azure.ResourceManager.ApiManagement.ApiManagementIdentityProviderData ApiManagementIdentityProviderData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ApiManagement.Models.IdentityProviderType? identityProviderType = default(Azure.ResourceManager.ApiManagement.Models.IdentityProviderType?), string signInTenant = null, System.Collections.Generic.IEnumerable allowedTenants = null, string authority = null, string signUpPolicyName = null, string signInPolicyName = null, string profileEditingPolicyName = null, string passwordResetPolicyName = null, string clientId = null, string clientSecret = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.ApiManagement.Models.ApiManagementIdentityProviderCreateOrUpdateContent ApiManagementIdentityProviderCreateOrUpdateContent(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, Azure.ResourceManager.ApiManagement.Models.IdentityProviderType? identityProviderType, string signInTenant, System.Collections.Generic.IEnumerable allowedTenants, string authority, string signUpPolicyName, string signInPolicyName, string profileEditingPolicyName, string passwordResetPolicyName, string clientId, string clientSecret) { throw null; } + public static Azure.ResourceManager.ApiManagement.Models.ApiManagementIdentityProviderCreateOrUpdateContent ApiManagementIdentityProviderCreateOrUpdateContent(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ApiManagement.Models.IdentityProviderType? identityProviderType = default(Azure.ResourceManager.ApiManagement.Models.IdentityProviderType?), string signInTenant = null, System.Collections.Generic.IEnumerable allowedTenants = null, string authority = null, string signUpPolicyName = null, string signInPolicyName = null, string profileEditingPolicyName = null, string passwordResetPolicyName = null, string clientLibrary = null, string clientId = null, string clientSecret = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.ApiManagement.ApiManagementIdentityProviderData ApiManagementIdentityProviderData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, Azure.ResourceManager.ApiManagement.Models.IdentityProviderType? identityProviderType, string signInTenant, System.Collections.Generic.IEnumerable allowedTenants, string authority, string signUpPolicyName, string signInPolicyName, string profileEditingPolicyName, string passwordResetPolicyName, string clientId, string clientSecret) { throw null; } + public static Azure.ResourceManager.ApiManagement.ApiManagementIdentityProviderData ApiManagementIdentityProviderData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ApiManagement.Models.IdentityProviderType? identityProviderType = default(Azure.ResourceManager.ApiManagement.Models.IdentityProviderType?), string signInTenant = null, System.Collections.Generic.IEnumerable allowedTenants = null, string authority = null, string signUpPolicyName = null, string signInPolicyName = null, string profileEditingPolicyName = null, string passwordResetPolicyName = null, string clientLibrary = null, string clientId = null, string clientSecret = null) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiManagementLoggerData ApiManagementLoggerData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ApiManagement.Models.LoggerType? loggerType = default(Azure.ResourceManager.ApiManagement.Models.LoggerType?), string description = null, System.Collections.Generic.IDictionary credentials = null, bool? isBuffered = default(bool?), Azure.Core.ResourceIdentifier resourceId = null) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.ApiManagementNamedValueCreateOrUpdateContent ApiManagementNamedValueCreateOrUpdateContent(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 tags = null, bool? isSecret = default(bool?), string displayName = null, string value = null, Azure.ResourceManager.ApiManagement.Models.KeyVaultContractCreateProperties keyVault = null) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiManagementNamedValueData ApiManagementNamedValueData(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 tags = null, bool? isSecret = default(bool?), string displayName = null, string value = null, Azure.ResourceManager.ApiManagement.Models.KeyVaultContractProperties keyVaultDetails = null) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiManagementNotificationData ApiManagementNotificationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string title = null, string description = null, Azure.ResourceManager.ApiManagement.Models.RecipientsContractProperties recipients = null) { throw null; } - public static Azure.ResourceManager.ApiManagement.ApiManagementOpenIdConnectProviderData ApiManagementOpenIdConnectProviderData(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 description = null, string metadataEndpoint = null, string clientId = null, string clientSecret = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.ApiManagement.ApiManagementOpenIdConnectProviderData ApiManagementOpenIdConnectProviderData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, string displayName, string description, string metadataEndpoint, string clientId, string clientSecret) { throw null; } + public static Azure.ResourceManager.ApiManagement.ApiManagementOpenIdConnectProviderData ApiManagementOpenIdConnectProviderData(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 description = null, string metadataEndpoint = null, string clientId = null, string clientSecret = null, bool? useInTestConsole = default(bool?), bool? useInApiDocumentation = default(bool?)) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiManagementPortalDelegationSettingData ApiManagementPortalDelegationSettingData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Uri uri = null, string validationKey = null, bool? isSubscriptionDelegationEnabled = default(bool?), bool? isUserRegistrationDelegationEnabled = default(bool?)) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiManagementPortalRevisionData ApiManagementPortalRevisionData(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 statusDetails = null, Azure.ResourceManager.ApiManagement.Models.PortalRevisionStatus? status = default(Azure.ResourceManager.ApiManagement.Models.PortalRevisionStatus?), bool? isCurrent = default(bool?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? updatedOn = default(System.DateTimeOffset?)) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiManagementPortalSignInSettingData ApiManagementPortalSignInSettingData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, bool? isRedirectEnabled = default(bool?)) { throw null; } @@ -3972,11 +4541,15 @@ public static partial class ArmApiManagementModelFactory public static Azure.ResourceManager.ApiManagement.ApiManagementProductData ApiManagementProductData(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 terms = null, bool? isSubscriptionRequired = default(bool?), bool? isApprovalRequired = default(bool?), int? subscriptionsLimit = default(int?), Azure.ResourceManager.ApiManagement.Models.ApiManagementProductState? state = default(Azure.ResourceManager.ApiManagement.Models.ApiManagementProductState?), string displayName = null) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.ApiManagementResourceSkuCapacity ApiManagementResourceSkuCapacity(int? minimum = default(int?), int? maximum = default(int?), int? @default = default(int?), Azure.ResourceManager.ApiManagement.Models.ApiManagementResourceSkuCapacityScaleType? scaleType = default(Azure.ResourceManager.ApiManagement.Models.ApiManagementResourceSkuCapacityScaleType?)) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.ApiManagementServiceBackupRestoreContent ApiManagementServiceBackupRestoreContent(string storageAccount = null, string containerName = null, string backupName = null, Azure.ResourceManager.ApiManagement.Models.StorageAccountAccessType? accessType = default(Azure.ResourceManager.ApiManagement.Models.StorageAccountAccessType?), string accessKey = null, string clientId = null) { throw null; } - public static Azure.ResourceManager.ApiManagement.ApiManagementServiceData ApiManagementServiceData(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.ApiManagement.Models.ApiManagementServiceSkuProperties sku = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ETag? etag = default(Azure.ETag?), System.Collections.Generic.IEnumerable zones = null, string notificationSenderEmail = null, string provisioningState = null, string targetProvisioningState = null, System.DateTimeOffset? createdAtUtc = default(System.DateTimeOffset?), System.Uri gatewayUri = null, System.Uri gatewayRegionalUri = null, System.Uri portalUri = null, System.Uri managementApiUri = null, System.Uri scmUri = null, System.Uri developerPortalUri = null, System.Collections.Generic.IEnumerable hostnameConfigurations = null, System.Collections.Generic.IEnumerable publicIPAddresses = null, System.Collections.Generic.IEnumerable privateIPAddresses = null, Azure.Core.ResourceIdentifier publicIPAddressId = null, Azure.ResourceManager.ApiManagement.Models.PublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.ApiManagement.Models.PublicNetworkAccess?), Azure.ResourceManager.ApiManagement.Models.VirtualNetworkConfiguration virtualNetworkConfiguration = null, System.Collections.Generic.IEnumerable additionalLocations = null, System.Collections.Generic.IDictionary customProperties = null, System.Collections.Generic.IEnumerable certificates = null, bool? enableClientCertificate = default(bool?), bool? disableGateway = default(bool?), Azure.ResourceManager.ApiManagement.Models.VirtualNetworkType? virtualNetworkType = default(Azure.ResourceManager.ApiManagement.Models.VirtualNetworkType?), string minApiVersion = null, bool? restore = default(bool?), System.Collections.Generic.IEnumerable privateEndpointConnections = null, Azure.ResourceManager.ApiManagement.Models.PlatformVersion? platformVersion = default(Azure.ResourceManager.ApiManagement.Models.PlatformVersion?), string publisherEmail = null, string publisherName = null) { throw null; } + public static Azure.ResourceManager.ApiManagement.ApiManagementServiceData ApiManagementServiceData(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.ApiManagement.Models.ApiManagementServiceSkuProperties sku = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ETag? etag = default(Azure.ETag?), System.Collections.Generic.IEnumerable zones = null, string notificationSenderEmail = null, string provisioningState = null, string targetProvisioningState = null, System.DateTimeOffset? createdAtUtc = default(System.DateTimeOffset?), System.Uri gatewayUri = null, System.Uri gatewayRegionalUri = null, System.Uri portalUri = null, System.Uri managementApiUri = null, System.Uri scmUri = null, System.Uri developerPortalUri = null, System.Collections.Generic.IEnumerable hostnameConfigurations = null, System.Collections.Generic.IEnumerable publicIPAddresses = null, System.Collections.Generic.IEnumerable privateIPAddresses = null, Azure.Core.ResourceIdentifier publicIPAddressId = null, Azure.ResourceManager.ApiManagement.Models.PublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.ApiManagement.Models.PublicNetworkAccess?), Azure.ResourceManager.ApiManagement.Models.VirtualNetworkConfiguration virtualNetworkConfiguration = null, System.Collections.Generic.IEnumerable additionalLocations = null, System.Collections.Generic.IDictionary customProperties = null, System.Collections.Generic.IEnumerable certificates = null, bool? enableClientCertificate = default(bool?), Azure.ResourceManager.ApiManagement.Models.ApiManagementNatGatewayState? natGatewayState = default(Azure.ResourceManager.ApiManagement.Models.ApiManagementNatGatewayState?), System.Collections.Generic.IEnumerable outboundPublicIPAddresses = null, bool? disableGateway = default(bool?), Azure.ResourceManager.ApiManagement.Models.VirtualNetworkType? virtualNetworkType = default(Azure.ResourceManager.ApiManagement.Models.VirtualNetworkType?), string minApiVersion = null, bool? restore = default(bool?), System.Collections.Generic.IEnumerable privateEndpointConnections = null, Azure.ResourceManager.ApiManagement.Models.PlatformVersion? platformVersion = default(Azure.ResourceManager.ApiManagement.Models.PlatformVersion?), string publisherEmail = null, string publisherName = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.ApiManagement.ApiManagementServiceData ApiManagementServiceData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ResourceManager.ApiManagement.Models.ApiManagementServiceSkuProperties sku, Azure.ResourceManager.Models.ManagedServiceIdentity identity, Azure.ETag? etag, System.Collections.Generic.IEnumerable zones, string notificationSenderEmail, string provisioningState, string targetProvisioningState, System.DateTimeOffset? createdAtUtc, System.Uri gatewayUri, System.Uri gatewayRegionalUri, System.Uri portalUri, System.Uri managementApiUri, System.Uri scmUri, System.Uri developerPortalUri, System.Collections.Generic.IEnumerable hostnameConfigurations, System.Collections.Generic.IEnumerable publicIPAddresses, System.Collections.Generic.IEnumerable privateIPAddresses, Azure.Core.ResourceIdentifier publicIPAddressId, Azure.ResourceManager.ApiManagement.Models.PublicNetworkAccess? publicNetworkAccess, Azure.ResourceManager.ApiManagement.Models.VirtualNetworkConfiguration virtualNetworkConfiguration, System.Collections.Generic.IEnumerable additionalLocations, System.Collections.Generic.IDictionary customProperties, System.Collections.Generic.IEnumerable certificates, bool? enableClientCertificate, bool? disableGateway, Azure.ResourceManager.ApiManagement.Models.VirtualNetworkType? virtualNetworkType, string minApiVersion, bool? restore, System.Collections.Generic.IEnumerable privateEndpointConnections, Azure.ResourceManager.ApiManagement.Models.PlatformVersion? platformVersion, string publisherEmail, string publisherName) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.ApiManagementServiceGetDomainOwnershipIdentifierResult ApiManagementServiceGetDomainOwnershipIdentifierResult(string domainOwnershipIdentifier = null) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.ApiManagementServiceGetSsoTokenResult ApiManagementServiceGetSsoTokenResult(System.Uri redirectUri = null) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.ApiManagementServiceNameAvailabilityResult ApiManagementServiceNameAvailabilityResult(bool? isNameAvailable = default(bool?), string message = null, Azure.ResourceManager.ApiManagement.Models.ApiManagementServiceNameUnavailableReason? reason = default(Azure.ResourceManager.ApiManagement.Models.ApiManagementServiceNameUnavailableReason?)) { throw null; } - public static Azure.ResourceManager.ApiManagement.Models.ApiManagementServicePatch ApiManagementServicePatch(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ApiManagement.Models.ApiManagementServiceSkuProperties sku = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ETag? etag = default(Azure.ETag?), System.Collections.Generic.IEnumerable zones = null, string notificationSenderEmail = null, string provisioningState = null, string targetProvisioningState = null, System.DateTimeOffset? createdAtUtc = default(System.DateTimeOffset?), System.Uri gatewayUri = null, System.Uri gatewayRegionalUri = null, System.Uri portalUri = null, System.Uri managementApiUri = null, System.Uri scmUri = null, System.Uri developerPortalUri = null, System.Collections.Generic.IEnumerable hostnameConfigurations = null, System.Collections.Generic.IEnumerable publicIPAddresses = null, System.Collections.Generic.IEnumerable privateIPAddresses = null, Azure.Core.ResourceIdentifier publicIPAddressId = null, Azure.ResourceManager.ApiManagement.Models.PublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.ApiManagement.Models.PublicNetworkAccess?), Azure.ResourceManager.ApiManagement.Models.VirtualNetworkConfiguration virtualNetworkConfiguration = null, System.Collections.Generic.IEnumerable additionalLocations = null, System.Collections.Generic.IDictionary customProperties = null, System.Collections.Generic.IEnumerable certificates = null, bool? enableClientCertificate = default(bool?), bool? disableGateway = default(bool?), Azure.ResourceManager.ApiManagement.Models.VirtualNetworkType? virtualNetworkType = default(Azure.ResourceManager.ApiManagement.Models.VirtualNetworkType?), string minApiVersion = null, bool? restore = default(bool?), System.Collections.Generic.IEnumerable privateEndpointConnections = null, Azure.ResourceManager.ApiManagement.Models.PlatformVersion? platformVersion = default(Azure.ResourceManager.ApiManagement.Models.PlatformVersion?), string publisherEmail = null, string publisherName = null, System.Collections.Generic.IDictionary tags = null) { throw null; } + public static Azure.ResourceManager.ApiManagement.Models.ApiManagementServicePatch ApiManagementServicePatch(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ApiManagement.Models.ApiManagementServiceSkuProperties sku = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ETag? etag = default(Azure.ETag?), System.Collections.Generic.IEnumerable zones = null, string notificationSenderEmail = null, string provisioningState = null, string targetProvisioningState = null, System.DateTimeOffset? createdAtUtc = default(System.DateTimeOffset?), System.Uri gatewayUri = null, System.Uri gatewayRegionalUri = null, System.Uri portalUri = null, System.Uri managementApiUri = null, System.Uri scmUri = null, System.Uri developerPortalUri = null, System.Collections.Generic.IEnumerable hostnameConfigurations = null, System.Collections.Generic.IEnumerable publicIPAddresses = null, System.Collections.Generic.IEnumerable privateIPAddresses = null, Azure.Core.ResourceIdentifier publicIPAddressId = null, Azure.ResourceManager.ApiManagement.Models.PublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.ApiManagement.Models.PublicNetworkAccess?), Azure.ResourceManager.ApiManagement.Models.VirtualNetworkConfiguration virtualNetworkConfiguration = null, System.Collections.Generic.IEnumerable additionalLocations = null, System.Collections.Generic.IDictionary customProperties = null, System.Collections.Generic.IEnumerable certificates = null, bool? enableClientCertificate = default(bool?), Azure.ResourceManager.ApiManagement.Models.ApiManagementNatGatewayState? natGatewayState = default(Azure.ResourceManager.ApiManagement.Models.ApiManagementNatGatewayState?), System.Collections.Generic.IEnumerable outboundPublicIPAddresses = null, bool? disableGateway = default(bool?), Azure.ResourceManager.ApiManagement.Models.VirtualNetworkType? virtualNetworkType = default(Azure.ResourceManager.ApiManagement.Models.VirtualNetworkType?), string minApiVersion = null, bool? restore = default(bool?), System.Collections.Generic.IEnumerable privateEndpointConnections = null, Azure.ResourceManager.ApiManagement.Models.PlatformVersion? platformVersion = default(Azure.ResourceManager.ApiManagement.Models.PlatformVersion?), string publisherEmail = null, string publisherName = null, System.Collections.Generic.IDictionary tags = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.ApiManagement.Models.ApiManagementServicePatch ApiManagementServicePatch(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, Azure.ResourceManager.ApiManagement.Models.ApiManagementServiceSkuProperties sku, Azure.ResourceManager.Models.ManagedServiceIdentity identity, Azure.ETag? etag, System.Collections.Generic.IEnumerable zones, string notificationSenderEmail, string provisioningState, string targetProvisioningState, System.DateTimeOffset? createdAtUtc, System.Uri gatewayUri, System.Uri gatewayRegionalUri, System.Uri portalUri, System.Uri managementApiUri, System.Uri scmUri, System.Uri developerPortalUri, System.Collections.Generic.IEnumerable hostnameConfigurations, System.Collections.Generic.IEnumerable publicIPAddresses, System.Collections.Generic.IEnumerable privateIPAddresses, Azure.Core.ResourceIdentifier publicIPAddressId, Azure.ResourceManager.ApiManagement.Models.PublicNetworkAccess? publicNetworkAccess, Azure.ResourceManager.ApiManagement.Models.VirtualNetworkConfiguration virtualNetworkConfiguration, System.Collections.Generic.IEnumerable additionalLocations, System.Collections.Generic.IDictionary customProperties, System.Collections.Generic.IEnumerable certificates, bool? enableClientCertificate, bool? disableGateway, Azure.ResourceManager.ApiManagement.Models.VirtualNetworkType? virtualNetworkType, string minApiVersion, bool? restore, System.Collections.Generic.IEnumerable privateEndpointConnections, Azure.ResourceManager.ApiManagement.Models.PlatformVersion? platformVersion, string publisherEmail, string publisherName, System.Collections.Generic.IDictionary tags) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.ApiManagementSku ApiManagementSku(string resourceType = null, string name = null, string tier = null, string size = null, string family = null, string kind = null, Azure.ResourceManager.ApiManagement.Models.ApiManagementSkuCapacity capacity = null, System.Collections.Generic.IEnumerable locations = null, System.Collections.Generic.IEnumerable locationInfo = null, System.Collections.Generic.IEnumerable apiVersions = null, System.Collections.Generic.IEnumerable costs = null, System.Collections.Generic.IEnumerable capabilities = null, System.Collections.Generic.IEnumerable restrictions = null) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.ApiManagementSkuCapabilities ApiManagementSkuCapabilities(string name = null, string value = null) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.ApiManagementSkuCapacity ApiManagementSkuCapacity(int? minimum = default(int?), int? maximum = default(int?), int? @default = default(int?), Azure.ResourceManager.ApiManagement.Models.ApiManagementSkuCapacityScaleType? scaleType = default(Azure.ResourceManager.ApiManagement.Models.ApiManagementSkuCapacityScaleType?)) { throw null; } @@ -4002,6 +4575,10 @@ public static partial class ArmApiManagementModelFactory public static Azure.ResourceManager.ApiManagement.Models.AssociatedProductProperties AssociatedProductProperties(string description = null, string terms = null, bool? isSubscriptionRequired = default(bool?), bool? isApprovalRequired = default(bool?), int? subscriptionsLimit = default(int?), Azure.ResourceManager.ApiManagement.Models.ApiManagementProductState? state = default(Azure.ResourceManager.ApiManagement.Models.ApiManagementProductState?), string id = null, string name = null) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.AssociatedTagProperties AssociatedTagProperties(string id = null, string name = null) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.AssociationContract AssociationContract(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ApiManagement.Models.AssociationEntityProvisioningState? provisioningState = default(Azure.ResourceManager.ApiManagement.Models.AssociationEntityProvisioningState?)) { throw null; } + public static Azure.ResourceManager.ApiManagement.AuthorizationAccessPolicyContractData AuthorizationAccessPolicyContractData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Guid? tenantId = default(System.Guid?), string objectId = null) { throw null; } + public static Azure.ResourceManager.ApiManagement.AuthorizationContractData AuthorizationContractData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ApiManagement.Models.ApiManagementAuthorizationType? authorizationType = default(Azure.ResourceManager.ApiManagement.Models.ApiManagementAuthorizationType?), Azure.ResourceManager.ApiManagement.Models.OAuth2GrantType? oAuth2GrantType = default(Azure.ResourceManager.ApiManagement.Models.OAuth2GrantType?), System.Collections.Generic.IDictionary parameters = null, Azure.ResourceManager.ApiManagement.Models.ApiManagementAuthorizationError error = null, string status = null) { throw null; } + public static Azure.ResourceManager.ApiManagement.Models.AuthorizationLoginResult AuthorizationLoginResult(string loginLink = null) { throw null; } + public static Azure.ResourceManager.ApiManagement.AuthorizationProviderContractData AuthorizationProviderContractData(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 identityProvider = null, Azure.ResourceManager.ApiManagement.Models.AuthorizationProviderOAuth2Settings oauth2 = null) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.AuthorizationServerSecretsContract AuthorizationServerSecretsContract(string clientSecret = null, string resourceOwnerUsername = null, string resourceOwnerPassword = null) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.AvailableApiManagementServiceSkuResult AvailableApiManagementServiceSkuResult(Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), Azure.ResourceManager.ApiManagement.Models.ApiManagementServiceSkuType? skuName = default(Azure.ResourceManager.ApiManagement.Models.ApiManagementServiceSkuType?), Azure.ResourceManager.ApiManagement.Models.ApiManagementResourceSkuCapacity capacity = null) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.BackendReconnectContract BackendReconnectContract(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.TimeSpan? after = default(System.TimeSpan?)) { throw null; } @@ -4013,6 +4590,7 @@ public static partial class ArmApiManagementModelFactory public static Azure.ResourceManager.ApiManagement.Models.ConnectivityIssue ConnectivityIssue(Azure.ResourceManager.ApiManagement.Models.IssueOrigin? origin = default(Azure.ResourceManager.ApiManagement.Models.IssueOrigin?), Azure.ResourceManager.ApiManagement.Models.IssueSeverity? severity = default(Azure.ResourceManager.ApiManagement.Models.IssueSeverity?), Azure.ResourceManager.ApiManagement.Models.IssueType? issueType = default(Azure.ResourceManager.ApiManagement.Models.IssueType?), System.Collections.Generic.IEnumerable> context = null) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.ConnectivityStatusContract ConnectivityStatusContract(string name = null, Azure.ResourceManager.ApiManagement.Models.ConnectivityStatusType status = default(Azure.ResourceManager.ApiManagement.Models.ConnectivityStatusType), string error = null, System.DateTimeOffset lastUpdatedOn = default(System.DateTimeOffset), System.DateTimeOffset lastStatusChangedOn = default(System.DateTimeOffset), string resourceType = null, bool isOptional = false) { throw null; } public static Azure.ResourceManager.ApiManagement.DiagnosticContractData DiagnosticContractData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ApiManagement.Models.AlwaysLog? alwaysLog = default(Azure.ResourceManager.ApiManagement.Models.AlwaysLog?), string loggerId = null, Azure.ResourceManager.ApiManagement.Models.SamplingSettings sampling = null, Azure.ResourceManager.ApiManagement.Models.PipelineDiagnosticSettings frontend = null, Azure.ResourceManager.ApiManagement.Models.PipelineDiagnosticSettings backend = null, bool? isLogClientIPEnabled = default(bool?), Azure.ResourceManager.ApiManagement.Models.HttpCorrelationProtocol? httpCorrelationProtocol = default(Azure.ResourceManager.ApiManagement.Models.HttpCorrelationProtocol?), Azure.ResourceManager.ApiManagement.Models.TraceVerbosityLevel? verbosity = default(Azure.ResourceManager.ApiManagement.Models.TraceVerbosityLevel?), Azure.ResourceManager.ApiManagement.Models.OperationNameFormat? operationNameFormat = default(Azure.ResourceManager.ApiManagement.Models.OperationNameFormat?), bool? metrics = default(bool?)) { throw null; } + public static Azure.ResourceManager.ApiManagement.DocumentationContractData DocumentationContractData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string title = null, string content = null) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.EndpointDependency EndpointDependency(string domainName = null, System.Collections.Generic.IEnumerable endpointDetails = null) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.EndpointDetail EndpointDetail(int? port = default(int?), string region = null) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.GatewayApiData GatewayApiData(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, Azure.ResourceManager.ApiManagement.Models.AuthenticationSettingsContract authenticationSettings = null, Azure.ResourceManager.ApiManagement.Models.SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames = null, Azure.ResourceManager.ApiManagement.Models.ApiType? apiType = default(Azure.ResourceManager.ApiManagement.Models.ApiType?), string apiRevision = null, string apiVersion = null, bool? isCurrent = default(bool?), bool? isOnline = default(bool?), string apiRevisionDescription = null, string apiVersionDescription = null, Azure.Core.ResourceIdentifier apiVersionSetId = null, bool? isSubscriptionRequired = default(bool?), string termsOfServiceLink = null, Azure.ResourceManager.ApiManagement.Models.ApiContactInformation contact = null, Azure.ResourceManager.ApiManagement.Models.ApiLicenseInformation license = null, Azure.Core.ResourceIdentifier sourceApiId = null, string displayName = null, string serviceLink = null, string path = null, System.Collections.Generic.IEnumerable protocols = null, Azure.ResourceManager.ApiManagement.Models.ApiVersionSetContractDetails apiVersionSet = null) { throw null; } @@ -4031,6 +4609,8 @@ public static partial class ArmApiManagementModelFactory public static Azure.ResourceManager.ApiManagement.Models.OutboundEnvironmentEndpoint OutboundEnvironmentEndpoint(string category = null, System.Collections.Generic.IEnumerable endpoints = null) { throw null; } public static Azure.ResourceManager.ApiManagement.PolicyContractData PolicyContractData(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, Azure.ResourceManager.ApiManagement.Models.PolicyContentFormat? format = default(Azure.ResourceManager.ApiManagement.Models.PolicyContentFormat?)) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.PolicyDescriptionContractData PolicyDescriptionContractData(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, long? scope = default(long?)) { throw null; } + public static Azure.ResourceManager.ApiManagement.PolicyFragmentContractData PolicyFragmentContractData(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 description = null, Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat? format = default(Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat?)) { throw null; } + public static Azure.ResourceManager.ApiManagement.PortalConfigContractData PortalConfigContractData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, bool? enableBasicAuth = default(bool?), bool? require = default(bool?), Azure.ResourceManager.ApiManagement.Models.PortalConfigTermsOfServiceProperties signupTermsOfService = null, Azure.ResourceManager.ApiManagement.Models.PortalConfigDelegationProperties delegation = null, System.Collections.Generic.IEnumerable corsAllowedOrigins = null, Azure.ResourceManager.ApiManagement.Models.PortalConfigCspProperties csp = null) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.PortalSettingsContractData PortalSettingsContractData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Uri uri = null, string validationKey = null, bool? isSubscriptionDelegationEnabled = default(bool?), bool? isUserRegistrationDelegationEnabled = default(bool?), bool? isRedirectEnabled = default(bool?), Azure.ResourceManager.ApiManagement.Models.TermsOfServiceProperties termsOfService = null) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.PortalSettingValidationKeyContract PortalSettingValidationKeyContract(string validationKey = null) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.ProductApiData ProductApiData(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, Azure.ResourceManager.ApiManagement.Models.AuthenticationSettingsContract authenticationSettings = null, Azure.ResourceManager.ApiManagement.Models.SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames = null, Azure.ResourceManager.ApiManagement.Models.ApiType? apiType = default(Azure.ResourceManager.ApiManagement.Models.ApiType?), string apiRevision = null, string apiVersion = null, bool? isCurrent = default(bool?), bool? isOnline = default(bool?), string apiRevisionDescription = null, string apiVersionDescription = null, Azure.Core.ResourceIdentifier apiVersionSetId = null, bool? isSubscriptionRequired = default(bool?), string termsOfServiceLink = null, Azure.ResourceManager.ApiManagement.Models.ApiContactInformation contact = null, Azure.ResourceManager.ApiManagement.Models.ApiLicenseInformation license = null, Azure.Core.ResourceIdentifier sourceApiId = null, string displayName = null, string serviceLink = null, string path = null, System.Collections.Generic.IEnumerable protocols = null, Azure.ResourceManager.ApiManagement.Models.ApiVersionSetContractDetails apiVersionSet = null) { throw null; } @@ -4046,6 +4626,8 @@ public static partial class ArmApiManagementModelFactory public static Azure.ResourceManager.ApiManagement.Models.RemotePrivateEndpointConnectionWrapper RemotePrivateEndpointConnectionWrapper(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), Azure.Core.ResourceIdentifier privateEndpointId = null, Azure.ResourceManager.ApiManagement.Models.ApiManagementPrivateLinkServiceConnectionState privateLinkServiceConnectionState = null, string provisioningState = null, System.Collections.Generic.IEnumerable groupIds = null) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.ReportRecordContract ReportRecordContract(string name = null, System.DateTimeOffset? timestamp = default(System.DateTimeOffset?), string interval = null, string country = null, string region = null, string zip = null, string userId = null, string productId = null, string apiId = null, string operationId = null, string apiRegion = null, Azure.Core.ResourceIdentifier subscriptionResourceId = null, int? callCountSuccess = default(int?), int? callCountBlocked = default(int?), int? callCountFailed = default(int?), int? callCountOther = default(int?), int? callCountTotal = default(int?), long? bandwidth = default(long?), int? cacheHitCount = default(int?), int? cacheMissCount = default(int?), double? apiTimeAvg = default(double?), double? apiTimeMin = default(double?), double? apiTimeMax = default(double?), double? serviceTimeAvg = default(double?), double? serviceTimeMin = default(double?), double? serviceTimeMax = default(double?)) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.RequestReportRecordContract RequestReportRecordContract(string apiId = null, string operationId = null, string productId = null, string userId = null, Azure.Core.RequestMethod? method = default(Azure.Core.RequestMethod?), System.Uri uri = null, System.Net.IPAddress ipAddress = null, string backendResponseCode = null, int? responseCode = default(int?), int? responseSize = default(int?), System.DateTimeOffset? timestamp = default(System.DateTimeOffset?), string cache = null, double? apiTime = default(double?), double? serviceTime = default(double?), string apiRegion = null, Azure.Core.ResourceIdentifier subscriptionResourceId = null, string requestId = null, int? requestSize = default(int?)) { throw null; } + public static Azure.ResourceManager.ApiManagement.ResolverContractData ResolverContractData(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 path = null, string description = null) { throw null; } + public static Azure.ResourceManager.ApiManagement.Models.ResourceCollectionValueItem ResourceCollectionValueItem(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null) { throw null; } public static Azure.ResourceManager.ApiManagement.SubscriptionContractData SubscriptionContractData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string ownerId = null, string scope = null, string displayName = null, Azure.ResourceManager.ApiManagement.Models.SubscriptionState? state = default(Azure.ResourceManager.ApiManagement.Models.SubscriptionState?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? expireOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), System.DateTimeOffset? notifiesOn = default(System.DateTimeOffset?), string primaryKey = null, string secondaryKey = null, string stateComment = null, bool? allowTracing = default(bool?)) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.SubscriptionKeysContract SubscriptionKeysContract(string primaryKey = null, string secondaryKey = null) { throw null; } public static Azure.ResourceManager.ApiManagement.TagContractData TagContractData(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) { throw null; } @@ -4056,6 +4638,7 @@ public static partial class ArmApiManagementModelFactory public static Azure.ResourceManager.ApiManagement.UserContractData UserContractData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ApiManagement.Models.ApiManagementUserState? state = default(Azure.ResourceManager.ApiManagement.Models.ApiManagementUserState?), string note = null, System.Collections.Generic.IEnumerable identities = null, string firstName = null, string lastName = null, string email = null, System.DateTimeOffset? registriesOn = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable groups = null) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.UserTokenResult UserTokenResult(string value = null) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.VirtualNetworkConfiguration VirtualNetworkConfiguration(System.Guid? vnetId = default(System.Guid?), string subnetname = null, Azure.Core.ResourceIdentifier subnetResourceId = null) { throw null; } + public static Azure.ResourceManager.ApiManagement.WikiContractData WikiContractData(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 documents = null) { throw null; } } public partial class AssociatedApiProperties : Azure.ResourceManager.ApiManagement.Models.ApiEntityBaseContract, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { @@ -4148,13 +4731,45 @@ public partial class AuthenticationSettingsContract : System.ClientModel.Primiti { public AuthenticationSettingsContract() { } public Azure.ResourceManager.ApiManagement.Models.OAuth2AuthenticationSettingsContract OAuth2 { get { throw null; } set { } } + public System.Collections.Generic.IList OAuth2AuthenticationSettings { get { throw null; } } public Azure.ResourceManager.ApiManagement.Models.OpenIdAuthenticationSettingsContract OpenId { get { throw null; } set { } } + public System.Collections.Generic.IList OpenidAuthenticationSettings { get { throw null; } } Azure.ResourceManager.ApiManagement.Models.AuthenticationSettingsContract 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.ApiManagement.Models.AuthenticationSettingsContract 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 AuthorizationConfirmConsentCodeContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AuthorizationConfirmConsentCodeContent() { } + public string ConsentCode { get { throw null; } set { } } + Azure.ResourceManager.ApiManagement.Models.AuthorizationConfirmConsentCodeContent 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.ApiManagement.Models.AuthorizationConfirmConsentCodeContent 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 AuthorizationLoginContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AuthorizationLoginContent() { } + public System.Uri PostLoginRedirectUri { get { throw null; } set { } } + Azure.ResourceManager.ApiManagement.Models.AuthorizationLoginContent 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.ApiManagement.Models.AuthorizationLoginContent 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 AuthorizationLoginResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AuthorizationLoginResult() { } + public string LoginLink { get { throw null; } } + Azure.ResourceManager.ApiManagement.Models.AuthorizationLoginResult 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.ApiManagement.Models.AuthorizationLoginResult 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 AuthorizationMethod { Head = 0, @@ -4166,6 +4781,28 @@ public enum AuthorizationMethod Patch = 6, Delete = 7, } + public partial class AuthorizationProviderOAuth2GrantTypes : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AuthorizationProviderOAuth2GrantTypes() { } + public System.Collections.Generic.IDictionary AuthorizationCode { get { throw null; } } + public System.Collections.Generic.IDictionary ClientCredentials { get { throw null; } } + Azure.ResourceManager.ApiManagement.Models.AuthorizationProviderOAuth2GrantTypes 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.ApiManagement.Models.AuthorizationProviderOAuth2GrantTypes 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 AuthorizationProviderOAuth2Settings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AuthorizationProviderOAuth2Settings() { } + public Azure.ResourceManager.ApiManagement.Models.AuthorizationProviderOAuth2GrantTypes GrantTypes { get { throw null; } set { } } + public System.Uri RedirectUri { get { throw null; } set { } } + Azure.ResourceManager.ApiManagement.Models.AuthorizationProviderOAuth2Settings 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.ApiManagement.Models.AuthorizationProviderOAuth2Settings 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 AuthorizationServerSecretsContract : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal AuthorizationServerSecretsContract() { } @@ -4699,6 +5336,17 @@ public DataMaskingEntity() { } public static bool operator !=(Azure.ResourceManager.ApiManagement.Models.DataMaskingMode left, Azure.ResourceManager.ApiManagement.Models.DataMaskingMode right) { throw null; } public override string ToString() { throw null; } } + public partial class DocumentationContractPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DocumentationContractPatch() { } + public string Content { get { throw null; } set { } } + public string Title { get { throw null; } set { } } + Azure.ResourceManager.ApiManagement.Models.DocumentationContractPatch 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.ApiManagement.Models.DocumentationContractPatch 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 EmailTemplateParametersContractProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public EmailTemplateParametersContractProperties() { } @@ -5222,6 +5870,24 @@ public OAuth2AuthenticationSettingsContract() { } 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 OAuth2GrantType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public OAuth2GrantType(string value) { throw null; } + public static Azure.ResourceManager.ApiManagement.Models.OAuth2GrantType AuthorizationCode { get { throw null; } } + public static Azure.ResourceManager.ApiManagement.Models.OAuth2GrantType ClientCredentials { get { throw null; } } + public bool Equals(Azure.ResourceManager.ApiManagement.Models.OAuth2GrantType 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.ApiManagement.Models.OAuth2GrantType left, Azure.ResourceManager.ApiManagement.Models.OAuth2GrantType right) { throw null; } + public static implicit operator Azure.ResourceManager.ApiManagement.Models.OAuth2GrantType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ApiManagement.Models.OAuth2GrantType left, Azure.ResourceManager.ApiManagement.Models.OAuth2GrantType right) { throw null; } + public override string ToString() { throw null; } + } public partial class OpenIdAuthenticationSettingsContract : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public OpenIdAuthenticationSettingsContract() { } @@ -5386,6 +6052,24 @@ public PolicyDescriptionContractData() { } public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct PolicyFragmentContentFormat : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public PolicyFragmentContentFormat(string value) { throw null; } + public static Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat Rawxml { get { throw null; } } + public static Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat Xml { get { throw null; } } + public bool Equals(Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat 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.ApiManagement.Models.PolicyFragmentContentFormat left, Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat right) { throw null; } + public static implicit operator Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat left, Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct PolicyName : System.IEquatable { private readonly object _dummy; @@ -5410,6 +6094,42 @@ public enum PolicyScopeContract Operation = 3, All = 4, } + public partial class PortalConfigCspProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PortalConfigCspProperties() { } + public System.Collections.Generic.IList AllowedSources { get { throw null; } } + public Azure.ResourceManager.ApiManagement.Models.PortalSettingsCspMode? Mode { get { throw null; } set { } } + public System.Collections.Generic.IList ReportUri { get { throw null; } } + Azure.ResourceManager.ApiManagement.Models.PortalConfigCspProperties 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.ApiManagement.Models.PortalConfigCspProperties 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 PortalConfigDelegationProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PortalConfigDelegationProperties() { } + public bool? DelegateRegistration { get { throw null; } set { } } + public bool? DelegateSubscription { get { throw null; } set { } } + public System.Uri DelegationUri { get { throw null; } set { } } + public string ValidationKey { get { throw null; } set { } } + Azure.ResourceManager.ApiManagement.Models.PortalConfigDelegationProperties 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.ApiManagement.Models.PortalConfigDelegationProperties 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 PortalConfigTermsOfServiceProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PortalConfigTermsOfServiceProperties() { } + public bool? RequireConsent { get { throw null; } set { } } + public string Text { get { throw null; } set { } } + Azure.ResourceManager.ApiManagement.Models.PortalConfigTermsOfServiceProperties 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.ApiManagement.Models.PortalConfigTermsOfServiceProperties 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 PortalRevisionStatus : System.IEquatable { @@ -5445,6 +6165,25 @@ public PortalSettingsContractData() { } 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 PortalSettingsCspMode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public PortalSettingsCspMode(string value) { throw null; } + public static Azure.ResourceManager.ApiManagement.Models.PortalSettingsCspMode Disabled { get { throw null; } } + public static Azure.ResourceManager.ApiManagement.Models.PortalSettingsCspMode Enabled { get { throw null; } } + public static Azure.ResourceManager.ApiManagement.Models.PortalSettingsCspMode ReportOnly { get { throw null; } } + public bool Equals(Azure.ResourceManager.ApiManagement.Models.PortalSettingsCspMode 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.ApiManagement.Models.PortalSettingsCspMode left, Azure.ResourceManager.ApiManagement.Models.PortalSettingsCspMode right) { throw null; } + public static implicit operator Azure.ResourceManager.ApiManagement.Models.PortalSettingsCspMode (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ApiManagement.Models.PortalSettingsCspMode left, Azure.ResourceManager.ApiManagement.Models.PortalSettingsCspMode right) { throw null; } + public override string ToString() { throw null; } + } public partial class PortalSettingValidationKeyContract : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal PortalSettingValidationKeyContract() { } @@ -5737,6 +6476,27 @@ internal RequestReportRecordContract() { } 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 ResolverContractPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ResolverContractPatch() { } + public string Description { get { throw null; } set { } } + public string DisplayName { get { throw null; } set { } } + public string Path { get { throw null; } set { } } + Azure.ResourceManager.ApiManagement.Models.ResolverContractPatch 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.ApiManagement.Models.ResolverContractPatch 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 ResourceCollectionValueItem : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ResourceCollectionValueItem() { } + Azure.ResourceManager.ApiManagement.Models.ResourceCollectionValueItem 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.ApiManagement.Models.ResourceCollectionValueItem 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 ResourceLocationDataContract : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ResourceLocationDataContract(string name) { } @@ -6022,6 +6782,24 @@ public enum TokenGenerationUsedKeyType public static bool operator !=(Azure.ResourceManager.ApiManagement.Models.TraceVerbosityLevel left, Azure.ResourceManager.ApiManagement.Models.TraceVerbosityLevel right) { throw null; } public override string ToString() { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct TranslateRequiredQueryParametersConduct : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public TranslateRequiredQueryParametersConduct(string value) { throw null; } + public static Azure.ResourceManager.ApiManagement.Models.TranslateRequiredQueryParametersConduct Query { get { throw null; } } + public static Azure.ResourceManager.ApiManagement.Models.TranslateRequiredQueryParametersConduct Template { get { throw null; } } + public bool Equals(Azure.ResourceManager.ApiManagement.Models.TranslateRequiredQueryParametersConduct 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.ApiManagement.Models.TranslateRequiredQueryParametersConduct left, Azure.ResourceManager.ApiManagement.Models.TranslateRequiredQueryParametersConduct right) { throw null; } + public static implicit operator Azure.ResourceManager.ApiManagement.Models.TranslateRequiredQueryParametersConduct (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ApiManagement.Models.TranslateRequiredQueryParametersConduct left, Azure.ResourceManager.ApiManagement.Models.TranslateRequiredQueryParametersConduct right) { throw null; } + public override string ToString() { throw null; } + } public partial class UserIdentityContract : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public UserIdentityContract() { } @@ -6104,6 +6882,26 @@ public VirtualNetworkConfiguration() { } public static bool operator !=(Azure.ResourceManager.ApiManagement.Models.VirtualNetworkType left, Azure.ResourceManager.ApiManagement.Models.VirtualNetworkType right) { throw null; } public override string ToString() { throw null; } } + public partial class WikiDocumentationContract : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WikiDocumentationContract() { } + public string DocumentationId { get { throw null; } set { } } + Azure.ResourceManager.ApiManagement.Models.WikiDocumentationContract 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.ApiManagement.Models.WikiDocumentationContract 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 WikiUpdateContract : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WikiUpdateContract() { } + public System.Collections.Generic.IList Documents { get { throw null; } } + Azure.ResourceManager.ApiManagement.Models.WikiUpdateContract 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.ApiManagement.Models.WikiUpdateContract 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 X509CertificateName : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public X509CertificateName() { } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiCollection.cs index 3c4f8170e63cf..c372da0248211 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListApis() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListApis.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApis.json // this example is just showing the usage of "Api_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListApis() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetApiContract() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiContract.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiContract.json // this example is just showing the usage of "Api_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 @@ -92,7 +92,7 @@ public async Task Get_ApiManagementGetApiContract() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetApiContract() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiContract.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiContract.json // this example is just showing the usage of "Api_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 @@ -123,7 +123,7 @@ public async Task Exists_ApiManagementGetApiContract() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetApiContract() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiContract.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiContract.json // this example is just showing the usage of "Api_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 @@ -166,7 +166,7 @@ public async Task GetIfExists_ApiManagementGetApiContract() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetApiRevisionContract() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiRevision.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiRevision.json // this example is just showing the usage of "Api_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 @@ -201,7 +201,7 @@ public async Task Get_ApiManagementGetApiRevisionContract() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetApiRevisionContract() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiRevision.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiRevision.json // this example is just showing the usage of "Api_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 @@ -232,7 +232,7 @@ public async Task Exists_ApiManagementGetApiRevisionContract() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetApiRevisionContract() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiRevision.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiRevision.json // this example is just showing the usage of "Api_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 @@ -275,7 +275,7 @@ public async Task GetIfExists_ApiManagementGetApiRevisionContract() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateApi() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateApi.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApi.json // this example is just showing the usage of "Api_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 @@ -335,7 +335,7 @@ public async Task CreateOrUpdate_ApiManagementCreateApi() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateApiClone() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateApiClone.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiClone.json // this example is just showing the usage of "Api_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 @@ -385,7 +385,7 @@ public async Task CreateOrUpdate_ApiManagementCreateApiClone() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateApiNewVersionUsingExistingApi() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateApiNewVersionUsingExistingApi.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiNewVersionUsingExistingApi.json // this example is just showing the usage of "Api_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 @@ -437,7 +437,7 @@ public async Task CreateOrUpdate_ApiManagementCreateApiNewVersionUsingExistingAp [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateApiRevisionFromExistingApi() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateApiRevisionFromExistingApi.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiRevisionFromExistingApi.json // this example is just showing the usage of "Api_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 @@ -480,7 +480,7 @@ public async Task CreateOrUpdate_ApiManagementCreateApiRevisionFromExistingApi() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateApiUsingImportOverrideServiceUrl() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateApiUsingImportOverrideServiceUrl.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiUsingImportOverrideServiceUrl.json // this example is just showing the usage of "Api_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 @@ -523,7 +523,7 @@ public async Task CreateOrUpdate_ApiManagementCreateApiUsingImportOverrideServic [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateApiUsingOai3Import() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateApiUsingOai3Import.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiUsingOai3Import.json // this example is just showing the usage of "Api_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 @@ -560,12 +560,55 @@ public async Task CreateOrUpdate_ApiManagementCreateApiUsingOai3Import() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } + // ApiManagementCreateApiUsingOai3ImportWithTranslateRequiredQueryParametersConduct + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_ApiManagementCreateApiUsingOai3ImportWithTranslateRequiredQueryParametersConduct() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiUsingOai3ImportWithTranslateRequiredQueryParametersConduct.json + // this example is just showing the usage of "Api_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 ApiManagementServiceResource created on azure + // for more information of creating ApiManagementServiceResource, please refer to the document of ApiManagementServiceResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + ResourceIdentifier apiManagementServiceResourceId = ApiManagementServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName); + ApiManagementServiceResource apiManagementService = client.GetApiManagementServiceResource(apiManagementServiceResourceId); + + // get the collection of this ApiResource + ApiCollection collection = apiManagementService.GetApis(); + + // invoke the operation + string apiId = "petstore"; + ApiCreateOrUpdateContent content = new ApiCreateOrUpdateContent() + { + Path = "petstore", + Value = "https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v3.0/petstore.yaml", + Format = ContentFormat.OpenApiLink, + TranslateRequiredQueryParametersConduct = TranslateRequiredQueryParametersConduct.Template, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, apiId, content); + ApiResource 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 + ApiData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + // ApiManagementCreateApiUsingSwaggerImport [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateApiUsingSwaggerImport() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateApiUsingSwaggerImport.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiUsingSwaggerImport.json // this example is just showing the usage of "Api_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 @@ -607,7 +650,7 @@ public async Task CreateOrUpdate_ApiManagementCreateApiUsingSwaggerImport() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateApiUsingWadlImport() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateApiUsingWadlImport.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiUsingWadlImport.json // this example is just showing the usage of "Api_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 @@ -644,12 +687,152 @@ public async Task CreateOrUpdate_ApiManagementCreateApiUsingWadlImport() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } + // ApiManagementCreateApiWithMultipleAuthServers + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_ApiManagementCreateApiWithMultipleAuthServers() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiWithMultipleAuthServers.json + // this example is just showing the usage of "Api_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 ApiManagementServiceResource created on azure + // for more information of creating ApiManagementServiceResource, please refer to the document of ApiManagementServiceResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + ResourceIdentifier apiManagementServiceResourceId = ApiManagementServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName); + ApiManagementServiceResource apiManagementService = client.GetApiManagementServiceResource(apiManagementServiceResourceId); + + // get the collection of this ApiResource + ApiCollection collection = apiManagementService.GetApis(); + + // invoke the operation + string apiId = "tempgroup"; + ApiCreateOrUpdateContent content = new ApiCreateOrUpdateContent() + { + Description = "apidescription5200", + AuthenticationSettings = new AuthenticationSettingsContract() + { + OAuth2AuthenticationSettings = +{ +new OAuth2AuthenticationSettingsContract() +{ +AuthorizationServerId = "authorizationServerId2283", +Scope = "oauth2scope2580", +},new OAuth2AuthenticationSettingsContract() +{ +AuthorizationServerId = "authorizationServerId2284", +Scope = "oauth2scope2581", +} +}, + }, + SubscriptionKeyParameterNames = new SubscriptionKeyParameterNamesContract() + { + Header = "header4520", + Query = "query3037", + }, + DisplayName = "apiname1463", + ServiceLink = "http://newechoapi.cloudapp.net/api", + Path = "newapiPath", + Protocols = +{ +ApiOperationInvokableProtocol.Https,ApiOperationInvokableProtocol.Http +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, apiId, content); + ApiResource 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 + ApiData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ApiManagementCreateApiWithMultipleOpenIdConnectProviders + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_ApiManagementCreateApiWithMultipleOpenIdConnectProviders() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiWithMultipleOpenIdConnectProviders.json + // this example is just showing the usage of "Api_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 ApiManagementServiceResource created on azure + // for more information of creating ApiManagementServiceResource, please refer to the document of ApiManagementServiceResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + ResourceIdentifier apiManagementServiceResourceId = ApiManagementServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName); + ApiManagementServiceResource apiManagementService = client.GetApiManagementServiceResource(apiManagementServiceResourceId); + + // get the collection of this ApiResource + ApiCollection collection = apiManagementService.GetApis(); + + // invoke the operation + string apiId = "tempgroup"; + ApiCreateOrUpdateContent content = new ApiCreateOrUpdateContent() + { + Description = "apidescription5200", + AuthenticationSettings = new AuthenticationSettingsContract() + { + OpenidAuthenticationSettings = +{ +new OpenIdAuthenticationSettingsContract() +{ +OpenIdProviderId = "openidProviderId2283", +BearerTokenSendingMethods = +{ +BearerTokenSendingMethod.AuthorizationHeader +}, +},new OpenIdAuthenticationSettingsContract() +{ +OpenIdProviderId = "openidProviderId2284", +BearerTokenSendingMethods = +{ +BearerTokenSendingMethod.AuthorizationHeader +}, +} +}, + }, + SubscriptionKeyParameterNames = new SubscriptionKeyParameterNamesContract() + { + Header = "header4520", + Query = "query3037", + }, + DisplayName = "apiname1463", + ServiceLink = "http://newechoapi.cloudapp.net/api", + Path = "newapiPath", + Protocols = +{ +ApiOperationInvokableProtocol.Https,ApiOperationInvokableProtocol.Http +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, apiId, content); + ApiResource 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 + ApiData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + // ApiManagementCreateApiWithOpenIdConnect [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateApiWithOpenIdConnect() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateApiWithOpenIdConnect.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiWithOpenIdConnect.json // this example is just showing the usage of "Api_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 @@ -712,7 +895,7 @@ public async Task CreateOrUpdate_ApiManagementCreateApiWithOpenIdConnect() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateGraphQLApi() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateGraphQLApi.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateGraphQLApi.json // this example is just showing the usage of "Api_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 @@ -760,7 +943,7 @@ public async Task CreateOrUpdate_ApiManagementCreateGraphQLApi() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateSoapPassThroughApiUsingWsdlImport() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateSoapPassThroughApiUsingWsdlImport.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateSoapPassThroughApiUsingWsdlImport.json // this example is just showing the usage of "Api_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 @@ -808,7 +991,7 @@ public async Task CreateOrUpdate_ApiManagementCreateSoapPassThroughApiUsingWsdlI [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateSoapToRestApiUsingWsdlImport() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateSoapToRestApiUsingWsdlImport.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateSoapToRestApiUsingWsdlImport.json // this example is just showing the usage of "Api_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 @@ -855,7 +1038,7 @@ public async Task CreateOrUpdate_ApiManagementCreateSoapToRestApiUsingWsdlImport [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateWebSocketApi() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateWebsocketApi.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateWebsocketApi.json // this example is just showing the usage of "Api_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/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiDiagnosticCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiDiagnosticCollection.cs index 5f11065401a9f..ea634c028da7a 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiDiagnosticCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiDiagnosticCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiDiagnosticCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListApiDiagnostics() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListApiDiagnostics.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiDiagnostics.json // this example is just showing the usage of "ApiDiagnostic_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListApiDiagnostics() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetApiDiagnostic() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiDiagnostic.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiDiagnostic.json // this example is just showing the usage of "ApiDiagnostic_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 @@ -94,7 +94,7 @@ public async Task Get_ApiManagementGetApiDiagnostic() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetApiDiagnostic() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiDiagnostic.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiDiagnostic.json // this example is just showing the usage of "ApiDiagnostic_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 @@ -126,7 +126,7 @@ public async Task Exists_ApiManagementGetApiDiagnostic() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetApiDiagnostic() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiDiagnostic.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiDiagnostic.json // this example is just showing the usage of "ApiDiagnostic_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 @@ -170,7 +170,7 @@ public async Task GetIfExists_ApiManagementGetApiDiagnostic() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateApiDiagnostic() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateApiDiagnostic.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiDiagnostic.json // this example is just showing the usage of "ApiDiagnostic_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/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiDiagnosticResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiDiagnosticResource.cs index 2d6318f5d677d..1048c60990005 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiDiagnosticResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiDiagnosticResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiDiagnosticResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityTag_ApiManagementHeadApiDiagnostic() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadApiDiagnostic.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiDiagnostic.json // this example is just showing the usage of "ApiDiagnostic_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -49,7 +49,7 @@ public async Task GetEntityTag_ApiManagementHeadApiDiagnostic() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetApiDiagnostic() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiDiagnostic.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiDiagnostic.json // this example is just showing the usage of "ApiDiagnostic_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 @@ -82,7 +82,7 @@ public async Task Get_ApiManagementGetApiDiagnostic() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementUpdateApiDiagnostic() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdateApiDiagnostic.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateApiDiagnostic.json // this example is just showing the usage of "ApiDiagnostic_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 @@ -164,7 +164,7 @@ public async Task Update_ApiManagementUpdateApiDiagnostic() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ApiManagementDeleteApiDiagnostic() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteApiDiagnostic.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiDiagnostic.json // this example is just showing the usage of "ApiDiagnostic_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 diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiIssueAttachmentCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiIssueAttachmentCollection.cs index 0806305e29aa8..369df0ac6f24d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiIssueAttachmentCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiIssueAttachmentCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiIssueAttachmentCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListApiIssueAttachments() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListApiIssueAttachments.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiIssueAttachments.json // this example is just showing the usage of "ApiIssueAttachment_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListApiIssueAttachments() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetApiIssueAttachment() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiIssueAttachment.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiIssueAttachment.json // this example is just showing the usage of "ApiIssueAttachment_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 @@ -95,7 +95,7 @@ public async Task Get_ApiManagementGetApiIssueAttachment() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetApiIssueAttachment() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiIssueAttachment.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiIssueAttachment.json // this example is just showing the usage of "ApiIssueAttachment_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 @@ -128,7 +128,7 @@ public async Task Exists_ApiManagementGetApiIssueAttachment() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetApiIssueAttachment() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiIssueAttachment.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiIssueAttachment.json // this example is just showing the usage of "ApiIssueAttachment_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 @@ -173,7 +173,7 @@ public async Task GetIfExists_ApiManagementGetApiIssueAttachment() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateApiIssueAttachment() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateApiIssueAttachment.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiIssueAttachment.json // this example is just showing the usage of "ApiIssueAttachment_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/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiIssueAttachmentResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiIssueAttachmentResource.cs index 8c286a2a4acf7..4aa3cb6228264 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiIssueAttachmentResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiIssueAttachmentResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiIssueAttachmentResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityTag_ApiManagementHeadApiIssueAttachment() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadApiIssueAttachment.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiIssueAttachment.json // this example is just showing the usage of "ApiIssueAttachment_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -49,7 +49,7 @@ public async Task GetEntityTag_ApiManagementHeadApiIssueAttachment() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetApiIssueAttachment() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiIssueAttachment.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiIssueAttachment.json // this example is just showing the usage of "ApiIssueAttachment_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 @@ -83,7 +83,7 @@ public async Task Get_ApiManagementGetApiIssueAttachment() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementCreateApiIssueAttachment() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateApiIssueAttachment.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiIssueAttachment.json // this example is just showing the usage of "ApiIssueAttachment_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 @@ -124,7 +124,7 @@ public async Task Update_ApiManagementCreateApiIssueAttachment() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ApiManagementDeleteApiIssueAttachment() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteApiIssueAttachment.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiIssueAttachment.json // this example is just showing the usage of "ApiIssueAttachment_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 diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiIssueCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiIssueCollection.cs index 5f8687a1b5cb1..f94e86ab0f17f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiIssueCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiIssueCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiIssueCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListApiIssues() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListApiIssues.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiIssues.json // this example is just showing the usage of "ApiIssue_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListApiIssues() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetApiIssue() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiIssue.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiIssue.json // this example is just showing the usage of "ApiIssue_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 @@ -94,7 +94,7 @@ public async Task Get_ApiManagementGetApiIssue() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetApiIssue() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiIssue.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiIssue.json // this example is just showing the usage of "ApiIssue_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 @@ -126,7 +126,7 @@ public async Task Exists_ApiManagementGetApiIssue() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetApiIssue() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiIssue.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiIssue.json // this example is just showing the usage of "ApiIssue_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 @@ -170,7 +170,7 @@ public async Task GetIfExists_ApiManagementGetApiIssue() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateApiIssue() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateApiIssue.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiIssue.json // this example is just showing the usage of "ApiIssue_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/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiIssueCommentCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiIssueCommentCollection.cs index c9e5b79eeeaa1..72f7f966c4e59 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiIssueCommentCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiIssueCommentCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiIssueCommentCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListApiIssueComments() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListApiIssueComments.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiIssueComments.json // this example is just showing the usage of "ApiIssueComment_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListApiIssueComments() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetApiIssueComment() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiIssueComment.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiIssueComment.json // this example is just showing the usage of "ApiIssueComment_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 @@ -95,7 +95,7 @@ public async Task Get_ApiManagementGetApiIssueComment() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetApiIssueComment() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiIssueComment.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiIssueComment.json // this example is just showing the usage of "ApiIssueComment_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 @@ -128,7 +128,7 @@ public async Task Exists_ApiManagementGetApiIssueComment() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetApiIssueComment() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiIssueComment.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiIssueComment.json // this example is just showing the usage of "ApiIssueComment_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 @@ -173,7 +173,7 @@ public async Task GetIfExists_ApiManagementGetApiIssueComment() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateApiIssueComment() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateApiIssueComment.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiIssueComment.json // this example is just showing the usage of "ApiIssueComment_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/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiIssueCommentResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiIssueCommentResource.cs index 9e4ac9af82a24..c2b48606d975d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiIssueCommentResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiIssueCommentResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiIssueCommentResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityTag_ApiManagementHeadApiIssueComment() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadApiIssueComment.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiIssueComment.json // this example is just showing the usage of "ApiIssueComment_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -49,7 +49,7 @@ public async Task GetEntityTag_ApiManagementHeadApiIssueComment() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetApiIssueComment() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiIssueComment.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiIssueComment.json // this example is just showing the usage of "ApiIssueComment_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 @@ -83,7 +83,7 @@ public async Task Get_ApiManagementGetApiIssueComment() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementCreateApiIssueComment() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateApiIssueComment.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiIssueComment.json // this example is just showing the usage of "ApiIssueComment_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 @@ -124,7 +124,7 @@ public async Task Update_ApiManagementCreateApiIssueComment() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ApiManagementDeleteApiIssueComment() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteApiIssueComment.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiIssueComment.json // this example is just showing the usage of "ApiIssueComment_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 diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiIssueResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiIssueResource.cs index 89a0f9bd924d5..f47047419bf93 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiIssueResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiIssueResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiIssueResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityTag_ApiManagementHeadApiIssue() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadApiIssue.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiIssue.json // this example is just showing the usage of "ApiIssue_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -49,7 +49,7 @@ public async Task GetEntityTag_ApiManagementHeadApiIssue() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetApiIssue() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiIssue.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiIssue.json // this example is just showing the usage of "ApiIssue_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 @@ -82,7 +82,7 @@ public async Task Get_ApiManagementGetApiIssue() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementUpdateApiIssue() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdateApiIssue.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateApiIssue.json // this example is just showing the usage of "ApiIssue_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 @@ -120,7 +120,7 @@ public async Task Update_ApiManagementUpdateApiIssue() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ApiManagementDeleteApiIssue() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteApiIssue.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiIssue.json // this example is just showing the usage of "ApiIssue_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 diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementAuthorizationServerCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementAuthorizationServerCollection.cs index d584d4e430cff..8a36c1004ae7f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementAuthorizationServerCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementAuthorizationServerCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementAuthorizationServerCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListAuthorizationServers() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListAuthorizationServers.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListAuthorizationServers.json // this example is just showing the usage of "AuthorizationServer_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListAuthorizationServers() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetAuthorizationServer() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetAuthorizationServer.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetAuthorizationServer.json // this example is just showing the usage of "AuthorizationServer_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 @@ -92,7 +92,7 @@ public async Task Get_ApiManagementGetAuthorizationServer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetAuthorizationServer() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetAuthorizationServer.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetAuthorizationServer.json // this example is just showing the usage of "AuthorizationServer_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 @@ -123,7 +123,7 @@ public async Task Exists_ApiManagementGetAuthorizationServer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetAuthorizationServer() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetAuthorizationServer.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetAuthorizationServer.json // this example is just showing the usage of "AuthorizationServer_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 @@ -166,7 +166,7 @@ public async Task GetIfExists_ApiManagementGetAuthorizationServer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateAuthorizationServer() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateAuthorizationServer.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateAuthorizationServer.json // this example is just showing the usage of "AuthorizationServer_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 @@ -204,6 +204,8 @@ public async Task CreateOrUpdate_ApiManagementCreateAuthorizationServer() ResourceOwnerUsername = "un", ResourceOwnerPassword = "pwd", DisplayName = "test2", + UseInTestConsole = false, + UseInApiDocumentation = true, ClientRegistrationEndpoint = "https://www.contoso.com/apps", AuthorizationEndpoint = "https://www.contoso.com/oauth2/auth", GrantTypes = diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementAuthorizationServerResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementAuthorizationServerResource.cs index 94ef833289b07..0149b37e0383f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementAuthorizationServerResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementAuthorizationServerResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementAuthorizationServerResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityTag_ApiManagementHeadAuthorizationServer() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadAuthorizationServer.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadAuthorizationServer.json // this example is just showing the usage of "AuthorizationServer_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task GetEntityTag_ApiManagementHeadAuthorizationServer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetAuthorizationServer() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetAuthorizationServer.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetAuthorizationServer.json // this example is just showing the usage of "AuthorizationServer_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 @@ -80,7 +80,7 @@ public async Task Get_ApiManagementGetAuthorizationServer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementUpdateAuthorizationServer() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdateAuthorizationServer.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateAuthorizationServer.json // this example is just showing the usage of "AuthorizationServer_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 @@ -101,6 +101,8 @@ public async Task Update_ApiManagementUpdateAuthorizationServer() ETag ifMatch = new ETag("*"); ApiManagementAuthorizationServerPatch patch = new ApiManagementAuthorizationServerPatch() { + UseInTestConsole = false, + UseInApiDocumentation = true, ClientId = "update", ClientSecret = "updated", }; @@ -118,7 +120,7 @@ public async Task Update_ApiManagementUpdateAuthorizationServer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ApiManagementDeleteAuthorizationServer() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteAuthorizationServer.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteAuthorizationServer.json // this example is just showing the usage of "AuthorizationServer_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 @@ -147,7 +149,7 @@ public async Task Delete_ApiManagementDeleteAuthorizationServer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetSecrets_ApiManagementAuthorizationServerListSecrets() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementAuthorizationServerListSecrets.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementAuthorizationServerListSecrets.json // this example is just showing the usage of "AuthorizationServer_ListSecrets" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementBackendCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementBackendCollection.cs index b669ac3f88510..7f73e474fe44a 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementBackendCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementBackendCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementBackendCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListBackends() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListBackends.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListBackends.json // this example is just showing the usage of "Backend_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListBackends() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetBackend() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetBackend.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetBackend.json // this example is just showing the usage of "Backend_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 @@ -92,7 +92,7 @@ public async Task Get_ApiManagementGetBackend() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetBackend() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetBackend.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetBackend.json // this example is just showing the usage of "Backend_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 @@ -123,7 +123,7 @@ public async Task Exists_ApiManagementGetBackend() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetBackend() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetBackend.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetBackend.json // this example is just showing the usage of "Backend_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 @@ -166,7 +166,7 @@ public async Task GetIfExists_ApiManagementGetBackend() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateBackendProxyBackend() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateBackendProxyBackend.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateBackendProxyBackend.json // this example is just showing the usage of "Backend_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 @@ -236,7 +236,7 @@ public async Task CreateOrUpdate_ApiManagementCreateBackendProxyBackend() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateBackendServiceFabric() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateBackendServiceFabric.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateBackendServiceFabric.json // this example is just showing the usage of "Backend_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/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementBackendResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementBackendResource.cs index b0cfd706accb6..6bffe64159af8 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementBackendResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementBackendResource.cs @@ -21,7 +21,7 @@ public partial class Sample_ApiManagementBackendResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityTag_ApiManagementHeadBackend() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadBackend.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadBackend.json // this example is just showing the usage of "Backend_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -49,7 +49,7 @@ public async Task GetEntityTag_ApiManagementHeadBackend() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetBackend() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetBackend.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetBackend.json // this example is just showing the usage of "Backend_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 @@ -81,7 +81,7 @@ public async Task Get_ApiManagementGetBackend() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementUpdateBackend() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdateBackend.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateBackend.json // this example is just showing the usage of "Backend_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 @@ -123,7 +123,7 @@ public async Task Update_ApiManagementUpdateBackend() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ApiManagementDeleteBackend() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteBackend.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteBackend.json // this example is just showing the usage of "Backend_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 @@ -152,7 +152,7 @@ public async Task Delete_ApiManagementDeleteBackend() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Reconnect_ApiManagementBackendReconnect() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementBackendReconnect.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementBackendReconnect.json // this example is just showing the usage of "Backend_Reconnect" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementCacheCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementCacheCollection.cs index 6f3836c07142e..7afa19e76a665 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementCacheCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementCacheCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiManagementCacheCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListCaches() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListCaches.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListCaches.json // this example is just showing the usage of "Cache_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListCaches() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetCache() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetCache.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetCache.json // this example is just showing the usage of "Cache_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_ApiManagementGetCache() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetCache() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetCache.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetCache.json // this example is just showing the usage of "Cache_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 @@ -122,7 +122,7 @@ public async Task Exists_ApiManagementGetCache() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetCache() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetCache.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetCache.json // this example is just showing the usage of "Cache_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 @@ -165,7 +165,7 @@ public async Task GetIfExists_ApiManagementGetCache() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateCache() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateCache.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateCache.json // this example is just showing the usage of "Cache_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/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementCacheResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementCacheResource.cs index 05a33efc28353..e88f6151a0769 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementCacheResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementCacheResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementCacheResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityTag_ApiManagementHeadCache() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadCache.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadCache.json // this example is just showing the usage of "Cache_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task GetEntityTag_ApiManagementHeadCache() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetCache() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetCache.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetCache.json // this example is just showing the usage of "Cache_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 @@ -80,7 +80,7 @@ public async Task Get_ApiManagementGetCache() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementUpdateCache() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdateCache.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateCache.json // this example is just showing the usage of "Cache_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 @@ -117,7 +117,7 @@ public async Task Update_ApiManagementUpdateCache() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ApiManagementDeleteCache() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteCache.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteCache.json // this example is just showing the usage of "Cache_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 diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementCertificateCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementCertificateCollection.cs index 6ad2462547cf9..cb1ebebb15a22 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementCertificateCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementCertificateCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementCertificateCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListCertificates() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListCertificates.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListCertificates.json // this example is just showing the usage of "Certificate_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListCertificates() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetCertificate() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetCertificate.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetCertificate.json // this example is just showing the usage of "Certificate_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 @@ -92,7 +92,7 @@ public async Task Get_ApiManagementGetCertificate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetCertificate() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetCertificate.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetCertificate.json // this example is just showing the usage of "Certificate_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 @@ -123,7 +123,7 @@ public async Task Exists_ApiManagementGetCertificate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetCertificate() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetCertificate.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetCertificate.json // this example is just showing the usage of "Certificate_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 @@ -166,7 +166,7 @@ public async Task GetIfExists_ApiManagementGetCertificate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetCertificateWithKeyVault() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetCertificateWithKeyVault.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetCertificateWithKeyVault.json // this example is just showing the usage of "Certificate_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 @@ -201,7 +201,7 @@ public async Task Get_ApiManagementGetCertificateWithKeyVault() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetCertificateWithKeyVault() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetCertificateWithKeyVault.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetCertificateWithKeyVault.json // this example is just showing the usage of "Certificate_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 @@ -232,7 +232,7 @@ public async Task Exists_ApiManagementGetCertificateWithKeyVault() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetCertificateWithKeyVault() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetCertificateWithKeyVault.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetCertificateWithKeyVault.json // this example is just showing the usage of "Certificate_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 @@ -275,7 +275,7 @@ public async Task GetIfExists_ApiManagementGetCertificateWithKeyVault() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateCertificate() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateCertificate.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateCertificate.json // this example is just showing the usage of "Certificate_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 @@ -316,7 +316,7 @@ public async Task CreateOrUpdate_ApiManagementCreateCertificate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateCertificateWithKeyVault() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateCertificateWithKeyVault.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateCertificateWithKeyVault.json // this example is just showing the usage of "Certificate_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/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementCertificateResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementCertificateResource.cs index 91050af7a0b9d..38e326ec42b93 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementCertificateResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementCertificateResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementCertificateResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityTag_ApiManagementHeadCertificate() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadCertificate.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadCertificate.json // this example is just showing the usage of "Certificate_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task GetEntityTag_ApiManagementHeadCertificate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetCertificate() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetCertificate.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetCertificate.json // this example is just showing the usage of "Certificate_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 @@ -80,7 +80,7 @@ public async Task Get_ApiManagementGetCertificate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetCertificateWithKeyVault() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetCertificateWithKeyVault.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetCertificateWithKeyVault.json // this example is just showing the usage of "Certificate_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 @@ -112,7 +112,7 @@ public async Task Get_ApiManagementGetCertificateWithKeyVault() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementCreateCertificate() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateCertificate.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateCertificate.json // this example is just showing the usage of "Certificate_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 @@ -150,7 +150,7 @@ public async Task Update_ApiManagementCreateCertificate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementCreateCertificateWithKeyVault() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateCertificateWithKeyVault.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateCertificateWithKeyVault.json // this example is just showing the usage of "Certificate_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 @@ -191,7 +191,7 @@ public async Task Update_ApiManagementCreateCertificateWithKeyVault() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ApiManagementDeleteCertificate() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteCertificate.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteCertificate.json // this example is just showing the usage of "Certificate_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 @@ -220,7 +220,7 @@ public async Task Delete_ApiManagementDeleteCertificate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task RefreshSecret_ApiManagementRefreshCertificate() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementRefreshCertificate.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementRefreshCertificate.json // this example is just showing the usage of "Certificate_RefreshSecret" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementDeletedServiceCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementDeletedServiceCollection.cs index 0af5aa944fc01..9350737da8fa9 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementDeletedServiceCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementDeletedServiceCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementDeletedServiceCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetDeletedServiceByName() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetDeletedServiceByName.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetDeletedServiceByName.json // this example is just showing the usage of "DeletedServices_GetByName" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetDeletedServiceByName() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetDeletedServiceByName() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetDeletedServiceByName.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetDeletedServiceByName.json // this example is just showing the usage of "DeletedServices_GetByName" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Exists_ApiManagementGetDeletedServiceByName() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetDeletedServiceByName() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetDeletedServiceByName.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetDeletedServiceByName.json // this example is just showing the usage of "DeletedServices_GetByName" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementDeletedServiceResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementDeletedServiceResource.cs index f08875d02fe56..888a5a72ba488 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementDeletedServiceResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementDeletedServiceResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementDeletedServiceResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetApiManagementDeletedServices_ApiManagementDeletedServicesListBySubscription() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeletedServicesListBySubscription.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeletedServicesListBySubscription.json // this example is just showing the usage of "DeletedServices_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 @@ -52,7 +52,7 @@ public async Task GetApiManagementDeletedServices_ApiManagementDeletedServicesLi [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetDeletedServiceByName() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetDeletedServiceByName.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetDeletedServiceByName.json // this example is just showing the usage of "DeletedServices_GetByName" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 +83,7 @@ public async Task Get_ApiManagementGetDeletedServiceByName() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ApiManagementDeletedServicesPurge() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeletedServicesPurge.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeletedServicesPurge.json // this example is just showing the usage of "DeletedServices_Purge" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementDiagnosticCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementDiagnosticCollection.cs index 2207e4332f63f..d22829d03a241 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementDiagnosticCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementDiagnosticCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementDiagnosticCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListDiagnostics() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListDiagnostics.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListDiagnostics.json // this example is just showing the usage of "Diagnostic_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListDiagnostics() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetDiagnostic() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetDiagnostic.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetDiagnostic.json // this example is just showing the usage of "Diagnostic_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 @@ -92,7 +92,7 @@ public async Task Get_ApiManagementGetDiagnostic() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetDiagnostic() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetDiagnostic.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetDiagnostic.json // this example is just showing the usage of "Diagnostic_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 @@ -123,7 +123,7 @@ public async Task Exists_ApiManagementGetDiagnostic() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetDiagnostic() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetDiagnostic.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetDiagnostic.json // this example is just showing the usage of "Diagnostic_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 @@ -166,7 +166,7 @@ public async Task GetIfExists_ApiManagementGetDiagnostic() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateDiagnostic() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateDiagnostic.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateDiagnostic.json // this example is just showing the usage of "Diagnostic_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/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementDiagnosticResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementDiagnosticResource.cs index 59a0d0dc17583..4a6ebf1abff93 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementDiagnosticResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementDiagnosticResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementDiagnosticResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityTag_ApiManagementHeadDiagnostic() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadDiagnostic.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadDiagnostic.json // this example is just showing the usage of "Diagnostic_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task GetEntityTag_ApiManagementHeadDiagnostic() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetDiagnostic() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetDiagnostic.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetDiagnostic.json // this example is just showing the usage of "Diagnostic_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 @@ -80,7 +80,7 @@ public async Task Get_ApiManagementGetDiagnostic() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementUpdateDiagnostic() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdateDiagnostic.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateDiagnostic.json // this example is just showing the usage of "Diagnostic_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 @@ -161,7 +161,7 @@ public async Task Update_ApiManagementUpdateDiagnostic() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ApiManagementDeleteDiagnostic() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteDiagnostic.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteDiagnostic.json // this example is just showing the usage of "Diagnostic_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 diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementEmailTemplateCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementEmailTemplateCollection.cs index f9bf1268a219d..1e915c03aa651 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementEmailTemplateCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementEmailTemplateCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementEmailTemplateCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListTemplates() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListTemplates.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListTemplates.json // this example is just showing the usage of "EmailTemplate_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListTemplates() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetTemplate() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetTemplate.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetTemplate.json // this example is just showing the usage of "EmailTemplate_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 @@ -92,7 +92,7 @@ public async Task Get_ApiManagementGetTemplate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetTemplate() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetTemplate.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetTemplate.json // this example is just showing the usage of "EmailTemplate_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 @@ -123,7 +123,7 @@ public async Task Exists_ApiManagementGetTemplate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetTemplate() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetTemplate.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetTemplate.json // this example is just showing the usage of "EmailTemplate_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 @@ -166,7 +166,7 @@ public async Task GetIfExists_ApiManagementGetTemplate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateTemplate() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateTemplate.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateTemplate.json // this example is just showing the usage of "EmailTemplate_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/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementEmailTemplateResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementEmailTemplateResource.cs index f4044027e1643..3e8211b5dd52e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementEmailTemplateResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementEmailTemplateResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementEmailTemplateResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityTag_ApiManagementHeadEmailTemplate() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadEmailTemplate.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadEmailTemplate.json // this example is just showing the usage of "EmailTemplate_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task GetEntityTag_ApiManagementHeadEmailTemplate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetTemplate() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetTemplate.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetTemplate.json // this example is just showing the usage of "EmailTemplate_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 @@ -80,7 +80,7 @@ public async Task Get_ApiManagementGetTemplate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementUpdateTemplate() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdateTemplate.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateTemplate.json // this example is just showing the usage of "EmailTemplate_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 @@ -118,7 +118,7 @@ public async Task Update_ApiManagementUpdateTemplate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ApiManagementDeleteTemplate() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteTemplate.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteTemplate.json // this example is just showing the usage of "EmailTemplate_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 diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGatewayCertificateAuthorityCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGatewayCertificateAuthorityCollection.cs index d8cbf0e0e6cc7..06523908830b8 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGatewayCertificateAuthorityCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGatewayCertificateAuthorityCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiManagementGatewayCertificateAuthorityCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListGatewaycertificateAuthorities() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListGatewayCertificateAuthorities.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListGatewayCertificateAuthorities.json // this example is just showing the usage of "GatewayCertificateAuthority_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListGatewaycertificateAuthorities() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetGatewayCertificateAuthority() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetGatewayCertificateAuthority.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGatewayCertificateAuthority.json // this example is just showing the usage of "GatewayCertificateAuthority_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 @@ -93,7 +93,7 @@ public async Task Get_ApiManagementGetGatewayCertificateAuthority() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetGatewayCertificateAuthority() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetGatewayCertificateAuthority.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGatewayCertificateAuthority.json // this example is just showing the usage of "GatewayCertificateAuthority_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 @@ -125,7 +125,7 @@ public async Task Exists_ApiManagementGetGatewayCertificateAuthority() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetGatewayCertificateAuthority() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetGatewayCertificateAuthority.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGatewayCertificateAuthority.json // this example is just showing the usage of "GatewayCertificateAuthority_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 @@ -169,7 +169,7 @@ public async Task GetIfExists_ApiManagementGetGatewayCertificateAuthority() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateGatewayCertificateAuthority() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateGatewayCertificateAuthority.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateGatewayCertificateAuthority.json // this example is just showing the usage of "GatewayCertificateAuthority_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/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGatewayCertificateAuthorityResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGatewayCertificateAuthorityResource.cs index 7baf29a788b27..1c03064887359 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGatewayCertificateAuthorityResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGatewayCertificateAuthorityResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiManagementGatewayCertificateAuthorityResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityTag_ApiManagementHeadGatewayCertificateAuthority() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadGatewayCertificateAuthority.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadGatewayCertificateAuthority.json // this example is just showing the usage of "GatewayCertificateAuthority_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task GetEntityTag_ApiManagementHeadGatewayCertificateAuthority() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetGatewayCertificateAuthority() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetGatewayCertificateAuthority.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGatewayCertificateAuthority.json // this example is just showing the usage of "GatewayCertificateAuthority_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 @@ -81,7 +81,7 @@ public async Task Get_ApiManagementGetGatewayCertificateAuthority() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementCreateGatewayCertificateAuthority() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateGatewayCertificateAuthority.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateGatewayCertificateAuthority.json // this example is just showing the usage of "GatewayCertificateAuthority_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 @@ -119,7 +119,7 @@ public async Task Update_ApiManagementCreateGatewayCertificateAuthority() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ApiManagementDeleteGatewayCertificateAuthority() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteGatewayCertificateAuthority.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteGatewayCertificateAuthority.json // this example is just showing the usage of "GatewayCertificateAuthority_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 diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGatewayCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGatewayCollection.cs index 0dcb8414a109e..081ffaa22b28a 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGatewayCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGatewayCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementGatewayCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListGateways() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListGateways.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListGateways.json // this example is just showing the usage of "Gateway_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListGateways() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetGateway() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetGateway.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGateway.json // this example is just showing the usage of "Gateway_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 @@ -92,7 +92,7 @@ public async Task Get_ApiManagementGetGateway() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetGateway() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetGateway.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGateway.json // this example is just showing the usage of "Gateway_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 @@ -123,7 +123,7 @@ public async Task Exists_ApiManagementGetGateway() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetGateway() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetGateway.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGateway.json // this example is just showing the usage of "Gateway_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 @@ -166,7 +166,7 @@ public async Task GetIfExists_ApiManagementGetGateway() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateGateway() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateGateway.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateGateway.json // this example is just showing the usage of "Gateway_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/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGatewayHostnameConfigurationCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGatewayHostnameConfigurationCollection.cs index 6ca2ef102ca49..2cb000560713c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGatewayHostnameConfigurationCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGatewayHostnameConfigurationCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiManagementGatewayHostnameConfigurationCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListGatewayHostnameConfigurations() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListGatewayHostnameConfigurations.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListGatewayHostnameConfigurations.json // this example is just showing the usage of "GatewayHostnameConfiguration_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListGatewayHostnameConfigurations() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetGatewayHostnameConfiguration() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetGatewayHostnameConfiguration.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGatewayHostnameConfiguration.json // this example is just showing the usage of "GatewayHostnameConfiguration_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 @@ -93,7 +93,7 @@ public async Task Get_ApiManagementGetGatewayHostnameConfiguration() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetGatewayHostnameConfiguration() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetGatewayHostnameConfiguration.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGatewayHostnameConfiguration.json // this example is just showing the usage of "GatewayHostnameConfiguration_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 @@ -125,7 +125,7 @@ public async Task Exists_ApiManagementGetGatewayHostnameConfiguration() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetGatewayHostnameConfiguration() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetGatewayHostnameConfiguration.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGatewayHostnameConfiguration.json // this example is just showing the usage of "GatewayHostnameConfiguration_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 @@ -169,7 +169,7 @@ public async Task GetIfExists_ApiManagementGetGatewayHostnameConfiguration() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateGatewayHostnameConfiguration() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateGatewayHostnameConfiguration.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateGatewayHostnameConfiguration.json // this example is just showing the usage of "GatewayHostnameConfiguration_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/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGatewayHostnameConfigurationResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGatewayHostnameConfigurationResource.cs index 637dbe19be119..2340b6b98e888 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGatewayHostnameConfigurationResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGatewayHostnameConfigurationResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiManagementGatewayHostnameConfigurationResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityTag_ApiManagementHeadGatewayHostnameConfiguration() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadGatewayHostnameConfiguration.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadGatewayHostnameConfiguration.json // this example is just showing the usage of "GatewayHostnameConfiguration_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task GetEntityTag_ApiManagementHeadGatewayHostnameConfiguration() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetGatewayHostnameConfiguration() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetGatewayHostnameConfiguration.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGatewayHostnameConfiguration.json // this example is just showing the usage of "GatewayHostnameConfiguration_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 @@ -81,7 +81,7 @@ public async Task Get_ApiManagementGetGatewayHostnameConfiguration() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementCreateGatewayHostnameConfiguration() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateGatewayHostnameConfiguration.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateGatewayHostnameConfiguration.json // this example is just showing the usage of "GatewayHostnameConfiguration_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 @@ -124,7 +124,7 @@ public async Task Update_ApiManagementCreateGatewayHostnameConfiguration() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ApiManagementDeleteGatewayHostnameConfiguration() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteGatewayHostnameConfiguration.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteGatewayHostnameConfiguration.json // this example is just showing the usage of "GatewayHostnameConfiguration_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 diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGatewayResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGatewayResource.cs index 253d3df0afb8b..4c9cbb61890e5 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGatewayResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGatewayResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementGatewayResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityTag_ApiManagementHeadGateway() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadGateway.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadGateway.json // this example is just showing the usage of "Gateway_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task GetEntityTag_ApiManagementHeadGateway() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetGateway() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetGateway.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGateway.json // this example is just showing the usage of "Gateway_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 @@ -80,7 +80,7 @@ public async Task Get_ApiManagementGetGateway() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementUpdateGateway() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdateGateway.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateGateway.json // this example is just showing the usage of "Gateway_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 @@ -118,7 +118,7 @@ public async Task Update_ApiManagementUpdateGateway() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ApiManagementDeleteGateway() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteGateway.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteGateway.json // this example is just showing the usage of "Gateway_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 @@ -147,7 +147,7 @@ public async Task Delete_ApiManagementDeleteGateway() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetKeys_ApiManagementGatewayListKeys() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGatewayListKeys.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGatewayListKeys.json // this example is just showing the usage of "Gateway_ListKeys" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 +175,7 @@ public async Task GetKeys_ApiManagementGatewayListKeys() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task RegenerateKey_ApiManagementGatewayRegenerateKey() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGatewayRegenerateKey.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGatewayRegenerateKey.json // this example is just showing the usage of "Gateway_RegenerateKey" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -204,7 +204,7 @@ public async Task RegenerateKey_ApiManagementGatewayRegenerateKey() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GenerateToken_ApiManagementGatewayGenerateToken() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGatewayGenerateToken.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGatewayGenerateToken.json // this example is just showing the usage of "Gateway_GenerateToken" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -233,7 +233,7 @@ public async Task GenerateToken_ApiManagementGatewayGenerateToken() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetGatewayApisByService_ApiManagementListGatewayApis() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListGatewayApis.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListGatewayApis.json // this example is just showing the usage of "GatewayApi_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -264,7 +264,7 @@ public async Task GetGatewayApisByService_ApiManagementListGatewayApis() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetGatewayApiEntityTag_ApiManagementHeadGatewayApi() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadGatewayApi.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadGatewayApi.json // this example is just showing the usage of "GatewayApi_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -293,7 +293,7 @@ public async Task GetGatewayApiEntityTag_ApiManagementHeadGatewayApi() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdateGatewayApi_ApiManagementCreateGatewayApi() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateGatewayApi.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateGatewayApi.json // this example is just showing the usage of "GatewayApi_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 @@ -326,7 +326,7 @@ public async Task CreateOrUpdateGatewayApi_ApiManagementCreateGatewayApi() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task DeleteGatewayApi_ApiManagementDeleteGatewayApi() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteGatewayApi.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteGatewayApi.json // this example is just showing the usage of "GatewayApi_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 diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGlobalSchemaCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGlobalSchemaCollection.cs index 82b9d83f5da28..6fa350fedfcca 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGlobalSchemaCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGlobalSchemaCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_ApiManagementGlobalSchemaCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListSchemas() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListGlobalSchemas.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListGlobalSchemas.json // this example is just showing the usage of "GlobalSchema_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListSchemas() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetSchema1() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetGlobalSchema1.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGlobalSchema1.json // this example is just showing the usage of "GlobalSchema_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 @@ -93,7 +93,7 @@ public async Task Get_ApiManagementGetSchema1() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetSchema1() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetGlobalSchema1.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGlobalSchema1.json // this example is just showing the usage of "GlobalSchema_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 @@ -124,7 +124,7 @@ public async Task Exists_ApiManagementGetSchema1() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetSchema1() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetGlobalSchema1.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGlobalSchema1.json // this example is just showing the usage of "GlobalSchema_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 @@ -167,7 +167,7 @@ public async Task GetIfExists_ApiManagementGetSchema1() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetSchema2() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetGlobalSchema2.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGlobalSchema2.json // this example is just showing the usage of "GlobalSchema_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 @@ -202,7 +202,7 @@ public async Task Get_ApiManagementGetSchema2() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetSchema2() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetGlobalSchema2.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGlobalSchema2.json // this example is just showing the usage of "GlobalSchema_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 @@ -233,7 +233,7 @@ public async Task Exists_ApiManagementGetSchema2() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetSchema2() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetGlobalSchema2.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGlobalSchema2.json // this example is just showing the usage of "GlobalSchema_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 @@ -276,7 +276,7 @@ public async Task GetIfExists_ApiManagementGetSchema2() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateSchema1() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateGlobalSchema1.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateGlobalSchema1.json // this example is just showing the usage of "GlobalSchema_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 @@ -318,7 +318,7 @@ public async Task CreateOrUpdate_ApiManagementCreateSchema1() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateSchema2() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateGlobalSchema2.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateGlobalSchema2.json // this example is just showing the usage of "GlobalSchema_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/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGlobalSchemaResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGlobalSchemaResource.cs index 1a94a6483e712..0ea1363a9fb03 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGlobalSchemaResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGlobalSchemaResource.cs @@ -21,7 +21,7 @@ public partial class Sample_ApiManagementGlobalSchemaResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityTag_ApiManagementHeadApi() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadGlobalSchema.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadGlobalSchema.json // this example is just showing the usage of "GlobalSchema_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -49,7 +49,7 @@ public async Task GetEntityTag_ApiManagementHeadApi() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetSchema1() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetGlobalSchema1.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGlobalSchema1.json // this example is just showing the usage of "GlobalSchema_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 @@ -81,7 +81,7 @@ public async Task Get_ApiManagementGetSchema1() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetSchema2() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetGlobalSchema2.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGlobalSchema2.json // this example is just showing the usage of "GlobalSchema_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 @@ -113,7 +113,7 @@ public async Task Get_ApiManagementGetSchema2() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementCreateSchema1() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateGlobalSchema1.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateGlobalSchema1.json // this example is just showing the usage of "GlobalSchema_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 @@ -152,7 +152,7 @@ public async Task Update_ApiManagementCreateSchema1() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementCreateSchema2() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateGlobalSchema2.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateGlobalSchema2.json // this example is just showing the usage of "GlobalSchema_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 @@ -216,7 +216,7 @@ public async Task Update_ApiManagementCreateSchema2() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ApiManagementDeleteSchema() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteGlobalSchema.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteGlobalSchema.json // this example is just showing the usage of "GlobalSchema_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 diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGroupCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGroupCollection.cs index 557c5434b496b..b2d8120117ce1 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGroupCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGroupCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementGroupCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListGroups() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListGroups.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListGroups.json // this example is just showing the usage of "Group_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListGroups() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetGroup() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetGroup.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGroup.json // this example is just showing the usage of "Group_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 @@ -92,7 +92,7 @@ public async Task Get_ApiManagementGetGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetGroup() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetGroup.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGroup.json // this example is just showing the usage of "Group_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 @@ -123,7 +123,7 @@ public async Task Exists_ApiManagementGetGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetGroup() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetGroup.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGroup.json // this example is just showing the usage of "Group_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 @@ -166,7 +166,7 @@ public async Task GetIfExists_ApiManagementGetGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateGroup() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateGroup.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateGroup.json // this example is just showing the usage of "Group_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 @@ -206,7 +206,7 @@ public async Task CreateOrUpdate_ApiManagementCreateGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateGroupExternal() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateGroupExternal.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateGroupExternal.json // this example is just showing the usage of "Group_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/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGroupResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGroupResource.cs index 0942a76de7cfd..461aaf68952fc 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGroupResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGroupResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementGroupResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityTag_ApiManagementHeadGroup() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadGroup.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadGroup.json // this example is just showing the usage of "Group_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task GetEntityTag_ApiManagementHeadGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetGroup() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetGroup.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGroup.json // this example is just showing the usage of "Group_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 @@ -80,7 +80,7 @@ public async Task Get_ApiManagementGetGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementUpdateGroup() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdateGroup.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateGroup.json // this example is just showing the usage of "Group_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 @@ -117,7 +117,7 @@ public async Task Update_ApiManagementUpdateGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ApiManagementDeleteGroup() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteGroup.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteGroup.json // this example is just showing the usage of "Group_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 @@ -146,7 +146,7 @@ public async Task Delete_ApiManagementDeleteGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetGroupUsers_ApiManagementListGroupUsers() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListGroupUsers.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListGroupUsers.json // this example is just showing the usage of "GroupUser_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 @@ -177,7 +177,7 @@ public async Task GetGroupUsers_ApiManagementListGroupUsers() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CheckGroupUserEntityExists_ApiManagementHeadGroupUser() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadGroupUser.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadGroupUser.json // this example is just showing the usage of "GroupUser_CheckEntityExists" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -206,7 +206,7 @@ public async Task CheckGroupUserEntityExists_ApiManagementHeadGroupUser() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateGroupUser_ApiManagementCreateGroupUser() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateGroupUser.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateGroupUser.json // this example is just showing the usage of "GroupUser_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -235,7 +235,7 @@ public async Task CreateGroupUser_ApiManagementCreateGroupUser() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task DeleteGroupUser_ApiManagementDeleteGroupUser() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteGroupUser.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteGroupUser.json // this example is just showing the usage of "GroupUser_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 diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementIdentityProviderCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementIdentityProviderCollection.cs index ca4b26ec862c9..1ae127184a50d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementIdentityProviderCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementIdentityProviderCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementIdentityProviderCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListIdentityProviders() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListIdentityProviders.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListIdentityProviders.json // this example is just showing the usage of "IdentityProvider_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListIdentityProviders() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetIdentityProvider() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetIdentityProvider.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetIdentityProvider.json // this example is just showing the usage of "IdentityProvider_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 @@ -92,7 +92,7 @@ public async Task Get_ApiManagementGetIdentityProvider() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetIdentityProvider() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetIdentityProvider.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetIdentityProvider.json // this example is just showing the usage of "IdentityProvider_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 @@ -123,7 +123,7 @@ public async Task Exists_ApiManagementGetIdentityProvider() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetIdentityProvider() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetIdentityProvider.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetIdentityProvider.json // this example is just showing the usage of "IdentityProvider_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 @@ -166,7 +166,7 @@ public async Task GetIfExists_ApiManagementGetIdentityProvider() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateIdentityProvider() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateIdentityProvider.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateIdentityProvider.json // this example is just showing the usage of "IdentityProvider_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/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementIdentityProviderResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementIdentityProviderResource.cs index 1286003408bbd..6d899073ad93c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementIdentityProviderResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementIdentityProviderResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementIdentityProviderResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityTag_ApiManagementHeadIdentityProvider() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadIdentityProvider.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadIdentityProvider.json // this example is just showing the usage of "IdentityProvider_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task GetEntityTag_ApiManagementHeadIdentityProvider() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetIdentityProvider() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetIdentityProvider.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetIdentityProvider.json // this example is just showing the usage of "IdentityProvider_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 @@ -80,7 +80,7 @@ public async Task Get_ApiManagementGetIdentityProvider() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementUpdateIdentityProvider() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdateIdentityProvider.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateIdentityProvider.json // this example is just showing the usage of "IdentityProvider_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 @@ -118,7 +118,7 @@ public async Task Update_ApiManagementUpdateIdentityProvider() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ApiManagementDeleteIdentityProvider() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteIdentityProvider.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteIdentityProvider.json // this example is just showing the usage of "IdentityProvider_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 @@ -147,7 +147,7 @@ public async Task Delete_ApiManagementDeleteIdentityProvider() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetSecrets_ApiManagementIdentityProviderListSecrets() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementIdentityProviderListSecrets.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementIdentityProviderListSecrets.json // this example is just showing the usage of "IdentityProvider_ListSecrets" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementIssueCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementIssueCollection.cs index b58e700d33382..62146d18409a2 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementIssueCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementIssueCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiManagementIssueCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListIssues() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListIssues.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListIssues.json // this example is just showing the usage of "Issue_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListIssues() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetIssue() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetIssue.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetIssue.json // this example is just showing the usage of "Issue_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_ApiManagementGetIssue() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetIssue() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetIssue.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetIssue.json // this example is just showing the usage of "Issue_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 @@ -122,7 +122,7 @@ public async Task Exists_ApiManagementGetIssue() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetIssue() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetIssue.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetIssue.json // this example is just showing the usage of "Issue_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/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementIssueResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementIssueResource.cs index c9694d6dcf0bc..a45b3652030bc 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementIssueResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementIssueResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiManagementIssueResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetIssue() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetIssue.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetIssue.json // this example is just showing the usage of "Issue_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/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementLoggerCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementLoggerCollection.cs index 287aed14720ce..f370fca9fdba1 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementLoggerCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementLoggerCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementLoggerCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListLoggers() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListLoggers.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListLoggers.json // this example is just showing the usage of "Logger_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListLoggers() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetLogger() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetLogger.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetLogger.json // this example is just showing the usage of "Logger_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 @@ -92,7 +92,7 @@ public async Task Get_ApiManagementGetLogger() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetLogger() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetLogger.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetLogger.json // this example is just showing the usage of "Logger_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 @@ -123,7 +123,7 @@ public async Task Exists_ApiManagementGetLogger() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetLogger() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetLogger.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetLogger.json // this example is just showing the usage of "Logger_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 @@ -166,7 +166,7 @@ public async Task GetIfExists_ApiManagementGetLogger() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateAILogger() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateAILogger.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateAILogger.json // this example is just showing the usage of "Logger_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 @@ -211,7 +211,7 @@ public async Task CreateOrUpdate_ApiManagementCreateAILogger() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateEHLogger() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateEHLogger.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateEHLogger.json // this example is just showing the usage of "Logger_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/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementLoggerResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementLoggerResource.cs index e828260b16d68..1d2632de6f776 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementLoggerResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementLoggerResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementLoggerResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityTag_ApiManagementHeadLogger() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadLogger.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadLogger.json // this example is just showing the usage of "Logger_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task GetEntityTag_ApiManagementHeadLogger() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetLogger() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetLogger.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetLogger.json // this example is just showing the usage of "Logger_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 @@ -80,7 +80,7 @@ public async Task Get_ApiManagementGetLogger() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementUpdateLogger() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdateLogger.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateLogger.json // this example is just showing the usage of "Logger_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 @@ -118,7 +118,7 @@ public async Task Update_ApiManagementUpdateLogger() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ApiManagementDeleteLogger() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteLogger.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteLogger.json // this example is just showing the usage of "Logger_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 diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementNamedValueCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementNamedValueCollection.cs index 058a92c83c302..83a73c8199f27 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementNamedValueCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementNamedValueCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementNamedValueCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListNamedValues() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListNamedValues.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListNamedValues.json // this example is just showing the usage of "NamedValue_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListNamedValues() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetNamedValue() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetNamedValue.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetNamedValue.json // this example is just showing the usage of "NamedValue_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 @@ -92,7 +92,7 @@ public async Task Get_ApiManagementGetNamedValue() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetNamedValue() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetNamedValue.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetNamedValue.json // this example is just showing the usage of "NamedValue_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 @@ -123,7 +123,7 @@ public async Task Exists_ApiManagementGetNamedValue() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetNamedValue() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetNamedValue.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetNamedValue.json // this example is just showing the usage of "NamedValue_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 @@ -166,7 +166,7 @@ public async Task GetIfExists_ApiManagementGetNamedValue() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetNamedValueWithKeyVault() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetNamedValueWithKeyVault.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetNamedValueWithKeyVault.json // this example is just showing the usage of "NamedValue_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 @@ -201,7 +201,7 @@ public async Task Get_ApiManagementGetNamedValueWithKeyVault() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetNamedValueWithKeyVault() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetNamedValueWithKeyVault.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetNamedValueWithKeyVault.json // this example is just showing the usage of "NamedValue_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 @@ -232,7 +232,7 @@ public async Task Exists_ApiManagementGetNamedValueWithKeyVault() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetNamedValueWithKeyVault() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetNamedValueWithKeyVault.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetNamedValueWithKeyVault.json // this example is just showing the usage of "NamedValue_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 @@ -275,7 +275,7 @@ public async Task GetIfExists_ApiManagementGetNamedValueWithKeyVault() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateNamedValue() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateNamedValue.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateNamedValue.json // this example is just showing the usage of "NamedValue_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 @@ -321,7 +321,7 @@ public async Task CreateOrUpdate_ApiManagementCreateNamedValue() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateNamedValueWithKeyVault() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateNamedValueWithKeyVault.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateNamedValueWithKeyVault.json // this example is just showing the usage of "NamedValue_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/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementNamedValueResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementNamedValueResource.cs index a2799ff2ea089..ae4d9e978b596 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementNamedValueResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementNamedValueResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementNamedValueResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityTag_ApiManagementHeadNamedValue() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadNamedValue.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadNamedValue.json // this example is just showing the usage of "NamedValue_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task GetEntityTag_ApiManagementHeadNamedValue() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetNamedValue() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetNamedValue.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetNamedValue.json // this example is just showing the usage of "NamedValue_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 @@ -80,7 +80,7 @@ public async Task Get_ApiManagementGetNamedValue() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetNamedValueWithKeyVault() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetNamedValueWithKeyVault.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetNamedValueWithKeyVault.json // this example is just showing the usage of "NamedValue_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 @@ -112,7 +112,7 @@ public async Task Get_ApiManagementGetNamedValueWithKeyVault() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementUpdateNamedValue() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdateNamedValue.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateNamedValue.json // this example is just showing the usage of "NamedValue_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 @@ -156,7 +156,7 @@ public async Task Update_ApiManagementUpdateNamedValue() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ApiManagementDeleteNamedValue() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteNamedValue.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteNamedValue.json // this example is just showing the usage of "NamedValue_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 @@ -185,7 +185,7 @@ public async Task Delete_ApiManagementDeleteNamedValue() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetValue_ApiManagementNamedValueListValue() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementNamedValueListValue.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementNamedValueListValue.json // this example is just showing the usage of "NamedValue_ListValue" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -213,7 +213,7 @@ public async Task GetValue_ApiManagementNamedValueListValue() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task RefreshSecret_ApiManagementRefreshNamedValue() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementRefreshNamedValue.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementRefreshNamedValue.json // this example is just showing the usage of "NamedValue_RefreshSecret" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementNotificationCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementNotificationCollection.cs index b13e0a43f327e..bac83760d434b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementNotificationCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementNotificationCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementNotificationCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListNotifications() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListNotifications.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListNotifications.json // this example is just showing the usage of "Notification_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListNotifications() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetNotification() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetNotification.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetNotification.json // this example is just showing the usage of "Notification_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 @@ -92,7 +92,7 @@ public async Task Get_ApiManagementGetNotification() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetNotification() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetNotification.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetNotification.json // this example is just showing the usage of "Notification_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 @@ -123,7 +123,7 @@ public async Task Exists_ApiManagementGetNotification() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetNotification() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetNotification.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetNotification.json // this example is just showing the usage of "Notification_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 @@ -166,7 +166,7 @@ public async Task GetIfExists_ApiManagementGetNotification() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateNotification() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateNotification.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateNotification.json // this example is just showing the usage of "Notification_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/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementNotificationResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementNotificationResource.cs index 37bd2611a6eab..ec154cedc0cc1 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementNotificationResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementNotificationResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementNotificationResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetNotification() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetNotification.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetNotification.json // this example is just showing the usage of "Notification_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 @@ -52,7 +52,7 @@ public async Task Get_ApiManagementGetNotification() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementCreateNotification() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateNotification.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateNotification.json // this example is just showing the usage of "Notification_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 @@ -85,7 +85,7 @@ public async Task Update_ApiManagementCreateNotification() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetNotificationRecipientUsers_ApiManagementListNotificationRecipientUsers() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListNotificationRecipientUsers.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListNotificationRecipientUsers.json // this example is just showing the usage of "NotificationRecipientUser_ListByNotification" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetNotificationRecipientUsers_ApiManagementListNotificationRec [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CheckNotificationRecipientUserEntityExists_ApiManagementHeadNotificationRecipientUser() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadNotificationRecipientUser.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadNotificationRecipientUser.json // this example is just showing the usage of "NotificationRecipientUser_CheckEntityExists" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -145,7 +145,7 @@ public async Task CheckNotificationRecipientUserEntityExists_ApiManagementHeadNo [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdateNotificationRecipientUser_ApiManagementCreateNotificationRecipientUser() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateNotificationRecipientUser.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateNotificationRecipientUser.json // this example is just showing the usage of "NotificationRecipientUser_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 @@ -174,7 +174,7 @@ public async Task CreateOrUpdateNotificationRecipientUser_ApiManagementCreateNot [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task DeleteNotificationRecipientUser_ApiManagementDeleteNotificationRecipientUser() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteNotificationRecipientUser.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteNotificationRecipientUser.json // this example is just showing the usage of "NotificationRecipientUser_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 @@ -203,7 +203,7 @@ public async Task DeleteNotificationRecipientUser_ApiManagementDeleteNotificatio [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetNotificationRecipientEmails_ApiManagementListNotificationRecipientEmails() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListNotificationRecipientEmails.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListNotificationRecipientEmails.json // this example is just showing the usage of "NotificationRecipientEmail_ListByNotification" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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,7 +234,7 @@ public async Task GetNotificationRecipientEmails_ApiManagementListNotificationRe [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CheckNotificationRecipientEmailEntityExists_ApiManagementHeadNotificationRecipientEmail() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadNotificationRecipientEmail.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadNotificationRecipientEmail.json // this example is just showing the usage of "NotificationRecipientEmail_CheckEntityExists" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -263,7 +263,7 @@ public async Task CheckNotificationRecipientEmailEntityExists_ApiManagementHeadN [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdateNotificationRecipientEmail_ApiManagementCreateNotificationRecipientEmail() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateNotificationRecipientEmail.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateNotificationRecipientEmail.json // this example is just showing the usage of "NotificationRecipientEmail_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 @@ -292,7 +292,7 @@ public async Task CreateOrUpdateNotificationRecipientEmail_ApiManagementCreateNo [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task DeleteNotificationRecipientEmail_ApiManagementDeleteNotificationRecipientEmail() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteNotificationRecipientEmail.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteNotificationRecipientEmail.json // this example is just showing the usage of "NotificationRecipientEmail_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 diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementOpenIdConnectProviderCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementOpenIdConnectProviderCollection.cs index 6ae88665f4054..6a410c3d6856a 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementOpenIdConnectProviderCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementOpenIdConnectProviderCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiManagementOpenIdConnectProviderCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListOpenIdConnectProviders() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListOpenIdConnectProviders.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListOpenIdConnectProviders.json // this example is just showing the usage of "OpenIdConnectProvider_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListOpenIdConnectProviders() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetOpenIdConnectProvider() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetOpenIdConnectProvider.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetOpenIdConnectProvider.json // this example is just showing the usage of "OpenIdConnectProvider_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_ApiManagementGetOpenIdConnectProvider() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetOpenIdConnectProvider() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetOpenIdConnectProvider.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetOpenIdConnectProvider.json // this example is just showing the usage of "OpenIdConnectProvider_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 @@ -122,7 +122,7 @@ public async Task Exists_ApiManagementGetOpenIdConnectProvider() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetOpenIdConnectProvider() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetOpenIdConnectProvider.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetOpenIdConnectProvider.json // this example is just showing the usage of "OpenIdConnectProvider_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 @@ -165,7 +165,7 @@ public async Task GetIfExists_ApiManagementGetOpenIdConnectProvider() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateOpenIdConnectProvider() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateOpenIdConnectProvider.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateOpenIdConnectProvider.json // this example is just showing the usage of "OpenIdConnectProvider_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 @@ -192,6 +192,8 @@ public async Task CreateOrUpdate_ApiManagementCreateOpenIdConnectProvider() MetadataEndpoint = "https://oidprovider-template3.net", ClientId = "oidprovidertemplate3", ClientSecret = "x", + UseInTestConsole = false, + UseInApiDocumentation = true, }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, openId, data); ApiManagementOpenIdConnectProviderResource result = lro.Value; diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementOpenIdConnectProviderResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementOpenIdConnectProviderResource.cs index 00275dcbbfeb0..57211f17a7912 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementOpenIdConnectProviderResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementOpenIdConnectProviderResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementOpenIdConnectProviderResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityTag_ApiManagementHeadOpenIdConnectProvider() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadOpenIdConnectProvider.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadOpenIdConnectProvider.json // this example is just showing the usage of "OpenIdConnectProvider_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task GetEntityTag_ApiManagementHeadOpenIdConnectProvider() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetOpenIdConnectProvider() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetOpenIdConnectProvider.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetOpenIdConnectProvider.json // this example is just showing the usage of "OpenIdConnectProvider_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 @@ -80,7 +80,7 @@ public async Task Get_ApiManagementGetOpenIdConnectProvider() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementUpdateOpenIdConnectProvider() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdateOpenIdConnectProvider.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateOpenIdConnectProvider.json // this example is just showing the usage of "OpenIdConnectProvider_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 @@ -102,6 +102,8 @@ public async Task Update_ApiManagementUpdateOpenIdConnectProvider() ApiManagementOpenIdConnectProviderPatch patch = new ApiManagementOpenIdConnectProviderPatch() { ClientSecret = "updatedsecret", + UseInTestConsole = false, + UseInApiDocumentation = true, }; ApiManagementOpenIdConnectProviderResource result = await apiManagementOpenIdConnectProvider.UpdateAsync(ifMatch, patch); @@ -117,7 +119,7 @@ public async Task Update_ApiManagementUpdateOpenIdConnectProvider() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ApiManagementDeleteOpenIdConnectProvider() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteOpenIdConnectProvider.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteOpenIdConnectProvider.json // this example is just showing the usage of "OpenIdConnectProvider_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 @@ -146,7 +148,7 @@ public async Task Delete_ApiManagementDeleteOpenIdConnectProvider() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetSecrets_ApiManagementOpenidConnectProviderListSecrets() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementOpenidConnectProviderListSecrets.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementOpenidConnectProviderListSecrets.json // this example is just showing the usage of "OpenIdConnectProvider_ListSecrets" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPolicyCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPolicyCollection.cs index 07c3357ac55c8..1b7e3e9bed7ba 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPolicyCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPolicyCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementPolicyCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListPolicies() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListPolicies.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListPolicies.json // this example is just showing the usage of "Policy_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListPolicies() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetPolicy.json // this example is just showing the usage of "Policy_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 @@ -92,7 +92,7 @@ public async Task Get_ApiManagementGetPolicy() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetPolicy.json // this example is just showing the usage of "Policy_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 @@ -123,7 +123,7 @@ public async Task Exists_ApiManagementGetPolicy() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetPolicy.json // this example is just showing the usage of "Policy_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 @@ -166,7 +166,7 @@ public async Task GetIfExists_ApiManagementGetPolicy() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetPolicyFormat() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetPolicyFormat.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetPolicyFormat.json // this example is just showing the usage of "Policy_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 @@ -202,7 +202,7 @@ public async Task Get_ApiManagementGetPolicyFormat() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetPolicyFormat() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetPolicyFormat.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetPolicyFormat.json // this example is just showing the usage of "Policy_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 @@ -234,7 +234,7 @@ public async Task Exists_ApiManagementGetPolicyFormat() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetPolicyFormat() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetPolicyFormat.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetPolicyFormat.json // this example is just showing the usage of "Policy_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 @@ -278,7 +278,7 @@ public async Task GetIfExists_ApiManagementGetPolicyFormat() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreatePolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreatePolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreatePolicy.json // this example is just showing the usage of "Policy_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/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPolicyResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPolicyResource.cs index ee134cb81dd25..dbd31607d9f4a 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPolicyResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPolicyResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementPolicyResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityTag_ApiManagementHeadPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadPolicy.json // this example is just showing the usage of "Policy_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task GetEntityTag_ApiManagementHeadPolicy() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetPolicy.json // this example is just showing the usage of "Policy_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 @@ -80,7 +80,7 @@ public async Task Get_ApiManagementGetPolicy() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetPolicyFormat() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetPolicyFormat.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetPolicyFormat.json // this example is just showing the usage of "Policy_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 @@ -113,7 +113,7 @@ public async Task Get_ApiManagementGetPolicyFormat() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementCreatePolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreatePolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreatePolicy.json // this example is just showing the usage of "Policy_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 @@ -151,7 +151,7 @@ public async Task Update_ApiManagementCreatePolicy() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ApiManagementDeletePolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeletePolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeletePolicy.json // this example is just showing the usage of "Policy_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 diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPortalDelegationSettingResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPortalDelegationSettingResource.cs index 05d522700b18f..8fd954dd69301 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPortalDelegationSettingResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPortalDelegationSettingResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementPortalDelegationSettingResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityTag_ApiManagementHeadDelegationSettings() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadDelegationSettings.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadDelegationSettings.json // this example is just showing the usage of "DelegationSettings_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -47,7 +47,7 @@ public async Task GetEntityTag_ApiManagementHeadDelegationSettings() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementPortalSettingsGetDelegation() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementPortalSettingsGetDelegation.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementPortalSettingsGetDelegation.json // this example is just showing the usage of "DelegationSettings_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 @@ -78,7 +78,7 @@ public async Task Get_ApiManagementPortalSettingsGetDelegation() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementPortalSettingsUpdateDelegation() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementPortalSettingsUpdateDelegation.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementPortalSettingsUpdateDelegation.json // this example is just showing the usage of "DelegationSettings_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 @@ -113,7 +113,7 @@ public async Task Update_ApiManagementPortalSettingsUpdateDelegation() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementPortalSettingsUpdateDelegation() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementPortalSettingsPutDelegation.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementPortalSettingsPutDelegation.json // this example is just showing the usage of "DelegationSettings_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 @@ -153,7 +153,7 @@ public async Task CreateOrUpdate_ApiManagementPortalSettingsUpdateDelegation() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetSecrets_ApiManagementListSecretsPortalSettings() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListSecretsPortalSettingsValidationKey.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListSecretsPortalSettingsValidationKey.json // this example is just showing the usage of "DelegationSettings_ListSecrets" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPortalRevisionCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPortalRevisionCollection.cs index 7412aeadfddc4..0913c26b2a50f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPortalRevisionCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPortalRevisionCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiManagementPortalRevisionCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListPortalRevisions() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListPortalRevisions.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListPortalRevisions.json // this example is just showing the usage of "PortalRevision_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListPortalRevisions() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetPortalRevision() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetPortalRevision.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetPortalRevision.json // this example is just showing the usage of "PortalRevision_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_ApiManagementGetPortalRevision() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetPortalRevision() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetPortalRevision.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetPortalRevision.json // this example is just showing the usage of "PortalRevision_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 @@ -122,7 +122,7 @@ public async Task Exists_ApiManagementGetPortalRevision() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetPortalRevision() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetPortalRevision.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetPortalRevision.json // this example is just showing the usage of "PortalRevision_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 @@ -165,7 +165,7 @@ public async Task GetIfExists_ApiManagementGetPortalRevision() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreatePortalRevision() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreatePortalRevision.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreatePortalRevision.json // this example is just showing the usage of "PortalRevision_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/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPortalRevisionResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPortalRevisionResource.cs index 5d5a486bc20b7..7092ff48e33d5 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPortalRevisionResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPortalRevisionResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiManagementPortalRevisionResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityTag_ApiManagementHeadPortalRevision() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadPortalRevision.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadPortalRevision.json // this example is just showing the usage of "PortalRevision_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -47,7 +47,7 @@ public async Task GetEntityTag_ApiManagementHeadPortalRevision() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetPortalRevision() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetPortalRevision.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetPortalRevision.json // this example is just showing the usage of "PortalRevision_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 @@ -79,7 +79,7 @@ public async Task Get_ApiManagementGetPortalRevision() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementUpdatePortalRevision() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdatePortalRevision.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdatePortalRevision.json // this example is just showing the usage of "PortalRevision_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/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPortalSignInSettingResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPortalSignInSettingResource.cs index abfffb1736507..d9781327e715b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPortalSignInSettingResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPortalSignInSettingResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiManagementPortalSignInSettingResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityTag_ApiManagementHeadSignInSettings() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadSignInSettings.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadSignInSettings.json // this example is just showing the usage of "SignInSettings_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetEntityTag_ApiManagementHeadSignInSettings() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementPortalSettingsGetSignIn() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementPortalSettingsGetSignIn.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementPortalSettingsGetSignIn.json // this example is just showing the usage of "SignInSettings_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 @@ -77,7 +77,7 @@ public async Task Get_ApiManagementPortalSettingsGetSignIn() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementPortalSettingsUpdateSignIn() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementPortalSettingsUpdateSignIn.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementPortalSettingsUpdateSignIn.json // this example is just showing the usage of "SignInSettings_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 @@ -109,7 +109,7 @@ public async Task Update_ApiManagementPortalSettingsUpdateSignIn() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementPortalSettingsUpdateSignIn() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementPortalSettingsPutSignIn.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementPortalSettingsPutSignIn.json // this example is just showing the usage of "SignInSettings_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/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPortalSignUpSettingResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPortalSignUpSettingResource.cs index 6e793a7718e45..bf5b631bb8c5d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPortalSignUpSettingResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPortalSignUpSettingResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementPortalSignUpSettingResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityTag_ApiManagementHeadSignUpSettings() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadSignUpSettings.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadSignUpSettings.json // this example is just showing the usage of "SignUpSettings_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -47,7 +47,7 @@ public async Task GetEntityTag_ApiManagementHeadSignUpSettings() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementPortalSettingsGetSignUp() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementPortalSettingsGetSignUp.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementPortalSettingsGetSignUp.json // this example is just showing the usage of "SignUpSettings_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 @@ -78,7 +78,7 @@ public async Task Get_ApiManagementPortalSettingsGetSignUp() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementPortalSettingsUpdateSignUp() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementPortalSettingsUpdateSignUp.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementPortalSettingsUpdateSignUp.json // this example is just showing the usage of "SignUpSettings_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 @@ -116,7 +116,7 @@ public async Task Update_ApiManagementPortalSettingsUpdateSignUp() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementPortalSettingsUpdateSignUp() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementPortalSettingsPutSignUp.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementPortalSettingsPutSignUp.json // this example is just showing the usage of "SignUpSettings_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/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPrivateEndpointConnectionCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPrivateEndpointConnectionCollection.cs index 004f978e0c0db..e34c4b69851d3 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPrivateEndpointConnectionCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPrivateEndpointConnectionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementPrivateEndpointConnectionCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListPrivateEndpointConnections() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListPrivateEndpointConnections.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListPrivateEndpointConnections.json // this example is just showing the usage of "PrivateEndpointConnection_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListPrivateEndpointConnections() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetPrivateEndpointConnection() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetPrivateEndpointConnection.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetPrivateEndpointConnection.json // this example is just showing the usage of "PrivateEndpointConnection_GetByName" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetPrivateEndpointConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetPrivateEndpointConnection() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetPrivateEndpointConnection.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetPrivateEndpointConnection.json // this example is just showing the usage of "PrivateEndpointConnection_GetByName" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetPrivateEndpointConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetPrivateEndpointConnection() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetPrivateEndpointConnection.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetPrivateEndpointConnection.json // this example is just showing the usage of "PrivateEndpointConnection_GetByName" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetPrivateEndpointConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementApproveOrRejectPrivateEndpointConnection() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementApproveOrRejectPrivateEndpointConnection.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementApproveOrRejectPrivateEndpointConnection.json // this example is just showing the usage of "PrivateEndpointConnection_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/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPrivateEndpointConnectionResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPrivateEndpointConnectionResource.cs index 2a62945a81819..b1ac61ee32eeb 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPrivateEndpointConnectionResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPrivateEndpointConnectionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementPrivateEndpointConnectionResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetPrivateEndpointConnection() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetPrivateEndpointConnection.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetPrivateEndpointConnection.json // this example is just showing the usage of "PrivateEndpointConnection_GetByName" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetPrivateEndpointConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementApproveOrRejectPrivateEndpointConnection() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementApproveOrRejectPrivateEndpointConnection.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementApproveOrRejectPrivateEndpointConnection.json // this example is just showing the usage of "PrivateEndpointConnection_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 @@ -94,7 +94,7 @@ public async Task Update_ApiManagementApproveOrRejectPrivateEndpointConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ApiManagementDeletePrivateEndpointConnection() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeletePrivateEndpointConnection.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeletePrivateEndpointConnection.json // this example is just showing the usage of "PrivateEndpointConnection_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 diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPrivateLinkResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPrivateLinkResource.cs index e90b0f14191d5..5b6645f001dc5 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPrivateLinkResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPrivateLinkResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiManagementPrivateLinkResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetPrivateLinkGroupResource() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetPrivateLinkGroupResource.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetPrivateLinkGroupResource.json // this example is just showing the usage of "PrivateEndpointConnection_GetPrivateLinkResource" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPrivateLinkResourceCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPrivateLinkResourceCollection.cs index be4fb5341a80d..2b602da00dd30 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPrivateLinkResourceCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPrivateLinkResourceCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiManagementPrivateLinkResourceCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListPrivateLinkGroupResources() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListPrivateLinkGroupResources.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListPrivateLinkGroupResources.json // this example is just showing the usage of "PrivateEndpointConnection_ListPrivateLinkResources" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListPrivateLinkGroupResources() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetPrivateLinkGroupResource() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetPrivateLinkGroupResource.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetPrivateLinkGroupResource.json // this example is just showing the usage of "PrivateEndpointConnection_GetPrivateLinkResource" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetPrivateLinkGroupResource() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetPrivateLinkGroupResource() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetPrivateLinkGroupResource.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetPrivateLinkGroupResource.json // this example is just showing the usage of "PrivateEndpointConnection_GetPrivateLinkResource" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetPrivateLinkGroupResource() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetPrivateLinkGroupResource() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetPrivateLinkGroupResource.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetPrivateLinkGroupResource.json // this example is just showing the usage of "PrivateEndpointConnection_GetPrivateLinkResource" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementProductCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementProductCollection.cs index a73c1a5ec2d72..2bd49190a1306 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementProductCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementProductCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiManagementProductCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListProducts() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListProducts.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListProducts.json // this example is just showing the usage of "Product_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListProducts() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetProduct() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetProduct.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetProduct.json // this example is just showing the usage of "Product_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_ApiManagementGetProduct() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetProduct() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetProduct.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetProduct.json // this example is just showing the usage of "Product_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 @@ -122,7 +122,7 @@ public async Task Exists_ApiManagementGetProduct() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetProduct() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetProduct.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetProduct.json // this example is just showing the usage of "Product_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 @@ -165,7 +165,7 @@ public async Task GetIfExists_ApiManagementGetProduct() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateProduct() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateProduct.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateProduct.json // this example is just showing the usage of "Product_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/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementProductPolicyCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementProductPolicyCollection.cs index d59eb7657c85d..abc0de837cb5a 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementProductPolicyCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementProductPolicyCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementProductPolicyCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListProductPolicies() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListProductPolicies.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListProductPolicies.json // this example is just showing the usage of "ProductPolicy_ListByProduct" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListProductPolicies() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetProductPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetProductPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetProductPolicy.json // this example is just showing the usage of "ProductPolicy_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 @@ -94,7 +94,7 @@ public async Task Get_ApiManagementGetProductPolicy() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetProductPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetProductPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetProductPolicy.json // this example is just showing the usage of "ProductPolicy_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 @@ -126,7 +126,7 @@ public async Task Exists_ApiManagementGetProductPolicy() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetProductPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetProductPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetProductPolicy.json // this example is just showing the usage of "ProductPolicy_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 @@ -170,7 +170,7 @@ public async Task GetIfExists_ApiManagementGetProductPolicy() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateProductPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateProductPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateProductPolicy.json // this example is just showing the usage of "ProductPolicy_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/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementProductPolicyResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementProductPolicyResource.cs index 74a9ad0995897..04261553a69f8 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementProductPolicyResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementProductPolicyResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementProductPolicyResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityTag_ApiManagementHeadProductPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadProductPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadProductPolicy.json // this example is just showing the usage of "ProductPolicy_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -49,7 +49,7 @@ public async Task GetEntityTag_ApiManagementHeadProductPolicy() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetProductPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetProductPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetProductPolicy.json // this example is just showing the usage of "ProductPolicy_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 @@ -82,7 +82,7 @@ public async Task Get_ApiManagementGetProductPolicy() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementCreateProductPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateProductPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateProductPolicy.json // this example is just showing the usage of "ProductPolicy_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 @@ -121,7 +121,7 @@ public async Task Update_ApiManagementCreateProductPolicy() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ApiManagementDeleteProductPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteProductPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteProductPolicy.json // this example is just showing the usage of "ProductPolicy_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 diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementProductResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementProductResource.cs index 811992c8000e9..cc580d8e6ed91 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementProductResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementProductResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementProductResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityTag_ApiManagementHeadProduct() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadProduct.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadProduct.json // this example is just showing the usage of "Product_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task GetEntityTag_ApiManagementHeadProduct() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetProduct() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetProduct.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetProduct.json // this example is just showing the usage of "Product_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 @@ -80,7 +80,7 @@ public async Task Get_ApiManagementGetProduct() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementUpdateProduct() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdateProduct.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateProduct.json // this example is just showing the usage of "Product_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 @@ -117,7 +117,7 @@ public async Task Update_ApiManagementUpdateProduct() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ApiManagementDeleteProduct() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteProduct.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteProduct.json // this example is just showing the usage of "Product_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 @@ -147,7 +147,7 @@ public async Task Delete_ApiManagementDeleteProduct() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetProductApis_ApiManagementListProductApis() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListProductApis.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListProductApis.json // this example is just showing the usage of "ProductApi_ListByProduct" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetProductApis_ApiManagementListProductApis() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CheckProductApiEntityExists_ApiManagementHeadProductApi() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadProductApi.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadProductApi.json // this example is just showing the usage of "ProductApi_CheckEntityExists" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 CheckProductApiEntityExists_ApiManagementHeadProductApi() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdateProductApi_ApiManagementCreateProductApi() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateProductApi.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateProductApi.json // this example is just showing the usage of "ProductApi_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 @@ -236,7 +236,7 @@ public async Task CreateOrUpdateProductApi_ApiManagementCreateProductApi() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task DeleteProductApi_ApiManagementDeleteProductApi() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteProductApi.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteProductApi.json // this example is just showing the usage of "ProductApi_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 @@ -265,7 +265,7 @@ public async Task DeleteProductApi_ApiManagementDeleteProductApi() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetProductGroups_ApiManagementListProductGroups() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListProductGroups.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListProductGroups.json // this example is just showing the usage of "ProductGroup_ListByProduct" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -296,7 +296,7 @@ public async Task GetProductGroups_ApiManagementListProductGroups() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CheckProductGroupEntityExists_ApiManagementHeadProductGroup() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadProductGroup.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadProductGroup.json // this example is just showing the usage of "ProductGroup_CheckEntityExists" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -325,7 +325,7 @@ public async Task CheckProductGroupEntityExists_ApiManagementHeadProductGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdateProductGroup_ApiManagementCreateProductGroup() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateProductGroup.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateProductGroup.json // this example is just showing the usage of "ProductGroup_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 @@ -354,7 +354,7 @@ public async Task CreateOrUpdateProductGroup_ApiManagementCreateProductGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task DeleteProductGroup_ApiManagementDeleteProductGroup() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteProductGroup.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteProductGroup.json // this example is just showing the usage of "ProductGroup_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 @@ -383,7 +383,7 @@ public async Task DeleteProductGroup_ApiManagementDeleteProductGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAllProductSubscriptionData_ApiManagementListProductSubscriptions() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListProductSubscriptions.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListProductSubscriptions.json // this example is just showing the usage of "ProductSubscriptions_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 diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementProductTagCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementProductTagCollection.cs index aff937ff2e3cf..fcbf5cc15a047 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementProductTagCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementProductTagCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiManagementProductTagCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListProductTags() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListProductTags.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListProductTags.json // this example is just showing the usage of "Tag_ListByProduct" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListProductTags() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetProductTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetProductTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetProductTag.json // this example is just showing the usage of "Tag_GetByProduct" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetProductTag() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetProductTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetProductTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetProductTag.json // this example is just showing the usage of "Tag_GetByProduct" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetProductTag() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetProductTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetProductTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetProductTag.json // this example is just showing the usage of "Tag_GetByProduct" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetProductTag() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateProductTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateProductTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateProductTag.json // this example is just showing the usage of "Tag_AssignToProduct" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementProductTagResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementProductTagResource.cs index c42db50e9b211..3604c2ccdd04d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementProductTagResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementProductTagResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiManagementProductTagResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityStateByProduct_ApiManagementHeadProductTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadProductTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadProductTag.json // this example is just showing the usage of "Tag_GetEntityStateByProduct" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task GetEntityStateByProduct_ApiManagementHeadProductTag() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetProductTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetProductTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetProductTag.json // this example is just showing the usage of "Tag_GetByProduct" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -81,7 +81,7 @@ public async Task Get_ApiManagementGetProductTag() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementCreateProductTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateProductTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateProductTag.json // this example is just showing the usage of "Tag_AssignToProduct" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Update_ApiManagementCreateProductTag() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ApiManagementDeleteProductTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteProductTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteProductTag.json // this example is just showing the usage of "Tag_DetachFromProduct" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementServiceCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementServiceCollection.cs index 8b299b714d920..1134d250ae22a 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementServiceCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementServiceCollection.cs @@ -22,7 +22,7 @@ public partial class Sample_ApiManagementServiceCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateMultiRegionServiceWithCustomHostname() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateMultiRegionServiceWithCustomHostname.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateMultiRegionServiceWithCustomHostname.json // this example is just showing the usage of "ApiManagementService_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 @@ -92,7 +92,7 @@ public async Task CreateOrUpdate_ApiManagementCreateMultiRegionServiceWithCustom [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateService() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateService.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateService.json // this example is just showing the usage of "ApiManagementService_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 @@ -135,7 +135,7 @@ public async Task CreateOrUpdate_ApiManagementCreateService() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateServiceHavingMsi() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateServiceHavingMsi.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateServiceHavingMsi.json // this example is just showing the usage of "ApiManagementService_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 @@ -180,7 +180,7 @@ public async Task CreateOrUpdate_ApiManagementCreateServiceHavingMsi() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateServiceInVnetWithPublicIP() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateServiceInVnetWithPublicIP.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateServiceInVnetWithPublicIP.json // this example is just showing the usage of "ApiManagementService_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 @@ -234,7 +234,7 @@ public async Task CreateOrUpdate_ApiManagementCreateServiceInVnetWithPublicIP() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateServiceInZones() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateServiceInZones.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateServiceInZones.json // this example is just showing the usage of "ApiManagementService_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 @@ -282,7 +282,7 @@ public async Task CreateOrUpdate_ApiManagementCreateServiceInZones() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateServiceWithCustomHostnameKeyVault() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateServiceWithCustomHostnameKeyVault.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateServiceWithCustomHostnameKeyVault.json // this example is just showing the usage of "ApiManagementService_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 @@ -347,12 +347,57 @@ public async Task CreateOrUpdate_ApiManagementCreateServiceWithCustomHostnameKey Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } + // ApiManagementCreateServiceWithNatGatewayEnabled + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_ApiManagementCreateServiceWithNatGatewayEnabled() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateServiceWithNatGatewayEnabled.json + // this example is just showing the usage of "ApiManagementService_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 = "subid"; + string resourceGroupName = "rg1"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ApiManagementServiceResource + ApiManagementServiceCollection collection = resourceGroupResource.GetApiManagementServices(); + + // invoke the operation + string serviceName = "apimService1"; + ApiManagementServiceData data = new ApiManagementServiceData(new AzureLocation("East US"), new ApiManagementServiceSkuProperties(ApiManagementServiceSkuType.Premium, 1), "apim@autorestsdk.com", "autorestsdk") + { + NatGatewayState = ApiManagementNatGatewayState.Enabled, + Tags = +{ +["tag1"] = "value1", +["tag2"] = "value2", +["tag3"] = "value3", +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, serviceName, data); + ApiManagementServiceResource 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 + ApiManagementServiceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + // ApiManagementCreateServiceWithSystemCertificates [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateServiceWithSystemCertificates() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateServiceWithSystemCertificates.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateServiceWithSystemCertificates.json // this example is just showing the usage of "ApiManagementService_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 @@ -404,7 +449,7 @@ public async Task CreateOrUpdate_ApiManagementCreateServiceWithSystemCertificate [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateServiceWithUserAssignedIdentity() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateServiceWithUserAssignedIdentity.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateServiceWithUserAssignedIdentity.json // this example is just showing the usage of "ApiManagementService_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 @@ -455,7 +500,7 @@ public async Task CreateOrUpdate_ApiManagementCreateServiceWithUserAssignedIdent [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementUndelete() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUndelete.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUndelete.json // this example is just showing the usage of "ApiManagementService_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 @@ -494,7 +539,7 @@ public async Task CreateOrUpdate_ApiManagementUndelete() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementServiceGetMultiRegionInternalVnet() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementServiceGetMultiRegionInternalVnet.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceGetMultiRegionInternalVnet.json // this example is just showing the usage of "ApiManagementService_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 @@ -528,7 +573,7 @@ public async Task Get_ApiManagementServiceGetMultiRegionInternalVnet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementServiceGetMultiRegionInternalVnet() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementServiceGetMultiRegionInternalVnet.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceGetMultiRegionInternalVnet.json // this example is just showing the usage of "ApiManagementService_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 @@ -558,7 +603,7 @@ public async Task Exists_ApiManagementServiceGetMultiRegionInternalVnet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementServiceGetMultiRegionInternalVnet() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementServiceGetMultiRegionInternalVnet.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceGetMultiRegionInternalVnet.json // this example is just showing the usage of "ApiManagementService_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 @@ -600,7 +645,7 @@ public async Task GetIfExists_ApiManagementServiceGetMultiRegionInternalVnet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementServiceGetService() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementServiceGetService.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceGetService.json // this example is just showing the usage of "ApiManagementService_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 @@ -634,7 +679,7 @@ public async Task Get_ApiManagementServiceGetService() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementServiceGetService() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementServiceGetService.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceGetService.json // this example is just showing the usage of "ApiManagementService_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 @@ -664,7 +709,7 @@ public async Task Exists_ApiManagementServiceGetService() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementServiceGetService() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementServiceGetService.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceGetService.json // this example is just showing the usage of "ApiManagementService_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 @@ -706,7 +751,7 @@ public async Task GetIfExists_ApiManagementServiceGetService() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementServiceGetServiceHavingMsi() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementServiceGetServiceHavingMsi.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceGetServiceHavingMsi.json // this example is just showing the usage of "ApiManagementService_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 @@ -740,7 +785,7 @@ public async Task Get_ApiManagementServiceGetServiceHavingMsi() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementServiceGetServiceHavingMsi() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementServiceGetServiceHavingMsi.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceGetServiceHavingMsi.json // this example is just showing the usage of "ApiManagementService_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 @@ -770,7 +815,7 @@ public async Task Exists_ApiManagementServiceGetServiceHavingMsi() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementServiceGetServiceHavingMsi() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementServiceGetServiceHavingMsi.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceGetServiceHavingMsi.json // this example is just showing the usage of "ApiManagementService_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 @@ -812,7 +857,7 @@ public async Task GetIfExists_ApiManagementServiceGetServiceHavingMsi() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListServiceBySubscriptionAndResourceGroup() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListServiceBySubscriptionAndResourceGroup.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListServiceBySubscriptionAndResourceGroup.json // this example is just showing the usage of "ApiManagementService_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/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementServiceResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementServiceResource.cs index 4cc5bd445ae1e..5d370275d221f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementServiceResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementServiceResource.cs @@ -22,7 +22,7 @@ public partial class Sample_ApiManagementServiceResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetApisByTags_ApiManagementListApisByTags() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListApisByTags.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApisByTags.json // this example is just showing the usage of "Api_ListByTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetApisByTags_ApiManagementListApisByTags() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task PerformConnectivityCheckAsync_HTTPConnectivityCheck() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementPerformConnectivityCheckHttpConnect.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementPerformConnectivityCheckHttpConnect.json // this example is just showing the usage of "PerformConnectivityCheckAsync" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -81,7 +81,7 @@ public async Task PerformConnectivityCheckAsync_HTTPConnectivityCheck() }, Headers = { -new HttpHeaderConfiguration("Authorization","Bearer myPreciousToken") +new HttpHeaderConfiguration("Authorization","******") }, }, }; @@ -96,7 +96,7 @@ public async Task PerformConnectivityCheckAsync_HTTPConnectivityCheck() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task PerformConnectivityCheckAsync_TCPConnectivityCheck() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementPerformConnectivityCheck.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementPerformConnectivityCheck.json // this example is just showing the usage of "PerformConnectivityCheckAsync" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 PerformConnectivityCheckAsync_TCPConnectivityCheck() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetContentTypes_ApiManagementListContentTypes() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListContentTypes.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListContentTypes.json // this example is just showing the usage of "ContentType_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -158,7 +158,7 @@ public async Task GetContentTypes_ApiManagementListContentTypes() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetContentType_ApiManagementGetContentType() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetContentType.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetContentType.json // this example is just showing the usage of "ContentType_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 @@ -186,7 +186,7 @@ public async Task GetContentType_ApiManagementGetContentType() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdateContentType_ApiManagementCreateContentType() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateContentType.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateContentType.json // this example is just showing the usage of "ContentType_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 @@ -214,7 +214,7 @@ public async Task CreateOrUpdateContentType_ApiManagementCreateContentType() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task DeleteContentType_ApiManagementDeleteContentType() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteContentType.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteContentType.json // this example is just showing the usage of "ContentType_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 @@ -243,7 +243,7 @@ public async Task DeleteContentType_ApiManagementDeleteContentType() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetContentItems_ApiManagementListContentTypeContentItems() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListContentTypeContentItems.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListContentTypeContentItems.json // this example is just showing the usage of "ContentItem_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -274,7 +274,7 @@ public async Task GetContentItems_ApiManagementListContentTypeContentItems() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetContentItemEntityTag_ApiManagementHeadContentTypeContentItem() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadContentTypeContentItem.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadContentTypeContentItem.json // this example is just showing the usage of "ContentItem_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -303,7 +303,7 @@ public async Task GetContentItemEntityTag_ApiManagementHeadContentTypeContentIte [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetContentItem_ApiManagementGetContentTypeContentItem() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetContentTypeContentItem.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetContentTypeContentItem.json // this example is just showing the usage of "ContentItem_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 @@ -332,7 +332,7 @@ public async Task GetContentItem_ApiManagementGetContentTypeContentItem() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdateContentItem_ApiManagementCreateContentTypeContentItem() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateContentTypeContentItem.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateContentTypeContentItem.json // this example is just showing the usage of "ContentItem_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 @@ -361,7 +361,7 @@ public async Task CreateOrUpdateContentItem_ApiManagementCreateContentTypeConten [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task DeleteContentItem_ApiManagementDeleteContentTypeContentItem() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteContentTypeContentItem.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteContentTypeContentItem.json // this example is just showing the usage of "ContentItem_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 @@ -391,7 +391,7 @@ public async Task DeleteContentItem_ApiManagementDeleteContentTypeContentItem() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAvailableApiManagementServiceSkus_ApiManagementListSKUsConsumption() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListSKUs-Consumption.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListSKUs-Consumption.json // this example is just showing the usage of "ApiManagementServiceSkus_ListAvailableServiceSkus" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -421,7 +421,7 @@ public async Task GetAvailableApiManagementServiceSkus_ApiManagementListSKUsCons [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAvailableApiManagementServiceSkus_ApiManagementListSKUsDedicated() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListSKUs-Dedicated.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListSKUs-Dedicated.json // this example is just showing the usage of "ApiManagementServiceSkus_ListAvailableServiceSkus" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -451,7 +451,7 @@ public async Task GetAvailableApiManagementServiceSkus_ApiManagementListSKUsDedi [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Restore_ApiManagementRestoreService() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementRestoreWithAccessKey.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementRestoreWithAccessKey.json // this example is just showing the usage of "ApiManagementService_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 @@ -488,7 +488,7 @@ public async Task Restore_ApiManagementRestoreService() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Backup_ApiManagementBackupWithAccessKey() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementBackupWithAccessKey.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementBackupWithAccessKey.json // this example is just showing the usage of "ApiManagementService_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 @@ -525,7 +525,7 @@ public async Task Backup_ApiManagementBackupWithAccessKey() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Backup_ApiManagementBackupWithSystemManagedIdentity() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementBackupWithSystemManagedIdentity.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementBackupWithSystemManagedIdentity.json // this example is just showing the usage of "ApiManagementService_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 @@ -561,7 +561,7 @@ public async Task Backup_ApiManagementBackupWithSystemManagedIdentity() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Backup_ApiManagementBackupWithUserAssignedManagedIdentity() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementBackupWithUserAssignedManagedIdentity.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementBackupWithUserAssignedManagedIdentity.json // this example is just showing the usage of "ApiManagementService_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 @@ -598,7 +598,7 @@ public async Task Backup_ApiManagementBackupWithUserAssignedManagedIdentity() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementUpdateServiceDisableTls10() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdateServiceDisableTls10.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateServiceDisableTls10.json // this example is just showing the usage of "ApiManagementService_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 @@ -637,7 +637,7 @@ public async Task Update_ApiManagementUpdateServiceDisableTls10() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementUpdateServicePublisherDetails() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdateServicePublisherDetails.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateServicePublisherDetails.json // this example is just showing the usage of "ApiManagementService_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 @@ -674,7 +674,7 @@ public async Task Update_ApiManagementUpdateServicePublisherDetails() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementUpdateServiceToNewVnetAndAvailabilityZones() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdateServiceToNewVnetAndAZs.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateServiceToNewVnetAndAZs.json // this example is just showing the usage of "ApiManagementService_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 @@ -735,7 +735,7 @@ public async Task Update_ApiManagementUpdateServiceToNewVnetAndAvailabilityZones [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementServiceGetMultiRegionInternalVnet() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementServiceGetMultiRegionInternalVnet.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceGetMultiRegionInternalVnet.json // this example is just showing the usage of "ApiManagementService_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 @@ -766,7 +766,7 @@ public async Task Get_ApiManagementServiceGetMultiRegionInternalVnet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementServiceGetService() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementServiceGetService.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceGetService.json // this example is just showing the usage of "ApiManagementService_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 @@ -797,7 +797,7 @@ public async Task Get_ApiManagementServiceGetService() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementServiceGetServiceHavingMsi() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementServiceGetServiceHavingMsi.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceGetServiceHavingMsi.json // this example is just showing the usage of "ApiManagementService_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 @@ -828,7 +828,7 @@ public async Task Get_ApiManagementServiceGetServiceHavingMsi() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ApiManagementServiceDeleteService() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementServiceDeleteService.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceDeleteService.json // this example is just showing the usage of "ApiManagementService_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 @@ -850,12 +850,44 @@ public async Task Delete_ApiManagementServiceDeleteService() Console.WriteLine($"Succeeded"); } + // ApiManagementMigrateService + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task MigrateToStv2_ApiManagementMigrateService() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceMigrateToStv2.json + // this example is just showing the usage of "ApiManagementService_MigrateToStv2" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ApiManagementServiceResource created on azure + // for more information of creating ApiManagementServiceResource, please refer to the document of ApiManagementServiceResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + ResourceIdentifier apiManagementServiceResourceId = ApiManagementServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName); + ApiManagementServiceResource apiManagementService = client.GetApiManagementServiceResource(apiManagementServiceResourceId); + + // invoke the operation + ArmOperation lro = await apiManagementService.MigrateToStv2Async(WaitUntil.Completed); + ApiManagementServiceResource 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 + ApiManagementServiceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + // ApiManagementListServiceBySubscription [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetApiManagementServices_ApiManagementListServiceBySubscription() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListServiceBySubscription.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListServiceBySubscription.json // this example is just showing the usage of "ApiManagementService_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 @@ -887,7 +919,7 @@ public async Task GetApiManagementServices_ApiManagementListServiceBySubscriptio [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetSsoToken_ApiManagementServiceGetSsoToken() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementServiceGetSsoToken.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceGetSsoToken.json // this example is just showing the usage of "ApiManagementService_GetSsoToken" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -914,7 +946,7 @@ public async Task GetSsoToken_ApiManagementServiceGetSsoToken() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CheckApiManagementServiceNameAvailability_ApiManagementServiceCheckNameAvailability() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementServiceCheckNameAvailability.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceCheckNameAvailability.json // this example is just showing the usage of "ApiManagementService_CheckNameAvailability" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -940,7 +972,7 @@ public async Task CheckApiManagementServiceNameAvailability_ApiManagementService [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetApiManagementServiceDomainOwnershipIdentifier_ApiManagementServiceGetDomainOwnershipIdentifier() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementServiceGetDomainOwnershipIdentifier.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceGetDomainOwnershipIdentifier.json // this example is just showing the usage of "ApiManagementService_GetDomainOwnershipIdentifier" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -965,7 +997,7 @@ public async Task GetApiManagementServiceDomainOwnershipIdentifier_ApiManagement [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task ApplyNetworkConfigurationUpdates_ApiManagementApplyNetworkConfigurationUpdates() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementApplyNetworkConfigurationUpdates.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementApplyNetworkConfigurationUpdates.json // this example is just showing the usage of "ApiManagementService_ApplyNetworkConfigurationUpdates" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1001,7 +1033,7 @@ public async Task ApplyNetworkConfigurationUpdates_ApiManagementApplyNetworkConf [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetNetworkStatuses_ApiManagementServiceGetNetworkStatus() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementServiceGetNetworkStatus.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceGetNetworkStatus.json // this example is just showing the usage of "NetworkStatus_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1031,7 +1063,7 @@ public async Task GetNetworkStatuses_ApiManagementServiceGetNetworkStatus() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetNetworkStatusByLocation_ApiManagementServiceGetNetworkStatusByLocation() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementServiceGetNetworkStatusByLocation.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceGetNetworkStatusByLocation.json // this example is just showing the usage of "NetworkStatus_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 @@ -1059,7 +1091,7 @@ public async Task GetNetworkStatusByLocation_ApiManagementServiceGetNetworkStatu [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetOutboundNetworkDependenciesEndpoints_ApiManagementServiceGetOutboundNetworkDependenciesEndpoints() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementServiceGetOutboundNetworkDependenciesEndpoints.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceGetOutboundNetworkDependenciesEndpoints.json // this example is just showing the usage of "OutboundNetworkDependenciesEndpoints_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1089,7 +1121,7 @@ public async Task GetOutboundNetworkDependenciesEndpoints_ApiManagementServiceGe [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetPolicyDescriptions_ApiManagementListPolicyDescriptions() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListPolicyDescriptions.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListPolicyDescriptions.json // this example is just showing the usage of "PolicyDescription_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1120,7 +1152,7 @@ public async Task GetPolicyDescriptions_ApiManagementListPolicyDescriptions() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetPortalSettings_ApiManagementListPortalSettings() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListPortalSettings.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListPortalSettings.json // this example is just showing the usage of "PortalSettings_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1150,7 +1182,7 @@ public async Task GetPortalSettings_ApiManagementListPortalSettings() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetProductsByTags_ApiManagementListProductsByTags() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListProductsByTags.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListProductsByTags.json // this example is just showing the usage of "Product_ListByTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1180,7 +1212,7 @@ public async Task GetProductsByTags_ApiManagementListProductsByTags() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetQuotaByCounterKeys_ApiManagementGetQuotaCounterKeys() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetQuotaCounterKeys.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetQuotaCounterKeys.json // this example is just showing the usage of "QuotaByCounterKeys_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1211,7 +1243,7 @@ public async Task GetQuotaByCounterKeys_ApiManagementGetQuotaCounterKeys() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task UpdateQuotaByCounterKeys_ApiManagementUpdateQuotaCounterKey() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdateQuotaCounterKey.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateQuotaCounterKey.json // this example is just showing the usage of "QuotaByCounterKeys_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 @@ -1247,7 +1279,7 @@ public async Task UpdateQuotaByCounterKeys_ApiManagementUpdateQuotaCounterKey() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetQuotaByPeriodKey_ApiManagementGetQuotaCounterKeysByQuotaPeriod() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetQuotaCounterKeysByQuotaPeriod.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetQuotaCounterKeysByQuotaPeriod.json // this example is just showing the usage of "QuotaByPeriodKeys_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 @@ -1276,7 +1308,7 @@ public async Task GetQuotaByPeriodKey_ApiManagementGetQuotaCounterKeysByQuotaPer [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task UpdateQuotaByPeriodKey_ApiManagementUpdateQuotaCounterKeyByQuotaPeriod() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdateQuotaCounterKeyByQuotaPeriod.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateQuotaCounterKeyByQuotaPeriod.json // this example is just showing the usage of "QuotaByPeriodKeys_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 @@ -1310,7 +1342,7 @@ public async Task UpdateQuotaByPeriodKey_ApiManagementUpdateQuotaCounterKeyByQuo [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetRegions_ApiManagementListRegions() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListRegions.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListRegions.json // this example is just showing the usage of "Region_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1340,7 +1372,7 @@ public async Task GetRegions_ApiManagementListRegions() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetReportsByApi_ApiManagementGetReportsByApi() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetReportsByApi.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetReportsByApi.json // this example is just showing the usage of "Reports_ListByApi" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1371,7 +1403,7 @@ public async Task GetReportsByApi_ApiManagementGetReportsByApi() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetReportsByUser_ApiManagementGetReportsByUser() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetReportsByUser.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetReportsByUser.json // this example is just showing the usage of "Reports_ListByUser" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1402,7 +1434,7 @@ public async Task GetReportsByUser_ApiManagementGetReportsByUser() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetReportsByOperation_ApiManagementGetReportsByOperation() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetReportsByOperation.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetReportsByOperation.json // this example is just showing the usage of "Reports_ListByOperation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1433,7 +1465,7 @@ public async Task GetReportsByOperation_ApiManagementGetReportsByOperation() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetReportsByProduct_ApiManagementGetReportsByProduct() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetReportsByProduct.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetReportsByProduct.json // this example is just showing the usage of "Reports_ListByProduct" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1464,7 +1496,7 @@ public async Task GetReportsByProduct_ApiManagementGetReportsByProduct() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetReportsByGeo_ApiManagementGetReportsByGeo() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetReportsByGeo.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetReportsByGeo.json // this example is just showing the usage of "Reports_ListByGeo" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1495,7 +1527,7 @@ public async Task GetReportsByGeo_ApiManagementGetReportsByGeo() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetReportsBySubscription_ApiManagementGetReportsBySubscription() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetReportsBySubscription.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetReportsBySubscription.json // this example is just showing the usage of "Reports_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 @@ -1526,7 +1558,7 @@ public async Task GetReportsBySubscription_ApiManagementGetReportsBySubscription [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetReportsByTime_ApiManagementGetReportsByTime() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetReportsByTime.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetReportsByTime.json // this example is just showing the usage of "Reports_ListByTime" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1558,7 +1590,7 @@ public async Task GetReportsByTime_ApiManagementGetReportsByTime() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetReportsByRequest_ApiManagementGetReportsByRequest() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetReportsByRequest.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetReportsByRequest.json // this example is just showing the usage of "Reports_ListByRequest" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1589,7 +1621,7 @@ public async Task GetReportsByRequest_ApiManagementGetReportsByRequest() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetTagResources_ApiManagementListTagResources() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListTagResources.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListTagResources.json // this example is just showing the usage of "TagResource_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1619,7 +1651,7 @@ public async Task GetTagResources_ApiManagementListTagResources() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task DeployTenantConfiguration_ApiManagementTenantConfigurationDeploy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementTenantConfigurationDeploy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementTenantConfigurationDeploy.json // this example is just showing the usage of "TenantConfiguration_Deploy" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1652,7 +1684,7 @@ public async Task DeployTenantConfiguration_ApiManagementTenantConfigurationDepl [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task SaveTenantConfiguration_ApiManagementTenantConfigurationSave() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementTenantConfigurationSave.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementTenantConfigurationSave.json // this example is just showing the usage of "TenantConfiguration_Save" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1685,7 +1717,7 @@ public async Task SaveTenantConfiguration_ApiManagementTenantConfigurationSave() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task ValidateTenantConfiguration_ApiManagementTenantConfigurationValidate() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementTenantConfigurationValidate.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementTenantConfigurationValidate.json // this example is just showing the usage of "TenantConfiguration_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 @@ -1718,7 +1750,7 @@ public async Task ValidateTenantConfiguration_ApiManagementTenantConfigurationVa [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetTenantConfigurationSyncState_ApiManagementTenantAccessSyncState() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementTenantAccessSyncState.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementTenantAccessSyncState.json // this example is just showing the usage of "TenantConfiguration_GetSyncState" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementSubscriptionCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementSubscriptionCollection.cs index 8d1d76203da1b..2e99158f2a9de 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementSubscriptionCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementSubscriptionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementSubscriptionCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListSubscriptions() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListSubscriptions.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListSubscriptions.json // this example is just showing the usage of "Subscription_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 @@ -57,7 +57,7 @@ public async Task GetAll_ApiManagementListSubscriptions() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetSubscription() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetSubscription.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetSubscription.json // this example is just showing the usage of "Subscription_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 @@ -92,7 +92,7 @@ public async Task Get_ApiManagementGetSubscription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetSubscription() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetSubscription.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetSubscription.json // this example is just showing the usage of "Subscription_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 @@ -123,7 +123,7 @@ public async Task Exists_ApiManagementGetSubscription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetSubscription() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetSubscription.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetSubscription.json // this example is just showing the usage of "Subscription_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 @@ -166,7 +166,7 @@ public async Task GetIfExists_ApiManagementGetSubscription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateSubscription() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateSubscription.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateSubscription.json // this example is just showing the usage of "Subscription_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/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementSubscriptionResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementSubscriptionResource.cs index 32ac2dc1add6a..24ba97772699d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementSubscriptionResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementSubscriptionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementSubscriptionResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityTag_ApiManagementHeadSubscription() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadSubscription.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadSubscription.json // this example is just showing the usage of "Subscription_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task GetEntityTag_ApiManagementHeadSubscription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetSubscription() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetSubscription.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetSubscription.json // this example is just showing the usage of "Subscription_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 @@ -80,7 +80,7 @@ public async Task Get_ApiManagementGetSubscription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementUpdateSubscription() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdateSubscription.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateSubscription.json // this example is just showing the usage of "Subscription_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 @@ -117,7 +117,7 @@ public async Task Update_ApiManagementUpdateSubscription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ApiManagementDeleteSubscription() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteSubscription.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteSubscription.json // this example is just showing the usage of "Subscription_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 @@ -146,7 +146,7 @@ public async Task Delete_ApiManagementDeleteSubscription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task RegeneratePrimaryKey_ApiManagementSubscriptionRegeneratePrimaryKey() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementSubscriptionRegeneratePrimaryKey.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementSubscriptionRegeneratePrimaryKey.json // this example is just showing the usage of "Subscription_RegeneratePrimaryKey" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 RegeneratePrimaryKey_ApiManagementSubscriptionRegeneratePrimar [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task RegenerateSecondaryKey_ApiManagementSubscriptionRegenerateSecondaryKey() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementSubscriptionRegenerateSecondaryKey.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementSubscriptionRegenerateSecondaryKey.json // this example is just showing the usage of "Subscription_RegenerateSecondaryKey" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 RegenerateSecondaryKey_ApiManagementSubscriptionRegenerateSeco [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetSecrets_ApiManagementSubscriptionListSecrets() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementSubscriptionListSecrets.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementSubscriptionListSecrets.json // this example is just showing the usage of "Subscription_ListSecrets" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementTagCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementTagCollection.cs index 9bddb78191745..ed2bfe2814db4 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementTagCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementTagCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementTagCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListTags() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListTags.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListTags.json // this example is just showing the usage of "Tag_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListTags() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetTag.json // this example is just showing the usage of "Tag_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 @@ -92,7 +92,7 @@ public async Task Get_ApiManagementGetTag() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetTag.json // this example is just showing the usage of "Tag_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 @@ -123,7 +123,7 @@ public async Task Exists_ApiManagementGetTag() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetTag.json // this example is just showing the usage of "Tag_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 @@ -166,7 +166,7 @@ public async Task GetIfExists_ApiManagementGetTag() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateTag.json // this example is just showing the usage of "Tag_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/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementTagResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementTagResource.cs index 2aa9ce4a248c2..4f7ee786c3f27 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementTagResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementTagResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementTagResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityState_ApiManagementHeadTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadTag.json // this example is just showing the usage of "Tag_GetEntityState" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task GetEntityState_ApiManagementHeadTag() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetTag.json // this example is just showing the usage of "Tag_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 @@ -80,7 +80,7 @@ public async Task Get_ApiManagementGetTag() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementUpdateTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdateTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateTag.json // this example is just showing the usage of "Tag_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 @@ -117,7 +117,7 @@ public async Task Update_ApiManagementUpdateTag() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ApiManagementDeleteTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteTag.json // this example is just showing the usage of "Tag_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 diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementTenantSettingCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementTenantSettingCollection.cs index 4304f3c6769ec..2c7cbb255a12f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementTenantSettingCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementTenantSettingCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementTenantSettingCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListTenantSettings() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListTenantSettings.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListTenantSettings.json // this example is just showing the usage of "TenantSettings_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListTenantSettings() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetTenantSettings() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetTenantSettings.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetTenantSettings.json // this example is just showing the usage of "TenantSettings_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 @@ -92,7 +92,7 @@ public async Task Get_ApiManagementGetTenantSettings() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetTenantSettings() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetTenantSettings.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetTenantSettings.json // this example is just showing the usage of "TenantSettings_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 @@ -123,7 +123,7 @@ public async Task Exists_ApiManagementGetTenantSettings() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetTenantSettings() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetTenantSettings.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetTenantSettings.json // this example is just showing the usage of "TenantSettings_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/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementTenantSettingResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementTenantSettingResource.cs index 73d1a74dac1db..f3a31657b2b9c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementTenantSettingResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementTenantSettingResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementTenantSettingResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetTenantSettings() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetTenantSettings.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetTenantSettings.json // this example is just showing the usage of "TenantSettings_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/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementUserCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementUserCollection.cs index 8816ebfd6aba6..6eef2aa4abdab 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementUserCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementUserCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementUserCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListUsers() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListUsers.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListUsers.json // this example is just showing the usage of "User_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListUsers() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetUser() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetUser.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetUser.json // this example is just showing the usage of "User_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 @@ -92,7 +92,7 @@ public async Task Get_ApiManagementGetUser() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetUser() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetUser.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetUser.json // this example is just showing the usage of "User_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 @@ -123,7 +123,7 @@ public async Task Exists_ApiManagementGetUser() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetUser() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetUser.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetUser.json // this example is just showing the usage of "User_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 @@ -166,7 +166,7 @@ public async Task GetIfExists_ApiManagementGetUser() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateUser() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateUser.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateUser.json // this example is just showing the usage of "User_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/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementUserResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementUserResource.cs index cc2f51b959fd9..aa706a0c30f92 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementUserResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementUserResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementUserResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityTag_ApiManagementHeadUser() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadUser.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadUser.json // this example is just showing the usage of "User_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task GetEntityTag_ApiManagementHeadUser() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetUser() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetUser.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetUser.json // this example is just showing the usage of "User_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 @@ -80,7 +80,7 @@ public async Task Get_ApiManagementGetUser() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementUpdateUser() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdateUser.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateUser.json // this example is just showing the usage of "User_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 @@ -119,7 +119,7 @@ public async Task Update_ApiManagementUpdateUser() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ApiManagementDeleteUser() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteUser.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteUser.json // this example is just showing the usage of "User_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 @@ -148,7 +148,7 @@ public async Task Delete_ApiManagementDeleteUser() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GenerateSsoUri_ApiManagementUserGenerateSsoUrl() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUserGenerateSsoUrl.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUserGenerateSsoUrl.json // this example is just showing the usage of "User_GenerateSsoUri" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -176,7 +176,7 @@ public async Task GenerateSsoUri_ApiManagementUserGenerateSsoUrl() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetSharedAccessToken_ApiManagementUserToken() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUserToken.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUserToken.json // this example is just showing the usage of "User_GetSharedAccessToken" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -209,7 +209,7 @@ public async Task GetSharedAccessToken_ApiManagementUserToken() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetUserGroups_ApiManagementListUserGroups() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListUserGroups.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListUserGroups.json // this example is just showing the usage of "UserGroup_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 @@ -244,7 +244,7 @@ public async Task GetUserGroups_ApiManagementListUserGroups() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetUserIdentities_ApiManagementListUserIdentities() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListUserIdentities.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListUserIdentities.json // this example is just showing the usage of "UserIdentities_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 @@ -275,7 +275,7 @@ public async Task GetUserIdentities_ApiManagementListUserIdentities() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task SendUserConfirmationPassword_ApiManagementUserConfirmationPasswordSend() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUserConfirmationPasswordSend.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUserConfirmationPasswordSend.json // this example is just showing the usage of "UserConfirmationPassword_Send" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementUserSubscriptionCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementUserSubscriptionCollection.cs index 22e3bc963b2ab..029beb5576aa7 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementUserSubscriptionCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementUserSubscriptionCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiManagementUserSubscriptionCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListUserSubscriptions() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListUserSubscriptions.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListUserSubscriptions.json // this example is just showing the usage of "UserSubscription_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 @@ -57,7 +57,7 @@ public async Task GetAll_ApiManagementListUserSubscriptions() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetUserSubscription() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetUserSubscription.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetUserSubscription.json // this example is just showing the usage of "UserSubscription_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 @@ -93,7 +93,7 @@ public async Task Get_ApiManagementGetUserSubscription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetUserSubscription() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetUserSubscription.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetUserSubscription.json // this example is just showing the usage of "UserSubscription_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 @@ -125,7 +125,7 @@ public async Task Exists_ApiManagementGetUserSubscription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetUserSubscription() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetUserSubscription.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetUserSubscription.json // this example is just showing the usage of "UserSubscription_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/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementUserSubscriptionResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementUserSubscriptionResource.cs index ef2484a61627e..e63ab49383ade 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementUserSubscriptionResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementUserSubscriptionResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiManagementUserSubscriptionResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetUserSubscription() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetUserSubscription.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetUserSubscription.json // this example is just showing the usage of "UserSubscription_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/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiOperationCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiOperationCollection.cs index 62ca5517ebbfe..07c7247225156 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiOperationCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiOperationCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiOperationCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListApiOperations() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListApiOperations.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiOperations.json // this example is just showing the usage of "ApiOperation_ListByApi" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListApiOperations() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetApiOperation() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiOperation.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiOperation.json // this example is just showing the usage of "ApiOperation_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 @@ -94,7 +94,7 @@ public async Task Get_ApiManagementGetApiOperation() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetApiOperation() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiOperation.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiOperation.json // this example is just showing the usage of "ApiOperation_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 @@ -126,7 +126,7 @@ public async Task Exists_ApiManagementGetApiOperation() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetApiOperation() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiOperation.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiOperation.json // this example is just showing the usage of "ApiOperation_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 @@ -170,7 +170,7 @@ public async Task GetIfExists_ApiManagementGetApiOperation() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetApiOperationPetStore() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiOperationPetStore.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiOperationPetStore.json // this example is just showing the usage of "ApiOperation_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 @@ -206,7 +206,7 @@ public async Task Get_ApiManagementGetApiOperationPetStore() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetApiOperationPetStore() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiOperationPetStore.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiOperationPetStore.json // this example is just showing the usage of "ApiOperation_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 @@ -238,7 +238,7 @@ public async Task Exists_ApiManagementGetApiOperationPetStore() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetApiOperationPetStore() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiOperationPetStore.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiOperationPetStore.json // this example is just showing the usage of "ApiOperation_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 @@ -282,7 +282,7 @@ public async Task GetIfExists_ApiManagementGetApiOperationPetStore() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateApiOperation() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateApiOperation.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiOperation.json // this example is just showing the usage of "ApiOperation_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/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiOperationPolicyCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiOperationPolicyCollection.cs index c7da64fd86d64..eb98313c88871 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiOperationPolicyCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiOperationPolicyCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiOperationPolicyCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListApiOperationPolicies() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListApiOperationPolicies.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiOperationPolicies.json // this example is just showing the usage of "ApiOperationPolicy_ListByOperation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -59,7 +59,7 @@ public async Task GetAll_ApiManagementListApiOperationPolicies() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetApiOperationPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiOperationPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiOperationPolicy.json // this example is just showing the usage of "ApiOperationPolicy_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 @@ -96,7 +96,7 @@ public async Task Get_ApiManagementGetApiOperationPolicy() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetApiOperationPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiOperationPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiOperationPolicy.json // this example is just showing the usage of "ApiOperationPolicy_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 @@ -129,7 +129,7 @@ public async Task Exists_ApiManagementGetApiOperationPolicy() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetApiOperationPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiOperationPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiOperationPolicy.json // this example is just showing the usage of "ApiOperationPolicy_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 @@ -174,7 +174,7 @@ public async Task GetIfExists_ApiManagementGetApiOperationPolicy() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateApiOperationPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateApiOperationPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiOperationPolicy.json // this example is just showing the usage of "ApiOperationPolicy_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/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiOperationPolicyResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiOperationPolicyResource.cs index dd1dec4a90f84..76e6a943802aa 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiOperationPolicyResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiOperationPolicyResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiOperationPolicyResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityTag_ApiManagementHeadApiOperationPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadApiOperationPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiOperationPolicy.json // this example is just showing the usage of "ApiOperationPolicy_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetEntityTag_ApiManagementHeadApiOperationPolicy() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetApiOperationPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiOperationPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiOperationPolicy.json // this example is just showing the usage of "ApiOperationPolicy_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_ApiManagementGetApiOperationPolicy() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementCreateApiOperationPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateApiOperationPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiOperationPolicy.json // this example is just showing the usage of "ApiOperationPolicy_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 @@ -125,7 +125,7 @@ public async Task Update_ApiManagementCreateApiOperationPolicy() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ApiManagementDeleteApiOperationPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteApiOperationPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiOperationPolicy.json // this example is just showing the usage of "ApiOperationPolicy_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 diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiOperationResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiOperationResource.cs index b7e4074bb65e3..d6e7b5fddc69a 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiOperationResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiOperationResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiOperationResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityTag_ApiManagementHeadApiOperation() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadApiOperation.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiOperation.json // this example is just showing the usage of "ApiOperation_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -49,7 +49,7 @@ public async Task GetEntityTag_ApiManagementHeadApiOperation() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetApiOperation() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiOperation.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiOperation.json // this example is just showing the usage of "ApiOperation_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 @@ -82,7 +82,7 @@ public async Task Get_ApiManagementGetApiOperation() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetApiOperationPetStore() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiOperationPetStore.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiOperationPetStore.json // this example is just showing the usage of "ApiOperation_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 @@ -115,7 +115,7 @@ public async Task Get_ApiManagementGetApiOperationPetStore() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementUpdateApiOperation() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdateApiOperation.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateApiOperation.json // this example is just showing the usage of "ApiOperation_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 @@ -196,7 +196,7 @@ public async Task Update_ApiManagementUpdateApiOperation() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ApiManagementDeleteApiOperation() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteApiOperation.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiOperation.json // this example is just showing the usage of "ApiOperation_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 diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiOperationTagCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiOperationTagCollection.cs index 8b1733bc1a503..b171c82532215 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiOperationTagCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiOperationTagCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiOperationTagCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListApiOperationTags() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListApiOperationTags.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiOperationTags.json // this example is just showing the usage of "Tag_ListByOperation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListApiOperationTags() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetApiOperationTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiOperationTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiOperationTag.json // this example is just showing the usage of "Tag_GetByOperation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Get_ApiManagementGetApiOperationTag() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetApiOperationTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiOperationTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiOperationTag.json // this example is just showing the usage of "Tag_GetByOperation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Exists_ApiManagementGetApiOperationTag() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetApiOperationTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiOperationTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiOperationTag.json // this example is just showing the usage of "Tag_GetByOperation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -173,7 +173,7 @@ public async Task GetIfExists_ApiManagementGetApiOperationTag() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateApiOperationTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateApiOperationTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiOperationTag.json // this example is just showing the usage of "Tag_AssignToOperation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiOperationTagResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiOperationTagResource.cs index ed5c97b565b3c..29996dd36f0e6 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiOperationTagResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiOperationTagResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiOperationTagResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityStateByOperation_ApiManagementHeadApiOperationTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadApiOperationTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiOperationTag.json // this example is just showing the usage of "Tag_GetEntityStateByOperation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -49,7 +49,7 @@ public async Task GetEntityStateByOperation_ApiManagementHeadApiOperationTag() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetApiOperationTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiOperationTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiOperationTag.json // this example is just showing the usage of "Tag_GetByOperation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 +83,7 @@ public async Task Get_ApiManagementGetApiOperationTag() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementCreateApiOperationTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateApiOperationTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiOperationTag.json // this example is just showing the usage of "Tag_AssignToOperation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Update_ApiManagementCreateApiOperationTag() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ApiManagementDeleteApiOperationTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteApiOperationTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiOperationTag.json // this example is just showing the usage of "Tag_DetachFromOperation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiPolicyCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiPolicyCollection.cs index a9c5e864b9f97..9bb3384129edc 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiPolicyCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiPolicyCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiPolicyCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListApiPolicies() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListApiPolicies.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiPolicies.json // this example is just showing the usage of "ApiPolicy_ListByApi" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListApiPolicies() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetApiPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiPolicy.json // this example is just showing the usage of "ApiPolicy_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 @@ -94,7 +94,7 @@ public async Task Get_ApiManagementGetApiPolicy() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetApiPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiPolicy.json // this example is just showing the usage of "ApiPolicy_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 @@ -126,7 +126,7 @@ public async Task Exists_ApiManagementGetApiPolicy() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetApiPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiPolicy.json // this example is just showing the usage of "ApiPolicy_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 @@ -170,7 +170,7 @@ public async Task GetIfExists_ApiManagementGetApiPolicy() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateApiPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateApiPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiPolicy.json // this example is just showing the usage of "ApiPolicy_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 @@ -213,7 +213,7 @@ public async Task CreateOrUpdate_ApiManagementCreateApiPolicy() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateApiPolicyNonXmlEncoded() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateApiPolicyNonXmlEncoded.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiPolicyNonXmlEncoded.json // this example is just showing the usage of "ApiPolicy_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/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiPolicyResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiPolicyResource.cs index cb126c5153dc0..bfe2f189a7c53 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiPolicyResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiPolicyResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiPolicyResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityTag_ApiManagementHeadApiPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadApiPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiPolicy.json // this example is just showing the usage of "ApiPolicy_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -49,7 +49,7 @@ public async Task GetEntityTag_ApiManagementHeadApiPolicy() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetApiPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiPolicy.json // this example is just showing the usage of "ApiPolicy_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 @@ -82,7 +82,7 @@ public async Task Get_ApiManagementGetApiPolicy() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementCreateApiPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateApiPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiPolicy.json // this example is just showing the usage of "ApiPolicy_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 @@ -122,7 +122,7 @@ public async Task Update_ApiManagementCreateApiPolicy() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementCreateApiPolicyNonXmlEncoded() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateApiPolicyNonXmlEncoded.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiPolicyNonXmlEncoded.json // this example is just showing the usage of "ApiPolicy_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 @@ -162,7 +162,7 @@ public async Task Update_ApiManagementCreateApiPolicyNonXmlEncoded() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ApiManagementDeleteApiPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteApiPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiPolicy.json // this example is just showing the usage of "ApiPolicy_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 diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiReleaseCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiReleaseCollection.cs index 0bff8f9940b59..f7ff8adf0dd03 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiReleaseCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiReleaseCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiReleaseCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListApiReleases() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListApiReleases.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiReleases.json // this example is just showing the usage of "ApiRelease_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListApiReleases() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetApiRelease() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiRelease.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiRelease.json // this example is just showing the usage of "ApiRelease_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 @@ -93,7 +93,7 @@ public async Task Get_ApiManagementGetApiRelease() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetApiRelease() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiRelease.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiRelease.json // this example is just showing the usage of "ApiRelease_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 @@ -125,7 +125,7 @@ public async Task Exists_ApiManagementGetApiRelease() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetApiRelease() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiRelease.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiRelease.json // this example is just showing the usage of "ApiRelease_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 @@ -169,7 +169,7 @@ public async Task GetIfExists_ApiManagementGetApiRelease() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateApiRelease() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateApiRelease.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiRelease.json // this example is just showing the usage of "ApiRelease_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/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiReleaseResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiReleaseResource.cs index 360916d75d576..0d54785db2061 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiReleaseResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiReleaseResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiReleaseResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityTag_ApiManagementHeadApiRelease() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadApiRelease.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiRelease.json // this example is just showing the usage of "ApiRelease_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task GetEntityTag_ApiManagementHeadApiRelease() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetApiRelease() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiRelease.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiRelease.json // this example is just showing the usage of "ApiRelease_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 @@ -81,7 +81,7 @@ public async Task Get_ApiManagementGetApiRelease() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementUpdateApiRelease() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdateApiRelease.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateApiRelease.json // this example is just showing the usage of "ApiRelease_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 @@ -120,7 +120,7 @@ public async Task Update_ApiManagementUpdateApiRelease() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ApiManagementDeleteApiRelease() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteApiRelease.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiRelease.json // this example is just showing the usage of "ApiRelease_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 diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiResource.cs index f8e51e95d41af..cf24ae4033e0a 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityTag_ApiManagementHeadApi() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadApi.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApi.json // this example is just showing the usage of "Api_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task GetEntityTag_ApiManagementHeadApi() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetApiContract() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiContract.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiContract.json // this example is just showing the usage of "Api_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 @@ -80,7 +80,7 @@ public async Task Get_ApiManagementGetApiContract() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetApiRevisionContract() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiRevision.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiRevision.json // this example is just showing the usage of "Api_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 @@ -112,7 +112,7 @@ public async Task Get_ApiManagementGetApiRevisionContract() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementUpdateApi() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdateApi.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateApi.json // this example is just showing the usage of "Api_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 @@ -151,7 +151,7 @@ public async Task Update_ApiManagementUpdateApi() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ApiManagementDeleteApi() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteApi.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApi.json // this example is just showing the usage of "Api_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 @@ -180,7 +180,7 @@ public async Task Delete_ApiManagementDeleteApi() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetApiRevisionsByService_ApiManagementListApiRevisions() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListApiRevisions.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiRevisions.json // this example is just showing the usage of "ApiRevision_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetApiRevisionsByService_ApiManagementListApiRevisions() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetApiProducts_ApiManagementListApiProducts() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListApiProducts.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiProducts.json // this example is just showing the usage of "ApiProduct_ListByApis" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -246,7 +246,7 @@ public async Task GetApiProducts_ApiManagementListApiProducts() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetOperationsByTags_ApiManagementListApiOperationsByTags() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListApiOperationsByTags.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiOperationsByTags.json // this example is just showing the usage of "Operation_ListByTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiSchemaCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiSchemaCollection.cs index 5a6e2455a737b..0b724f7be758d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiSchemaCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiSchemaCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiSchemaCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListApiSchemas() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListApiSchemas.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiSchemas.json // this example is just showing the usage of "ApiSchema_ListByApi" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListApiSchemas() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetApiSchema() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiSchema.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiSchema.json // this example is just showing the usage of "ApiSchema_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 @@ -93,7 +93,7 @@ public async Task Get_ApiManagementGetApiSchema() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetApiSchema() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiSchema.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiSchema.json // this example is just showing the usage of "ApiSchema_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 @@ -125,7 +125,7 @@ public async Task Exists_ApiManagementGetApiSchema() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetApiSchema() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiSchema.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiSchema.json // this example is just showing the usage of "ApiSchema_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 @@ -169,7 +169,7 @@ public async Task GetIfExists_ApiManagementGetApiSchema() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateApiSchema() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateApiSchema.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiSchema.json // this example is just showing the usage of "ApiSchema_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/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiSchemaResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiSchemaResource.cs index 70183894f73ac..e4e38edc952a0 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiSchemaResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiSchemaResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiSchemaResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityTag_ApiManagementHeadApiSchema() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadApiSchema.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiSchema.json // this example is just showing the usage of "ApiSchema_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task GetEntityTag_ApiManagementHeadApiSchema() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetApiSchema() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiSchema.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiSchema.json // this example is just showing the usage of "ApiSchema_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 @@ -81,7 +81,7 @@ public async Task Get_ApiManagementGetApiSchema() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementCreateApiSchema() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateApiSchema.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiSchema.json // this example is just showing the usage of "ApiSchema_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 @@ -120,7 +120,7 @@ public async Task Update_ApiManagementCreateApiSchema() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ApiManagementDeleteApiSchema() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteApiSchema.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiSchema.json // this example is just showing the usage of "ApiSchema_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 diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiTagCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiTagCollection.cs index a13ba810b1e7b..cd74faa6d04c5 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiTagCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiTagCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiTagCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListApiTags() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListApiTags.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiTags.json // this example is just showing the usage of "Tag_ListByApi" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListApiTags() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetApiTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiTag.json // this example is just showing the usage of "Tag_GetByApi" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetApiTag() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetApiTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiTag.json // this example is just showing the usage of "Tag_GetByApi" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetApiTag() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetApiTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiTag.json // this example is just showing the usage of "Tag_GetByApi" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetApiTag() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateApiTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateApiTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiTag.json // this example is just showing the usage of "Tag_AssignToApi" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiTagDescriptionCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiTagDescriptionCollection.cs index c299d75b53296..095219df0ba9b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiTagDescriptionCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiTagDescriptionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiTagDescriptionCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListApiTagDescriptions() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListApiTagDescriptions.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiTagDescriptions.json // this example is just showing the usage of "ApiTagDescription_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListApiTagDescriptions() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetApiTagDescription() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiTagDescription.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiTagDescription.json // this example is just showing the usage of "ApiTagDescription_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 @@ -94,7 +94,7 @@ public async Task Get_ApiManagementGetApiTagDescription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetApiTagDescription() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiTagDescription.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiTagDescription.json // this example is just showing the usage of "ApiTagDescription_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 @@ -126,7 +126,7 @@ public async Task Exists_ApiManagementGetApiTagDescription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetApiTagDescription() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiTagDescription.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiTagDescription.json // this example is just showing the usage of "ApiTagDescription_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 @@ -170,7 +170,7 @@ public async Task GetIfExists_ApiManagementGetApiTagDescription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateApiTagDescription() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateApiTagDescription.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiTagDescription.json // this example is just showing the usage of "ApiTagDescription_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/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiTagDescriptionResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiTagDescriptionResource.cs index aca46b95bd46a..c6456efe2f98f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiTagDescriptionResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiTagDescriptionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiTagDescriptionResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityTag_ApiManagementHeadApiTagDescription() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadApiTagDescription.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiTagDescription.json // this example is just showing the usage of "ApiTagDescription_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -49,7 +49,7 @@ public async Task GetEntityTag_ApiManagementHeadApiTagDescription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetApiTagDescription() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiTagDescription.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiTagDescription.json // this example is just showing the usage of "ApiTagDescription_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 @@ -82,7 +82,7 @@ public async Task Get_ApiManagementGetApiTagDescription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementCreateApiTagDescription() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateApiTagDescription.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiTagDescription.json // this example is just showing the usage of "ApiTagDescription_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 @@ -122,7 +122,7 @@ public async Task Update_ApiManagementCreateApiTagDescription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ApiManagementDeleteApiTagDescription() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteApiTagDescription.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiTagDescription.json // this example is just showing the usage of "ApiTagDescription_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 diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiTagResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiTagResource.cs index 9ba7032807a12..85eacba71ed3f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiTagResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiTagResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiTagResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityStateByApi_ApiManagementHeadApiTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadApiTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiTag.json // this example is just showing the usage of "Tag_GetEntityStateByApi" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task GetEntityStateByApi_ApiManagementHeadApiTag() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetApiTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiTag.json // this example is just showing the usage of "Tag_GetByApi" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -81,7 +81,7 @@ public async Task Get_ApiManagementGetApiTag() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementCreateApiTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateApiTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiTag.json // this example is just showing the usage of "Tag_AssignToApi" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Update_ApiManagementCreateApiTag() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ApiManagementDeleteApiTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteApiTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiTag.json // this example is just showing the usage of "Tag_DetachFromApi" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiVersionSetCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiVersionSetCollection.cs index 4386d9df8af40..1087fc2d0f298 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiVersionSetCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiVersionSetCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiVersionSetCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListApiVersionSets() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListApiVersionSets.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiVersionSets.json // this example is just showing the usage of "ApiVersionSet_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListApiVersionSets() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetApiVersionSet() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiVersionSet.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiVersionSet.json // this example is just showing the usage of "ApiVersionSet_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 @@ -92,7 +92,7 @@ public async Task Get_ApiManagementGetApiVersionSet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetApiVersionSet() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiVersionSet.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiVersionSet.json // this example is just showing the usage of "ApiVersionSet_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 @@ -123,7 +123,7 @@ public async Task Exists_ApiManagementGetApiVersionSet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetApiVersionSet() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiVersionSet.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiVersionSet.json // this example is just showing the usage of "ApiVersionSet_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 @@ -166,7 +166,7 @@ public async Task GetIfExists_ApiManagementGetApiVersionSet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateApiVersionSet() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateApiVersionSet.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiVersionSet.json // this example is just showing the usage of "ApiVersionSet_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/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiVersionSetResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiVersionSetResource.cs index d895ce4cf120b..73a9363771445 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiVersionSetResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiVersionSetResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiVersionSetResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityTag_ApiManagementHeadApiVersionSet() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadApiVersionSet.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiVersionSet.json // this example is just showing the usage of "ApiVersionSet_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task GetEntityTag_ApiManagementHeadApiVersionSet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetApiVersionSet() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiVersionSet.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiVersionSet.json // this example is just showing the usage of "ApiVersionSet_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 @@ -80,7 +80,7 @@ public async Task Get_ApiManagementGetApiVersionSet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementUpdateApiVersionSet() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdateApiVersionSet.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateApiVersionSet.json // this example is just showing the usage of "ApiVersionSet_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 @@ -119,7 +119,7 @@ public async Task Update_ApiManagementUpdateApiVersionSet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ApiManagementDeleteApiVersionSet() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteApiVersionSet.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiVersionSet.json // this example is just showing the usage of "ApiVersionSet_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 diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_AuthorizationAccessPolicyContractCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_AuthorizationAccessPolicyContractCollection.cs new file mode 100644 index 0000000000000..d5ff48a001e4f --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_AuthorizationAccessPolicyContractCollection.cs @@ -0,0 +1,214 @@ +// 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.ApiManagement.Samples +{ + public partial class Sample_AuthorizationAccessPolicyContractCollection + { + // ApiManagementListAuthorizationAccessPolicies + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ApiManagementListAuthorizationAccessPolicies() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListAuthorizationAccessPolicies.json + // this example is just showing the usage of "AuthorizationAccessPolicy_ListByAuthorization" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AuthorizationContractResource created on azure + // for more information of creating AuthorizationContractResource, please refer to the document of AuthorizationContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string authorizationProviderId = "aadwithauthcode"; + string authorizationId = "authz1"; + ResourceIdentifier authorizationContractResourceId = AuthorizationContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId); + AuthorizationContractResource authorizationContract = client.GetAuthorizationContractResource(authorizationContractResourceId); + + // get the collection of this AuthorizationAccessPolicyContractResource + AuthorizationAccessPolicyContractCollection collection = authorizationContract.GetAuthorizationAccessPolicyContracts(); + + // invoke the operation and iterate over the result + await foreach (AuthorizationAccessPolicyContractResource 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 + AuthorizationAccessPolicyContractData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // ApiManagementGetAuthorizationAccessPolicy + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_ApiManagementGetAuthorizationAccessPolicy() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetAuthorizationAccessPolicy.json + // this example is just showing the usage of "AuthorizationAccessPolicy_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 AuthorizationContractResource created on azure + // for more information of creating AuthorizationContractResource, please refer to the document of AuthorizationContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string authorizationProviderId = "aadwithauthcode"; + string authorizationId = "authz1"; + ResourceIdentifier authorizationContractResourceId = AuthorizationContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId); + AuthorizationContractResource authorizationContract = client.GetAuthorizationContractResource(authorizationContractResourceId); + + // get the collection of this AuthorizationAccessPolicyContractResource + AuthorizationAccessPolicyContractCollection collection = authorizationContract.GetAuthorizationAccessPolicyContracts(); + + // invoke the operation + string authorizationAccessPolicyId = "fe0bed83-631f-4149-bd0b-0464b1bc7cab"; + AuthorizationAccessPolicyContractResource result = await collection.GetAsync(authorizationAccessPolicyId); + + // 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 + AuthorizationAccessPolicyContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ApiManagementGetAuthorizationAccessPolicy + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_ApiManagementGetAuthorizationAccessPolicy() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetAuthorizationAccessPolicy.json + // this example is just showing the usage of "AuthorizationAccessPolicy_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 AuthorizationContractResource created on azure + // for more information of creating AuthorizationContractResource, please refer to the document of AuthorizationContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string authorizationProviderId = "aadwithauthcode"; + string authorizationId = "authz1"; + ResourceIdentifier authorizationContractResourceId = AuthorizationContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId); + AuthorizationContractResource authorizationContract = client.GetAuthorizationContractResource(authorizationContractResourceId); + + // get the collection of this AuthorizationAccessPolicyContractResource + AuthorizationAccessPolicyContractCollection collection = authorizationContract.GetAuthorizationAccessPolicyContracts(); + + // invoke the operation + string authorizationAccessPolicyId = "fe0bed83-631f-4149-bd0b-0464b1bc7cab"; + bool result = await collection.ExistsAsync(authorizationAccessPolicyId); + + Console.WriteLine($"Succeeded: {result}"); + } + + // ApiManagementGetAuthorizationAccessPolicy + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_ApiManagementGetAuthorizationAccessPolicy() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetAuthorizationAccessPolicy.json + // this example is just showing the usage of "AuthorizationAccessPolicy_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 AuthorizationContractResource created on azure + // for more information of creating AuthorizationContractResource, please refer to the document of AuthorizationContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string authorizationProviderId = "aadwithauthcode"; + string authorizationId = "authz1"; + ResourceIdentifier authorizationContractResourceId = AuthorizationContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId); + AuthorizationContractResource authorizationContract = client.GetAuthorizationContractResource(authorizationContractResourceId); + + // get the collection of this AuthorizationAccessPolicyContractResource + AuthorizationAccessPolicyContractCollection collection = authorizationContract.GetAuthorizationAccessPolicyContracts(); + + // invoke the operation + string authorizationAccessPolicyId = "fe0bed83-631f-4149-bd0b-0464b1bc7cab"; + NullableResponse response = await collection.GetIfExistsAsync(authorizationAccessPolicyId); + AuthorizationAccessPolicyContractResource 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 + AuthorizationAccessPolicyContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // ApiManagementCreateAuthorizationAccessPolicy + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_ApiManagementCreateAuthorizationAccessPolicy() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateAuthorizationAccessPolicy.json + // this example is just showing the usage of "AuthorizationAccessPolicy_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 AuthorizationContractResource created on azure + // for more information of creating AuthorizationContractResource, please refer to the document of AuthorizationContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string authorizationProviderId = "aadwithauthcode"; + string authorizationId = "authz1"; + ResourceIdentifier authorizationContractResourceId = AuthorizationContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId); + AuthorizationContractResource authorizationContract = client.GetAuthorizationContractResource(authorizationContractResourceId); + + // get the collection of this AuthorizationAccessPolicyContractResource + AuthorizationAccessPolicyContractCollection collection = authorizationContract.GetAuthorizationAccessPolicyContracts(); + + // invoke the operation + string authorizationAccessPolicyId = "fe0bed83-631f-4149-bd0b-0464b1bc7cab"; + AuthorizationAccessPolicyContractData data = new AuthorizationAccessPolicyContractData() + { + TenantId = Guid.Parse("13932a0d-5c63-4d37-901d-1df9c97722ff"), + ObjectId = "fe0bed83-631f-4149-bd0b-0464b1bc7cab", + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, authorizationAccessPolicyId, data); + AuthorizationAccessPolicyContractResource 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 + AuthorizationAccessPolicyContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_AuthorizationAccessPolicyContractResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_AuthorizationAccessPolicyContractResource.cs new file mode 100644 index 0000000000000..89fb3e4763c73 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_AuthorizationAccessPolicyContractResource.cs @@ -0,0 +1,122 @@ +// 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.ApiManagement.Samples +{ + public partial class Sample_AuthorizationAccessPolicyContractResource + { + // ApiManagementGetAuthorizationAccessPolicy + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_ApiManagementGetAuthorizationAccessPolicy() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetAuthorizationAccessPolicy.json + // this example is just showing the usage of "AuthorizationAccessPolicy_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 AuthorizationAccessPolicyContractResource created on azure + // for more information of creating AuthorizationAccessPolicyContractResource, please refer to the document of AuthorizationAccessPolicyContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string authorizationProviderId = "aadwithauthcode"; + string authorizationId = "authz1"; + string authorizationAccessPolicyId = "fe0bed83-631f-4149-bd0b-0464b1bc7cab"; + ResourceIdentifier authorizationAccessPolicyContractResourceId = AuthorizationAccessPolicyContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId, authorizationAccessPolicyId); + AuthorizationAccessPolicyContractResource authorizationAccessPolicyContract = client.GetAuthorizationAccessPolicyContractResource(authorizationAccessPolicyContractResourceId); + + // invoke the operation + AuthorizationAccessPolicyContractResource result = await authorizationAccessPolicyContract.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 + AuthorizationAccessPolicyContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ApiManagementCreateAuthorizationAccessPolicy + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_ApiManagementCreateAuthorizationAccessPolicy() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateAuthorizationAccessPolicy.json + // this example is just showing the usage of "AuthorizationAccessPolicy_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 AuthorizationAccessPolicyContractResource created on azure + // for more information of creating AuthorizationAccessPolicyContractResource, please refer to the document of AuthorizationAccessPolicyContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string authorizationProviderId = "aadwithauthcode"; + string authorizationId = "authz1"; + string authorizationAccessPolicyId = "fe0bed83-631f-4149-bd0b-0464b1bc7cab"; + ResourceIdentifier authorizationAccessPolicyContractResourceId = AuthorizationAccessPolicyContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId, authorizationAccessPolicyId); + AuthorizationAccessPolicyContractResource authorizationAccessPolicyContract = client.GetAuthorizationAccessPolicyContractResource(authorizationAccessPolicyContractResourceId); + + // invoke the operation + AuthorizationAccessPolicyContractData data = new AuthorizationAccessPolicyContractData() + { + TenantId = Guid.Parse("13932a0d-5c63-4d37-901d-1df9c97722ff"), + ObjectId = "fe0bed83-631f-4149-bd0b-0464b1bc7cab", + }; + ArmOperation lro = await authorizationAccessPolicyContract.UpdateAsync(WaitUntil.Completed, data); + AuthorizationAccessPolicyContractResource 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 + AuthorizationAccessPolicyContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ApiManagementDeleteAuthorizationAccessPolicy + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_ApiManagementDeleteAuthorizationAccessPolicy() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteAuthorizationAccessPolicy.json + // this example is just showing the usage of "AuthorizationAccessPolicy_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 AuthorizationAccessPolicyContractResource created on azure + // for more information of creating AuthorizationAccessPolicyContractResource, please refer to the document of AuthorizationAccessPolicyContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string authorizationProviderId = "aadwithauthcode"; + string authorizationId = "authz1"; + string authorizationAccessPolicyId = "fe0bed83-631f-4149-bd0b-0464b1bc7cab"; + ResourceIdentifier authorizationAccessPolicyContractResourceId = AuthorizationAccessPolicyContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId, authorizationAccessPolicyId); + AuthorizationAccessPolicyContractResource authorizationAccessPolicyContract = client.GetAuthorizationAccessPolicyContractResource(authorizationAccessPolicyContractResourceId); + + // invoke the operation + ETag ifMatch = new ETag("*"); + await authorizationAccessPolicyContract.DeleteAsync(WaitUntil.Completed, ifMatch); + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_AuthorizationContractCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_AuthorizationContractCollection.cs new file mode 100644 index 0000000000000..7483b190f0607 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_AuthorizationContractCollection.cs @@ -0,0 +1,295 @@ +// 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.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement.Samples +{ + public partial class Sample_AuthorizationContractCollection + { + // ApiManagementListAuthorizationsAuthCode + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ApiManagementListAuthorizationsAuthCode() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListAuthorizationsAuthCode.json + // this example is just showing the usage of "Authorization_ListByAuthorizationProvider" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AuthorizationProviderContractResource created on azure + // for more information of creating AuthorizationProviderContractResource, please refer to the document of AuthorizationProviderContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string authorizationProviderId = "aadwithauthcode"; + ResourceIdentifier authorizationProviderContractResourceId = AuthorizationProviderContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, authorizationProviderId); + AuthorizationProviderContractResource authorizationProviderContract = client.GetAuthorizationProviderContractResource(authorizationProviderContractResourceId); + + // get the collection of this AuthorizationContractResource + AuthorizationContractCollection collection = authorizationProviderContract.GetAuthorizationContracts(); + + // invoke the operation and iterate over the result + await foreach (AuthorizationContractResource 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 + AuthorizationContractData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // ApiManagementListAuthorizationsClientCred + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ApiManagementListAuthorizationsClientCred() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListAuthorizationsClientCred.json + // this example is just showing the usage of "Authorization_ListByAuthorizationProvider" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AuthorizationProviderContractResource created on azure + // for more information of creating AuthorizationProviderContractResource, please refer to the document of AuthorizationProviderContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string authorizationProviderId = "aadwithclientcred"; + ResourceIdentifier authorizationProviderContractResourceId = AuthorizationProviderContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, authorizationProviderId); + AuthorizationProviderContractResource authorizationProviderContract = client.GetAuthorizationProviderContractResource(authorizationProviderContractResourceId); + + // get the collection of this AuthorizationContractResource + AuthorizationContractCollection collection = authorizationProviderContract.GetAuthorizationContracts(); + + // invoke the operation and iterate over the result + await foreach (AuthorizationContractResource 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 + AuthorizationContractData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // ApiManagementGetAuthorization + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_ApiManagementGetAuthorization() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetAuthorization.json + // this example is just showing the usage of "Authorization_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 AuthorizationProviderContractResource created on azure + // for more information of creating AuthorizationProviderContractResource, please refer to the document of AuthorizationProviderContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string authorizationProviderId = "aadwithauthcode"; + ResourceIdentifier authorizationProviderContractResourceId = AuthorizationProviderContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, authorizationProviderId); + AuthorizationProviderContractResource authorizationProviderContract = client.GetAuthorizationProviderContractResource(authorizationProviderContractResourceId); + + // get the collection of this AuthorizationContractResource + AuthorizationContractCollection collection = authorizationProviderContract.GetAuthorizationContracts(); + + // invoke the operation + string authorizationId = "authz1"; + AuthorizationContractResource result = await collection.GetAsync(authorizationId); + + // 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 + AuthorizationContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ApiManagementGetAuthorization + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_ApiManagementGetAuthorization() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetAuthorization.json + // this example is just showing the usage of "Authorization_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 AuthorizationProviderContractResource created on azure + // for more information of creating AuthorizationProviderContractResource, please refer to the document of AuthorizationProviderContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string authorizationProviderId = "aadwithauthcode"; + ResourceIdentifier authorizationProviderContractResourceId = AuthorizationProviderContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, authorizationProviderId); + AuthorizationProviderContractResource authorizationProviderContract = client.GetAuthorizationProviderContractResource(authorizationProviderContractResourceId); + + // get the collection of this AuthorizationContractResource + AuthorizationContractCollection collection = authorizationProviderContract.GetAuthorizationContracts(); + + // invoke the operation + string authorizationId = "authz1"; + bool result = await collection.ExistsAsync(authorizationId); + + Console.WriteLine($"Succeeded: {result}"); + } + + // ApiManagementGetAuthorization + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_ApiManagementGetAuthorization() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetAuthorization.json + // this example is just showing the usage of "Authorization_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 AuthorizationProviderContractResource created on azure + // for more information of creating AuthorizationProviderContractResource, please refer to the document of AuthorizationProviderContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string authorizationProviderId = "aadwithauthcode"; + ResourceIdentifier authorizationProviderContractResourceId = AuthorizationProviderContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, authorizationProviderId); + AuthorizationProviderContractResource authorizationProviderContract = client.GetAuthorizationProviderContractResource(authorizationProviderContractResourceId); + + // get the collection of this AuthorizationContractResource + AuthorizationContractCollection collection = authorizationProviderContract.GetAuthorizationContracts(); + + // invoke the operation + string authorizationId = "authz1"; + NullableResponse response = await collection.GetIfExistsAsync(authorizationId); + AuthorizationContractResource 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 + AuthorizationContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // ApiManagementCreateAuthorizationAADAuthCode + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_ApiManagementCreateAuthorizationAADAuthCode() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateAuthorizationAADAuthCode.json + // this example is just showing the usage of "Authorization_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 AuthorizationProviderContractResource created on azure + // for more information of creating AuthorizationProviderContractResource, please refer to the document of AuthorizationProviderContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string authorizationProviderId = "aadwithauthcode"; + ResourceIdentifier authorizationProviderContractResourceId = AuthorizationProviderContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, authorizationProviderId); + AuthorizationProviderContractResource authorizationProviderContract = client.GetAuthorizationProviderContractResource(authorizationProviderContractResourceId); + + // get the collection of this AuthorizationContractResource + AuthorizationContractCollection collection = authorizationProviderContract.GetAuthorizationContracts(); + + // invoke the operation + string authorizationId = "authz2"; + AuthorizationContractData data = new AuthorizationContractData() + { + AuthorizationType = ApiManagementAuthorizationType.OAuth2, + OAuth2GrantType = OAuth2GrantType.AuthorizationCode, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, authorizationId, data); + AuthorizationContractResource 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 + AuthorizationContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ApiManagementCreateAuthorizationAADClientCred + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_ApiManagementCreateAuthorizationAADClientCred() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateAuthorizationAADClientCred.json + // this example is just showing the usage of "Authorization_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 AuthorizationProviderContractResource created on azure + // for more information of creating AuthorizationProviderContractResource, please refer to the document of AuthorizationProviderContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string authorizationProviderId = "aadwithclientcred"; + ResourceIdentifier authorizationProviderContractResourceId = AuthorizationProviderContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, authorizationProviderId); + AuthorizationProviderContractResource authorizationProviderContract = client.GetAuthorizationProviderContractResource(authorizationProviderContractResourceId); + + // get the collection of this AuthorizationContractResource + AuthorizationContractCollection collection = authorizationProviderContract.GetAuthorizationContracts(); + + // invoke the operation + string authorizationId = "authz1"; + AuthorizationContractData data = new AuthorizationContractData() + { + AuthorizationType = ApiManagementAuthorizationType.OAuth2, + OAuth2GrantType = OAuth2GrantType.AuthorizationCode, + Parameters = +{ +["clientId"] = "53790925-fdd3-4b80-bc7a-4c3aaf25801d", +["clientSecret"] = "xxxxxxxxxxxxxxx~xxxxxxxxx", +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, authorizationId, data); + AuthorizationContractResource 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 + AuthorizationContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_AuthorizationContractResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_AuthorizationContractResource.cs new file mode 100644 index 0000000000000..c49b8cfcb504b --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_AuthorizationContractResource.cs @@ -0,0 +1,230 @@ +// 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.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement.Samples +{ + public partial class Sample_AuthorizationContractResource + { + // ApiManagementGetAuthorization + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_ApiManagementGetAuthorization() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetAuthorization.json + // this example is just showing the usage of "Authorization_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 AuthorizationContractResource created on azure + // for more information of creating AuthorizationContractResource, please refer to the document of AuthorizationContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string authorizationProviderId = "aadwithauthcode"; + string authorizationId = "authz1"; + ResourceIdentifier authorizationContractResourceId = AuthorizationContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId); + AuthorizationContractResource authorizationContract = client.GetAuthorizationContractResource(authorizationContractResourceId); + + // invoke the operation + AuthorizationContractResource result = await authorizationContract.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 + AuthorizationContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ApiManagementCreateAuthorizationAADAuthCode + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_ApiManagementCreateAuthorizationAADAuthCode() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateAuthorizationAADAuthCode.json + // this example is just showing the usage of "Authorization_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 AuthorizationContractResource created on azure + // for more information of creating AuthorizationContractResource, please refer to the document of AuthorizationContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string authorizationProviderId = "aadwithauthcode"; + string authorizationId = "authz2"; + ResourceIdentifier authorizationContractResourceId = AuthorizationContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId); + AuthorizationContractResource authorizationContract = client.GetAuthorizationContractResource(authorizationContractResourceId); + + // invoke the operation + AuthorizationContractData data = new AuthorizationContractData() + { + AuthorizationType = ApiManagementAuthorizationType.OAuth2, + OAuth2GrantType = OAuth2GrantType.AuthorizationCode, + }; + ArmOperation lro = await authorizationContract.UpdateAsync(WaitUntil.Completed, data); + AuthorizationContractResource 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 + AuthorizationContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ApiManagementCreateAuthorizationAADClientCred + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_ApiManagementCreateAuthorizationAADClientCred() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateAuthorizationAADClientCred.json + // this example is just showing the usage of "Authorization_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 AuthorizationContractResource created on azure + // for more information of creating AuthorizationContractResource, please refer to the document of AuthorizationContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string authorizationProviderId = "aadwithclientcred"; + string authorizationId = "authz1"; + ResourceIdentifier authorizationContractResourceId = AuthorizationContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId); + AuthorizationContractResource authorizationContract = client.GetAuthorizationContractResource(authorizationContractResourceId); + + // invoke the operation + AuthorizationContractData data = new AuthorizationContractData() + { + AuthorizationType = ApiManagementAuthorizationType.OAuth2, + OAuth2GrantType = OAuth2GrantType.AuthorizationCode, + Parameters = +{ +["clientId"] = "53790925-fdd3-4b80-bc7a-4c3aaf25801d", +["clientSecret"] = "xxxxxxxxxxxxxxx~xxxxxxxxx", +}, + }; + ArmOperation lro = await authorizationContract.UpdateAsync(WaitUntil.Completed, data); + AuthorizationContractResource 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 + AuthorizationContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ApiManagementDeleteAuthorization + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_ApiManagementDeleteAuthorization() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteAuthorization.json + // this example is just showing the usage of "Authorization_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 AuthorizationContractResource created on azure + // for more information of creating AuthorizationContractResource, please refer to the document of AuthorizationContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string authorizationProviderId = "aadwithauthcode"; + string authorizationId = "authz1"; + ResourceIdentifier authorizationContractResourceId = AuthorizationContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId); + AuthorizationContractResource authorizationContract = client.GetAuthorizationContractResource(authorizationContractResourceId); + + // invoke the operation + ETag ifMatch = new ETag("*"); + await authorizationContract.DeleteAsync(WaitUntil.Completed, ifMatch); + + Console.WriteLine($"Succeeded"); + } + + // ApiManagementPostAuthorizationConfirmConsentCodeRequest + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task ConfirmConsentCode_ApiManagementPostAuthorizationConfirmConsentCodeRequest() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementPostAuthorizationConfirmConsentCodeRequest.json + // this example is just showing the usage of "Authorization_ConfirmConsentCode" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AuthorizationContractResource created on azure + // for more information of creating AuthorizationContractResource, please refer to the document of AuthorizationContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string authorizationProviderId = "aadwithauthcode"; + string authorizationId = "authz1"; + ResourceIdentifier authorizationContractResourceId = AuthorizationContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId); + AuthorizationContractResource authorizationContract = client.GetAuthorizationContractResource(authorizationContractResourceId); + + // invoke the operation + AuthorizationConfirmConsentCodeContent content = new AuthorizationConfirmConsentCodeContent() + { + ConsentCode = "theconsentcode", + }; + await authorizationContract.ConfirmConsentCodeAsync(content); + + Console.WriteLine($"Succeeded"); + } + + // ApiManagementGetAuthorizationLoginRequest + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task PostAuthorizationLoginLink_ApiManagementGetAuthorizationLoginRequest() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetAuthorizationLoginRequest.json + // this example is just showing the usage of "AuthorizationLoginLinks_Post" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AuthorizationContractResource created on azure + // for more information of creating AuthorizationContractResource, please refer to the document of AuthorizationContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string authorizationProviderId = "aadwithauthcode"; + string authorizationId = "authz1"; + ResourceIdentifier authorizationContractResourceId = AuthorizationContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId); + AuthorizationContractResource authorizationContract = client.GetAuthorizationContractResource(authorizationContractResourceId); + + // invoke the operation + AuthorizationLoginContent content = new AuthorizationLoginContent() + { + PostLoginRedirectUri = new Uri("https://www.bing.com/"), + }; + AuthorizationLoginResult result = await authorizationContract.PostAuthorizationLoginLinkAsync(content); + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_AuthorizationProviderContractCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_AuthorizationProviderContractCollection.cs new file mode 100644 index 0000000000000..2f34bbd465618 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_AuthorizationProviderContractCollection.cs @@ -0,0 +1,383 @@ +// 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.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement.Samples +{ + public partial class Sample_AuthorizationProviderContractCollection + { + // ApiManagementListAuthorizationProviders + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ApiManagementListAuthorizationProviders() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListAuthorizationProviders.json + // this example is just showing the usage of "AuthorizationProvider_ListByService" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ApiManagementServiceResource created on azure + // for more information of creating ApiManagementServiceResource, please refer to the document of ApiManagementServiceResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + ResourceIdentifier apiManagementServiceResourceId = ApiManagementServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName); + ApiManagementServiceResource apiManagementService = client.GetApiManagementServiceResource(apiManagementServiceResourceId); + + // get the collection of this AuthorizationProviderContractResource + AuthorizationProviderContractCollection collection = apiManagementService.GetAuthorizationProviderContracts(); + + // invoke the operation and iterate over the result + await foreach (AuthorizationProviderContractResource 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 + AuthorizationProviderContractData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // ApiManagementGetAuthorizationProvider + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_ApiManagementGetAuthorizationProvider() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetAuthorizationProvider.json + // this example is just showing the usage of "AuthorizationProvider_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 ApiManagementServiceResource created on azure + // for more information of creating ApiManagementServiceResource, please refer to the document of ApiManagementServiceResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + ResourceIdentifier apiManagementServiceResourceId = ApiManagementServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName); + ApiManagementServiceResource apiManagementService = client.GetApiManagementServiceResource(apiManagementServiceResourceId); + + // get the collection of this AuthorizationProviderContractResource + AuthorizationProviderContractCollection collection = apiManagementService.GetAuthorizationProviderContracts(); + + // invoke the operation + string authorizationProviderId = "aadwithauthcode"; + AuthorizationProviderContractResource result = await collection.GetAsync(authorizationProviderId); + + // 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 + AuthorizationProviderContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ApiManagementGetAuthorizationProvider + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_ApiManagementGetAuthorizationProvider() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetAuthorizationProvider.json + // this example is just showing the usage of "AuthorizationProvider_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 ApiManagementServiceResource created on azure + // for more information of creating ApiManagementServiceResource, please refer to the document of ApiManagementServiceResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + ResourceIdentifier apiManagementServiceResourceId = ApiManagementServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName); + ApiManagementServiceResource apiManagementService = client.GetApiManagementServiceResource(apiManagementServiceResourceId); + + // get the collection of this AuthorizationProviderContractResource + AuthorizationProviderContractCollection collection = apiManagementService.GetAuthorizationProviderContracts(); + + // invoke the operation + string authorizationProviderId = "aadwithauthcode"; + bool result = await collection.ExistsAsync(authorizationProviderId); + + Console.WriteLine($"Succeeded: {result}"); + } + + // ApiManagementGetAuthorizationProvider + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_ApiManagementGetAuthorizationProvider() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetAuthorizationProvider.json + // this example is just showing the usage of "AuthorizationProvider_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 ApiManagementServiceResource created on azure + // for more information of creating ApiManagementServiceResource, please refer to the document of ApiManagementServiceResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + ResourceIdentifier apiManagementServiceResourceId = ApiManagementServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName); + ApiManagementServiceResource apiManagementService = client.GetApiManagementServiceResource(apiManagementServiceResourceId); + + // get the collection of this AuthorizationProviderContractResource + AuthorizationProviderContractCollection collection = apiManagementService.GetAuthorizationProviderContracts(); + + // invoke the operation + string authorizationProviderId = "aadwithauthcode"; + NullableResponse response = await collection.GetIfExistsAsync(authorizationProviderId); + AuthorizationProviderContractResource 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 + AuthorizationProviderContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // ApiManagementCreateAuthorizationProviderAADAuthCode + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_ApiManagementCreateAuthorizationProviderAADAuthCode() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateAuthorizationProviderAADAuthCode.json + // this example is just showing the usage of "AuthorizationProvider_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 ApiManagementServiceResource created on azure + // for more information of creating ApiManagementServiceResource, please refer to the document of ApiManagementServiceResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + ResourceIdentifier apiManagementServiceResourceId = ApiManagementServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName); + ApiManagementServiceResource apiManagementService = client.GetApiManagementServiceResource(apiManagementServiceResourceId); + + // get the collection of this AuthorizationProviderContractResource + AuthorizationProviderContractCollection collection = apiManagementService.GetAuthorizationProviderContracts(); + + // invoke the operation + string authorizationProviderId = "aadwithauthcode"; + AuthorizationProviderContractData data = new AuthorizationProviderContractData() + { + DisplayName = "aadwithauthcode", + IdentityProvider = "aad", + Oauth2 = new AuthorizationProviderOAuth2Settings() + { + RedirectUri = new Uri("https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1"), + GrantTypes = new AuthorizationProviderOAuth2GrantTypes() + { + AuthorizationCode = +{ +["clientId"] = "59790825-fdd3-4b10-bc7a-4c3aaf25801d", +["clientSecret"] = "xxxxxxxxxxxxxxxxxxxxxxxx", +["resourceUri"] = "https://graph.microsoft.com", +["scopes"] = "User.Read.All Group.Read.All", +}, + }, + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, authorizationProviderId, data); + AuthorizationProviderContractResource 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 + AuthorizationProviderContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ApiManagementCreateAuthorizationProviderAADClientCred + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_ApiManagementCreateAuthorizationProviderAADClientCred() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateAuthorizationProviderAADClientCred.json + // this example is just showing the usage of "AuthorizationProvider_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 ApiManagementServiceResource created on azure + // for more information of creating ApiManagementServiceResource, please refer to the document of ApiManagementServiceResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + ResourceIdentifier apiManagementServiceResourceId = ApiManagementServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName); + ApiManagementServiceResource apiManagementService = client.GetApiManagementServiceResource(apiManagementServiceResourceId); + + // get the collection of this AuthorizationProviderContractResource + AuthorizationProviderContractCollection collection = apiManagementService.GetAuthorizationProviderContracts(); + + // invoke the operation + string authorizationProviderId = "aadwithclientcred"; + AuthorizationProviderContractData data = new AuthorizationProviderContractData() + { + DisplayName = "aadwithclientcred", + IdentityProvider = "aad", + Oauth2 = new AuthorizationProviderOAuth2Settings() + { + RedirectUri = new Uri("https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1"), + GrantTypes = new AuthorizationProviderOAuth2GrantTypes() + { + AuthorizationCode = +{ +["resourceUri"] = "https://graph.microsoft.com", +["scopes"] = "User.Read.All Group.Read.All", +}, + }, + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, authorizationProviderId, data); + AuthorizationProviderContractResource 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 + AuthorizationProviderContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ApiManagementCreateAuthorizationProviderGenericOAuth2 + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_ApiManagementCreateAuthorizationProviderGenericOAuth2() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateAuthorizationProviderGenericOAuth2.json + // this example is just showing the usage of "AuthorizationProvider_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 ApiManagementServiceResource created on azure + // for more information of creating ApiManagementServiceResource, please refer to the document of ApiManagementServiceResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + ResourceIdentifier apiManagementServiceResourceId = ApiManagementServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName); + ApiManagementServiceResource apiManagementService = client.GetApiManagementServiceResource(apiManagementServiceResourceId); + + // get the collection of this AuthorizationProviderContractResource + AuthorizationProviderContractCollection collection = apiManagementService.GetAuthorizationProviderContracts(); + + // invoke the operation + string authorizationProviderId = "eventbrite"; + AuthorizationProviderContractData data = new AuthorizationProviderContractData() + { + DisplayName = "eventbrite", + IdentityProvider = "oauth2", + Oauth2 = new AuthorizationProviderOAuth2Settings() + { + RedirectUri = new Uri("https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1"), + GrantTypes = new AuthorizationProviderOAuth2GrantTypes() + { + AuthorizationCode = +{ +["authorizationUrl"] = "https://www.eventbrite.com/oauth/authorize", +["clientId"] = "genericClientId", +["clientSecret"] = "xxxxxxxxxxxxxxxxxxxxxxxx", +["refreshUrl"] = "https://www.eventbrite.com/oauth/token", +["scopes"] = "", +["tokenUrl"] = "https://www.eventbrite.com/oauth/token", +}, + }, + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, authorizationProviderId, data); + AuthorizationProviderContractResource 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 + AuthorizationProviderContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ApiManagementCreateAuthorizationProviderOOBGoogle + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_ApiManagementCreateAuthorizationProviderOOBGoogle() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateAuthorizationProviderOOBGoogle.json + // this example is just showing the usage of "AuthorizationProvider_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 ApiManagementServiceResource created on azure + // for more information of creating ApiManagementServiceResource, please refer to the document of ApiManagementServiceResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + ResourceIdentifier apiManagementServiceResourceId = ApiManagementServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName); + ApiManagementServiceResource apiManagementService = client.GetApiManagementServiceResource(apiManagementServiceResourceId); + + // get the collection of this AuthorizationProviderContractResource + AuthorizationProviderContractCollection collection = apiManagementService.GetAuthorizationProviderContracts(); + + // invoke the operation + string authorizationProviderId = "google"; + AuthorizationProviderContractData data = new AuthorizationProviderContractData() + { + DisplayName = "google", + IdentityProvider = "google", + Oauth2 = new AuthorizationProviderOAuth2Settings() + { + RedirectUri = new Uri("https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1"), + GrantTypes = new AuthorizationProviderOAuth2GrantTypes() + { + AuthorizationCode = +{ +["clientId"] = "99999999-xxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com", +["clientSecret"] = "XXXXXXXXXXXXXXXXXXXX", +["scopes"] = "openid https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email", +}, + }, + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, authorizationProviderId, data); + AuthorizationProviderContractResource 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 + AuthorizationProviderContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_AuthorizationProviderContractResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_AuthorizationProviderContractResource.cs new file mode 100644 index 0000000000000..0a5d3304131c9 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_AuthorizationProviderContractResource.cs @@ -0,0 +1,286 @@ +// 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.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement.Samples +{ + public partial class Sample_AuthorizationProviderContractResource + { + // ApiManagementGetAuthorizationProvider + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_ApiManagementGetAuthorizationProvider() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetAuthorizationProvider.json + // this example is just showing the usage of "AuthorizationProvider_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 AuthorizationProviderContractResource created on azure + // for more information of creating AuthorizationProviderContractResource, please refer to the document of AuthorizationProviderContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string authorizationProviderId = "aadwithauthcode"; + ResourceIdentifier authorizationProviderContractResourceId = AuthorizationProviderContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, authorizationProviderId); + AuthorizationProviderContractResource authorizationProviderContract = client.GetAuthorizationProviderContractResource(authorizationProviderContractResourceId); + + // invoke the operation + AuthorizationProviderContractResource result = await authorizationProviderContract.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 + AuthorizationProviderContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ApiManagementCreateAuthorizationProviderAADAuthCode + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_ApiManagementCreateAuthorizationProviderAADAuthCode() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateAuthorizationProviderAADAuthCode.json + // this example is just showing the usage of "AuthorizationProvider_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 AuthorizationProviderContractResource created on azure + // for more information of creating AuthorizationProviderContractResource, please refer to the document of AuthorizationProviderContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string authorizationProviderId = "aadwithauthcode"; + ResourceIdentifier authorizationProviderContractResourceId = AuthorizationProviderContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, authorizationProviderId); + AuthorizationProviderContractResource authorizationProviderContract = client.GetAuthorizationProviderContractResource(authorizationProviderContractResourceId); + + // invoke the operation + AuthorizationProviderContractData data = new AuthorizationProviderContractData() + { + DisplayName = "aadwithauthcode", + IdentityProvider = "aad", + Oauth2 = new AuthorizationProviderOAuth2Settings() + { + RedirectUri = new Uri("https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1"), + GrantTypes = new AuthorizationProviderOAuth2GrantTypes() + { + AuthorizationCode = +{ +["clientId"] = "59790825-fdd3-4b10-bc7a-4c3aaf25801d", +["clientSecret"] = "xxxxxxxxxxxxxxxxxxxxxxxx", +["resourceUri"] = "https://graph.microsoft.com", +["scopes"] = "User.Read.All Group.Read.All", +}, + }, + }, + }; + ArmOperation lro = await authorizationProviderContract.UpdateAsync(WaitUntil.Completed, data); + AuthorizationProviderContractResource 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 + AuthorizationProviderContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ApiManagementCreateAuthorizationProviderAADClientCred + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_ApiManagementCreateAuthorizationProviderAADClientCred() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateAuthorizationProviderAADClientCred.json + // this example is just showing the usage of "AuthorizationProvider_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 AuthorizationProviderContractResource created on azure + // for more information of creating AuthorizationProviderContractResource, please refer to the document of AuthorizationProviderContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string authorizationProviderId = "aadwithclientcred"; + ResourceIdentifier authorizationProviderContractResourceId = AuthorizationProviderContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, authorizationProviderId); + AuthorizationProviderContractResource authorizationProviderContract = client.GetAuthorizationProviderContractResource(authorizationProviderContractResourceId); + + // invoke the operation + AuthorizationProviderContractData data = new AuthorizationProviderContractData() + { + DisplayName = "aadwithclientcred", + IdentityProvider = "aad", + Oauth2 = new AuthorizationProviderOAuth2Settings() + { + RedirectUri = new Uri("https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1"), + GrantTypes = new AuthorizationProviderOAuth2GrantTypes() + { + AuthorizationCode = +{ +["resourceUri"] = "https://graph.microsoft.com", +["scopes"] = "User.Read.All Group.Read.All", +}, + }, + }, + }; + ArmOperation lro = await authorizationProviderContract.UpdateAsync(WaitUntil.Completed, data); + AuthorizationProviderContractResource 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 + AuthorizationProviderContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ApiManagementCreateAuthorizationProviderGenericOAuth2 + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_ApiManagementCreateAuthorizationProviderGenericOAuth2() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateAuthorizationProviderGenericOAuth2.json + // this example is just showing the usage of "AuthorizationProvider_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 AuthorizationProviderContractResource created on azure + // for more information of creating AuthorizationProviderContractResource, please refer to the document of AuthorizationProviderContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string authorizationProviderId = "eventbrite"; + ResourceIdentifier authorizationProviderContractResourceId = AuthorizationProviderContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, authorizationProviderId); + AuthorizationProviderContractResource authorizationProviderContract = client.GetAuthorizationProviderContractResource(authorizationProviderContractResourceId); + + // invoke the operation + AuthorizationProviderContractData data = new AuthorizationProviderContractData() + { + DisplayName = "eventbrite", + IdentityProvider = "oauth2", + Oauth2 = new AuthorizationProviderOAuth2Settings() + { + RedirectUri = new Uri("https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1"), + GrantTypes = new AuthorizationProviderOAuth2GrantTypes() + { + AuthorizationCode = +{ +["authorizationUrl"] = "https://www.eventbrite.com/oauth/authorize", +["clientId"] = "genericClientId", +["clientSecret"] = "xxxxxxxxxxxxxxxxxxxxxxxx", +["refreshUrl"] = "https://www.eventbrite.com/oauth/token", +["scopes"] = "", +["tokenUrl"] = "https://www.eventbrite.com/oauth/token", +}, + }, + }, + }; + ArmOperation lro = await authorizationProviderContract.UpdateAsync(WaitUntil.Completed, data); + AuthorizationProviderContractResource 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 + AuthorizationProviderContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ApiManagementCreateAuthorizationProviderOOBGoogle + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_ApiManagementCreateAuthorizationProviderOOBGoogle() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateAuthorizationProviderOOBGoogle.json + // this example is just showing the usage of "AuthorizationProvider_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 AuthorizationProviderContractResource created on azure + // for more information of creating AuthorizationProviderContractResource, please refer to the document of AuthorizationProviderContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string authorizationProviderId = "google"; + ResourceIdentifier authorizationProviderContractResourceId = AuthorizationProviderContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, authorizationProviderId); + AuthorizationProviderContractResource authorizationProviderContract = client.GetAuthorizationProviderContractResource(authorizationProviderContractResourceId); + + // invoke the operation + AuthorizationProviderContractData data = new AuthorizationProviderContractData() + { + DisplayName = "google", + IdentityProvider = "google", + Oauth2 = new AuthorizationProviderOAuth2Settings() + { + RedirectUri = new Uri("https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1"), + GrantTypes = new AuthorizationProviderOAuth2GrantTypes() + { + AuthorizationCode = +{ +["clientId"] = "99999999-xxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com", +["clientSecret"] = "XXXXXXXXXXXXXXXXXXXX", +["scopes"] = "openid https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email", +}, + }, + }, + }; + ArmOperation lro = await authorizationProviderContract.UpdateAsync(WaitUntil.Completed, data); + AuthorizationProviderContractResource 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 + AuthorizationProviderContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ApiManagementDeleteAuthorizationProvider + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_ApiManagementDeleteAuthorizationProvider() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteAuthorizationProvider.json + // this example is just showing the usage of "AuthorizationProvider_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 AuthorizationProviderContractResource created on azure + // for more information of creating AuthorizationProviderContractResource, please refer to the document of AuthorizationProviderContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string authorizationProviderId = "aadwithauthcode"; + ResourceIdentifier authorizationProviderContractResourceId = AuthorizationProviderContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, authorizationProviderId); + AuthorizationProviderContractResource authorizationProviderContract = client.GetAuthorizationProviderContractResource(authorizationProviderContractResourceId); + + // invoke the operation + ETag ifMatch = new ETag("*"); + await authorizationProviderContract.DeleteAsync(WaitUntil.Completed, ifMatch); + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_DocumentationContractCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_DocumentationContractCollection.cs new file mode 100644 index 0000000000000..7e087ff0c0317 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_DocumentationContractCollection.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.ApiManagement.Samples +{ + public partial class Sample_DocumentationContractCollection + { + // ApiManagementListApis + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ApiManagementListApis() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListDocumentations.json + // this example is just showing the usage of "Documentation_ListByService" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ApiManagementServiceResource created on azure + // for more information of creating ApiManagementServiceResource, please refer to the document of ApiManagementServiceResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + ResourceIdentifier apiManagementServiceResourceId = ApiManagementServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName); + ApiManagementServiceResource apiManagementService = client.GetApiManagementServiceResource(apiManagementServiceResourceId); + + // get the collection of this DocumentationContractResource + DocumentationContractCollection collection = apiManagementService.GetDocumentationContracts(); + + // invoke the operation and iterate over the result + await foreach (DocumentationContractResource 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 + DocumentationContractData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // ApiManagementGetDocumentation + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_ApiManagementGetDocumentation() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetDocumentation.json + // this example is just showing the usage of "Documentation_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 ApiManagementServiceResource created on azure + // for more information of creating ApiManagementServiceResource, please refer to the document of ApiManagementServiceResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + ResourceIdentifier apiManagementServiceResourceId = ApiManagementServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName); + ApiManagementServiceResource apiManagementService = client.GetApiManagementServiceResource(apiManagementServiceResourceId); + + // get the collection of this DocumentationContractResource + DocumentationContractCollection collection = apiManagementService.GetDocumentationContracts(); + + // invoke the operation + string documentationId = "57d1f7558aa04f15146d9d8a"; + DocumentationContractResource result = await collection.GetAsync(documentationId); + + // 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 + DocumentationContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ApiManagementGetDocumentation + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_ApiManagementGetDocumentation() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetDocumentation.json + // this example is just showing the usage of "Documentation_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 ApiManagementServiceResource created on azure + // for more information of creating ApiManagementServiceResource, please refer to the document of ApiManagementServiceResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + ResourceIdentifier apiManagementServiceResourceId = ApiManagementServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName); + ApiManagementServiceResource apiManagementService = client.GetApiManagementServiceResource(apiManagementServiceResourceId); + + // get the collection of this DocumentationContractResource + DocumentationContractCollection collection = apiManagementService.GetDocumentationContracts(); + + // invoke the operation + string documentationId = "57d1f7558aa04f15146d9d8a"; + bool result = await collection.ExistsAsync(documentationId); + + Console.WriteLine($"Succeeded: {result}"); + } + + // ApiManagementGetDocumentation + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_ApiManagementGetDocumentation() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetDocumentation.json + // this example is just showing the usage of "Documentation_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 ApiManagementServiceResource created on azure + // for more information of creating ApiManagementServiceResource, please refer to the document of ApiManagementServiceResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + ResourceIdentifier apiManagementServiceResourceId = ApiManagementServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName); + ApiManagementServiceResource apiManagementService = client.GetApiManagementServiceResource(apiManagementServiceResourceId); + + // get the collection of this DocumentationContractResource + DocumentationContractCollection collection = apiManagementService.GetDocumentationContracts(); + + // invoke the operation + string documentationId = "57d1f7558aa04f15146d9d8a"; + NullableResponse response = await collection.GetIfExistsAsync(documentationId); + DocumentationContractResource 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 + DocumentationContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // ApiManagementCreateDocumentation + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_ApiManagementCreateDocumentation() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateDocumentation.json + // this example is just showing the usage of "Documentation_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 ApiManagementServiceResource created on azure + // for more information of creating ApiManagementServiceResource, please refer to the document of ApiManagementServiceResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + ResourceIdentifier apiManagementServiceResourceId = ApiManagementServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName); + ApiManagementServiceResource apiManagementService = client.GetApiManagementServiceResource(apiManagementServiceResourceId); + + // get the collection of this DocumentationContractResource + DocumentationContractCollection collection = apiManagementService.GetDocumentationContracts(); + + // invoke the operation + string documentationId = "57d1f7558aa04f15146d9d8a"; + DocumentationContractData data = new DocumentationContractData() + { + Title = "Title", + Content = "content", + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, documentationId, data); + DocumentationContractResource 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 + DocumentationContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_DocumentationContractResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_DocumentationContractResource.cs new file mode 100644 index 0000000000000..d5e141462aee1 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_DocumentationContractResource.cs @@ -0,0 +1,145 @@ +// 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.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement.Samples +{ + public partial class Sample_DocumentationContractResource + { + // ApiManagementHeadDocumentation + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetEntityTag_ApiManagementHeadDocumentation() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadDocumentation.json + // this example is just showing the usage of "Documentation_GetEntityTag" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DocumentationContractResource created on azure + // for more information of creating DocumentationContractResource, please refer to the document of DocumentationContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string documentationId = "57d1f7558aa04f15146d9d8a"; + ResourceIdentifier documentationContractResourceId = DocumentationContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, documentationId); + DocumentationContractResource documentationContract = client.GetDocumentationContractResource(documentationContractResourceId); + + // invoke the operation + bool result = await documentationContract.GetEntityTagAsync(); + + Console.WriteLine($"Succeeded: {result}"); + } + + // ApiManagementGetDocumentation + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_ApiManagementGetDocumentation() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetDocumentation.json + // this example is just showing the usage of "Documentation_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 DocumentationContractResource created on azure + // for more information of creating DocumentationContractResource, please refer to the document of DocumentationContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string documentationId = "57d1f7558aa04f15146d9d8a"; + ResourceIdentifier documentationContractResourceId = DocumentationContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, documentationId); + DocumentationContractResource documentationContract = client.GetDocumentationContractResource(documentationContractResourceId); + + // invoke the operation + DocumentationContractResource result = await documentationContract.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 + DocumentationContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ApiManagementUpdateDocumentation + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_ApiManagementUpdateDocumentation() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateDocumentation.json + // this example is just showing the usage of "Documentation_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 DocumentationContractResource created on azure + // for more information of creating DocumentationContractResource, please refer to the document of DocumentationContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string documentationId = "57d1f7558aa04f15146d9d8a"; + ResourceIdentifier documentationContractResourceId = DocumentationContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, documentationId); + DocumentationContractResource documentationContract = client.GetDocumentationContractResource(documentationContractResourceId); + + // invoke the operation + ETag ifMatch = new ETag("*"); + DocumentationContractPatch patch = new DocumentationContractPatch() + { + Title = "Title updated", + Content = "content updated", + }; + DocumentationContractResource result = await documentationContract.UpdateAsync(ifMatch, 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 + DocumentationContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ApiManagementDeleteDocumentation + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_ApiManagementDeleteDocumentation() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteDocumentation.json + // this example is just showing the usage of "Documentation_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 DocumentationContractResource created on azure + // for more information of creating DocumentationContractResource, please refer to the document of DocumentationContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string documentationId = "57d1f7558aa04f15146d9d8a"; + ResourceIdentifier documentationContractResourceId = DocumentationContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, documentationId); + DocumentationContractResource documentationContract = client.GetDocumentationContractResource(documentationContractResourceId); + + // invoke the operation + ETag ifMatch = new ETag("*"); + await documentationContract.DeleteAsync(WaitUntil.Completed, ifMatch); + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_PolicyFragmentContractCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_PolicyFragmentContractCollection.cs new file mode 100644 index 0000000000000..eab29d801b563 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_PolicyFragmentContractCollection.cs @@ -0,0 +1,318 @@ +// 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.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement.Samples +{ + public partial class Sample_PolicyFragmentContractCollection + { + // ApiManagementListPolicyFragments + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ApiManagementListPolicyFragments() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListPolicyFragments.json + // this example is just showing the usage of "PolicyFragment_ListByService" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ApiManagementServiceResource created on azure + // for more information of creating ApiManagementServiceResource, please refer to the document of ApiManagementServiceResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + ResourceIdentifier apiManagementServiceResourceId = ApiManagementServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName); + ApiManagementServiceResource apiManagementService = client.GetApiManagementServiceResource(apiManagementServiceResourceId); + + // get the collection of this PolicyFragmentContractResource + PolicyFragmentContractCollection collection = apiManagementService.GetPolicyFragmentContracts(); + + // invoke the operation and iterate over the result + await foreach (PolicyFragmentContractResource 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 + PolicyFragmentContractData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // ApiManagementGetPolicyFragment + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_ApiManagementGetPolicyFragment() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetPolicyFragment.json + // this example is just showing the usage of "PolicyFragment_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 ApiManagementServiceResource created on azure + // for more information of creating ApiManagementServiceResource, please refer to the document of ApiManagementServiceResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + ResourceIdentifier apiManagementServiceResourceId = ApiManagementServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName); + ApiManagementServiceResource apiManagementService = client.GetApiManagementServiceResource(apiManagementServiceResourceId); + + // get the collection of this PolicyFragmentContractResource + PolicyFragmentContractCollection collection = apiManagementService.GetPolicyFragmentContracts(); + + // invoke the operation + string id = "policyFragment1"; + PolicyFragmentContractResource result = await collection.GetAsync(id); + + // 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 + PolicyFragmentContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ApiManagementGetPolicyFragment + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_ApiManagementGetPolicyFragment() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetPolicyFragment.json + // this example is just showing the usage of "PolicyFragment_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 ApiManagementServiceResource created on azure + // for more information of creating ApiManagementServiceResource, please refer to the document of ApiManagementServiceResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + ResourceIdentifier apiManagementServiceResourceId = ApiManagementServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName); + ApiManagementServiceResource apiManagementService = client.GetApiManagementServiceResource(apiManagementServiceResourceId); + + // get the collection of this PolicyFragmentContractResource + PolicyFragmentContractCollection collection = apiManagementService.GetPolicyFragmentContracts(); + + // invoke the operation + string id = "policyFragment1"; + bool result = await collection.ExistsAsync(id); + + Console.WriteLine($"Succeeded: {result}"); + } + + // ApiManagementGetPolicyFragment + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_ApiManagementGetPolicyFragment() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetPolicyFragment.json + // this example is just showing the usage of "PolicyFragment_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 ApiManagementServiceResource created on azure + // for more information of creating ApiManagementServiceResource, please refer to the document of ApiManagementServiceResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + ResourceIdentifier apiManagementServiceResourceId = ApiManagementServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName); + ApiManagementServiceResource apiManagementService = client.GetApiManagementServiceResource(apiManagementServiceResourceId); + + // get the collection of this PolicyFragmentContractResource + PolicyFragmentContractCollection collection = apiManagementService.GetPolicyFragmentContracts(); + + // invoke the operation + string id = "policyFragment1"; + NullableResponse response = await collection.GetIfExistsAsync(id); + PolicyFragmentContractResource 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 + PolicyFragmentContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // ApiManagementGetPolicyFragmentFormat + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_ApiManagementGetPolicyFragmentFormat() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetPolicyFragmentFormat.json + // this example is just showing the usage of "PolicyFragment_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 ApiManagementServiceResource created on azure + // for more information of creating ApiManagementServiceResource, please refer to the document of ApiManagementServiceResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + ResourceIdentifier apiManagementServiceResourceId = ApiManagementServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName); + ApiManagementServiceResource apiManagementService = client.GetApiManagementServiceResource(apiManagementServiceResourceId); + + // get the collection of this PolicyFragmentContractResource + PolicyFragmentContractCollection collection = apiManagementService.GetPolicyFragmentContracts(); + + // invoke the operation + string id = "policyFragment1"; + PolicyFragmentContentFormat? format = PolicyFragmentContentFormat.Rawxml; + PolicyFragmentContractResource result = await collection.GetAsync(id, format: format); + + // 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 + PolicyFragmentContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ApiManagementGetPolicyFragmentFormat + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_ApiManagementGetPolicyFragmentFormat() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetPolicyFragmentFormat.json + // this example is just showing the usage of "PolicyFragment_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 ApiManagementServiceResource created on azure + // for more information of creating ApiManagementServiceResource, please refer to the document of ApiManagementServiceResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + ResourceIdentifier apiManagementServiceResourceId = ApiManagementServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName); + ApiManagementServiceResource apiManagementService = client.GetApiManagementServiceResource(apiManagementServiceResourceId); + + // get the collection of this PolicyFragmentContractResource + PolicyFragmentContractCollection collection = apiManagementService.GetPolicyFragmentContracts(); + + // invoke the operation + string id = "policyFragment1"; + PolicyFragmentContentFormat? format = PolicyFragmentContentFormat.Rawxml; + bool result = await collection.ExistsAsync(id, format: format); + + Console.WriteLine($"Succeeded: {result}"); + } + + // ApiManagementGetPolicyFragmentFormat + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_ApiManagementGetPolicyFragmentFormat() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetPolicyFragmentFormat.json + // this example is just showing the usage of "PolicyFragment_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 ApiManagementServiceResource created on azure + // for more information of creating ApiManagementServiceResource, please refer to the document of ApiManagementServiceResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + ResourceIdentifier apiManagementServiceResourceId = ApiManagementServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName); + ApiManagementServiceResource apiManagementService = client.GetApiManagementServiceResource(apiManagementServiceResourceId); + + // get the collection of this PolicyFragmentContractResource + PolicyFragmentContractCollection collection = apiManagementService.GetPolicyFragmentContracts(); + + // invoke the operation + string id = "policyFragment1"; + PolicyFragmentContentFormat? format = PolicyFragmentContentFormat.Rawxml; + NullableResponse response = await collection.GetIfExistsAsync(id, format: format); + PolicyFragmentContractResource 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 + PolicyFragmentContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // ApiManagementCreatePolicy + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_ApiManagementCreatePolicy() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreatePolicyFragment.json + // this example is just showing the usage of "PolicyFragment_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 ApiManagementServiceResource created on azure + // for more information of creating ApiManagementServiceResource, please refer to the document of ApiManagementServiceResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + ResourceIdentifier apiManagementServiceResourceId = ApiManagementServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName); + ApiManagementServiceResource apiManagementService = client.GetApiManagementServiceResource(apiManagementServiceResourceId); + + // get the collection of this PolicyFragmentContractResource + PolicyFragmentContractCollection collection = apiManagementService.GetPolicyFragmentContracts(); + + // invoke the operation + string id = "policyFragment1"; + PolicyFragmentContractData data = new PolicyFragmentContractData() + { + Value = "", + Description = "A policy fragment example", + Format = PolicyFragmentContentFormat.Xml, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, id, data); + PolicyFragmentContractResource 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 + PolicyFragmentContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_PolicyFragmentContractResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_PolicyFragmentContractResource.cs new file mode 100644 index 0000000000000..74fdd3711c219 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_PolicyFragmentContractResource.cs @@ -0,0 +1,210 @@ +// 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.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement.Samples +{ + public partial class Sample_PolicyFragmentContractResource + { + // ApiManagementHeadPolicyFragment + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetEntityTag_ApiManagementHeadPolicyFragment() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadPolicyFragment.json + // this example is just showing the usage of "PolicyFragment_GetEntityTag" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this PolicyFragmentContractResource created on azure + // for more information of creating PolicyFragmentContractResource, please refer to the document of PolicyFragmentContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string id = "policyFragment1"; + ResourceIdentifier policyFragmentContractResourceId = PolicyFragmentContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, id); + PolicyFragmentContractResource policyFragmentContract = client.GetPolicyFragmentContractResource(policyFragmentContractResourceId); + + // invoke the operation + bool result = await policyFragmentContract.GetEntityTagAsync(); + + Console.WriteLine($"Succeeded: {result}"); + } + + // ApiManagementGetPolicyFragment + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_ApiManagementGetPolicyFragment() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetPolicyFragment.json + // this example is just showing the usage of "PolicyFragment_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 PolicyFragmentContractResource created on azure + // for more information of creating PolicyFragmentContractResource, please refer to the document of PolicyFragmentContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string id = "policyFragment1"; + ResourceIdentifier policyFragmentContractResourceId = PolicyFragmentContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, id); + PolicyFragmentContractResource policyFragmentContract = client.GetPolicyFragmentContractResource(policyFragmentContractResourceId); + + // invoke the operation + PolicyFragmentContractResource result = await policyFragmentContract.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 + PolicyFragmentContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ApiManagementGetPolicyFragmentFormat + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_ApiManagementGetPolicyFragmentFormat() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetPolicyFragmentFormat.json + // this example is just showing the usage of "PolicyFragment_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 PolicyFragmentContractResource created on azure + // for more information of creating PolicyFragmentContractResource, please refer to the document of PolicyFragmentContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string id = "policyFragment1"; + ResourceIdentifier policyFragmentContractResourceId = PolicyFragmentContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, id); + PolicyFragmentContractResource policyFragmentContract = client.GetPolicyFragmentContractResource(policyFragmentContractResourceId); + + // invoke the operation + PolicyFragmentContentFormat? format = PolicyFragmentContentFormat.Rawxml; + PolicyFragmentContractResource result = await policyFragmentContract.GetAsync(format: format); + + // 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 + PolicyFragmentContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ApiManagementCreatePolicy + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_ApiManagementCreatePolicy() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreatePolicyFragment.json + // this example is just showing the usage of "PolicyFragment_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 PolicyFragmentContractResource created on azure + // for more information of creating PolicyFragmentContractResource, please refer to the document of PolicyFragmentContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string id = "policyFragment1"; + ResourceIdentifier policyFragmentContractResourceId = PolicyFragmentContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, id); + PolicyFragmentContractResource policyFragmentContract = client.GetPolicyFragmentContractResource(policyFragmentContractResourceId); + + // invoke the operation + PolicyFragmentContractData data = new PolicyFragmentContractData() + { + Value = "", + Description = "A policy fragment example", + Format = PolicyFragmentContentFormat.Xml, + }; + ArmOperation lro = await policyFragmentContract.UpdateAsync(WaitUntil.Completed, data); + PolicyFragmentContractResource 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 + PolicyFragmentContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ApiManagementDeletePolicy + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_ApiManagementDeletePolicy() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeletePolicyFragment.json + // this example is just showing the usage of "PolicyFragment_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 PolicyFragmentContractResource created on azure + // for more information of creating PolicyFragmentContractResource, please refer to the document of PolicyFragmentContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string id = "policyFragment1"; + ResourceIdentifier policyFragmentContractResourceId = PolicyFragmentContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, id); + PolicyFragmentContractResource policyFragmentContract = client.GetPolicyFragmentContractResource(policyFragmentContractResourceId); + + // invoke the operation + ETag ifMatch = new ETag("*"); + await policyFragmentContract.DeleteAsync(WaitUntil.Completed, ifMatch); + + Console.WriteLine($"Succeeded"); + } + + // ApiManagementListPolicyFragmentReferences + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetReferences_ApiManagementListPolicyFragmentReferences() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListPolicyFragmentReferences.json + // this example is just showing the usage of "PolicyFragment_ListReferences" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this PolicyFragmentContractResource created on azure + // for more information of creating PolicyFragmentContractResource, please refer to the document of PolicyFragmentContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string id = "policyFragment1"; + ResourceIdentifier policyFragmentContractResourceId = PolicyFragmentContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, id); + PolicyFragmentContractResource policyFragmentContract = client.GetPolicyFragmentContractResource(policyFragmentContractResourceId); + + // invoke the operation and iterate over the result + await foreach (ResourceCollectionValueItem item in policyFragmentContract.GetReferencesAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_PortalConfigContractCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_PortalConfigContractCollection.cs new file mode 100644 index 0000000000000..52113570db639 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_PortalConfigContractCollection.cs @@ -0,0 +1,234 @@ +// 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.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement.Samples +{ + public partial class Sample_PortalConfigContractCollection + { + // ApiManagementListPortalConfig + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ApiManagementListPortalConfig() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListPortalConfig.json + // this example is just showing the usage of "PortalConfig_ListByService" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ApiManagementServiceResource created on azure + // for more information of creating ApiManagementServiceResource, please refer to the document of ApiManagementServiceResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + ResourceIdentifier apiManagementServiceResourceId = ApiManagementServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName); + ApiManagementServiceResource apiManagementService = client.GetApiManagementServiceResource(apiManagementServiceResourceId); + + // get the collection of this PortalConfigContractResource + PortalConfigContractCollection collection = apiManagementService.GetPortalConfigContracts(); + + // invoke the operation and iterate over the result + await foreach (PortalConfigContractResource 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 + PortalConfigContractData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // ApiManagementPortalConfig + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_ApiManagementPortalConfig() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementPortalConfig.json + // this example is just showing the usage of "PortalConfig_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 ApiManagementServiceResource created on azure + // for more information of creating ApiManagementServiceResource, please refer to the document of ApiManagementServiceResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + ResourceIdentifier apiManagementServiceResourceId = ApiManagementServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName); + ApiManagementServiceResource apiManagementService = client.GetApiManagementServiceResource(apiManagementServiceResourceId); + + // get the collection of this PortalConfigContractResource + PortalConfigContractCollection collection = apiManagementService.GetPortalConfigContracts(); + + // invoke the operation + string portalConfigId = "default"; + PortalConfigContractResource result = await collection.GetAsync(portalConfigId); + + // 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 + PortalConfigContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ApiManagementPortalConfig + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_ApiManagementPortalConfig() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementPortalConfig.json + // this example is just showing the usage of "PortalConfig_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 ApiManagementServiceResource created on azure + // for more information of creating ApiManagementServiceResource, please refer to the document of ApiManagementServiceResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + ResourceIdentifier apiManagementServiceResourceId = ApiManagementServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName); + ApiManagementServiceResource apiManagementService = client.GetApiManagementServiceResource(apiManagementServiceResourceId); + + // get the collection of this PortalConfigContractResource + PortalConfigContractCollection collection = apiManagementService.GetPortalConfigContracts(); + + // invoke the operation + string portalConfigId = "default"; + bool result = await collection.ExistsAsync(portalConfigId); + + Console.WriteLine($"Succeeded: {result}"); + } + + // ApiManagementPortalConfig + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_ApiManagementPortalConfig() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementPortalConfig.json + // this example is just showing the usage of "PortalConfig_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 ApiManagementServiceResource created on azure + // for more information of creating ApiManagementServiceResource, please refer to the document of ApiManagementServiceResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + ResourceIdentifier apiManagementServiceResourceId = ApiManagementServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName); + ApiManagementServiceResource apiManagementService = client.GetApiManagementServiceResource(apiManagementServiceResourceId); + + // get the collection of this PortalConfigContractResource + PortalConfigContractCollection collection = apiManagementService.GetPortalConfigContracts(); + + // invoke the operation + string portalConfigId = "default"; + NullableResponse response = await collection.GetIfExistsAsync(portalConfigId); + PortalConfigContractResource 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 + PortalConfigContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // ApiManagementCreatePortalConfig + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_ApiManagementCreatePortalConfig() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreatePortalConfig.json + // this example is just showing the usage of "PortalConfig_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 ApiManagementServiceResource created on azure + // for more information of creating ApiManagementServiceResource, please refer to the document of ApiManagementServiceResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + ResourceIdentifier apiManagementServiceResourceId = ApiManagementServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName); + ApiManagementServiceResource apiManagementService = client.GetApiManagementServiceResource(apiManagementServiceResourceId); + + // get the collection of this PortalConfigContractResource + PortalConfigContractCollection collection = apiManagementService.GetPortalConfigContracts(); + + // invoke the operation + string portalConfigId = "default"; + ETag ifMatch = new ETag("*"); + PortalConfigContractData data = new PortalConfigContractData() + { + EnableBasicAuth = true, + Require = false, + SignupTermsOfService = new PortalConfigTermsOfServiceProperties() + { + Text = "I agree to the service terms and conditions.", + RequireConsent = false, + }, + Delegation = new PortalConfigDelegationProperties() + { + DelegateRegistration = false, + DelegateSubscription = false, + DelegationUri = null, + ValidationKey = null, + }, + CorsAllowedOrigins = +{ +"https://contoso.com" +}, + Csp = new PortalConfigCspProperties() + { + Mode = PortalSettingsCspMode.ReportOnly, + ReportUri = +{ +new Uri("https://report.contoso.com") +}, + AllowedSources = +{ +"*.contoso.com" +}, + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, portalConfigId, ifMatch, data); + PortalConfigContractResource 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 + PortalConfigContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_PortalConfigContractResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_PortalConfigContractResource.cs new file mode 100644 index 0000000000000..c059c257368d3 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_PortalConfigContractResource.cs @@ -0,0 +1,144 @@ +// 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.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement.Samples +{ + public partial class Sample_PortalConfigContractResource + { + // ApiManagementHeadPortalConfig + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetEntityTag_ApiManagementHeadPortalConfig() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadPortalConfig.json + // this example is just showing the usage of "PortalConfig_GetEntityTag" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this PortalConfigContractResource created on azure + // for more information of creating PortalConfigContractResource, please refer to the document of PortalConfigContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string portalConfigId = "default"; + ResourceIdentifier portalConfigContractResourceId = PortalConfigContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, portalConfigId); + PortalConfigContractResource portalConfigContract = client.GetPortalConfigContractResource(portalConfigContractResourceId); + + // invoke the operation + bool result = await portalConfigContract.GetEntityTagAsync(); + + Console.WriteLine($"Succeeded: {result}"); + } + + // ApiManagementPortalConfig + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_ApiManagementPortalConfig() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementPortalConfig.json + // this example is just showing the usage of "PortalConfig_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 PortalConfigContractResource created on azure + // for more information of creating PortalConfigContractResource, please refer to the document of PortalConfigContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string portalConfigId = "default"; + ResourceIdentifier portalConfigContractResourceId = PortalConfigContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, portalConfigId); + PortalConfigContractResource portalConfigContract = client.GetPortalConfigContractResource(portalConfigContractResourceId); + + // invoke the operation + PortalConfigContractResource result = await portalConfigContract.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 + PortalConfigContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ApiManagementUpdatePortalConfig + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_ApiManagementUpdatePortalConfig() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdatePortalConfig.json + // this example is just showing the usage of "PortalConfig_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 PortalConfigContractResource created on azure + // for more information of creating PortalConfigContractResource, please refer to the document of PortalConfigContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string portalConfigId = "default"; + ResourceIdentifier portalConfigContractResourceId = PortalConfigContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, portalConfigId); + PortalConfigContractResource portalConfigContract = client.GetPortalConfigContractResource(portalConfigContractResourceId); + + // invoke the operation + ETag ifMatch = new ETag("*"); + PortalConfigContractData data = new PortalConfigContractData() + { + EnableBasicAuth = true, + Require = false, + SignupTermsOfService = new PortalConfigTermsOfServiceProperties() + { + Text = "I agree to the service terms and conditions.", + RequireConsent = false, + }, + Delegation = new PortalConfigDelegationProperties() + { + DelegateRegistration = false, + DelegateSubscription = false, + DelegationUri = null, + ValidationKey = null, + }, + CorsAllowedOrigins = +{ +"https://contoso.com" +}, + Csp = new PortalConfigCspProperties() + { + Mode = PortalSettingsCspMode.ReportOnly, + ReportUri = +{ +new Uri("https://report.contoso.com") +}, + AllowedSources = +{ +"*.contoso.com" +}, + }, + }; + PortalConfigContractResource result = await portalConfigContract.UpdateAsync(ifMatch, 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 + PortalConfigContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ResolverContractCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ResolverContractCollection.cs new file mode 100644 index 0000000000000..dc602ab11b78c --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ResolverContractCollection.cs @@ -0,0 +1,210 @@ +// 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.ApiManagement.Samples +{ + public partial class Sample_ResolverContractCollection + { + // ApiManagementListGraphQLApiResolvers + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ApiManagementListGraphQLApiResolvers() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListGraphQLApiResolvers.json + // this example is just showing the usage of "GraphQLApiResolver_ListByApi" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ApiResource created on azure + // for more information of creating ApiResource, please refer to the document of ApiResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string apiId = "57d2ef278aa04f0888cba3f3"; + ResourceIdentifier apiResourceId = ApiResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, apiId); + ApiResource api = client.GetApiResource(apiResourceId); + + // get the collection of this ResolverContractResource + ResolverContractCollection collection = api.GetResolverContracts(); + + // invoke the operation and iterate over the result + await foreach (ResolverContractResource 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 + ResolverContractData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // ApiManagementGetGraphQLApiResolver + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_ApiManagementGetGraphQLApiResolver() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGraphQLApiResolver.json + // this example is just showing the usage of "GraphQLApiResolver_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 ApiResource created on azure + // for more information of creating ApiResource, please refer to the document of ApiResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string apiId = "57d2ef278aa04f0888cba3f3"; + ResourceIdentifier apiResourceId = ApiResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, apiId); + ApiResource api = client.GetApiResource(apiResourceId); + + // get the collection of this ResolverContractResource + ResolverContractCollection collection = api.GetResolverContracts(); + + // invoke the operation + string resolverId = "57d2ef278aa04f0ad01d6cdc"; + ResolverContractResource result = await collection.GetAsync(resolverId); + + // 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 + ResolverContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ApiManagementGetGraphQLApiResolver + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_ApiManagementGetGraphQLApiResolver() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGraphQLApiResolver.json + // this example is just showing the usage of "GraphQLApiResolver_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 ApiResource created on azure + // for more information of creating ApiResource, please refer to the document of ApiResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string apiId = "57d2ef278aa04f0888cba3f3"; + ResourceIdentifier apiResourceId = ApiResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, apiId); + ApiResource api = client.GetApiResource(apiResourceId); + + // get the collection of this ResolverContractResource + ResolverContractCollection collection = api.GetResolverContracts(); + + // invoke the operation + string resolverId = "57d2ef278aa04f0ad01d6cdc"; + bool result = await collection.ExistsAsync(resolverId); + + Console.WriteLine($"Succeeded: {result}"); + } + + // ApiManagementGetGraphQLApiResolver + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_ApiManagementGetGraphQLApiResolver() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGraphQLApiResolver.json + // this example is just showing the usage of "GraphQLApiResolver_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 ApiResource created on azure + // for more information of creating ApiResource, please refer to the document of ApiResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string apiId = "57d2ef278aa04f0888cba3f3"; + ResourceIdentifier apiResourceId = ApiResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, apiId); + ApiResource api = client.GetApiResource(apiResourceId); + + // get the collection of this ResolverContractResource + ResolverContractCollection collection = api.GetResolverContracts(); + + // invoke the operation + string resolverId = "57d2ef278aa04f0ad01d6cdc"; + NullableResponse response = await collection.GetIfExistsAsync(resolverId); + ResolverContractResource 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 + ResolverContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // ApiManagementCreateGraphQLApiResolver + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_ApiManagementCreateGraphQLApiResolver() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateGraphQLApiResolver.json + // this example is just showing the usage of "GraphQLApiResolver_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 ApiResource created on azure + // for more information of creating ApiResource, please refer to the document of ApiResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string apiId = "someAPI"; + ResourceIdentifier apiResourceId = ApiResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, apiId); + ApiResource api = client.GetApiResource(apiResourceId); + + // get the collection of this ResolverContractResource + ResolverContractCollection collection = api.GetResolverContracts(); + + // invoke the operation + string resolverId = "newResolver"; + ResolverContractData data = new ResolverContractData() + { + DisplayName = "Query Users", + Path = "Query/users", + Description = "A GraphQL Resolver example", + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, resolverId, data); + ResolverContractResource 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 + ResolverContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ResolverContractResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ResolverContractResource.cs new file mode 100644 index 0000000000000..f4b2c4c51a800 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ResolverContractResource.cs @@ -0,0 +1,150 @@ +// 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.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement.Samples +{ + public partial class Sample_ResolverContractResource + { + // ApiManagementHeadGraphQLApiResolver + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetEntityTag_ApiManagementHeadGraphQLApiResolver() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadGraphQLApiResolver.json + // this example is just showing the usage of "GraphQLApiResolver_GetEntityTag" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResolverContractResource created on azure + // for more information of creating ResolverContractResource, please refer to the document of ResolverContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string apiId = "57d2ef278aa04f0888cba3f3"; + string resolverId = "57d2ef278aa04f0ad01d6cdc"; + ResourceIdentifier resolverContractResourceId = ResolverContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, apiId, resolverId); + ResolverContractResource resolverContract = client.GetResolverContractResource(resolverContractResourceId); + + // invoke the operation + bool result = await resolverContract.GetEntityTagAsync(); + + Console.WriteLine($"Succeeded: {result}"); + } + + // ApiManagementGetGraphQLApiResolver + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_ApiManagementGetGraphQLApiResolver() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGraphQLApiResolver.json + // this example is just showing the usage of "GraphQLApiResolver_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 ResolverContractResource created on azure + // for more information of creating ResolverContractResource, please refer to the document of ResolverContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string apiId = "57d2ef278aa04f0888cba3f3"; + string resolverId = "57d2ef278aa04f0ad01d6cdc"; + ResourceIdentifier resolverContractResourceId = ResolverContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, apiId, resolverId); + ResolverContractResource resolverContract = client.GetResolverContractResource(resolverContractResourceId); + + // invoke the operation + ResolverContractResource result = await resolverContract.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 + ResolverContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ApiManagementUpdateGraphQLApiResolver + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_ApiManagementUpdateGraphQLApiResolver() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateGraphQLApiResolver.json + // this example is just showing the usage of "GraphQLApiResolver_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 ResolverContractResource created on azure + // for more information of creating ResolverContractResource, please refer to the document of ResolverContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string apiId = "echo-api"; + string resolverId = "resolverId"; + ResourceIdentifier resolverContractResourceId = ResolverContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, apiId, resolverId); + ResolverContractResource resolverContract = client.GetResolverContractResource(resolverContractResourceId); + + // invoke the operation + ETag ifMatch = new ETag("*"); + ResolverContractPatch patch = new ResolverContractPatch() + { + DisplayName = "Query AdminUsers", + Path = "Query/adminUsers", + Description = "A GraphQL Resolver example", + }; + ResolverContractResource result = await resolverContract.UpdateAsync(ifMatch, 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 + ResolverContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ApiManagementDeleteGraphQLApiResolver + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_ApiManagementDeleteGraphQLApiResolver() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteGraphQLApiResolver.json + // this example is just showing the usage of "GraphQLApiResolver_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 ResolverContractResource created on azure + // for more information of creating ResolverContractResource, please refer to the document of ResolverContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string apiId = "57d2ef278aa04f0888cba3f3"; + string resolverId = "57d2ef278aa04f0ad01d6cdc"; + ResourceIdentifier resolverContractResourceId = ResolverContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, apiId, resolverId); + ResolverContractResource resolverContract = client.GetResolverContractResource(resolverContractResourceId); + + // invoke the operation + ETag ifMatch = new ETag("*"); + await resolverContract.DeleteAsync(WaitUntil.Completed, ifMatch); + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceApiResolverPolicyCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceApiResolverPolicyCollection.cs new file mode 100644 index 0000000000000..f01657d8fe38a --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceApiResolverPolicyCollection.cs @@ -0,0 +1,216 @@ +// 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.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement.Samples +{ + public partial class Sample_ServiceApiResolverPolicyCollection + { + // ApiManagementListGraphQLApiResolverPolicies + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ApiManagementListGraphQLApiResolverPolicies() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListGraphQLApiResolverPolicies.json + // this example is just showing the usage of "GraphQLApiResolverPolicy_ListByResolver" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResolverContractResource created on azure + // for more information of creating ResolverContractResource, please refer to the document of ResolverContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string apiId = "599e2953193c3c0bd0b3e2fa"; + string resolverId = "599e29ab193c3c0bd0b3e2fb"; + ResourceIdentifier resolverContractResourceId = ResolverContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, apiId, resolverId); + ResolverContractResource resolverContract = client.GetResolverContractResource(resolverContractResourceId); + + // get the collection of this ServiceApiResolverPolicyResource + ServiceApiResolverPolicyCollection collection = resolverContract.GetServiceApiResolverPolicies(); + + // invoke the operation and iterate over the result + await foreach (ServiceApiResolverPolicyResource 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 + PolicyContractData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // ApiManagementGetGraphQLApiResolverPolicy + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_ApiManagementGetGraphQLApiResolverPolicy() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGraphQLApiResolverPolicy.json + // this example is just showing the usage of "GraphQLApiResolverPolicy_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 ResolverContractResource created on azure + // for more information of creating ResolverContractResource, please refer to the document of ResolverContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string apiId = "5600b539c53f5b0062040001"; + string resolverId = "5600b53ac53f5b0062080006"; + ResourceIdentifier resolverContractResourceId = ResolverContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, apiId, resolverId); + ResolverContractResource resolverContract = client.GetResolverContractResource(resolverContractResourceId); + + // get the collection of this ServiceApiResolverPolicyResource + ServiceApiResolverPolicyCollection collection = resolverContract.GetServiceApiResolverPolicies(); + + // invoke the operation + PolicyName policyId = PolicyName.Policy; + ServiceApiResolverPolicyResource result = await collection.GetAsync(policyId); + + // 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 + PolicyContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ApiManagementGetGraphQLApiResolverPolicy + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_ApiManagementGetGraphQLApiResolverPolicy() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGraphQLApiResolverPolicy.json + // this example is just showing the usage of "GraphQLApiResolverPolicy_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 ResolverContractResource created on azure + // for more information of creating ResolverContractResource, please refer to the document of ResolverContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string apiId = "5600b539c53f5b0062040001"; + string resolverId = "5600b53ac53f5b0062080006"; + ResourceIdentifier resolverContractResourceId = ResolverContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, apiId, resolverId); + ResolverContractResource resolverContract = client.GetResolverContractResource(resolverContractResourceId); + + // get the collection of this ServiceApiResolverPolicyResource + ServiceApiResolverPolicyCollection collection = resolverContract.GetServiceApiResolverPolicies(); + + // invoke the operation + PolicyName policyId = PolicyName.Policy; + bool result = await collection.ExistsAsync(policyId); + + Console.WriteLine($"Succeeded: {result}"); + } + + // ApiManagementGetGraphQLApiResolverPolicy + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_ApiManagementGetGraphQLApiResolverPolicy() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGraphQLApiResolverPolicy.json + // this example is just showing the usage of "GraphQLApiResolverPolicy_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 ResolverContractResource created on azure + // for more information of creating ResolverContractResource, please refer to the document of ResolverContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string apiId = "5600b539c53f5b0062040001"; + string resolverId = "5600b53ac53f5b0062080006"; + ResourceIdentifier resolverContractResourceId = ResolverContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, apiId, resolverId); + ResolverContractResource resolverContract = client.GetResolverContractResource(resolverContractResourceId); + + // get the collection of this ServiceApiResolverPolicyResource + ServiceApiResolverPolicyCollection collection = resolverContract.GetServiceApiResolverPolicies(); + + // invoke the operation + PolicyName policyId = PolicyName.Policy; + NullableResponse response = await collection.GetIfExistsAsync(policyId); + ServiceApiResolverPolicyResource 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 + PolicyContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // ApiManagementCreateGraphQLApiResolverPolicy + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_ApiManagementCreateGraphQLApiResolverPolicy() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateGraphQLApiResolverPolicy.json + // this example is just showing the usage of "GraphQLApiResolverPolicy_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 ResolverContractResource created on azure + // for more information of creating ResolverContractResource, please refer to the document of ResolverContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string apiId = "5600b57e7e8880006a040001"; + string resolverId = "5600b57e7e8880006a080001"; + ResourceIdentifier resolverContractResourceId = ResolverContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, apiId, resolverId); + ResolverContractResource resolverContract = client.GetResolverContractResource(resolverContractResourceId); + + // get the collection of this ServiceApiResolverPolicyResource + ServiceApiResolverPolicyCollection collection = resolverContract.GetServiceApiResolverPolicies(); + + // invoke the operation + PolicyName policyId = PolicyName.Policy; + PolicyContractData data = new PolicyContractData() + { + Value = "GET/api/users", + Format = PolicyContentFormat.Xml, + }; + ETag? ifMatch = new ETag("*"); + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, policyId, data, ifMatch: ifMatch); + ServiceApiResolverPolicyResource 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 + PolicyContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceApiResolverPolicyResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceApiResolverPolicyResource.cs new file mode 100644 index 0000000000000..c6b898780ea07 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceApiResolverPolicyResource.cs @@ -0,0 +1,154 @@ +// 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.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement.Samples +{ + public partial class Sample_ServiceApiResolverPolicyResource + { + // ApiManagementHeadGraphQLApiResolverPolicy + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetEntityTag_ApiManagementHeadGraphQLApiResolverPolicy() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadGraphQLApiResolverPolicy.json + // this example is just showing the usage of "GraphQLApiResolverPolicy_GetEntityTag" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ServiceApiResolverPolicyResource created on azure + // for more information of creating ServiceApiResolverPolicyResource, please refer to the document of ServiceApiResolverPolicyResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string apiId = "5600b539c53f5b0062040001"; + string resolverId = "5600b53ac53f5b0062080006"; + PolicyName policyId = PolicyName.Policy; + ResourceIdentifier serviceApiResolverPolicyResourceId = ServiceApiResolverPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, apiId, resolverId, policyId); + ServiceApiResolverPolicyResource serviceApiResolverPolicy = client.GetServiceApiResolverPolicyResource(serviceApiResolverPolicyResourceId); + + // invoke the operation + bool result = await serviceApiResolverPolicy.GetEntityTagAsync(); + + Console.WriteLine($"Succeeded: {result}"); + } + + // ApiManagementGetGraphQLApiResolverPolicy + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_ApiManagementGetGraphQLApiResolverPolicy() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGraphQLApiResolverPolicy.json + // this example is just showing the usage of "GraphQLApiResolverPolicy_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 ServiceApiResolverPolicyResource created on azure + // for more information of creating ServiceApiResolverPolicyResource, please refer to the document of ServiceApiResolverPolicyResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string apiId = "5600b539c53f5b0062040001"; + string resolverId = "5600b53ac53f5b0062080006"; + PolicyName policyId = PolicyName.Policy; + ResourceIdentifier serviceApiResolverPolicyResourceId = ServiceApiResolverPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, apiId, resolverId, policyId); + ServiceApiResolverPolicyResource serviceApiResolverPolicy = client.GetServiceApiResolverPolicyResource(serviceApiResolverPolicyResourceId); + + // invoke the operation + ServiceApiResolverPolicyResource result = await serviceApiResolverPolicy.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 + PolicyContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ApiManagementCreateGraphQLApiResolverPolicy + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_ApiManagementCreateGraphQLApiResolverPolicy() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateGraphQLApiResolverPolicy.json + // this example is just showing the usage of "GraphQLApiResolverPolicy_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 ServiceApiResolverPolicyResource created on azure + // for more information of creating ServiceApiResolverPolicyResource, please refer to the document of ServiceApiResolverPolicyResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string apiId = "5600b57e7e8880006a040001"; + string resolverId = "5600b57e7e8880006a080001"; + PolicyName policyId = PolicyName.Policy; + ResourceIdentifier serviceApiResolverPolicyResourceId = ServiceApiResolverPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, apiId, resolverId, policyId); + ServiceApiResolverPolicyResource serviceApiResolverPolicy = client.GetServiceApiResolverPolicyResource(serviceApiResolverPolicyResourceId); + + // invoke the operation + PolicyContractData data = new PolicyContractData() + { + Value = "GET/api/users", + Format = PolicyContentFormat.Xml, + }; + ETag? ifMatch = new ETag("*"); + ArmOperation lro = await serviceApiResolverPolicy.UpdateAsync(WaitUntil.Completed, data, ifMatch: ifMatch); + ServiceApiResolverPolicyResource 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 + PolicyContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ApiManagementDeleteGraphQLApiResolverPolicy + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_ApiManagementDeleteGraphQLApiResolverPolicy() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteGraphQLApiResolverPolicy.json + // this example is just showing the usage of "GraphQLApiResolverPolicy_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 ServiceApiResolverPolicyResource created on azure + // for more information of creating ServiceApiResolverPolicyResource, please refer to the document of ServiceApiResolverPolicyResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string apiId = "testapi"; + string resolverId = "testResolver"; + PolicyName policyId = PolicyName.Policy; + ResourceIdentifier serviceApiResolverPolicyResourceId = ServiceApiResolverPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, apiId, resolverId, policyId); + ServiceApiResolverPolicyResource serviceApiResolverPolicy = client.GetServiceApiResolverPolicyResource(serviceApiResolverPolicyResourceId); + + // invoke the operation + ETag ifMatch = new ETag("*"); + await serviceApiResolverPolicy.DeleteAsync(WaitUntil.Completed, ifMatch); + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceApiWikiResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceApiWikiResource.cs new file mode 100644 index 0000000000000..2ca964c844420 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceApiWikiResource.cs @@ -0,0 +1,196 @@ +// 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.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement.Samples +{ + public partial class Sample_ServiceApiWikiResource + { + // ApiManagementHeadApiWiki + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetEntityTag_ApiManagementHeadApiWiki() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiWiki.json + // this example is just showing the usage of "ApiWiki_GetEntityTag" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ServiceApiWikiResource created on azure + // for more information of creating ServiceApiWikiResource, please refer to the document of ServiceApiWikiResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string apiId = "57d1f7558aa04f15146d9d8a"; + ResourceIdentifier serviceApiWikiResourceId = ServiceApiWikiResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, apiId); + ServiceApiWikiResource serviceApiWiki = client.GetServiceApiWikiResource(serviceApiWikiResourceId); + + // invoke the operation + bool result = await serviceApiWiki.GetEntityTagAsync(); + + Console.WriteLine($"Succeeded: {result}"); + } + + // ApiManagementGetApiWiki + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_ApiManagementGetApiWiki() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiWiki.json + // this example is just showing the usage of "ApiWiki_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 ServiceApiWikiResource created on azure + // for more information of creating ServiceApiWikiResource, please refer to the document of ServiceApiWikiResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string apiId = "57d1f7558aa04f15146d9d8a"; + ResourceIdentifier serviceApiWikiResourceId = ServiceApiWikiResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, apiId); + ServiceApiWikiResource serviceApiWiki = client.GetServiceApiWikiResource(serviceApiWikiResourceId); + + // invoke the operation + ServiceApiWikiResource result = await serviceApiWiki.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 + WikiContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ApiManagementCreateApiWiki + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_ApiManagementCreateApiWiki() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiWiki.json + // this example is just showing the usage of "ApiWiki_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 ServiceApiWikiResource created on azure + // for more information of creating ServiceApiWikiResource, please refer to the document of ServiceApiWikiResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string apiId = "57d1f7558aa04f15146d9d8a"; + ResourceIdentifier serviceApiWikiResourceId = ServiceApiWikiResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, apiId); + ServiceApiWikiResource serviceApiWiki = client.GetServiceApiWikiResource(serviceApiWikiResourceId); + + // invoke the operation + WikiContractData data = new WikiContractData() + { + Documents = +{ +new WikiDocumentationContract() +{ +DocumentationId = "docId1", +},new WikiDocumentationContract() +{ +DocumentationId = "docId2", +} +}, + }; + ArmOperation lro = await serviceApiWiki.CreateOrUpdateAsync(WaitUntil.Completed, data); + ServiceApiWikiResource 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 + WikiContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ApiManagementUpdateApiWiki + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_ApiManagementUpdateApiWiki() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateApiWiki.json + // this example is just showing the usage of "ApiWiki_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 ServiceApiWikiResource created on azure + // for more information of creating ServiceApiWikiResource, please refer to the document of ServiceApiWikiResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string apiId = "57d1f7558aa04f15146d9d8a"; + ResourceIdentifier serviceApiWikiResourceId = ServiceApiWikiResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, apiId); + ServiceApiWikiResource serviceApiWiki = client.GetServiceApiWikiResource(serviceApiWikiResourceId); + + // invoke the operation + ETag ifMatch = new ETag("*"); + WikiUpdateContract wikiUpdateContract = new WikiUpdateContract() + { + Documents = +{ +new WikiDocumentationContract() +{ +DocumentationId = "docId1", +} +}, + }; + ServiceApiWikiResource result = await serviceApiWiki.UpdateAsync(ifMatch, wikiUpdateContract); + + // 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 + WikiContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ApiManagementDeleteApiWiki + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_ApiManagementDeleteApiWiki() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiWiki.json + // this example is just showing the usage of "ApiWiki_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 ServiceApiWikiResource created on azure + // for more information of creating ServiceApiWikiResource, please refer to the document of ServiceApiWikiResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string apiId = "57d1f7558aa04f15146d9d8a"; + ResourceIdentifier serviceApiWikiResourceId = ServiceApiWikiResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, apiId); + ServiceApiWikiResource serviceApiWiki = client.GetServiceApiWikiResource(serviceApiWikiResourceId); + + // invoke the operation + ETag ifMatch = new ETag("*"); + await serviceApiWiki.DeleteAsync(WaitUntil.Completed, ifMatch); + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceProductWikiResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceProductWikiResource.cs new file mode 100644 index 0000000000000..039d90cabccf0 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceProductWikiResource.cs @@ -0,0 +1,196 @@ +// 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.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement.Samples +{ + public partial class Sample_ServiceProductWikiResource + { + // ApiManagementHeadProductWiki + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetEntityTag_ApiManagementHeadProductWiki() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadProductWiki.json + // this example is just showing the usage of "ProductWiki_GetEntityTag" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ServiceProductWikiResource created on azure + // for more information of creating ServiceProductWikiResource, please refer to the document of ServiceProductWikiResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string productId = "57d1f7558aa04f15146d9d8a"; + ResourceIdentifier serviceProductWikiResourceId = ServiceProductWikiResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, productId); + ServiceProductWikiResource serviceProductWiki = client.GetServiceProductWikiResource(serviceProductWikiResourceId); + + // invoke the operation + bool result = await serviceProductWiki.GetEntityTagAsync(); + + Console.WriteLine($"Succeeded: {result}"); + } + + // ApiManagementGetProductWiki + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_ApiManagementGetProductWiki() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetProductWiki.json + // this example is just showing the usage of "ProductWiki_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 ServiceProductWikiResource created on azure + // for more information of creating ServiceProductWikiResource, please refer to the document of ServiceProductWikiResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string productId = "57d1f7558aa04f15146d9d8a"; + ResourceIdentifier serviceProductWikiResourceId = ServiceProductWikiResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, productId); + ServiceProductWikiResource serviceProductWiki = client.GetServiceProductWikiResource(serviceProductWikiResourceId); + + // invoke the operation + ServiceProductWikiResource result = await serviceProductWiki.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 + WikiContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ApiManagementCreateProductWiki + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_ApiManagementCreateProductWiki() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateProductWiki.json + // this example is just showing the usage of "ProductWiki_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 ServiceProductWikiResource created on azure + // for more information of creating ServiceProductWikiResource, please refer to the document of ServiceProductWikiResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string productId = "57d1f7558aa04f15146d9d8a"; + ResourceIdentifier serviceProductWikiResourceId = ServiceProductWikiResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, productId); + ServiceProductWikiResource serviceProductWiki = client.GetServiceProductWikiResource(serviceProductWikiResourceId); + + // invoke the operation + WikiContractData data = new WikiContractData() + { + Documents = +{ +new WikiDocumentationContract() +{ +DocumentationId = "docId1", +},new WikiDocumentationContract() +{ +DocumentationId = "docId2", +} +}, + }; + ArmOperation lro = await serviceProductWiki.CreateOrUpdateAsync(WaitUntil.Completed, data); + ServiceProductWikiResource 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 + WikiContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ApiManagementUpdateProductWiki + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_ApiManagementUpdateProductWiki() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateProductWiki.json + // this example is just showing the usage of "ProductWiki_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 ServiceProductWikiResource created on azure + // for more information of creating ServiceProductWikiResource, please refer to the document of ServiceProductWikiResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string productId = "57d1f7558aa04f15146d9d8a"; + ResourceIdentifier serviceProductWikiResourceId = ServiceProductWikiResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, productId); + ServiceProductWikiResource serviceProductWiki = client.GetServiceProductWikiResource(serviceProductWikiResourceId); + + // invoke the operation + ETag ifMatch = new ETag("*"); + WikiUpdateContract wikiUpdateContract = new WikiUpdateContract() + { + Documents = +{ +new WikiDocumentationContract() +{ +DocumentationId = "docId1", +} +}, + }; + ServiceProductWikiResource result = await serviceProductWiki.UpdateAsync(ifMatch, wikiUpdateContract); + + // 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 + WikiContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ApiManagementDeleteProductWiki + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_ApiManagementDeleteProductWiki() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteProductWiki.json + // this example is just showing the usage of "ProductWiki_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 ServiceProductWikiResource created on azure + // for more information of creating ServiceProductWikiResource, please refer to the document of ServiceProductWikiResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string productId = "57d1f7558aa04f15146d9d8a"; + ResourceIdentifier serviceProductWikiResourceId = ServiceProductWikiResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, productId); + ServiceProductWikiResource serviceProductWiki = client.GetServiceProductWikiResource(serviceProductWikiResourceId); + + // invoke the operation + ETag ifMatch = new ETag("*"); + await serviceProductWiki.DeleteAsync(WaitUntil.Completed, ifMatch); + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs index 730994cb4e207..bd85cbcb6bc63 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -21,7 +21,7 @@ public partial class Sample_SubscriptionResourceExtensions [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetApiManagementSkus_ListsAllAvailableResourceSKUs() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListSku.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListSku.json // this example is just showing the usage of "ApiManagementSkus_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 diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_TenantAccessInfoCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_TenantAccessInfoCollection.cs index 728eee6775110..f0691b8764942 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_TenantAccessInfoCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_TenantAccessInfoCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_TenantAccessInfoCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListTenantAccess() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListTenantAccess.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListTenantAccess.json // this example is just showing the usage of "TenantAccess_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListTenantAccess() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetTenantAccess() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetTenantAccess.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetTenantAccess.json // this example is just showing the usage of "TenantAccess_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 @@ -92,7 +92,7 @@ public async Task Get_ApiManagementGetTenantAccess() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetTenantAccess() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetTenantAccess.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetTenantAccess.json // this example is just showing the usage of "TenantAccess_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 @@ -123,7 +123,7 @@ public async Task Exists_ApiManagementGetTenantAccess() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetTenantAccess() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetTenantAccess.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetTenantAccess.json // this example is just showing the usage of "TenantAccess_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 @@ -166,7 +166,7 @@ public async Task GetIfExists_ApiManagementGetTenantAccess() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetTenantGitAccess() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetTenantGitAccess.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetTenantGitAccess.json // this example is just showing the usage of "TenantAccess_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 @@ -201,7 +201,7 @@ public async Task Get_ApiManagementGetTenantGitAccess() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetTenantGitAccess() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetTenantGitAccess.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetTenantGitAccess.json // this example is just showing the usage of "TenantAccess_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 @@ -232,7 +232,7 @@ public async Task Exists_ApiManagementGetTenantGitAccess() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetTenantGitAccess() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetTenantGitAccess.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetTenantGitAccess.json // this example is just showing the usage of "TenantAccess_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 @@ -275,7 +275,7 @@ public async Task GetIfExists_ApiManagementGetTenantGitAccess() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateTenantAccess() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateTenantAccess.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateTenantAccess.json // this example is just showing the usage of "TenantAccess_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_TenantAccessInfoResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_TenantAccessInfoResource.cs index 684d81b7cccfe..f7a5631329c24 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_TenantAccessInfoResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_TenantAccessInfoResource.cs @@ -20,7 +20,7 @@ public partial class Sample_TenantAccessInfoResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityTag_ApiManagementHeadTenantAccess() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadTenantAccess.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadTenantAccess.json // this example is just showing the usage of "TenantAccess_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task GetEntityTag_ApiManagementHeadTenantAccess() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetTenantAccess() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetTenantAccess.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetTenantAccess.json // this example is just showing the usage of "TenantAccess_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 @@ -80,7 +80,7 @@ public async Task Get_ApiManagementGetTenantAccess() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetTenantGitAccess() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetTenantGitAccess.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetTenantGitAccess.json // this example is just showing the usage of "TenantAccess_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 @@ -112,7 +112,7 @@ public async Task Get_ApiManagementGetTenantGitAccess() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementUpdateTenantAccess() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdateTenantAccess.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateTenantAccess.json // this example is just showing the usage of "TenantAccess_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 @@ -149,7 +149,7 @@ public async Task Update_ApiManagementUpdateTenantAccess() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task RegeneratePrimaryKey_ApiManagementTenantAccessRegenerateKey() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementTenantAccessRegenerateKey.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementTenantAccessRegenerateKey.json // this example is just showing the usage of "TenantAccess_RegeneratePrimaryKey" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -177,7 +177,7 @@ public async Task RegeneratePrimaryKey_ApiManagementTenantAccessRegenerateKey() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task RegenerateSecondaryKey_ApiManagementTenantAccessRegenerateKey() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementTenantAccessRegenerateKey.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementTenantAccessRegenerateKey.json // this example is just showing the usage of "TenantAccess_RegenerateSecondaryKey" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -205,7 +205,7 @@ public async Task RegenerateSecondaryKey_ApiManagementTenantAccessRegenerateKey( [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetSecrets_ApiManagementListSecretsTenantAccess() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListSecretsTenantAccess.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListSecretsTenantAccess.json // this example is just showing the usage of "TenantAccess_ListSecrets" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -233,7 +233,7 @@ public async Task GetSecrets_ApiManagementListSecretsTenantAccess() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task RegeneratePrimaryKeyForGit_ApiManagementTenantAccessRegenerateKey() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementTenantAccessRegenerateKey.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementTenantAccessRegenerateKey.json // this example is just showing the usage of "TenantAccessGit_RegeneratePrimaryKey" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -261,7 +261,7 @@ public async Task RegeneratePrimaryKeyForGit_ApiManagementTenantAccessRegenerate [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task RegenerateSecondaryKeyForGit_ApiManagementTenantAccessRegenerateKey() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementTenantAccessRegenerateKey.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementTenantAccessRegenerateKey.json // this example is just showing the usage of "TenantAccessGit_RegenerateSecondaryKey" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/apimanagement/Azure.ResourceManager.ApiManagement/src/Azure.ResourceManager.ApiManagement.csproj b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Azure.ResourceManager.ApiManagement.csproj index 2a056867d2f76..5cd6a5bff7482 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Azure.ResourceManager.ApiManagement.csproj +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Azure.ResourceManager.ApiManagement.csproj @@ -1,6 +1,6 @@ - 1.2.0-beta.2 + 1.2.0 1.1.0 Azure.ResourceManager.ApiManagement diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiCollection.cs index 7249b94240b51..fe130f130c2c9 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> CreateOrUpdateAsync(WaitUnt /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -165,7 +165,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, str /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task> GetAsync(string apiId, Cancella /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -255,7 +255,7 @@ public virtual Response Get(string apiId, CancellationToken cancell /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -290,7 +290,7 @@ public virtual AsyncPageable GetAllAsync(string filter = null, int? /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -325,7 +325,7 @@ public virtual Pageable GetAll(string filter = null, int? top = nul /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -368,7 +368,7 @@ public virtual async Task> ExistsAsync(string apiId, Cancellation /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -411,7 +411,7 @@ public virtual Response Exists(string apiId, CancellationToken cancellatio /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -456,7 +456,7 @@ public virtual async Task> GetIfExistsAsync(string /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiData.Serialization.cs index 9ef8aaf777656..02293b2363468 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiData.Serialization.cs @@ -8,6 +8,8 @@ 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.ApiManagement.Models; @@ -457,6 +459,475 @@ internal static ApiData DeserializeApiData(JsonElement element, ModelReaderWrite 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(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}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AuthenticationSettings), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" authenticationSettings: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AuthenticationSettings)) + { + builder.Append(" authenticationSettings: "); + BicepSerializationHelpers.AppendChildObject(builder, AuthenticationSettings, options, 4, false, " authenticationSettings: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SubscriptionKeyParameterNames), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" subscriptionKeyParameterNames: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SubscriptionKeyParameterNames)) + { + builder.Append(" subscriptionKeyParameterNames: "); + BicepSerializationHelpers.AppendChildObject(builder, SubscriptionKeyParameterNames, options, 4, false, " subscriptionKeyParameterNames: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" type: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiType)) + { + builder.Append(" type: "); + builder.AppendLine($"'{ApiType.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiRevision), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiRevision: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiRevision)) + { + builder.Append(" apiRevision: "); + if (ApiRevision.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ApiRevision}'''"); + } + else + { + builder.AppendLine($"'{ApiRevision}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiVersion), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiVersion: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiVersion)) + { + builder.Append(" apiVersion: "); + if (ApiVersion.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ApiVersion}'''"); + } + else + { + builder.AppendLine($"'{ApiVersion}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsCurrent), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" isCurrent: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsCurrent)) + { + builder.Append(" isCurrent: "); + var boolValue = IsCurrent.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsOnline), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" isOnline: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsOnline)) + { + builder.Append(" isOnline: "); + var boolValue = IsOnline.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiRevisionDescription), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiRevisionDescription: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiRevisionDescription)) + { + builder.Append(" apiRevisionDescription: "); + if (ApiRevisionDescription.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ApiRevisionDescription}'''"); + } + else + { + builder.AppendLine($"'{ApiRevisionDescription}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiVersionDescription), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiVersionDescription: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiVersionDescription)) + { + builder.Append(" apiVersionDescription: "); + if (ApiVersionDescription.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ApiVersionDescription}'''"); + } + else + { + builder.AppendLine($"'{ApiVersionDescription}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiVersionSetId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiVersionSetId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiVersionSetId)) + { + builder.Append(" apiVersionSetId: "); + builder.AppendLine($"'{ApiVersionSetId.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsSubscriptionRequired), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" subscriptionRequired: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsSubscriptionRequired)) + { + builder.Append(" subscriptionRequired: "); + var boolValue = IsSubscriptionRequired.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TermsOfServiceLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" termsOfServiceUrl: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TermsOfServiceLink)) + { + builder.Append(" termsOfServiceUrl: "); + if (TermsOfServiceLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{TermsOfServiceLink}'''"); + } + else + { + builder.AppendLine($"'{TermsOfServiceLink}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Contact), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" contact: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Contact)) + { + builder.Append(" contact: "); + BicepSerializationHelpers.AppendChildObject(builder, Contact, options, 4, false, " contact: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(License), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" license: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(License)) + { + builder.Append(" license: "); + BicepSerializationHelpers.AppendChildObject(builder, License, options, 4, false, " license: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SourceApiId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" sourceApiId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SourceApiId)) + { + builder.Append(" sourceApiId: "); + builder.AppendLine($"'{SourceApiId.ToString()}'"); + } + } + + 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(ServiceLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" serviceUrl: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ServiceLink)) + { + builder.Append(" serviceUrl: "); + if (ServiceLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ServiceLink}'''"); + } + else + { + builder.AppendLine($"'{ServiceLink}'"); + } + } + } + + 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(Protocols), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" protocols: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Protocols)) + { + if (Protocols.Any()) + { + builder.Append(" protocols: "); + builder.AppendLine("["); + foreach (var item in Protocols) + { + builder.AppendLine($" '{item.ToString()}'"); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiVersionSet), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiVersionSet: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiVersionSet)) + { + builder.Append(" apiVersionSet: "); + BicepSerializationHelpers.AppendChildObject(builder, ApiVersionSet, options, 4, false, " apiVersionSet: "); + } + } + + 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; @@ -465,6 +936,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiData.cs index 55bd712e80bdc..0b6aa43672b7a 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiData.cs @@ -111,46 +111,67 @@ internal ApiData(ResourceIdentifier id, string name, ResourceType resourceType, } /// Description of the API. May include HTML formatting tags. + [WirePath("properties.description")] public string Description { get; set; } /// Collection of authentication settings included into this API. + [WirePath("properties.authenticationSettings")] public AuthenticationSettingsContract AuthenticationSettings { get; set; } /// Protocols over which API is made available. + [WirePath("properties.subscriptionKeyParameterNames")] public SubscriptionKeyParameterNamesContract SubscriptionKeyParameterNames { get; set; } /// Type of API. + [WirePath("properties.type")] public ApiType? ApiType { get; set; } /// Describes the revision of the API. If no value is provided, default revision 1 is created. + [WirePath("properties.apiRevision")] public string ApiRevision { get; set; } /// Indicates the version identifier of the API if the API is versioned. + [WirePath("properties.apiVersion")] public string ApiVersion { get; set; } /// Indicates if API revision is current api revision. + [WirePath("properties.isCurrent")] public bool? IsCurrent { get; set; } /// Indicates if API revision is accessible via the gateway. + [WirePath("properties.isOnline")] public bool? IsOnline { get; } /// Description of the API Revision. + [WirePath("properties.apiRevisionDescription")] public string ApiRevisionDescription { get; set; } /// Description of the API Version. + [WirePath("properties.apiVersionDescription")] public string ApiVersionDescription { get; set; } /// A resource identifier for the related ApiVersionSet. + [WirePath("properties.apiVersionSetId")] public ResourceIdentifier ApiVersionSetId { get; set; } /// Specifies whether an API or Product subscription is required for accessing the API. + [WirePath("properties.subscriptionRequired")] public bool? IsSubscriptionRequired { get; set; } /// A URL to the Terms of Service for the API. MUST be in the format of a URL. + [WirePath("properties.termsOfServiceUrl")] public string TermsOfServiceLink { get; set; } /// Contact information for the API. + [WirePath("properties.contact")] public ApiContactInformation Contact { get; set; } /// License information for the API. + [WirePath("properties.license")] public ApiLicenseInformation License { get; set; } /// API identifier of the source API. + [WirePath("properties.sourceApiId")] public ResourceIdentifier SourceApiId { get; set; } /// API name. Must be 1 to 300 characters long. + [WirePath("properties.displayName")] public string DisplayName { get; set; } /// Absolute URL of the backend service implementing this API. Cannot be more than 2000 characters long. + [WirePath("properties.serviceUrl")] public string ServiceLink { get; set; } /// Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API. + [WirePath("properties.path")] public string Path { get; set; } /// Describes on which protocols the operations in this API can be invoked. + [WirePath("properties.protocols")] public IList Protocols { get; } /// Version set details. + [WirePath("properties.apiVersionSet")] public ApiVersionSetContractDetails ApiVersionSet { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiDiagnosticCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiDiagnosticCollection.cs index 9535c957b7546..13557973d5ae3 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiDiagnosticCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiDiagnosticCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> CreateOrUpdateAsy /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -168,7 +168,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wait /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task> GetAsync(string diagn /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -258,7 +258,7 @@ public virtual Response Get(string diagnosticId, Cancella /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -291,7 +291,7 @@ public virtual AsyncPageable GetAllAsync(string filter = /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -324,7 +324,7 @@ public virtual Pageable GetAll(string filter = null, int? /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -367,7 +367,7 @@ public virtual async Task> ExistsAsync(string diagnosticId, Cance /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -410,7 +410,7 @@ public virtual Response Exists(string diagnosticId, CancellationToken canc /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -455,7 +455,7 @@ public virtual async Task> GetIfExistsAs /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiDiagnosticResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiDiagnosticResource.cs index 4dda4f6e17f5c..5ccd9560f57a3 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiDiagnosticResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiDiagnosticResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Cancellation /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken cancellatio /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -272,7 +272,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual async Task> UpdateAsync(ETag ifMa /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -358,7 +358,7 @@ public virtual Response Update(ETag ifMatch, DiagnosticCo /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -396,7 +396,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueAttachmentCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueAttachmentCollection.cs index 1c64e8651852a..9a7664a84a3e7 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueAttachmentCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueAttachmentCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> CreateOrUpda /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -168,7 +168,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -258,7 +258,7 @@ public virtual Response Get(string attachmentId, Can /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -291,7 +291,7 @@ public virtual AsyncPageable GetAllAsync(string filt /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -324,7 +324,7 @@ public virtual Pageable GetAll(string filter = null, /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -367,7 +367,7 @@ public virtual async Task> ExistsAsync(string attachmentId, Cance /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -410,7 +410,7 @@ public virtual Response Exists(string attachmentId, CancellationToken canc /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -455,7 +455,7 @@ public virtual async Task> GetIfExi /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueAttachmentData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueAttachmentData.Serialization.cs index 9f36e7945caf8..95691dbff2e0a 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueAttachmentData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueAttachmentData.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Models; @@ -182,6 +183,146 @@ internal static ApiIssueAttachmentData DeserializeApiIssueAttachmentData(JsonEle 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(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(ContentFormat), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" contentFormat: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ContentFormat)) + { + builder.Append(" contentFormat: "); + if (ContentFormat.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ContentFormat}'''"); + } + else + { + builder.AppendLine($"'{ContentFormat}'"); + } + } + } + + 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(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -190,6 +331,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOpti { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiIssueAttachmentData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueAttachmentData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueAttachmentData.cs index d62c5d670d4eb..dc16beb043661 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueAttachmentData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueAttachmentData.cs @@ -73,10 +73,13 @@ internal ApiIssueAttachmentData(ResourceIdentifier id, string name, ResourceType } /// Filename by which the binary data will be saved. + [WirePath("properties.title")] public string Title { get; set; } /// Either 'link' if content is provided via an HTTP link or the MIME type of the Base64-encoded binary data provided in the 'content' property. + [WirePath("properties.contentFormat")] public string ContentFormat { get; set; } /// An HTTP link or Base64-encoded binary data. + [WirePath("properties.content")] public string Content { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueAttachmentResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueAttachmentResource.cs index 683f9456a5b65..bb2419002a74d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueAttachmentResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueAttachmentResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Cancell /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken cancel /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -228,7 +228,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -273,7 +273,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -322,7 +322,7 @@ public virtual async Task> UpdateAsync( /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -371,7 +371,7 @@ public virtual ArmOperation Update(WaitUntil waitUnt /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -409,7 +409,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueCollection.cs index e230c1b06f14d..8101cb6c9df67 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> CreateOrUpdateAsync(Wa /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -168,7 +168,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual async Task> GetAsync(string issueId, b /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -260,7 +260,7 @@ public virtual Response Get(string issueId, bool? expandCommen /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -294,7 +294,7 @@ public virtual AsyncPageable GetAllAsync(string filter = null, /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -328,7 +328,7 @@ public virtual Pageable GetAll(string filter = null, bool? exp /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -372,7 +372,7 @@ public virtual async Task> ExistsAsync(string issueId, bool? expa /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -416,7 +416,7 @@ public virtual Response Exists(string issueId, bool? expandCommentsAttachm /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -462,7 +462,7 @@ public virtual async Task> GetIfExistsAsync(s /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueCommentCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueCommentCollection.cs index 15b50c3582711..301e65b1561f4 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueCommentCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueCommentCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> CreateOrUpdateA /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -168,7 +168,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wa /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task> GetAsync(string com /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -258,7 +258,7 @@ public virtual Response Get(string commentId, Cancellat /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -291,7 +291,7 @@ public virtual AsyncPageable GetAllAsync(string filter /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -324,7 +324,7 @@ public virtual Pageable GetAll(string filter = null, in /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -367,7 +367,7 @@ public virtual async Task> ExistsAsync(string commentId, Cancella /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -410,7 +410,7 @@ public virtual Response Exists(string commentId, CancellationToken cancell /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -455,7 +455,7 @@ public virtual async Task> GetIfExists /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueCommentData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueCommentData.Serialization.cs index d706bb7bda86e..1030c62748777 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueCommentData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueCommentData.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Models; @@ -190,6 +191,131 @@ internal static ApiIssueCommentData DeserializeApiIssueCommentData(JsonElement e 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(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(CreatedOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" createdDate: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CreatedOn)) + { + builder.Append(" createdDate: "); + var formattedDateTimeString = TypeFormatters.ToString(CreatedOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(UserId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" userId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(UserId)) + { + builder.Append(" userId: "); + builder.AppendLine($"'{UserId.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; @@ -198,6 +324,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiIssueCommentData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueCommentData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueCommentData.cs index 2054621d145e1..97425fad40d12 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueCommentData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueCommentData.cs @@ -73,10 +73,13 @@ internal ApiIssueCommentData(ResourceIdentifier id, string name, ResourceType re } /// Comment text. + [WirePath("properties.text")] public string Text { get; set; } /// Date and time when the comment was created. + [WirePath("properties.createdDate")] public DateTimeOffset? CreatedOn { get; set; } /// A resource identifier for the user who left the comment. + [WirePath("properties.userId")] public ResourceIdentifier UserId { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueCommentResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueCommentResource.cs index 697f314f2ea11..0717c62140045 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueCommentResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueCommentResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken cancellat /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -228,7 +228,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -273,7 +273,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -322,7 +322,7 @@ public virtual async Task> UpdateAsync(Wai /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -371,7 +371,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -409,7 +409,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueResource.cs index 0eea7a4f2c0a6..01aeaf15b3c58 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueResource.cs @@ -110,7 +110,7 @@ public virtual ApiIssueCommentCollection GetApiIssueComments() /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetApiIssueCommentA /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -179,7 +179,7 @@ public virtual ApiIssueAttachmentCollection GetApiIssueAttachments() /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task> GetApiIssueAttac /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -241,7 +241,7 @@ public virtual Response GetApiIssueAttachment(string /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual async Task> GetAsync(bool? expandComme /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -323,7 +323,7 @@ public virtual Response Get(bool? expandCommentsAttachments = /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -368,7 +368,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -413,7 +413,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -456,7 +456,7 @@ public virtual async Task> UpdateAsync(ETag ifMatch, /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -499,7 +499,7 @@ public virtual Response Update(ETag ifMatch, ApiIssuePatch pat /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -537,7 +537,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementAuthorizationServerCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementAuthorizationServerCollection.cs index 88d1b19ab1adc..b4002caab4e20 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementAuthorizationServerCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementAuthorizationServerCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -168,7 +168,7 @@ public virtual ArmOperation CreateOrUp /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -258,7 +258,7 @@ public virtual Response Get(string aut /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -291,7 +291,7 @@ public virtual AsyncPageable GetAllAsy /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -324,7 +324,7 @@ public virtual Pageable GetAll(string /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -367,7 +367,7 @@ public virtual async Task> ExistsAsync(string authsid, Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -410,7 +410,7 @@ public virtual Response Exists(string authsid, CancellationToken cancellat /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -455,7 +455,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementAuthorizationServerData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementAuthorizationServerData.Serialization.cs index 2f2b4fd0faaa0..5393aeb5ba4b9 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementAuthorizationServerData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementAuthorizationServerData.Serialization.cs @@ -8,6 +8,8 @@ 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.ApiManagement.Models; @@ -125,6 +127,16 @@ void IJsonModel.Write(Utf8JsonWriter write writer.WritePropertyName("displayName"u8); writer.WriteStringValue(DisplayName); } + if (Optional.IsDefined(UseInTestConsole)) + { + writer.WritePropertyName("useInTestConsole"u8); + writer.WriteBooleanValue(UseInTestConsole.Value); + } + if (Optional.IsDefined(UseInApiDocumentation)) + { + writer.WritePropertyName("useInApiDocumentation"u8); + writer.WriteBooleanValue(UseInApiDocumentation.Value); + } if (Optional.IsDefined(ClientRegistrationEndpoint)) { writer.WritePropertyName("clientRegistrationEndpoint"u8); @@ -209,6 +221,8 @@ internal static ApiManagementAuthorizationServerData DeserializeApiManagementAut string resourceOwnerUsername = default; string resourceOwnerPassword = default; string displayName = default; + bool? useInTestConsole = default; + bool? useInApiDocumentation = default; string clientRegistrationEndpoint = default; string authorizationEndpoint = default; IList grantTypes = default; @@ -346,6 +360,24 @@ internal static ApiManagementAuthorizationServerData DeserializeApiManagementAut displayName = property0.Value.GetString(); continue; } + if (property0.NameEquals("useInTestConsole"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + useInTestConsole = property0.Value.GetBoolean(); + continue; + } + if (property0.NameEquals("useInApiDocumentation"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + useInApiDocumentation = property0.Value.GetBoolean(); + continue; + } if (property0.NameEquals("clientRegistrationEndpoint"u8)) { clientRegistrationEndpoint = property0.Value.GetString(); @@ -405,6 +437,8 @@ internal static ApiManagementAuthorizationServerData DeserializeApiManagementAut resourceOwnerUsername, resourceOwnerPassword, displayName, + useInTestConsole, + useInApiDocumentation, clientRegistrationEndpoint, authorizationEndpoint, grantTypes ?? new ChangeTrackingList(), @@ -413,6 +447,470 @@ internal static ApiManagementAuthorizationServerData DeserializeApiManagementAut 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(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}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AuthorizationMethods), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" authorizationMethods: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(AuthorizationMethods)) + { + if (AuthorizationMethods.Any()) + { + builder.Append(" authorizationMethods: "); + builder.AppendLine("["); + foreach (var item in AuthorizationMethods) + { + builder.AppendLine($" '{item.ToSerialString()}'"); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ClientAuthenticationMethods), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" clientAuthenticationMethod: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(ClientAuthenticationMethods)) + { + if (ClientAuthenticationMethods.Any()) + { + builder.Append(" clientAuthenticationMethod: "); + builder.AppendLine("["); + foreach (var item in ClientAuthenticationMethods) + { + builder.AppendLine($" '{item.ToString()}'"); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TokenBodyParameters), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" tokenBodyParameters: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(TokenBodyParameters)) + { + if (TokenBodyParameters.Any()) + { + builder.Append(" tokenBodyParameters: "); + builder.AppendLine("["); + foreach (var item in TokenBodyParameters) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " tokenBodyParameters: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TokenEndpoint), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" tokenEndpoint: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TokenEndpoint)) + { + builder.Append(" tokenEndpoint: "); + if (TokenEndpoint.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{TokenEndpoint}'''"); + } + else + { + builder.AppendLine($"'{TokenEndpoint}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DoesSupportState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" supportState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DoesSupportState)) + { + builder.Append(" supportState: "); + var boolValue = DoesSupportState.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DefaultScope), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" defaultScope: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DefaultScope)) + { + builder.Append(" defaultScope: "); + if (DefaultScope.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{DefaultScope}'''"); + } + else + { + builder.AppendLine($"'{DefaultScope}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(BearerTokenSendingMethods), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" bearerTokenSendingMethods: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(BearerTokenSendingMethods)) + { + if (BearerTokenSendingMethods.Any()) + { + builder.Append(" bearerTokenSendingMethods: "); + builder.AppendLine("["); + foreach (var item in BearerTokenSendingMethods) + { + builder.AppendLine($" '{item.ToString()}'"); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ResourceOwnerUsername), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" resourceOwnerUsername: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ResourceOwnerUsername)) + { + builder.Append(" resourceOwnerUsername: "); + if (ResourceOwnerUsername.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ResourceOwnerUsername}'''"); + } + else + { + builder.AppendLine($"'{ResourceOwnerUsername}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ResourceOwnerPassword), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" resourceOwnerPassword: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ResourceOwnerPassword)) + { + builder.Append(" resourceOwnerPassword: "); + if (ResourceOwnerPassword.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ResourceOwnerPassword}'''"); + } + else + { + builder.AppendLine($"'{ResourceOwnerPassword}'"); + } + } + } + + 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(UseInTestConsole), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" useInTestConsole: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(UseInTestConsole)) + { + builder.Append(" useInTestConsole: "); + var boolValue = UseInTestConsole.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(UseInApiDocumentation), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" useInApiDocumentation: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(UseInApiDocumentation)) + { + builder.Append(" useInApiDocumentation: "); + var boolValue = UseInApiDocumentation.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ClientRegistrationEndpoint), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" clientRegistrationEndpoint: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ClientRegistrationEndpoint)) + { + builder.Append(" clientRegistrationEndpoint: "); + if (ClientRegistrationEndpoint.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ClientRegistrationEndpoint}'''"); + } + else + { + builder.AppendLine($"'{ClientRegistrationEndpoint}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AuthorizationEndpoint), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" authorizationEndpoint: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AuthorizationEndpoint)) + { + builder.Append(" authorizationEndpoint: "); + if (AuthorizationEndpoint.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{AuthorizationEndpoint}'''"); + } + else + { + builder.AppendLine($"'{AuthorizationEndpoint}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(GrantTypes), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" grantTypes: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(GrantTypes)) + { + if (GrantTypes.Any()) + { + builder.Append(" grantTypes: "); + builder.AppendLine("["); + foreach (var item in GrantTypes) + { + builder.AppendLine($" '{item.ToString()}'"); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ClientId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" clientId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ClientId)) + { + builder.Append(" clientId: "); + if (ClientId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ClientId}'''"); + } + else + { + builder.AppendLine($"'{ClientId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ClientSecret), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" clientSecret: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ClientSecret)) + { + builder.Append(" clientSecret: "); + if (ClientSecret.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ClientSecret}'''"); + } + else + { + builder.AppendLine($"'{ClientSecret}'"); + } + } + } + + 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; @@ -421,6 +919,8 @@ BinaryData IPersistableModel.Write(ModelRe { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementAuthorizationServerData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementAuthorizationServerData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementAuthorizationServerData.cs index 1a3f9796f4fbc..666402729c2e8 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementAuthorizationServerData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementAuthorizationServerData.cs @@ -77,13 +77,15 @@ public ApiManagementAuthorizationServerData() /// Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username. /// Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password. /// User-friendly authorization server name. + /// If true, the authorization server may be used in the developer portal test console. True by default if no value is provided. + /// If true, the authorization server will be used in the API documentation in the developer portal. False by default if no value is provided. /// Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute URL to entity being referenced. /// OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2. /// Form of an authorization grant, which the client uses to request the access token. /// Client or app id registered with this authorization server. /// Client or app secret registered with this authorization server. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. /// Keeps track of any properties unknown to the library. - internal ApiManagementAuthorizationServerData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string description, IList authorizationMethods, IList clientAuthenticationMethods, IList tokenBodyParameters, string tokenEndpoint, bool? doesSupportState, string defaultScope, IList bearerTokenSendingMethods, string resourceOwnerUsername, string resourceOwnerPassword, string displayName, string clientRegistrationEndpoint, string authorizationEndpoint, IList grantTypes, string clientId, string clientSecret, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal ApiManagementAuthorizationServerData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string description, IList authorizationMethods, IList clientAuthenticationMethods, IList tokenBodyParameters, string tokenEndpoint, bool? doesSupportState, string defaultScope, IList bearerTokenSendingMethods, string resourceOwnerUsername, string resourceOwnerPassword, string displayName, bool? useInTestConsole, bool? useInApiDocumentation, string clientRegistrationEndpoint, string authorizationEndpoint, IList grantTypes, string clientId, string clientSecret, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { Description = description; AuthorizationMethods = authorizationMethods; @@ -96,6 +98,8 @@ internal ApiManagementAuthorizationServerData(ResourceIdentifier id, string name ResourceOwnerUsername = resourceOwnerUsername; ResourceOwnerPassword = resourceOwnerPassword; DisplayName = displayName; + UseInTestConsole = useInTestConsole; + UseInApiDocumentation = useInApiDocumentation; ClientRegistrationEndpoint = clientRegistrationEndpoint; AuthorizationEndpoint = authorizationEndpoint; GrantTypes = grantTypes; @@ -105,36 +109,58 @@ internal ApiManagementAuthorizationServerData(ResourceIdentifier id, string name } /// Description of the authorization server. Can contain HTML formatting tags. + [WirePath("properties.description")] public string Description { get; set; } /// HTTP verbs supported by the authorization endpoint. GET must be always present. POST is optional. + [WirePath("properties.authorizationMethods")] public IList AuthorizationMethods { get; } /// Method of authentication supported by the token endpoint of this authorization server. Possible values are Basic and/or Body. When Body is specified, client credentials and other parameters are passed within the request body in the application/x-www-form-urlencoded format. + [WirePath("properties.clientAuthenticationMethod")] public IList ClientAuthenticationMethods { get; } /// Additional parameters required by the token endpoint of this authorization server represented as an array of JSON objects with name and value string properties, i.e. {"name" : "name value", "value": "a value"}. + [WirePath("properties.tokenBodyParameters")] public IList TokenBodyParameters { get; } /// OAuth token endpoint. Contains absolute URI to entity being referenced. + [WirePath("properties.tokenEndpoint")] public string TokenEndpoint { get; set; } /// If true, authorization server will include state parameter from the authorization request to its response. Client may use state parameter to raise protocol security. + [WirePath("properties.supportState")] public bool? DoesSupportState { get; set; } /// Access token scope that is going to be requested by default. Can be overridden at the API level. Should be provided in the form of a string containing space-delimited values. + [WirePath("properties.defaultScope")] public string DefaultScope { get; set; } /// Specifies the mechanism by which access token is passed to the API. + [WirePath("properties.bearerTokenSendingMethods")] public IList BearerTokenSendingMethods { get; } /// Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username. + [WirePath("properties.resourceOwnerUsername")] public string ResourceOwnerUsername { get; set; } /// Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password. + [WirePath("properties.resourceOwnerPassword")] public string ResourceOwnerPassword { get; set; } /// User-friendly authorization server name. + [WirePath("properties.displayName")] public string DisplayName { get; set; } + /// If true, the authorization server may be used in the developer portal test console. True by default if no value is provided. + [WirePath("properties.useInTestConsole")] + public bool? UseInTestConsole { get; set; } + /// If true, the authorization server will be used in the API documentation in the developer portal. False by default if no value is provided. + [WirePath("properties.useInApiDocumentation")] + public bool? UseInApiDocumentation { get; set; } /// Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute URL to entity being referenced. + [WirePath("properties.clientRegistrationEndpoint")] public string ClientRegistrationEndpoint { get; set; } /// OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2. + [WirePath("properties.authorizationEndpoint")] public string AuthorizationEndpoint { get; set; } /// Form of an authorization grant, which the client uses to request the access token. + [WirePath("properties.grantTypes")] public IList GrantTypes { get; } /// Client or app id registered with this authorization server. + [WirePath("properties.clientId")] public string ClientId { get; set; } /// Client or app secret registered with this authorization server. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. + [WirePath("properties.clientSecret")] public string ClientSecret { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementAuthorizationServerResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementAuthorizationServerResource.cs index b5b227aeef654..7c2f658f5cd15 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementAuthorizationServerResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementAuthorizationServerResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -272,7 +272,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual async Task> Up /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -358,7 +358,7 @@ public virtual Response Update(ETag if /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -396,7 +396,7 @@ public virtual async Task> GetSecre /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -434,7 +434,7 @@ public virtual Response GetSecrets(Cancellat /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -472,7 +472,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementBackendCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementBackendCollection.cs index 570e353b1bf68..e502ea1743e74 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementBackendCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementBackendCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> CreateOrUp /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -168,7 +168,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnt /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task> GetAsync(strin /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -258,7 +258,7 @@ public virtual Response Get(string backendId, Canc /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -291,7 +291,7 @@ public virtual AsyncPageable GetAllAsync(string fi /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -324,7 +324,7 @@ public virtual Pageable GetAll(string filter = nul /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -367,7 +367,7 @@ public virtual async Task> ExistsAsync(string backendId, Cancella /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -410,7 +410,7 @@ public virtual Response Exists(string backendId, CancellationToken cancell /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -455,7 +455,7 @@ public virtual async Task> GetIfE /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementBackendData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementBackendData.Serialization.cs index 32c3530f65f3c..1f3d712a8eed1 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementBackendData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementBackendData.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.ApiManagement.Models; @@ -283,6 +284,233 @@ internal static ApiManagementBackendData DeserializeApiManagementBackendData(Jso 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(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(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}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ResourceUri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" resourceId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ResourceUri)) + { + builder.Append(" resourceId: "); + builder.AppendLine($"'{ResourceUri.AbsoluteUri}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("BackendServiceFabricCluster", out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" properties: "); + builder.AppendLine("{"); + builder.AppendLine(" properties: {"); + builder.Append(" serviceFabricCluster: "); + builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); + builder.AppendLine(" }"); + } + else + { + if (Optional.IsDefined(Properties)) + { + builder.Append(" properties: "); + BicepSerializationHelpers.AppendChildObject(builder, Properties, options, 4, false, " properties: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Credentials), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" credentials: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Credentials)) + { + builder.Append(" credentials: "); + BicepSerializationHelpers.AppendChildObject(builder, Credentials, options, 4, false, " credentials: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Proxy), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" proxy: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Proxy)) + { + builder.Append(" proxy: "); + BicepSerializationHelpers.AppendChildObject(builder, Proxy, options, 4, false, " proxy: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Tls), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" tls: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Tls)) + { + builder.Append(" tls: "); + BicepSerializationHelpers.AppendChildObject(builder, Tls, options, 4, false, " tls: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Uri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" url: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Uri)) + { + builder.Append(" url: "); + builder.AppendLine($"'{Uri.AbsoluteUri}'"); + } + } + + 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(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -291,6 +519,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOp { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementBackendData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementBackendData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementBackendData.cs index a19c1c00aa598..7d5ebae1a8a92 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementBackendData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementBackendData.cs @@ -63,10 +63,10 @@ public ApiManagementBackendData() /// The systemData. /// Backend Title. /// Backend Description. - /// Management Uri of the Resource in External System. This url can be the Arm Resource Id of Logic Apps, Function Apps or API Apps. + /// Management Uri of the Resource in External System. This URL can be the Arm Resource Id of Logic Apps, Function Apps or API Apps. /// Backend Properties contract. /// Backend Credentials Contract Properties. - /// Backend Proxy Contract Properties. + /// Backend gateway Contract Properties. /// Backend TLS Properties. /// Runtime Url of the Backend. /// Backend communication protocol. @@ -86,14 +86,18 @@ internal ApiManagementBackendData(ResourceIdentifier id, string name, ResourceTy } /// Backend Title. + [WirePath("properties.title")] public string Title { get; set; } /// Backend Description. + [WirePath("properties.description")] public string Description { get; set; } - /// Management Uri of the Resource in External System. This url can be the Arm Resource Id of Logic Apps, Function Apps or API Apps. + /// Management Uri of the Resource in External System. This URL can be the Arm Resource Id of Logic Apps, Function Apps or API Apps. + [WirePath("properties.resourceId")] public Uri ResourceUri { get; set; } /// Backend Properties contract. internal BackendProperties Properties { get; set; } /// Backend Service Fabric Cluster Properties. + [WirePath("properties.properties.serviceFabricCluster")] public BackendServiceFabricClusterProperties BackendServiceFabricCluster { get => Properties is null ? default : Properties.ServiceFabricCluster; @@ -106,14 +110,19 @@ public BackendServiceFabricClusterProperties BackendServiceFabricCluster } /// Backend Credentials Contract Properties. + [WirePath("properties.credentials")] public BackendCredentialsContract Credentials { get; set; } - /// Backend Proxy Contract Properties. + /// Backend gateway Contract Properties. + [WirePath("properties.proxy")] public BackendProxyContract Proxy { get; set; } /// Backend TLS Properties. + [WirePath("properties.tls")] public BackendTlsProperties Tls { get; set; } /// Runtime Url of the Backend. + [WirePath("properties.url")] public Uri Uri { get; set; } /// Backend communication protocol. + [WirePath("properties.protocol")] public BackendProtocol? Protocol { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementBackendResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementBackendResource.cs index 6e14f8cacc560..192fb5ec49156 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementBackendResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementBackendResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Cance /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken canc /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -272,7 +272,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual async Task> UpdateAsync(ET /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -346,7 +346,7 @@ public virtual Response Update(ETag ifMatch, ApiMa } /// - /// Notifies the APIM proxy to create a new connection to the backend after the specified timeout. If no timeout was specified, timeout of 2 minutes is used. + /// Notifies the API Management gateway to create a new connection to the backend after the specified timeout. If no timeout was specified, timeout of 2 minutes is used. /// /// /// Request Path @@ -358,7 +358,7 @@ public virtual Response Update(ETag ifMatch, ApiMa /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -385,7 +385,7 @@ public virtual async Task ReconnectAsync(BackendReconnectContract back } /// - /// Notifies the APIM proxy to create a new connection to the backend after the specified timeout. If no timeout was specified, timeout of 2 minutes is used. + /// Notifies the API Management gateway to create a new connection to the backend after the specified timeout. If no timeout was specified, timeout of 2 minutes is used. /// /// /// Request Path @@ -397,7 +397,7 @@ public virtual async Task ReconnectAsync(BackendReconnectContract back /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -436,7 +436,7 @@ public virtual Response Reconnect(BackendReconnectContract backendReconnectContr /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -474,7 +474,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCacheCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCacheCollection.cs index 346fd88947112..a6f42ddfad24d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCacheCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCacheCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> CreateOrUpda /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -168,7 +168,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -258,7 +258,7 @@ public virtual Response Get(string cacheId, Cancella /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -290,7 +290,7 @@ public virtual AsyncPageable GetAllAsync(int? top = /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -322,7 +322,7 @@ public virtual Pageable GetAll(int? top = null, int? /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -365,7 +365,7 @@ public virtual async Task> ExistsAsync(string cacheId, Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -408,7 +408,7 @@ public virtual Response Exists(string cacheId, CancellationToken cancellat /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -453,7 +453,7 @@ public virtual async Task> GetIfExi /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCacheData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCacheData.Serialization.cs index a39fa0adc43bd..e3f99f79280e7 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCacheData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCacheData.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Models; @@ -198,6 +199,161 @@ internal static ApiManagementCacheData DeserializeApiManagementCacheData(JsonEle 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(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}'"); + } + } + } + + 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(UseFromLocation), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" useFromLocation: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(UseFromLocation)) + { + builder.Append(" useFromLocation: "); + if (UseFromLocation.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{UseFromLocation}'''"); + } + else + { + builder.AppendLine($"'{UseFromLocation}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ResourceUri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" resourceId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ResourceUri)) + { + builder.Append(" resourceId: "); + builder.AppendLine($"'{ResourceUri.AbsoluteUri}'"); + } + } + + 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; @@ -206,6 +362,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOpti { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementCacheData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCacheData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCacheData.cs index 38ebfb085461e..919aebbb38046 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCacheData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCacheData.cs @@ -75,12 +75,16 @@ internal ApiManagementCacheData(ResourceIdentifier id, string name, ResourceType } /// Cache description. + [WirePath("properties.description")] public string Description { get; set; } /// Runtime connection string to cache. + [WirePath("properties.connectionString")] public string ConnectionString { get; set; } /// Location identifier to use cache from (should be either 'default' or valid Azure region identifier). + [WirePath("properties.useFromLocation")] public string UseFromLocation { get; set; } /// Original uri of entity in external system cache points to. + [WirePath("properties.resourceId")] public Uri ResourceUri { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCacheResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCacheResource.cs index 8d72207df4874..63a177f37cef0 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCacheResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCacheResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Cancell /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken cancel /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -272,7 +272,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual async Task> UpdateAsync(ETag /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -358,7 +358,7 @@ public virtual Response Update(ETag ifMatch, ApiMana /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -396,7 +396,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCertificateCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCertificateCollection.cs index 5928d5c27d362..faacfd526f920 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCertificateCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCertificateCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -117,7 +117,7 @@ public virtual async Task> Create /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -169,7 +169,7 @@ public virtual ArmOperation CreateOrUpdate(Wai /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual async Task> GetAsync(s /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -259,7 +259,7 @@ public virtual Response Get(string certificate /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -293,7 +293,7 @@ public virtual AsyncPageable GetAllAsync(strin /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -327,7 +327,7 @@ public virtual Pageable GetAll(string filter = /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -370,7 +370,7 @@ public virtual async Task> ExistsAsync(string certificateId, Canc /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -413,7 +413,7 @@ public virtual Response Exists(string certificateId, CancellationToken can /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -458,7 +458,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCertificateData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCertificateData.Serialization.cs index 29db1b0f397d6..27388a5af11e2 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCertificateData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCertificateData.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.ApiManagement.Models; @@ -203,6 +204,154 @@ internal static ApiManagementCertificateData DeserializeApiManagementCertificate 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(Subject), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" subject: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Subject)) + { + builder.Append(" subject: "); + if (Subject.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Subject}'''"); + } + else + { + builder.AppendLine($"'{Subject}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Thumbprint), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" thumbprint: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Thumbprint)) + { + builder.Append(" thumbprint: "); + if (Thumbprint.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Thumbprint}'''"); + } + else + { + builder.AppendLine($"'{Thumbprint}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ExpireOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" expirationDate: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ExpireOn)) + { + builder.Append(" expirationDate: "); + var formattedDateTimeString = TypeFormatters.ToString(ExpireOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(KeyVaultDetails), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" keyVault: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(KeyVaultDetails)) + { + builder.Append(" keyVault: "); + BicepSerializationHelpers.AppendChildObject(builder, KeyVaultDetails, options, 4, false, " keyVault: "); + } + } + + 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; @@ -211,6 +360,8 @@ BinaryData IPersistableModel.Write(ModelReaderWrit { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementCertificateData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCertificateData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCertificateData.cs index 09e5184a7f627..7d10ad87cc038 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCertificateData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCertificateData.cs @@ -79,15 +79,19 @@ internal ApiManagementCertificateData(ResourceIdentifier id, string name, Resour } /// Subject attribute of the certificate. + [WirePath("properties.subject")] public string Subject { get; set; } /// Thumbprint of the certificate. + [WirePath("properties.thumbprint")] public string Thumbprint { get; set; } /// /// Expiration date of the certificate. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. /// /// + [WirePath("properties.expirationDate")] public DateTimeOffset? ExpireOn { get; set; } /// KeyVault location details of the certificate. + [WirePath("properties.keyVault")] public KeyVaultContractProperties KeyVaultDetails { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCertificateResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCertificateResource.cs index 4ab7da619817f..2c50163327eb9 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCertificateResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCertificateResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(C /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -272,7 +272,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -321,7 +321,7 @@ public virtual async Task> Update /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -370,7 +370,7 @@ public virtual ArmOperation Update(WaitUntil w /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -408,7 +408,7 @@ public virtual async Task> RefreshSec /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -446,7 +446,7 @@ public virtual Response RefreshSecret(Cancella /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -484,7 +484,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementDeletedServiceCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementDeletedServiceCollection.cs index 0e14b7e5fddc5..209d195266def 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementDeletedServiceCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementDeletedServiceCollection.cs @@ -62,7 +62,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -108,7 +108,7 @@ public virtual async Task> GetAsyn /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(AzureLocation l /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -198,7 +198,7 @@ public virtual async Task> ExistsAsync(AzureLocation location, st /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -242,7 +242,7 @@ public virtual Response Exists(AzureLocation location, string serviceName, /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -288,7 +288,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementDeletedServiceData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementDeletedServiceData.Serialization.cs index 44c6c5537b661..0d01b914cadc1 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementDeletedServiceData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementDeletedServiceData.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Models; @@ -210,6 +211,139 @@ internal static ApiManagementDeletedServiceData DeserializeApiManagementDeletedS 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(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(ServiceId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" serviceId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ServiceId)) + { + builder.Append(" serviceId: "); + builder.AppendLine($"'{ServiceId.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ScheduledPurgeOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" scheduledPurgeDate: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ScheduledPurgeOn)) + { + builder.Append(" scheduledPurgeDate: "); + var formattedDateTimeString = TypeFormatters.ToString(ScheduledPurgeOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DeletedOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" deletionDate: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DeletedOn)) + { + builder.Append(" deletionDate: "); + var formattedDateTimeString = TypeFormatters.ToString(DeletedOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + 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; @@ -218,6 +352,8 @@ BinaryData IPersistableModel.Write(ModelReaderW { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementDeletedServiceData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementDeletedServiceData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementDeletedServiceData.cs index 7f41c280cfa63..abeb0d734b955 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementDeletedServiceData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementDeletedServiceData.cs @@ -75,12 +75,16 @@ internal ApiManagementDeletedServiceData(ResourceIdentifier id, string name, Res } /// API Management Service Master Location. + [WirePath("location")] public AzureLocation? Location { get; } /// Fully-qualified API Management Service Resource ID. + [WirePath("properties.serviceId")] public ResourceIdentifier ServiceId { get; set; } /// UTC Date and Time when the service will be automatically purged. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. + [WirePath("properties.scheduledPurgeDate")] public DateTimeOffset? ScheduledPurgeOn { get; set; } /// UTC Timestamp when the service was soft-deleted. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. + [WirePath("properties.deletionDate")] public DateTimeOffset? DeletedOn { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementDeletedServiceResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementDeletedServiceResource.cs index bf5f25124725a..1941c94614ebe 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementDeletedServiceResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementDeletedServiceResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsyn /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationTok /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementDiagnosticCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementDiagnosticCollection.cs index c365920823031..8ee4e83812891 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementDiagnosticCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementDiagnosticCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> CreateO /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -168,7 +168,7 @@ public virtual ArmOperation CreateOrUpdate(Wait /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task> GetAsync(st /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -258,7 +258,7 @@ public virtual Response Get(string diagnosticId /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -291,7 +291,7 @@ public virtual AsyncPageable GetAllAsync(string /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -324,7 +324,7 @@ public virtual Pageable GetAll(string filter = /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -367,7 +367,7 @@ public virtual async Task> ExistsAsync(string diagnosticId, Cance /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -410,7 +410,7 @@ public virtual Response Exists(string diagnosticId, CancellationToken canc /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -455,7 +455,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementDiagnosticResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementDiagnosticResource.cs index 64cc2f131fcf8..fb5506a811dfc 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementDiagnosticResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementDiagnosticResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken c /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -271,7 +271,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -314,7 +314,7 @@ public virtual async Task> UpdateAsync /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -357,7 +357,7 @@ public virtual Response Update(ETag ifMatch, Di /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -395,7 +395,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementEmailTemplateCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementEmailTemplateCollection.cs index a9a860821a5e4..790538f5627e1 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementEmailTemplateCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementEmailTemplateCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> Crea /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -165,7 +165,7 @@ public virtual ArmOperation CreateOrUpdate(W /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -206,7 +206,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -247,7 +247,7 @@ public virtual Response Get(TemplateName tem /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -280,7 +280,7 @@ public virtual AsyncPageable GetAllAsync(str /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(string filter /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -352,7 +352,7 @@ public virtual async Task> ExistsAsync(TemplateName templateName, /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -391,7 +391,7 @@ public virtual Response Exists(TemplateName templateName, CancellationToke /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -432,7 +432,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementEmailTemplateData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementEmailTemplateData.Serialization.cs index ef054786306cc..cbcd8dd39d406 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementEmailTemplateData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementEmailTemplateData.Serialization.cs @@ -8,6 +8,8 @@ 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.ApiManagement.Models; @@ -237,6 +239,208 @@ internal static ApiManagementEmailTemplateData DeserializeApiManagementEmailTemp 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(Subject), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" subject: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Subject)) + { + builder.Append(" subject: "); + if (Subject.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Subject}'''"); + } + else + { + builder.AppendLine($"'{Subject}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Body), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" body: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Body)) + { + builder.Append(" body: "); + if (Body.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Body}'''"); + } + else + { + builder.AppendLine($"'{Body}'"); + } + } + } + + 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(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}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsDefault), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" isDefault: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsDefault)) + { + builder.Append(" isDefault: "); + var boolValue = IsDefault.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + 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) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " 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; @@ -245,6 +449,8 @@ BinaryData IPersistableModel.Write(ModelReaderWr { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementEmailTemplateData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementEmailTemplateData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementEmailTemplateData.cs index 1b6ec2c1b9068..56f67f05fd3bf 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementEmailTemplateData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementEmailTemplateData.cs @@ -81,16 +81,22 @@ internal ApiManagementEmailTemplateData(ResourceIdentifier id, string name, Reso } /// Subject of the Template. + [WirePath("properties.subject")] public string Subject { get; set; } /// Email Template Body. This should be a valid XDocument. + [WirePath("properties.body")] public string Body { get; set; } /// Title of the Template. + [WirePath("properties.title")] public string Title { get; set; } /// Description of the Email Template. + [WirePath("properties.description")] public string Description { get; set; } /// Whether the template is the default template provided by API Management or has been edited. + [WirePath("properties.isDefault")] public bool? IsDefault { get; } /// Email Template Parameter values. + [WirePath("properties.parameters")] public IList Parameters { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementEmailTemplateResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementEmailTemplateResource.cs index f8dc595ca31f5..dd2c9aac925cc 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementEmailTemplateResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementEmailTemplateResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToke /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -272,7 +272,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual async Task> UpdateAs /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -358,7 +358,7 @@ public virtual Response Update(ETag ifMatch, /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -396,7 +396,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayCertificateAuthorityCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayCertificateAuthorityCollection.cs index 31e8834dd57e8..af223fc64e57d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayCertificateAuthorityCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayCertificateAuthorityCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -168,7 +168,7 @@ public virtual ArmOperation Cr /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -258,7 +258,7 @@ public virtual Response Get(st /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -291,7 +291,7 @@ public virtual AsyncPageable G /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -324,7 +324,7 @@ public virtual Pageable GetAll /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -367,7 +367,7 @@ public virtual async Task> ExistsAsync(string certificateId, Canc /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -410,7 +410,7 @@ public virtual Response Exists(string certificateId, CancellationToken can /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -455,7 +455,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayCertificateAuthorityData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayCertificateAuthorityData.Serialization.cs index 574d3f07ffa73..4470202302fb3 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayCertificateAuthorityData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayCertificateAuthorityData.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Models; @@ -162,6 +163,93 @@ internal static ApiManagementGatewayCertificateAuthorityData DeserializeApiManag 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(IsTrusted), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" isTrusted: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsTrusted)) + { + builder.Append(" isTrusted: "); + var boolValue = IsTrusted.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + 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; @@ -170,6 +258,8 @@ BinaryData IPersistableModel.Write { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementGatewayCertificateAuthorityData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayCertificateAuthorityData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayCertificateAuthorityData.cs index 9d6bb728c3d74..417d0325a3120 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayCertificateAuthorityData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayCertificateAuthorityData.cs @@ -69,6 +69,7 @@ internal ApiManagementGatewayCertificateAuthorityData(ResourceIdentifier id, str } /// Determines whether certificate authority is trusted. + [WirePath("properties.isTrusted")] public bool? IsTrusted { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayCertificateAuthorityResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayCertificateAuthorityResource.cs index 0a517014e2f5c..cd0c702921f29 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayCertificateAuthorityResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayCertificateAuthorityResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(Ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -272,7 +272,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -321,7 +321,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -370,7 +370,7 @@ public virtual ArmOperation Up /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -408,7 +408,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayCollection.cs index a9c7c286be4ba..77605f23026bb 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> CreateOrUp /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -168,7 +168,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnt /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task> GetAsync(strin /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -258,7 +258,7 @@ public virtual Response Get(string gatewayId, Canc /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -291,7 +291,7 @@ public virtual AsyncPageable GetAllAsync(string fi /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -324,7 +324,7 @@ public virtual Pageable GetAll(string filter = nul /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -367,7 +367,7 @@ public virtual async Task> ExistsAsync(string gatewayId, Cancella /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -410,7 +410,7 @@ public virtual Response Exists(string gatewayId, CancellationToken cancell /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -455,7 +455,7 @@ public virtual async Task> GetIfE /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayData.Serialization.cs index 7e05965e9387b..c01da741abf78 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayData.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.ApiManagement.Models; @@ -175,6 +176,115 @@ internal static ApiManagementGatewayData DeserializeApiManagementGatewayData(Jso 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(LocationData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" locationData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(LocationData)) + { + builder.Append(" locationData: "); + BicepSerializationHelpers.AppendChildObject(builder, LocationData, options, 4, false, " locationData: "); + } + } + + 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(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -183,6 +293,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOp { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementGatewayData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayData.cs index 91bd5cc9eb4f0..c12a353e607cb 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayData.cs @@ -72,8 +72,10 @@ internal ApiManagementGatewayData(ResourceIdentifier id, string name, ResourceTy } /// Gateway location. + [WirePath("properties.locationData")] public ResourceLocationDataContract LocationData { get; set; } /// Gateway description. + [WirePath("properties.description")] public string Description { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayHostnameConfigurationCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayHostnameConfigurationCollection.cs index 880d7de3d3844..91dbc14a66877 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayHostnameConfigurationCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayHostnameConfigurationCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -168,7 +168,7 @@ public virtual ArmOperation C /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -258,7 +258,7 @@ public virtual Response Get(s /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -291,7 +291,7 @@ public virtual AsyncPageable /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -324,7 +324,7 @@ public virtual Pageable GetAl /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -367,7 +367,7 @@ public virtual async Task> ExistsAsync(string hcId, CancellationT /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -410,7 +410,7 @@ public virtual Response Exists(string hcId, CancellationToken cancellation /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -455,7 +455,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayHostnameConfigurationData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayHostnameConfigurationData.Serialization.cs index 6491ccc58d053..da1cb943c6ff6 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayHostnameConfigurationData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayHostnameConfigurationData.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Models; @@ -234,6 +235,187 @@ internal static ApiManagementGatewayHostnameConfigurationData DeserializeApiMana 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(Hostname), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" hostname: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Hostname)) + { + builder.Append(" hostname: "); + if (Hostname.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Hostname}'''"); + } + else + { + builder.AppendLine($"'{Hostname}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CertificateId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" certificateId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CertificateId)) + { + builder.Append(" certificateId: "); + if (CertificateId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{CertificateId}'''"); + } + else + { + builder.AppendLine($"'{CertificateId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsClientCertificateRequired), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" negotiateClientCertificate: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsClientCertificateRequired)) + { + builder.Append(" negotiateClientCertificate: "); + var boolValue = IsClientCertificateRequired.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsTls1_0Enabled), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" tls10Enabled: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsTls1_0Enabled)) + { + builder.Append(" tls10Enabled: "); + var boolValue = IsTls1_0Enabled.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsTls1_1Enabled), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" tls11Enabled: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsTls1_1Enabled)) + { + builder.Append(" tls11Enabled: "); + var boolValue = IsTls1_1Enabled.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsHttp2_0Enabled), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" http2Enabled: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsHttp2_0Enabled)) + { + builder.Append(" http2Enabled: "); + var boolValue = IsHttp2_0Enabled.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + 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; @@ -242,6 +424,8 @@ BinaryData IPersistableModel.Writ { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementGatewayHostnameConfigurationData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayHostnameConfigurationData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayHostnameConfigurationData.cs index 92cd9d25b9da3..a1122fdb32794 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayHostnameConfigurationData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayHostnameConfigurationData.cs @@ -79,10 +79,13 @@ internal ApiManagementGatewayHostnameConfigurationData(ResourceIdentifier id, st } /// Hostname value. Supports valid domain name, partial or full wildcard. + [WirePath("properties.hostname")] public string Hostname { get; set; } /// Identifier of Certificate entity that will be used for TLS connection establishment. + [WirePath("properties.certificateId")] public string CertificateId { get; set; } /// Determines whether gateway requests client certificate. + [WirePath("properties.negotiateClientCertificate")] public bool? IsClientCertificateRequired { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayHostnameConfigurationResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayHostnameConfigurationResource.cs index 471531c46e677..92355fe0dab95 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayHostnameConfigurationResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayHostnameConfigurationResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(C /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -272,7 +272,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -321,7 +321,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -370,7 +370,7 @@ public virtual ArmOperation U /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -408,7 +408,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayResource.cs index c677160802014..1a4d6cec74509 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayResource.cs @@ -114,7 +114,7 @@ public virtual ApiManagementGatewayHostnameConfigurationCollection GetApiManagem /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -145,7 +145,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual ApiManagementGatewayCertificateAuthorityCollection GetApiManageme /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -245,7 +245,7 @@ public virtual Response GetApi /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -285,7 +285,7 @@ public virtual async Task> GetAsync(Cance /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -325,7 +325,7 @@ public virtual Response Get(CancellationToken canc /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -370,7 +370,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -415,7 +415,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -458,7 +458,7 @@ public virtual async Task> UpdateAsync(ET /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -501,7 +501,7 @@ public virtual Response Update(ETag ifMatch, ApiMa /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -539,7 +539,7 @@ public virtual async Task> GetKeysAsync(Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -577,7 +577,7 @@ public virtual Response GetKeys(CancellationToken cancellat /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -619,7 +619,7 @@ public virtual async Task RegenerateKeyAsync(GatewayKeyRegenerateConte /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -661,7 +661,7 @@ public virtual Response RegenerateKey(GatewayKeyRegenerateContent content, Cance /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -703,7 +703,7 @@ public virtual async Task> GenerateTokenAsync(Gat /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -745,7 +745,7 @@ public virtual Response GenerateToken(GatewayTokenRequestC /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -774,7 +774,7 @@ public virtual AsyncPageable GetGatewayApisByServiceAsync(string /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -803,7 +803,7 @@ public virtual Pageable GetGatewayApisByService(string filter = /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -842,7 +842,7 @@ public virtual async Task> GetGatewayApiEntityTagAsync(string api /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -881,7 +881,7 @@ public virtual Response GetGatewayApiEntityTag(string apiId, CancellationT /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -921,7 +921,7 @@ public virtual async Task> CreateOrUpdateGatewayApiAsyn /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -961,7 +961,7 @@ public virtual Response CreateOrUpdateGatewayApi(string apiId, A /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -1000,7 +1000,7 @@ public virtual async Task DeleteGatewayApiAsync(string apiId, Cancella /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -1039,7 +1039,7 @@ public virtual Response DeleteGatewayApi(string apiId, CancellationToken cancell /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1077,7 +1077,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGlobalSchemaCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGlobalSchemaCollection.cs index eb2553cc3bf7a..409cc8e6b0358 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGlobalSchemaCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGlobalSchemaCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> Creat /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -164,7 +164,7 @@ public virtual ArmOperation CreateOrUpdate(Wa /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -209,7 +209,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -254,7 +254,7 @@ public virtual Response Get(string schemaId, /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -287,7 +287,7 @@ public virtual AsyncPageable GetAllAsync(stri /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -320,7 +320,7 @@ public virtual Pageable GetAll(string filter /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -363,7 +363,7 @@ public virtual async Task> ExistsAsync(string schemaId, Cancellat /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -406,7 +406,7 @@ public virtual Response Exists(string schemaId, CancellationToken cancella /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -451,7 +451,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGlobalSchemaData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGlobalSchemaData.Serialization.cs index 503446ced3297..6971ec491db5f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGlobalSchemaData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGlobalSchemaData.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.ApiManagement.Models; @@ -221,6 +222,145 @@ internal static ApiManagementGlobalSchemaData DeserializeApiManagementGlobalSche 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(SchemaType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" schemaType: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SchemaType)) + { + builder.Append(" schemaType: "); + builder.AppendLine($"'{SchemaType.Value.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}'"); + } + } + } + + 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(Document), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" document: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Document)) + { + builder.Append(" document: "); + builder.AppendLine($"'{Document.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; @@ -229,6 +369,8 @@ BinaryData IPersistableModel.Write(ModelReaderWri { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementGlobalSchemaData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGlobalSchemaData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGlobalSchemaData.cs index e922c59868619..b298f31f51d30 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGlobalSchemaData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGlobalSchemaData.cs @@ -76,8 +76,10 @@ internal ApiManagementGlobalSchemaData(ResourceIdentifier id, string name, Resou } /// Schema Type. Immutable. + [WirePath("properties.schemaType")] public ApiSchemaType? SchemaType { get; set; } /// Free-form schema entity description. + [WirePath("properties.description")] public string Description { get; set; } /// /// Json-encoded string for non json-based schema. @@ -109,6 +111,7 @@ internal ApiManagementGlobalSchemaData(ResourceIdentifier id, string name, Resou /// /// /// + [WirePath("properties.value")] public BinaryData Value { get; set; } /// /// Global Schema document object for json-based schema formats(e.g. json schema). @@ -140,6 +143,7 @@ internal ApiManagementGlobalSchemaData(ResourceIdentifier id, string name, Resou /// /// /// + [WirePath("properties.document")] public BinaryData Document { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGlobalSchemaResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGlobalSchemaResource.cs index 10deff16cb50b..6c32883861a75 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGlobalSchemaResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGlobalSchemaResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -271,7 +271,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -318,7 +318,7 @@ public virtual async Task> Updat /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -365,7 +365,7 @@ public virtual ArmOperation Update(WaitUntil /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -403,7 +403,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGroupCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGroupCollection.cs index 7a3c9fc74229d..0cef8f451ae8e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGroupCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGroupCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -117,7 +117,7 @@ public virtual async Task> CreateOrUpda /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -169,7 +169,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -259,7 +259,7 @@ public virtual Response Get(string groupId, Cancella /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -292,7 +292,7 @@ public virtual AsyncPageable GetAllAsync(string filt /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -325,7 +325,7 @@ public virtual Pageable GetAll(string filter = null, /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -368,7 +368,7 @@ public virtual async Task> ExistsAsync(string groupId, Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -411,7 +411,7 @@ public virtual Response Exists(string groupId, CancellationToken cancellat /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -456,7 +456,7 @@ public virtual async Task> GetIfExi /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGroupData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGroupData.Serialization.cs index 0fb25cf77c4bd..a33e7a2cd19dd 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGroupData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGroupData.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.ApiManagement.Models; @@ -215,6 +216,177 @@ internal static ApiManagementGroupData DeserializeApiManagementGroupData(JsonEle 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(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(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}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsBuiltIn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" builtIn: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsBuiltIn)) + { + builder.Append(" builtIn: "); + var boolValue = IsBuiltIn.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(GroupType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" type: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(GroupType)) + { + builder.Append(" type: "); + builder.AppendLine($"'{GroupType.Value.ToSerialString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ExternalId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" externalId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ExternalId)) + { + builder.Append(" externalId: "); + if (ExternalId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ExternalId}'''"); + } + else + { + builder.AppendLine($"'{ExternalId}'"); + } + } + } + + 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; @@ -223,6 +395,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOpti { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementGroupData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGroupData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGroupData.cs index 23411a156746e..baab8829ecea1 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGroupData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGroupData.cs @@ -78,14 +78,19 @@ internal ApiManagementGroupData(ResourceIdentifier id, string name, ResourceType } /// Group name. + [WirePath("properties.displayName")] public string DisplayName { get; set; } /// Group description. Can contain HTML formatting tags. + [WirePath("properties.description")] public string Description { get; set; } /// true if the group is one of the three system groups (Administrators, Developers, or Guests); otherwise false. + [WirePath("properties.builtIn")] public bool? IsBuiltIn { get; } /// Group type. + [WirePath("properties.type")] public ApiManagementGroupType? GroupType { get; set; } /// For external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory `aad://<tenant>.onmicrosoft.com/groups/<group object id>`; otherwise the value is null. + [WirePath("properties.externalId")] public string ExternalId { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGroupResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGroupResource.cs index 43fb861fd76c3..b25ad13b27f97 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGroupResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGroupResource.cs @@ -107,7 +107,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -147,7 +147,7 @@ public virtual async Task> GetAsync(Cancell /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -187,7 +187,7 @@ public virtual Response Get(CancellationToken cancel /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -232,7 +232,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -277,7 +277,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -320,7 +320,7 @@ public virtual async Task> UpdateAsync(ETag /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -363,7 +363,7 @@ public virtual Response Update(ETag ifMatch, ApiMana /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -392,7 +392,7 @@ public virtual AsyncPageable GetGroupUsersAsync(stri /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -421,7 +421,7 @@ public virtual Pageable GetGroupUsers(string filter /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -460,7 +460,7 @@ public virtual async Task> CheckGroupUserEntityExistsAsync(string /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -499,7 +499,7 @@ public virtual Response CheckGroupUserEntityExists(string userId, Cancella /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -538,7 +538,7 @@ public virtual async Task> CreateGroupUserA /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -577,7 +577,7 @@ public virtual Response CreateGroupUser(string userI /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -616,7 +616,7 @@ public virtual async Task DeleteGroupUserAsync(string userId, Cancella /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -655,7 +655,7 @@ public virtual Response DeleteGroupUser(string userId, CancellationToken cancell /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -693,7 +693,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementIdentityProviderCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementIdentityProviderCollection.cs index 6e66998cd95db..59169fc9042c8 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementIdentityProviderCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementIdentityProviderCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> C /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -165,7 +165,7 @@ public virtual ArmOperation CreateOrUpdat /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -206,7 +206,7 @@ public virtual async Task> GetAs /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -247,7 +247,7 @@ public virtual Response Get(IdentityProvi /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -277,7 +277,7 @@ public virtual AsyncPageable GetAllAsync( /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -307,7 +307,7 @@ public virtual Pageable GetAll(Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -346,7 +346,7 @@ public virtual async Task> ExistsAsync(IdentityProviderType ident /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -385,7 +385,7 @@ public virtual Response Exists(IdentityProviderType identityProviderName, /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -426,7 +426,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementIdentityProviderData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementIdentityProviderData.Serialization.cs index 1be26af1e5095..95784a8312d0f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementIdentityProviderData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementIdentityProviderData.Serialization.cs @@ -8,6 +8,8 @@ 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.ApiManagement.Models; @@ -95,6 +97,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WritePropertyName("passwordResetPolicyName"u8); writer.WriteStringValue(PasswordResetPolicyName); } + if (Optional.IsDefined(ClientLibrary)) + { + writer.WritePropertyName("clientLibrary"u8); + writer.WriteStringValue(ClientLibrary); + } if (Optional.IsDefined(ClientId)) { writer.WritePropertyName("clientId"u8); @@ -156,6 +163,7 @@ internal static ApiManagementIdentityProviderData DeserializeApiManagementIdenti string signinPolicyName = default; string profileEditingPolicyName = default; string passwordResetPolicyName = default; + string clientLibrary = default; string clientId = default; string clientSecret = default; IDictionary serializedAdditionalRawData = default; @@ -248,6 +256,11 @@ internal static ApiManagementIdentityProviderData DeserializeApiManagementIdenti passwordResetPolicyName = property0.Value.GetString(); continue; } + if (property0.NameEquals("clientLibrary"u8)) + { + clientLibrary = property0.Value.GetString(); + continue; + } if (property0.NameEquals("clientId"u8)) { clientId = property0.Value.GetString(); @@ -280,11 +293,341 @@ internal static ApiManagementIdentityProviderData DeserializeApiManagementIdenti signinPolicyName, profileEditingPolicyName, passwordResetPolicyName, + clientLibrary, clientId, clientSecret, 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(IdentityProviderType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" type: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IdentityProviderType)) + { + builder.Append(" type: "); + builder.AppendLine($"'{IdentityProviderType.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SignInTenant), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" signinTenant: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SignInTenant)) + { + builder.Append(" signinTenant: "); + if (SignInTenant.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{SignInTenant}'''"); + } + else + { + builder.AppendLine($"'{SignInTenant}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AllowedTenants), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" allowedTenants: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(AllowedTenants)) + { + if (AllowedTenants.Any()) + { + builder.Append(" allowedTenants: "); + builder.AppendLine("["); + foreach (var item in AllowedTenants) + { + 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(Authority), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" authority: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Authority)) + { + builder.Append(" authority: "); + if (Authority.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Authority}'''"); + } + else + { + builder.AppendLine($"'{Authority}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SignUpPolicyName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" signupPolicyName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SignUpPolicyName)) + { + builder.Append(" signupPolicyName: "); + if (SignUpPolicyName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{SignUpPolicyName}'''"); + } + else + { + builder.AppendLine($"'{SignUpPolicyName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SignInPolicyName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" signinPolicyName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SignInPolicyName)) + { + builder.Append(" signinPolicyName: "); + if (SignInPolicyName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{SignInPolicyName}'''"); + } + else + { + builder.AppendLine($"'{SignInPolicyName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProfileEditingPolicyName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" profileEditingPolicyName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ProfileEditingPolicyName)) + { + builder.Append(" profileEditingPolicyName: "); + if (ProfileEditingPolicyName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ProfileEditingPolicyName}'''"); + } + else + { + builder.AppendLine($"'{ProfileEditingPolicyName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PasswordResetPolicyName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" passwordResetPolicyName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PasswordResetPolicyName)) + { + builder.Append(" passwordResetPolicyName: "); + if (PasswordResetPolicyName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{PasswordResetPolicyName}'''"); + } + else + { + builder.AppendLine($"'{PasswordResetPolicyName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ClientLibrary), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" clientLibrary: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ClientLibrary)) + { + builder.Append(" clientLibrary: "); + if (ClientLibrary.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ClientLibrary}'''"); + } + else + { + builder.AppendLine($"'{ClientLibrary}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ClientId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" clientId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ClientId)) + { + builder.Append(" clientId: "); + if (ClientId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ClientId}'''"); + } + else + { + builder.AppendLine($"'{ClientId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ClientSecret), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" clientSecret: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ClientSecret)) + { + builder.Append(" clientSecret: "); + if (ClientSecret.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ClientSecret}'''"); + } + else + { + builder.AppendLine($"'{ClientSecret}'"); + } + } + } + + 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; @@ -293,6 +636,8 @@ BinaryData IPersistableModel.Write(ModelReade { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementIdentityProviderData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementIdentityProviderData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementIdentityProviderData.cs index 70a4bbb798233..8bf0605abe849 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementIdentityProviderData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementIdentityProviderData.cs @@ -70,10 +70,11 @@ public ApiManagementIdentityProviderData() /// Signin Policy Name. Only applies to AAD B2C Identity Provider. /// Profile Editing Policy Name. Only applies to AAD B2C Identity Provider. /// Password Reset Policy Name. Only applies to AAD B2C Identity Provider. + /// The client library to be used in the developer portal. Only applies to AAD and AAD B2C Identity Provider. /// Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft. /// Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. /// Keeps track of any properties unknown to the library. - internal ApiManagementIdentityProviderData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IdentityProviderType? identityProviderType, string signInTenant, IList allowedTenants, string authority, string signUpPolicyName, string signInPolicyName, string profileEditingPolicyName, string passwordResetPolicyName, string clientId, string clientSecret, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal ApiManagementIdentityProviderData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IdentityProviderType? identityProviderType, string signInTenant, IList allowedTenants, string authority, string signUpPolicyName, string signInPolicyName, string profileEditingPolicyName, string passwordResetPolicyName, string clientLibrary, string clientId, string clientSecret, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { IdentityProviderType = identityProviderType; SignInTenant = signInTenant; @@ -83,30 +84,44 @@ internal ApiManagementIdentityProviderData(ResourceIdentifier id, string name, R SignInPolicyName = signInPolicyName; ProfileEditingPolicyName = profileEditingPolicyName; PasswordResetPolicyName = passwordResetPolicyName; + ClientLibrary = clientLibrary; ClientId = clientId; ClientSecret = clientSecret; _serializedAdditionalRawData = serializedAdditionalRawData; } /// Identity Provider Type identifier. + [WirePath("properties.type")] public IdentityProviderType? IdentityProviderType { get; set; } /// The TenantId to use instead of Common when logging into Active Directory. + [WirePath("properties.signinTenant")] public string SignInTenant { get; set; } /// List of Allowed Tenants when configuring Azure Active Directory login. + [WirePath("properties.allowedTenants")] public IList AllowedTenants { get; } /// OpenID Connect discovery endpoint hostname for AAD or AAD B2C. + [WirePath("properties.authority")] public string Authority { get; set; } /// Signup Policy Name. Only applies to AAD B2C Identity Provider. + [WirePath("properties.signupPolicyName")] public string SignUpPolicyName { get; set; } /// Signin Policy Name. Only applies to AAD B2C Identity Provider. + [WirePath("properties.signinPolicyName")] public string SignInPolicyName { get; set; } /// Profile Editing Policy Name. Only applies to AAD B2C Identity Provider. + [WirePath("properties.profileEditingPolicyName")] public string ProfileEditingPolicyName { get; set; } /// Password Reset Policy Name. Only applies to AAD B2C Identity Provider. + [WirePath("properties.passwordResetPolicyName")] public string PasswordResetPolicyName { get; set; } + /// The client library to be used in the developer portal. Only applies to AAD and AAD B2C Identity Provider. + [WirePath("properties.clientLibrary")] + public string ClientLibrary { get; set; } /// Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft. + [WirePath("properties.clientId")] public string ClientId { get; set; } /// Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. + [WirePath("properties.clientSecret")] public string ClientSecret { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementIdentityProviderResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementIdentityProviderResource.cs index ed0b70c56e9cd..9f2110b6b81ad 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementIdentityProviderResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementIdentityProviderResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAs /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationT /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -272,7 +272,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual async Task> Updat /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -358,7 +358,7 @@ public virtual Response Update(ETag ifMat /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -396,7 +396,7 @@ public virtual async Task> GetSecretsAsync(Cancel /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -434,7 +434,7 @@ public virtual Response GetSecrets(CancellationToken cance /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -472,7 +472,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementIssueCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementIssueCollection.cs index 790fdb03c5cdb..dba3c8c41b8e0 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementIssueCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementIssueCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string issueId, Cancella /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -187,7 +187,7 @@ public virtual AsyncPageable GetAllAsync(string filt /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -220,7 +220,7 @@ public virtual Pageable GetAll(string filter = null, /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -263,7 +263,7 @@ public virtual async Task> ExistsAsync(string issueId, Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -306,7 +306,7 @@ public virtual Response Exists(string issueId, CancellationToken cancellat /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -351,7 +351,7 @@ public virtual async Task> GetIfExi /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementIssueResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementIssueResource.cs index 7b187106069bc..1957b5dee5ccd 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementIssueResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementIssueResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancell /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementLoggerCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementLoggerCollection.cs index 12bfb472a7841..9057367cb6995 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementLoggerCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementLoggerCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> CreateOrUpd /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -168,7 +168,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnti /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -258,7 +258,7 @@ public virtual Response Get(string loggerId, Cancel /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -291,7 +291,7 @@ public virtual AsyncPageable GetAllAsync(string fil /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -324,7 +324,7 @@ public virtual Pageable GetAll(string filter = null /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -367,7 +367,7 @@ public virtual async Task> ExistsAsync(string loggerId, Cancellat /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -410,7 +410,7 @@ public virtual Response Exists(string loggerId, CancellationToken cancella /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -455,7 +455,7 @@ public virtual async Task> GetIfEx /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementLoggerData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementLoggerData.Serialization.cs index ddcd68b8aa8ad..fd9ee97de7dee 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementLoggerData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementLoggerData.Serialization.cs @@ -8,6 +8,8 @@ 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.ApiManagement.Models; @@ -234,6 +236,183 @@ internal static ApiManagementLoggerData DeserializeApiManagementLoggerData(JsonE 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(LoggerType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" loggerType: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(LoggerType)) + { + builder.Append(" loggerType: "); + builder.AppendLine($"'{LoggerType.Value.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}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Credentials), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" credentials: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Credentials)) + { + if (Credentials.Any()) + { + builder.Append(" credentials: "); + builder.AppendLine("{"); + foreach (var item in Credentials) + { + 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(IsBuffered), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" isBuffered: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsBuffered)) + { + builder.Append(" isBuffered: "); + var boolValue = IsBuffered.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + 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()}'"); + } + } + + 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; @@ -242,6 +421,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOpt { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementLoggerData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementLoggerData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementLoggerData.cs index 565786dafafcf..49e47b50c831c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementLoggerData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementLoggerData.cs @@ -82,17 +82,22 @@ internal ApiManagementLoggerData(ResourceIdentifier id, string name, ResourceTyp } /// Logger type. + [WirePath("properties.loggerType")] public LoggerType? LoggerType { get; set; } /// Logger description. + [WirePath("properties.description")] public string Description { get; set; } /// /// The name and SendRule connection string of the event hub for azureEventHub logger. /// Instrumentation key for applicationInsights logger. /// + [WirePath("properties.credentials")] public IDictionary Credentials { get; } /// Whether records are buffered in the logger before publishing. Default is assumed to be true. + [WirePath("properties.isBuffered")] public bool? IsBuffered { get; set; } /// Azure Resource Id of a log target (either Azure Event Hub resource or Azure Application Insights resource). + [WirePath("properties.resourceId")] public ResourceIdentifier ResourceId { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementLoggerResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementLoggerResource.cs index 3d7ab68b5d8bb..4e742dfe68356 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementLoggerResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementLoggerResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Cancel /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken cance /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -272,7 +272,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual async Task> UpdateAsync(ETa /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -358,7 +358,7 @@ public virtual Response Update(ETag ifMatch, ApiMan /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -396,7 +396,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNamedValueCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNamedValueCollection.cs index 53eec1c5d65a2..89ea3f38b8e2e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNamedValueCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNamedValueCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> CreateO /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -165,7 +165,7 @@ public virtual ArmOperation CreateOrUpdate(Wait /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task> GetAsync(st /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -255,7 +255,7 @@ public virtual Response Get(string namedValueId /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -289,7 +289,7 @@ public virtual AsyncPageable GetAllAsync(string /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -323,7 +323,7 @@ public virtual Pageable GetAll(string filter = /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -366,7 +366,7 @@ public virtual async Task> ExistsAsync(string namedValueId, Cance /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -409,7 +409,7 @@ public virtual Response Exists(string namedValueId, CancellationToken canc /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -454,7 +454,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNamedValueData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNamedValueData.Serialization.cs index e500c0d94d28c..262a3bcddf693 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNamedValueData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNamedValueData.Serialization.cs @@ -8,6 +8,8 @@ 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.ApiManagement.Models; @@ -229,6 +231,190 @@ internal static ApiManagementNamedValueData DeserializeApiManagementNamedValueDa 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(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) + { + 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(IsSecret), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" secret: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsSecret)) + { + builder.Append(" secret: "); + var boolValue = IsSecret.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + 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(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(KeyVaultDetails), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" keyVault: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(KeyVaultDetails)) + { + builder.Append(" keyVault: "); + BicepSerializationHelpers.AppendChildObject(builder, KeyVaultDetails, options, 4, false, " keyVault: "); + } + } + + 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; @@ -237,6 +423,8 @@ BinaryData IPersistableModel.Write(ModelReaderWrite { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementNamedValueData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNamedValueData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNamedValueData.cs index 84e2f65cb7677..a8bac899b00b1 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNamedValueData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNamedValueData.cs @@ -79,14 +79,19 @@ internal ApiManagementNamedValueData(ResourceIdentifier id, string name, Resourc } /// Optional tags that when provided can be used to filter the NamedValue list. + [WirePath("properties.tags")] public IList Tags { get; } /// Determines whether the value is a secret and should be encrypted or not. Default value is false. + [WirePath("properties.secret")] public bool? IsSecret { get; set; } /// Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore characters. + [WirePath("properties.displayName")] public string DisplayName { get; set; } /// Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of whitespace. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. + [WirePath("properties.value")] public string Value { get; set; } /// KeyVault location details of the namedValue. + [WirePath("properties.keyVault")] public KeyVaultContractProperties KeyVaultDetails { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNamedValueResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNamedValueResource.cs index e7363c126df3f..c6f8ca99f49e4 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNamedValueResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNamedValueResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken c /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -272,7 +272,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -319,7 +319,7 @@ public virtual async Task> UpdateA /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -366,7 +366,7 @@ public virtual ArmOperation Update(WaitUntil wa /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -404,7 +404,7 @@ public virtual async Task> GetValueAsync(Canc /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -442,7 +442,7 @@ public virtual Response GetValue(CancellationToken can /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -484,7 +484,7 @@ public virtual async Task> Refresh /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -526,7 +526,7 @@ public virtual ArmOperation RefreshSecret(WaitU /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -564,7 +564,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNotificationCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNotificationCollection.cs index bfd4cf4f0693d..711b89e757df6 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNotificationCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNotificationCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -111,7 +111,7 @@ public virtual async Task> Creat /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -157,7 +157,7 @@ public virtual ArmOperation CreateOrUpdate(Wa /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -198,7 +198,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -239,7 +239,7 @@ public virtual Response Get(NotificationName /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -271,7 +271,7 @@ public virtual AsyncPageable GetAllAsync(int? /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -303,7 +303,7 @@ public virtual Pageable GetAll(int? top = nul /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -342,7 +342,7 @@ public virtual async Task> ExistsAsync(NotificationName notificat /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -381,7 +381,7 @@ public virtual Response Exists(NotificationName notificationName, Cancella /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -422,7 +422,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNotificationData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNotificationData.Serialization.cs index 5d67dd010fbe5..d0e645781b95f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNotificationData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNotificationData.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.ApiManagement.Models; @@ -187,6 +188,138 @@ internal static ApiManagementNotificationData DeserializeApiManagementNotificati 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(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(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}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Recipients), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" recipients: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Recipients)) + { + builder.Append(" recipients: "); + BicepSerializationHelpers.AppendChildObject(builder, Recipients, options, 4, false, " recipients: "); + } + } + + 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; @@ -195,6 +328,8 @@ BinaryData IPersistableModel.Write(ModelReaderWri { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementNotificationData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNotificationData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNotificationData.cs index 4382039709eb9..1efbe7e32a71a 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNotificationData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNotificationData.cs @@ -74,10 +74,13 @@ internal ApiManagementNotificationData(ResourceIdentifier id, string name, Resou } /// Title of the Notification. + [WirePath("properties.title")] public string Title { get; set; } /// Description of the Notification. + [WirePath("properties.description")] public string Description { get; set; } /// Recipient Parameter values. + [WirePath("properties.recipients")] public RecipientsContractProperties Recipients { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNotificationResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNotificationResource.cs index 968667580b96a..fd54c3a083a68 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNotificationResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNotificationResource.cs @@ -111,7 +111,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -151,7 +151,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -191,7 +191,7 @@ public virtual Response Get(CancellationToken /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -236,7 +236,7 @@ public virtual async Task> Updat /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -281,7 +281,7 @@ public virtual ArmOperation Update(WaitUntil /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -306,7 +306,7 @@ public virtual AsyncPageable GetNotificationRecipientUser /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -331,7 +331,7 @@ public virtual Pageable GetNotificationRecipientUsers(Can /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -370,7 +370,7 @@ public virtual async Task> CheckNotificationRecipientUserEntityEx /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -409,7 +409,7 @@ public virtual Response CheckNotificationRecipientUserEntityExists(string /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -448,7 +448,7 @@ public virtual async Task> CreateOrUpdateNotific /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -487,7 +487,7 @@ public virtual Response CreateOrUpdateNotificationRecipie /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -526,7 +526,7 @@ public virtual async Task DeleteNotificationRecipientUserAsync(string /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -565,7 +565,7 @@ public virtual Response DeleteNotificationRecipientUser(string userId, Cancellat /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -590,7 +590,7 @@ public virtual AsyncPageable GetNotificationRecipientEma /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -615,7 +615,7 @@ public virtual Pageable GetNotificationRecipientEmails(C /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -654,7 +654,7 @@ public virtual async Task> CheckNotificationRecipientEmailEntityE /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -693,7 +693,7 @@ public virtual Response CheckNotificationRecipientEmailEntityExists(string /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -732,7 +732,7 @@ public virtual async Task> CreateOrUpdateNotifi /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -771,7 +771,7 @@ public virtual Response CreateOrUpdateNotificationRecipi /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -810,7 +810,7 @@ public virtual async Task DeleteNotificationRecipientEmailAsync(string /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementOpenIdConnectProviderCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementOpenIdConnectProviderCollection.cs index 189872e419bbe..a7f20c1362fdd 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementOpenIdConnectProviderCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementOpenIdConnectProviderCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -168,7 +168,7 @@ public virtual ArmOperation CreateOr /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -258,7 +258,7 @@ public virtual Response Get(string o /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -291,7 +291,7 @@ public virtual AsyncPageable GetAllA /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -324,7 +324,7 @@ public virtual Pageable GetAll(strin /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -367,7 +367,7 @@ public virtual async Task> ExistsAsync(string openId, Cancellatio /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -410,7 +410,7 @@ public virtual Response Exists(string openId, CancellationToken cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -455,7 +455,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementOpenIdConnectProviderData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementOpenIdConnectProviderData.Serialization.cs index 85f7369fe7932..fb64aa210dba4 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementOpenIdConnectProviderData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementOpenIdConnectProviderData.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Models; @@ -74,6 +75,16 @@ void IJsonModel.Write(Utf8JsonWriter wri writer.WritePropertyName("clientSecret"u8); writer.WriteStringValue(ClientSecret); } + if (Optional.IsDefined(UseInTestConsole)) + { + writer.WritePropertyName("useInTestConsole"u8); + writer.WriteBooleanValue(UseInTestConsole.Value); + } + if (Optional.IsDefined(UseInApiDocumentation)) + { + writer.WritePropertyName("useInApiDocumentation"u8); + writer.WriteBooleanValue(UseInApiDocumentation.Value); + } writer.WriteEndObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -122,6 +133,8 @@ internal static ApiManagementOpenIdConnectProviderData DeserializeApiManagementO string metadataEndpoint = default; string clientId = default; string clientSecret = default; + bool? useInTestConsole = default; + bool? useInApiDocumentation = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -184,6 +197,24 @@ internal static ApiManagementOpenIdConnectProviderData DeserializeApiManagementO clientSecret = property0.Value.GetString(); continue; } + if (property0.NameEquals("useInTestConsole"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + useInTestConsole = property0.Value.GetBoolean(); + continue; + } + if (property0.NameEquals("useInApiDocumentation"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + useInApiDocumentation = property0.Value.GetBoolean(); + continue; + } } continue; } @@ -203,9 +234,229 @@ internal static ApiManagementOpenIdConnectProviderData DeserializeApiManagementO metadataEndpoint, clientId, clientSecret, + useInTestConsole, + useInApiDocumentation, 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(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(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}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(MetadataEndpoint), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" metadataEndpoint: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(MetadataEndpoint)) + { + builder.Append(" metadataEndpoint: "); + if (MetadataEndpoint.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{MetadataEndpoint}'''"); + } + else + { + builder.AppendLine($"'{MetadataEndpoint}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ClientId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" clientId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ClientId)) + { + builder.Append(" clientId: "); + if (ClientId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ClientId}'''"); + } + else + { + builder.AppendLine($"'{ClientId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ClientSecret), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" clientSecret: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ClientSecret)) + { + builder.Append(" clientSecret: "); + if (ClientSecret.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ClientSecret}'''"); + } + else + { + builder.AppendLine($"'{ClientSecret}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(UseInTestConsole), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" useInTestConsole: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(UseInTestConsole)) + { + builder.Append(" useInTestConsole: "); + var boolValue = UseInTestConsole.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(UseInApiDocumentation), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" useInApiDocumentation: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(UseInApiDocumentation)) + { + builder.Append(" useInApiDocumentation: "); + var boolValue = UseInApiDocumentation.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + 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; @@ -214,6 +465,8 @@ BinaryData IPersistableModel.Write(Model { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementOpenIdConnectProviderData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementOpenIdConnectProviderData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementOpenIdConnectProviderData.cs index 316ee490092e0..93847379f96c5 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementOpenIdConnectProviderData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementOpenIdConnectProviderData.cs @@ -65,26 +65,41 @@ public ApiManagementOpenIdConnectProviderData() /// Metadata endpoint URI. /// Client ID of developer console which is the client application. /// Client Secret of developer console which is the client application. + /// If true, the Open ID Connect provider may be used in the developer portal test console. True by default if no value is provided. + /// If true, the Open ID Connect provider will be used in the API documentation in the developer portal. False by default if no value is provided. /// Keeps track of any properties unknown to the library. - internal ApiManagementOpenIdConnectProviderData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string displayName, string description, string metadataEndpoint, string clientId, string clientSecret, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal ApiManagementOpenIdConnectProviderData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string displayName, string description, string metadataEndpoint, string clientId, string clientSecret, bool? useInTestConsole, bool? useInApiDocumentation, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { DisplayName = displayName; Description = description; MetadataEndpoint = metadataEndpoint; ClientId = clientId; ClientSecret = clientSecret; + UseInTestConsole = useInTestConsole; + UseInApiDocumentation = useInApiDocumentation; _serializedAdditionalRawData = serializedAdditionalRawData; } /// User-friendly OpenID Connect Provider name. + [WirePath("properties.displayName")] public string DisplayName { get; set; } /// User-friendly description of OpenID Connect Provider. + [WirePath("properties.description")] public string Description { get; set; } /// Metadata endpoint URI. + [WirePath("properties.metadataEndpoint")] public string MetadataEndpoint { get; set; } /// Client ID of developer console which is the client application. + [WirePath("properties.clientId")] public string ClientId { get; set; } /// Client Secret of developer console which is the client application. + [WirePath("properties.clientSecret")] public string ClientSecret { get; set; } + /// If true, the Open ID Connect provider may be used in the developer portal test console. True by default if no value is provided. + [WirePath("properties.useInTestConsole")] + public bool? UseInTestConsole { get; set; } + /// If true, the Open ID Connect provider will be used in the API documentation in the developer portal. False by default if no value is provided. + [WirePath("properties.useInApiDocumentation")] + public bool? UseInApiDocumentation { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementOpenIdConnectProviderResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementOpenIdConnectProviderResource.cs index d0ecfa9e6c69b..177e7d0ad1434 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementOpenIdConnectProviderResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementOpenIdConnectProviderResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(Cancella /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -272,7 +272,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -358,7 +358,7 @@ public virtual Response Update(ETag /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -396,7 +396,7 @@ public virtual async Task> GetSecretsAsync(Cancel /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -434,7 +434,7 @@ public virtual Response GetSecrets(CancellationToken cance /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -472,7 +472,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPolicyCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPolicyCollection.cs index d5e070b01ab55..d2e77ba437a1a 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPolicyCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPolicyCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> CreateOrUpd /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -165,7 +165,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnti /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(Policy /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -249,7 +249,7 @@ public virtual Response Get(PolicyName policyId, Po /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -278,7 +278,7 @@ public virtual AsyncPageable GetAllAsync(Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -307,7 +307,7 @@ public virtual Pageable GetAll(CancellationToken ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -347,7 +347,7 @@ public virtual async Task> ExistsAsync(PolicyName policyId, Polic /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -387,7 +387,7 @@ public virtual Response Exists(PolicyName policyId, PolicyExportFormat? fo /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -429,7 +429,7 @@ public virtual async Task> GetIfEx /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPolicyResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPolicyResource.cs index 22de937f15bd0..fe2116361d5cf 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPolicyResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPolicyResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Policy /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual Response Get(PolicyExportFormat? for /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -229,7 +229,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -274,7 +274,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -323,7 +323,7 @@ public virtual async Task> UpdateAsync /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -372,7 +372,7 @@ public virtual ArmOperation Update(WaitUntil waitUn /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -410,7 +410,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalDelegationSettingData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalDelegationSettingData.Serialization.cs index 6cd6e13817bcc..2be1af441e7da 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalDelegationSettingData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalDelegationSettingData.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.ApiManagement.Models; @@ -207,6 +208,155 @@ internal static ApiManagementPortalDelegationSettingData DeserializeApiManagemen 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(Uri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" url: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Uri)) + { + builder.Append(" url: "); + builder.AppendLine($"'{Uri.AbsoluteUri}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ValidationKey), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" validationKey: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ValidationKey)) + { + builder.Append(" validationKey: "); + if (ValidationKey.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ValidationKey}'''"); + } + else + { + builder.AppendLine($"'{ValidationKey}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("IsSubscriptionDelegationEnabled", out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" subscriptions: "); + builder.AppendLine("{"); + builder.AppendLine(" subscriptions: {"); + builder.Append(" enabled: "); + builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); + builder.AppendLine(" }"); + } + else + { + if (Optional.IsDefined(Subscriptions)) + { + builder.Append(" subscriptions: "); + BicepSerializationHelpers.AppendChildObject(builder, Subscriptions, options, 4, false, " subscriptions: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("IsUserRegistrationDelegationEnabled", out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" userRegistration: "); + builder.AppendLine("{"); + builder.AppendLine(" userRegistration: {"); + builder.Append(" enabled: "); + builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); + builder.AppendLine(" }"); + } + else + { + if (Optional.IsDefined(UserRegistration)) + { + builder.Append(" userRegistration: "); + BicepSerializationHelpers.AppendChildObject(builder, UserRegistration, options, 4, false, " userRegistration: "); + } + } + + 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; @@ -215,6 +365,8 @@ BinaryData IPersistableModel.Write(Mod { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementPortalDelegationSettingData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalDelegationSettingData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalDelegationSettingData.cs index ce2c7d0f5c5c6..551b06a07b7ea 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalDelegationSettingData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalDelegationSettingData.cs @@ -76,12 +76,15 @@ internal ApiManagementPortalDelegationSettingData(ResourceIdentifier id, string } /// A delegation Url. + [WirePath("properties.url")] public Uri Uri { get; set; } /// A base64-encoded validation key to validate, that a request is coming from Azure API Management. + [WirePath("properties.validationKey")] public string ValidationKey { get; set; } /// Subscriptions delegation settings. internal SubscriptionDelegationSettingProperties Subscriptions { get; set; } /// Enable or disable delegation for subscriptions. + [WirePath("properties.subscriptions.enabled")] public bool? IsSubscriptionDelegationEnabled { get => Subscriptions is null ? default : Subscriptions.IsSubscriptionDelegationEnabled; @@ -96,6 +99,7 @@ public bool? IsSubscriptionDelegationEnabled /// User registration delegation settings. internal RegistrationDelegationSettingProperties UserRegistration { get; set; } /// Enable or disable delegation for user registration. + [WirePath("properties.userRegistration.enabled")] public bool? IsUserRegistrationDelegationEnabled { get => UserRegistration is null ? default : UserRegistration.IsUserRegistrationDelegationEnabled; diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalDelegationSettingResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalDelegationSettingResource.cs index d1742ece97c30..0319a45c87644 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalDelegationSettingResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalDelegationSettingResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(Cancel /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task UpdateAsync(ETag ifMatch, ApiManagementPorta /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -267,7 +267,7 @@ public virtual Response Update(ETag ifMatch, ApiManagementPortalDelegationSettin /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -316,7 +316,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -365,7 +365,7 @@ public virtual ArmOperation Create /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -403,7 +403,7 @@ public virtual async Task> GetSecre /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -441,7 +441,7 @@ public virtual Response GetSecrets(Cancellat /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -479,7 +479,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalRevisionCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalRevisionCollection.cs index 0487323685099..92348d88a996f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalRevisionCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalRevisionCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> Cre /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate( /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsyn /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string portalRe /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -293,7 +293,7 @@ public virtual AsyncPageable GetAllAsync(st /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -334,7 +334,7 @@ public virtual Pageable GetAll(string filte /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -377,7 +377,7 @@ public virtual async Task> ExistsAsync(string portalRevisionId, C /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -420,7 +420,7 @@ public virtual Response Exists(string portalRevisionId, CancellationToken /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -465,7 +465,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalRevisionData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalRevisionData.Serialization.cs index 095777df1cd6d..1c0ddd7679361 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalRevisionData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalRevisionData.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.ApiManagement.Models; @@ -235,6 +236,186 @@ internal static ApiManagementPortalRevisionData DeserializeApiManagementPortalRe 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(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}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(StatusDetails), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" statusDetails: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(StatusDetails)) + { + builder.Append(" statusDetails: "); + if (StatusDetails.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{StatusDetails}'''"); + } + else + { + builder.AppendLine($"'{StatusDetails}'"); + } + } + } + + 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(IsCurrent), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" isCurrent: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsCurrent)) + { + builder.Append(" isCurrent: "); + var boolValue = IsCurrent.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CreatedOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" createdDateTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CreatedOn)) + { + builder.Append(" createdDateTime: "); + var formattedDateTimeString = TypeFormatters.ToString(CreatedOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(UpdatedOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" updatedDateTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(UpdatedOn)) + { + builder.Append(" updatedDateTime: "); + var formattedDateTimeString = TypeFormatters.ToString(UpdatedOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + 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; @@ -243,6 +424,8 @@ BinaryData IPersistableModel.Write(ModelReaderW { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementPortalRevisionData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalRevisionData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalRevisionData.cs index aa67e255d00d4..ad0006c7934d5 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalRevisionData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalRevisionData.cs @@ -80,16 +80,22 @@ internal ApiManagementPortalRevisionData(ResourceIdentifier id, string name, Res } /// Portal revision description. + [WirePath("properties.description")] public string Description { get; set; } /// Portal revision publishing status details. + [WirePath("properties.statusDetails")] public string StatusDetails { get; } /// Status of the portal's revision. + [WirePath("properties.status")] public PortalRevisionStatus? Status { get; } /// Indicates if the portal's revision is public. + [WirePath("properties.isCurrent")] public bool? IsCurrent { get; set; } /// Portal's revision creation date and time. + [WirePath("properties.createdDateTime")] public DateTimeOffset? CreatedOn { get; } /// Last updated date and time. + [WirePath("properties.updatedDateTime")] public DateTimeOffset? UpdatedOn { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalRevisionResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalRevisionResource.cs index 6cdad5809a33e..abc551e60b43f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalRevisionResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalRevisionResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsyn /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationTok /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -228,7 +228,7 @@ public virtual async Task> Upd /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -275,7 +275,7 @@ public virtual ArmOperation Update(WaitUnti /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalSignInSettingData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalSignInSettingData.Serialization.cs index 2ebddcb6d8c30..6e529c4fceac6 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalSignInSettingData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalSignInSettingData.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Models; @@ -162,6 +163,93 @@ internal static ApiManagementPortalSignInSettingData DeserializeApiManagementPor 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(IsRedirectEnabled), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" enabled: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsRedirectEnabled)) + { + builder.Append(" enabled: "); + var boolValue = IsRedirectEnabled.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + 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; @@ -170,6 +258,8 @@ BinaryData IPersistableModel.Write(ModelRe { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementPortalSignInSettingData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalSignInSettingData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalSignInSettingData.cs index a7f2913a9087d..9644008bf28b4 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalSignInSettingData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalSignInSettingData.cs @@ -69,6 +69,7 @@ internal ApiManagementPortalSignInSettingData(ResourceIdentifier id, string name } /// Redirect Anonymous users to the Sign-In page. + [WirePath("properties.enabled")] public bool? IsRedirectEnabled { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalSignInSettingResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalSignInSettingResource.cs index 2d76113efdc1c..74ffc0205152f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalSignInSettingResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalSignInSettingResource.cs @@ -100,7 +100,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -180,7 +180,7 @@ public virtual Response Get(Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task UpdateAsync(ETag ifMatch, ApiManagementPorta /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -266,7 +266,7 @@ public virtual Response Update(ETag ifMatch, ApiManagementPortalSignInSettingDat /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -364,7 +364,7 @@ public virtual ArmOperation CreateOrUp /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -402,7 +402,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalSignUpSettingData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalSignUpSettingData.Serialization.cs index 6db4619a0c478..8e23f159f4334 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalSignUpSettingData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalSignUpSettingData.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.ApiManagement.Models; @@ -179,6 +180,108 @@ internal static ApiManagementPortalSignUpSettingData DeserializeApiManagementPor 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(IsSignUpDeveloperPortalEnabled), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" enabled: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsSignUpDeveloperPortalEnabled)) + { + builder.Append(" enabled: "); + var boolValue = IsSignUpDeveloperPortalEnabled.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TermsOfService), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" termsOfService: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TermsOfService)) + { + builder.Append(" termsOfService: "); + BicepSerializationHelpers.AppendChildObject(builder, TermsOfService, options, 4, false, " termsOfService: "); + } + } + + 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; @@ -187,6 +290,8 @@ BinaryData IPersistableModel.Write(ModelRe { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementPortalSignUpSettingData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalSignUpSettingData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalSignUpSettingData.cs index 879786d409615..2704abead6482 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalSignUpSettingData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalSignUpSettingData.cs @@ -72,8 +72,10 @@ internal ApiManagementPortalSignUpSettingData(ResourceIdentifier id, string name } /// Allow users to sign up on a developer portal. + [WirePath("properties.enabled")] public bool? IsSignUpDeveloperPortalEnabled { get; set; } /// Terms of service contract properties. + [WirePath("properties.termsOfService")] public TermsOfServiceProperties TermsOfService { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalSignUpSettingResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalSignUpSettingResource.cs index d041db6de7443..bbfb18a9df942 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalSignUpSettingResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalSignUpSettingResource.cs @@ -100,7 +100,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -180,7 +180,7 @@ public virtual Response Get(Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task UpdateAsync(ETag ifMatch, ApiManagementPorta /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -266,7 +266,7 @@ public virtual Response Update(ETag ifMatch, ApiManagementPortalSignUpSettingDat /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -364,7 +364,7 @@ public virtual ArmOperation CreateOrUp /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -402,7 +402,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateEndpointConnectionCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateEndpointConnectionCollection.cs index 6d448c7b62ecb..5765eda1a0c82 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateEndpointConnectionCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateEndpointConnectionCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation Crea /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(stri /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable Get /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual Pageable GetAll(C /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -354,7 +354,7 @@ public virtual async Task> ExistsAsync(string privateEndpointConn /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -397,7 +397,7 @@ public virtual Response Exists(string privateEndpointConnectionName, Cance /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -442,7 +442,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateEndpointConnectionData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateEndpointConnectionData.Serialization.cs index 41a882dc5c6c4..b54b74a29f7c6 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateEndpointConnectionData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateEndpointConnectionData.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.ApiManagement.Models; @@ -196,6 +197,127 @@ internal static ApiManagementPrivateEndpointConnectionData DeserializeApiManagem 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("PrivateEndpointId", out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" privateEndpoint: "); + builder.AppendLine("{"); + builder.AppendLine(" privateEndpoint: {"); + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); + builder.AppendLine(" }"); + } + else + { + if (Optional.IsDefined(PrivateEndpoint)) + { + builder.Append(" privateEndpoint: "); + BicepSerializationHelpers.AppendChildObject(builder, PrivateEndpoint, options, 4, false, " privateEndpoint: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ConnectionState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" privateLinkServiceConnectionState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ConnectionState)) + { + builder.Append(" privateLinkServiceConnectionState: "); + BicepSerializationHelpers.AppendChildObject(builder, ConnectionState, options, 4, false, " privateLinkServiceConnectionState: "); + } + } + + 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()}'"); + } + } + + 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; @@ -204,6 +326,8 @@ BinaryData IPersistableModel.Write(M { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementPrivateEndpointConnectionData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateEndpointConnectionData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateEndpointConnectionData.cs index 29d3dbeaade9b..5c819d4b14318 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateEndpointConnectionData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateEndpointConnectionData.cs @@ -77,14 +77,17 @@ internal ApiManagementPrivateEndpointConnectionData(ResourceIdentifier id, strin /// The resource of private end point. internal SubResource PrivateEndpoint { get; set; } /// Gets Id. + [WirePath("properties.privateEndpoint.id")] public ResourceIdentifier PrivateEndpointId { get => PrivateEndpoint is null ? default : PrivateEndpoint.Id; } /// A collection of information about the state of the connection between service consumer and provider. + [WirePath("properties.privateLinkServiceConnectionState")] public ApiManagementPrivateLinkServiceConnectionState ConnectionState { get; set; } /// The provisioning state of the private endpoint connection resource. + [WirePath("properties.provisioningState")] public ApiManagementPrivateEndpointConnectionProvisioningState? ProvisioningState { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateEndpointConnectionResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateEndpointConnectionResource.cs index e0269aa6241ff..8a48fb0bcac3f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateEndpointConnectionResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateEndpointConnectionResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(Canc /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -266,7 +266,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateLinkResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateLinkResource.cs index 366f7759a8c62..80a2a68bea52a 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateLinkResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateLinkResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(C /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateLinkResourceCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateLinkResourceCollection.cs index ddd61e360f400..88a546976c955 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateLinkResourceCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateLinkResourceCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(s /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string privateLink /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual AsyncPageable GetAllAsync(Cance /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -212,7 +212,7 @@ public virtual Pageable GetAll(CancellationTok /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -255,7 +255,7 @@ public virtual async Task> ExistsAsync(string privateLinkSubResou /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -298,7 +298,7 @@ public virtual Response Exists(string privateLinkSubResourceName, Cancella /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -343,7 +343,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateLinkResourceData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateLinkResourceData.Serialization.cs index fffe7573cd210..db8f5950470a1 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateLinkResourceData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateLinkResourceData.Serialization.cs @@ -8,6 +8,8 @@ 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; @@ -210,6 +212,172 @@ internal static ApiManagementPrivateLinkResourceData DeserializeApiManagementPri 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(GroupId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" groupId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(GroupId)) + { + builder.Append(" groupId: "); + if (GroupId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{GroupId}'''"); + } + else + { + builder.AppendLine($"'{GroupId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(RequiredMembers), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" requiredMembers: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(RequiredMembers)) + { + if (RequiredMembers.Any()) + { + builder.Append(" requiredMembers: "); + builder.AppendLine("["); + foreach (var item in RequiredMembers) + { + 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(RequiredZoneNames), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" requiredZoneNames: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(RequiredZoneNames)) + { + if (RequiredZoneNames.Any()) + { + builder.Append(" requiredZoneNames: "); + builder.AppendLine("["); + foreach (var item in RequiredZoneNames) + { + 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; @@ -218,6 +386,8 @@ BinaryData IPersistableModel.Write(ModelRe { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementPrivateLinkResourceData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateLinkResourceData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateLinkResourceData.cs index b64fb67d0ccfe..cc7c97e321344 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateLinkResourceData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateLinkResourceData.cs @@ -75,10 +75,13 @@ internal ApiManagementPrivateLinkResourceData(ResourceIdentifier id, string name } /// The private link resource group id. + [WirePath("properties.groupId")] public string GroupId { get; } /// The private link resource required member names. + [WirePath("properties.requiredMembers")] public IReadOnlyList RequiredMembers { get; } /// The private link resource Private link DNS zone name. + [WirePath("properties.requiredZoneNames")] public IList RequiredZoneNames { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductCollection.cs index 672baa6175cf0..84cf34eafaf1c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> CreateOrUp /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -168,7 +168,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnt /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task> GetAsync(strin /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -258,7 +258,7 @@ public virtual Response Get(string productId, Canc /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -293,7 +293,7 @@ public virtual AsyncPageable GetAllAsync(string fi /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -328,7 +328,7 @@ public virtual Pageable GetAll(string filter = nul /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -371,7 +371,7 @@ public virtual async Task> ExistsAsync(string productId, Cancella /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -414,7 +414,7 @@ public virtual Response Exists(string productId, CancellationToken cancell /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -459,7 +459,7 @@ public virtual async Task> GetIfE /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductData.Serialization.cs index 79dd361246db7..4db24b4331595 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductData.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.ApiManagement.Models; @@ -247,6 +248,208 @@ internal static ApiManagementProductData DeserializeApiManagementProductData(Jso 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(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}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Terms), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" terms: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Terms)) + { + builder.Append(" terms: "); + if (Terms.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Terms}'''"); + } + else + { + builder.AppendLine($"'{Terms}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsSubscriptionRequired), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" subscriptionRequired: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsSubscriptionRequired)) + { + builder.Append(" subscriptionRequired: "); + var boolValue = IsSubscriptionRequired.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsApprovalRequired), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" approvalRequired: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsApprovalRequired)) + { + builder.Append(" approvalRequired: "); + var boolValue = IsApprovalRequired.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SubscriptionsLimit), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" subscriptionsLimit: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SubscriptionsLimit)) + { + builder.Append(" subscriptionsLimit: "); + builder.AppendLine($"{SubscriptionsLimit.Value}"); + } + } + + 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.ToSerialString()}'"); + } + } + + 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}'"); + } + } + } + + 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; @@ -255,6 +458,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOp { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementProductData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductData.cs index 65278be4a8a15..fef414385e719 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductData.cs @@ -82,18 +82,25 @@ internal ApiManagementProductData(ResourceIdentifier id, string name, ResourceTy } /// Product description. May include HTML formatting tags. + [WirePath("properties.description")] public string Description { get; set; } /// Product terms of use. Developers trying to subscribe to the product will be presented and required to accept these terms before they can complete the subscription process. + [WirePath("properties.terms")] public string Terms { get; set; } /// Whether a product subscription is required for accessing APIs included in this product. If true, the product is referred to as "protected" and a valid subscription key is required for a request to an API included in the product to succeed. If false, the product is referred to as "open" and requests to an API included in the product can be made without a subscription key. If property is omitted when creating a new product it's value is assumed to be true. + [WirePath("properties.subscriptionRequired")] public bool? IsSubscriptionRequired { get; set; } /// whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the product’s APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present only if subscriptionRequired property is present and has a value of false. + [WirePath("properties.approvalRequired")] public bool? IsApprovalRequired { get; set; } /// Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false. + [WirePath("properties.subscriptionsLimit")] public int? SubscriptionsLimit { get; set; } /// whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished. + [WirePath("properties.state")] public ApiManagementProductState? State { get; set; } /// Product name. + [WirePath("properties.displayName")] public string DisplayName { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductPolicyCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductPolicyCollection.cs index 67c883b306650..153d9d21e16dc 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductPolicyCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductPolicyCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> Crea /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -165,7 +165,7 @@ public virtual ArmOperation CreateOrUpdate(W /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -249,7 +249,7 @@ public virtual Response Get(PolicyName polic /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -278,7 +278,7 @@ public virtual AsyncPageable GetAllAsync(Can /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -307,7 +307,7 @@ public virtual Pageable GetAll(CancellationT /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -347,7 +347,7 @@ public virtual async Task> ExistsAsync(PolicyName policyId, Polic /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -387,7 +387,7 @@ public virtual Response Exists(PolicyName policyId, PolicyExportFormat? fo /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -429,7 +429,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductPolicyResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductPolicyResource.cs index a92b88e929ceb..53ec22e85bb22 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductPolicyResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductPolicyResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -144,7 +144,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -185,7 +185,7 @@ public virtual Response Get(PolicyExportForm /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -230,7 +230,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -275,7 +275,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -324,7 +324,7 @@ public virtual async Task> Upda /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -373,7 +373,7 @@ public virtual ArmOperation Update(WaitUntil /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -411,7 +411,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductResource.cs index 174721c031901..32478de17bdeb 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductResource.cs @@ -122,7 +122,7 @@ public virtual ApiManagementProductPolicyCollection GetApiManagementProductPolic /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -152,7 +152,7 @@ public virtual async Task> GetApiMa /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -189,7 +189,7 @@ public virtual ApiManagementProductTagCollection GetApiManagementProductTags() /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -220,7 +220,7 @@ public virtual async Task> GetApiManag /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -238,6 +238,13 @@ public virtual Response GetApiManagementProduct return GetApiManagementProductTags().Get(tagId, cancellationToken); } + /// Gets an object representing a ServiceProductWikiResource along with the instance operations that can be performed on it in the ApiManagementProduct. + /// Returns a object. + public virtual ServiceProductWikiResource GetServiceProductWiki() + { + return new ServiceProductWikiResource(Client, Id.AppendChildResource("wikis", "default")); + } + /// /// Gets the details of the product specified by its identifier. /// @@ -251,7 +258,7 @@ public virtual Response GetApiManagementProduct /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -291,7 +298,7 @@ public virtual async Task> GetAsync(Cance /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -331,7 +338,7 @@ public virtual Response Get(CancellationToken canc /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -377,7 +384,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -423,7 +430,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, bool? dele /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -466,7 +473,7 @@ public virtual async Task> UpdateAsync(ET /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -509,7 +516,7 @@ public virtual Response Update(ETag ifMatch, ApiMa /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -538,7 +545,7 @@ public virtual AsyncPageable GetProductApisAsync(string filter = /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -567,7 +574,7 @@ public virtual Pageable GetProductApis(string filter = null, int /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -606,7 +613,7 @@ public virtual async Task> CheckProductApiEntityExistsAsync(strin /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -645,7 +652,7 @@ public virtual Response CheckProductApiEntityExists(string apiId, Cancella /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -684,7 +691,7 @@ public virtual async Task> CreateOrUpdateProductApiAsyn /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -723,7 +730,7 @@ public virtual Response CreateOrUpdateProductApi(string apiId, C /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -762,7 +769,7 @@ public virtual async Task DeleteProductApiAsync(string apiId, Cancella /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -801,7 +808,7 @@ public virtual Response DeleteProductApi(string apiId, CancellationToken cancell /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -830,7 +837,7 @@ public virtual AsyncPageable GetProductGroupsAsync(string filt /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -859,7 +866,7 @@ public virtual Pageable GetProductGroups(string filter = null, /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -898,7 +905,7 @@ public virtual async Task> CheckProductGroupEntityExistsAsync(str /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -937,7 +944,7 @@ public virtual Response CheckProductGroupEntityExists(string groupId, Canc /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -976,7 +983,7 @@ public virtual async Task> CreateOrUpdateProductGroup /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -1015,7 +1022,7 @@ public virtual Response CreateOrUpdateProductGroup(string grou /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -1054,7 +1061,7 @@ public virtual async Task DeleteProductGroupAsync(string groupId, Canc /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -1093,7 +1100,7 @@ public virtual Response DeleteProductGroup(string groupId, CancellationToken can /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1131,7 +1138,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductTagCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductTagCollection.cs index edbd620948498..9462a28ba55ff 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductTagCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductTagCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateO /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(Wait /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(st /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string tagId, Cance /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -285,7 +285,7 @@ public virtual AsyncPageable GetAllAsync(string /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -318,7 +318,7 @@ public virtual Pageable GetAll(string filter = /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -361,7 +361,7 @@ public virtual async Task> ExistsAsync(string tagId, Cancellation /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -404,7 +404,7 @@ public virtual Response Exists(string tagId, CancellationToken cancellatio /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -449,7 +449,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductTagResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductTagResource.cs index bc2acf51838a2..3c5a2ab8c4a5e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductTagResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductTagResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken c /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -270,7 +270,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -314,7 +314,7 @@ public virtual async Task> UpdateA /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -358,7 +358,7 @@ public virtual ArmOperation Update(WaitUntil wa /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -396,7 +396,7 @@ public virtual async Task> GetEntityStateByProductAsync(Cancellat /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementServiceCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementServiceCollection.cs index cda6234f81c33..35567cce9609b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementServiceCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementServiceCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUp /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnt /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(strin /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string serviceName, Ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(Cancellat /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken c /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string serviceName, Cancel /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string serviceName, CancellationToken cance /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIfE /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementServiceData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementServiceData.Serialization.cs index 16c850a382830..133e1b3f6a36f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementServiceData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementServiceData.Serialization.cs @@ -8,7 +8,9 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; using System.Net; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.ApiManagement.Models; @@ -227,6 +229,21 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead writer.WritePropertyName("enableClientCertificate"u8); writer.WriteBooleanValue(EnableClientCertificate.Value); } + if (Optional.IsDefined(NatGatewayState)) + { + writer.WritePropertyName("natGatewayState"u8); + writer.WriteStringValue(NatGatewayState.Value.ToString()); + } + if (options.Format != "W" && Optional.IsCollectionDefined(OutboundPublicIPAddresses)) + { + writer.WritePropertyName("outboundPublicIPAddresses"u8); + writer.WriteStartArray(); + foreach (var item in OutboundPublicIPAddresses) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } if (Optional.IsDefined(DisableGateway)) { writer.WritePropertyName("disableGateway"u8); @@ -335,6 +352,8 @@ internal static ApiManagementServiceData DeserializeApiManagementServiceData(Jso IDictionary customProperties = default; IList certificates = default; bool? enableClientCertificate = default; + ApiManagementNatGatewayState? natGatewayState = default; + IReadOnlyList outboundPublicIPAddresses = default; bool? disableGateway = default; VirtualNetworkType? virtualNetworkType = default; ApiVersionConstraint apiVersionConstraint = default; @@ -648,6 +667,29 @@ internal static ApiManagementServiceData DeserializeApiManagementServiceData(Jso enableClientCertificate = property0.Value.GetBoolean(); continue; } + if (property0.NameEquals("natGatewayState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + natGatewayState = new ApiManagementNatGatewayState(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("outboundPublicIPAddresses"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + outboundPublicIPAddresses = array; + continue; + } if (property0.NameEquals("disableGateway"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -757,6 +799,8 @@ internal static ApiManagementServiceData DeserializeApiManagementServiceData(Jso customProperties ?? new ChangeTrackingDictionary(), certificates ?? new ChangeTrackingList(), enableClientCertificate, + natGatewayState, + outboundPublicIPAddresses ?? new ChangeTrackingList(), disableGateway, virtualNetworkType, apiVersionConstraint, @@ -768,6 +812,807 @@ internal static ApiManagementServiceData DeserializeApiManagementServiceData(Jso 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(Sku), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" sku: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Sku)) + { + builder.Append(" sku: "); + BicepSerializationHelpers.AppendChildObject(builder, Sku, options, 2, false, " sku: "); + } + } + + 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(ETag), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" etag: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ETag)) + { + builder.Append(" etag: "); + builder.AppendLine($"'{ETag.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Zones), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" zones: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Zones)) + { + if (Zones.Any()) + { + builder.Append(" zones: "); + builder.AppendLine("["); + foreach (var item in Zones) + { + 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(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(NotificationSenderEmail), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" notificationSenderEmail: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NotificationSenderEmail)) + { + builder.Append(" notificationSenderEmail: "); + if (NotificationSenderEmail.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NotificationSenderEmail}'''"); + } + else + { + builder.AppendLine($"'{NotificationSenderEmail}'"); + } + } + } + + 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}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TargetProvisioningState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" targetProvisioningState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TargetProvisioningState)) + { + builder.Append(" targetProvisioningState: "); + if (TargetProvisioningState.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{TargetProvisioningState}'''"); + } + else + { + builder.AppendLine($"'{TargetProvisioningState}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CreatedAtUtc), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" createdAtUtc: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CreatedAtUtc)) + { + builder.Append(" createdAtUtc: "); + var formattedDateTimeString = TypeFormatters.ToString(CreatedAtUtc.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(GatewayUri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" gatewayUrl: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(GatewayUri)) + { + builder.Append(" gatewayUrl: "); + builder.AppendLine($"'{GatewayUri.AbsoluteUri}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(GatewayRegionalUri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" gatewayRegionalUrl: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(GatewayRegionalUri)) + { + builder.Append(" gatewayRegionalUrl: "); + builder.AppendLine($"'{GatewayRegionalUri.AbsoluteUri}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PortalUri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" portalUrl: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PortalUri)) + { + builder.Append(" portalUrl: "); + builder.AppendLine($"'{PortalUri.AbsoluteUri}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ManagementApiUri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" managementApiUrl: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ManagementApiUri)) + { + builder.Append(" managementApiUrl: "); + builder.AppendLine($"'{ManagementApiUri.AbsoluteUri}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ScmUri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" scmUrl: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ScmUri)) + { + builder.Append(" scmUrl: "); + builder.AppendLine($"'{ScmUri.AbsoluteUri}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DeveloperPortalUri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" developerPortalUrl: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DeveloperPortalUri)) + { + builder.Append(" developerPortalUrl: "); + builder.AppendLine($"'{DeveloperPortalUri.AbsoluteUri}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(HostnameConfigurations), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" hostnameConfigurations: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(HostnameConfigurations)) + { + if (HostnameConfigurations.Any()) + { + builder.Append(" hostnameConfigurations: "); + builder.AppendLine("["); + foreach (var item in HostnameConfigurations) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " hostnameConfigurations: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PublicIPAddresses), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" publicIPAddresses: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(PublicIPAddresses)) + { + if (PublicIPAddresses.Any()) + { + builder.Append(" publicIPAddresses: "); + builder.AppendLine("["); + foreach (var item in PublicIPAddresses) + { + if (item == null) + { + builder.Append("null"); + continue; + } + builder.AppendLine($" '{item.ToString()}'"); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PrivateIPAddresses), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" privateIPAddresses: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(PrivateIPAddresses)) + { + if (PrivateIPAddresses.Any()) + { + builder.Append(" privateIPAddresses: "); + builder.AppendLine("["); + foreach (var item in PrivateIPAddresses) + { + if (item == null) + { + builder.Append("null"); + continue; + } + builder.AppendLine($" '{item.ToString()}'"); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PublicIPAddressId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" publicIpAddressId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PublicIPAddressId)) + { + builder.Append(" publicIpAddressId: "); + builder.AppendLine($"'{PublicIPAddressId.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: "); + builder.AppendLine($"'{PublicNetworkAccess.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(VirtualNetworkConfiguration), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" virtualNetworkConfiguration: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(VirtualNetworkConfiguration)) + { + builder.Append(" virtualNetworkConfiguration: "); + BicepSerializationHelpers.AppendChildObject(builder, VirtualNetworkConfiguration, options, 4, false, " virtualNetworkConfiguration: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AdditionalLocations), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" additionalLocations: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(AdditionalLocations)) + { + if (AdditionalLocations.Any()) + { + builder.Append(" additionalLocations: "); + builder.AppendLine("["); + foreach (var item in AdditionalLocations) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " additionalLocations: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CustomProperties), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" customProperties: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(CustomProperties)) + { + if (CustomProperties.Any()) + { + builder.Append(" customProperties: "); + builder.AppendLine("{"); + foreach (var item in CustomProperties) + { + 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(Certificates), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" certificates: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Certificates)) + { + if (Certificates.Any()) + { + builder.Append(" certificates: "); + builder.AppendLine("["); + foreach (var item in Certificates) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " certificates: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EnableClientCertificate), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" enableClientCertificate: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(EnableClientCertificate)) + { + builder.Append(" enableClientCertificate: "); + var boolValue = EnableClientCertificate.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NatGatewayState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" natGatewayState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NatGatewayState)) + { + builder.Append(" natGatewayState: "); + builder.AppendLine($"'{NatGatewayState.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(OutboundPublicIPAddresses), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" outboundPublicIPAddresses: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(OutboundPublicIPAddresses)) + { + if (OutboundPublicIPAddresses.Any()) + { + builder.Append(" outboundPublicIPAddresses: "); + builder.AppendLine("["); + foreach (var item in OutboundPublicIPAddresses) + { + 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(DisableGateway), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" disableGateway: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DisableGateway)) + { + builder.Append(" disableGateway: "); + var boolValue = DisableGateway.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(VirtualNetworkType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" virtualNetworkType: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(VirtualNetworkType)) + { + builder.Append(" virtualNetworkType: "); + builder.AppendLine($"'{VirtualNetworkType.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("MinApiVersion", out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiVersionConstraint: "); + builder.AppendLine("{"); + builder.AppendLine(" apiVersionConstraint: {"); + builder.Append(" minApiVersion: "); + builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); + builder.AppendLine(" }"); + } + else + { + if (Optional.IsDefined(ApiVersionConstraint)) + { + builder.Append(" apiVersionConstraint: "); + BicepSerializationHelpers.AppendChildObject(builder, ApiVersionConstraint, options, 4, false, " apiVersionConstraint: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Restore), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" restore: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Restore)) + { + builder.Append(" restore: "); + var boolValue = Restore.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PrivateEndpointConnections), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" privateEndpointConnections: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(PrivateEndpointConnections)) + { + if (PrivateEndpointConnections.Any()) + { + builder.Append(" privateEndpointConnections: "); + builder.AppendLine("["); + foreach (var item in PrivateEndpointConnections) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " privateEndpointConnections: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PlatformVersion), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" platformVersion: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PlatformVersion)) + { + builder.Append(" platformVersion: "); + builder.AppendLine($"'{PlatformVersion.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PublisherEmail), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" publisherEmail: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PublisherEmail)) + { + builder.Append(" publisherEmail: "); + if (PublisherEmail.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{PublisherEmail}'''"); + } + else + { + builder.AppendLine($"'{PublisherEmail}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PublisherName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" publisherName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PublisherName)) + { + builder.Append(" publisherName: "); + if (PublisherName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{PublisherName}'''"); + } + else + { + builder.AppendLine($"'{PublisherName}'"); + } + } + } + + 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; @@ -776,6 +1621,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOp { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementServiceData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementServiceData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementServiceData.cs index 04c2720694350..dee0cb282bb50 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementServiceData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementServiceData.cs @@ -72,6 +72,7 @@ public ApiManagementServiceData(AzureLocation location, ApiManagementServiceSkuP AdditionalLocations = new ChangeTrackingList(); CustomProperties = new ChangeTrackingDictionary(); Certificates = new ChangeTrackingList(); + OutboundPublicIPAddresses = new ChangeTrackingList(); PrivateEndpointConnections = new ChangeTrackingList(); PublisherEmail = publisherEmail; PublisherName = publisherName; @@ -105,9 +106,11 @@ public ApiManagementServiceData(AzureLocation location, ApiManagementServiceSkuP /// Whether or not public endpoint access is allowed for this API Management service. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'. /// Virtual network configuration of the API Management service. /// Additional datacenter locations of the API Management service. - /// Custom properties of the API Management service.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2).</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` can be used to disable just TLS 1.1.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` can be used to disable TLS 1.0 on an API Management service.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11` can be used to disable just TLS 1.1 for communications with backends.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10` can be used to disable TLS 1.0 for communications with backends.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2` can be used to enable HTTP2 protocol on an API Management service.</br>Not specifying any of these properties on PATCH operation will reset omitted properties' values to their defaults. For all the settings except Http2 the default value is `True` if the service was created on or before April 1st 2018 and `False` otherwise. Http2 setting's default value is `False`.</br></br>You can disable any of next ciphers by using settings `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]`: TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. For example, `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:`false`. The default value is `true` for them. Note: next ciphers can't be disabled since they are required by Azure CloudService internal components: TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_RSA_WITH_AES_256_GCM_SHA384. + /// Custom properties of the API Management service.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2).</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` can be used to disable just TLS 1.1.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` can be used to disable TLS 1.0 on an API Management service.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11` can be used to disable just TLS 1.1 for communications with backends.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10` can be used to disable TLS 1.0 for communications with backends.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2` can be used to enable HTTP2 protocol on an API Management service.</br>Not specifying any of these properties on PATCH operation will reset omitted properties' values to their defaults. For all the settings except Http2 the default value is `True` if the service was created on or before April 1, 2018 and `False` otherwise. Http2 setting's default value is `False`.</br></br>You can disable any of the following ciphers by using settings `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]`: TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. For example, `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:`false`. The default value is `true` for them.</br> Note: The following ciphers can't be disabled since they are required by internal platform components: TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256. /// List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10. /// Property only meant to be used for Consumption SKU Service. This enforces a client certificate to be presented on each request to the gateway. This also enables the ability to authenticate the certificate in the policy on the gateway. + /// Property can be used to enable NAT Gateway for this API Management service. + /// Outbound public IPV4 address prefixes associated with NAT Gateway deployed service. Available only for Premium SKU on stv2 platform. /// Property only valid for an Api Management service deployed in multiple locations. This can be used to disable the gateway in master region. /// The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only. /// Control Plane Apis version constraint for the API Management service. @@ -117,7 +120,7 @@ public ApiManagementServiceData(AzureLocation location, ApiManagementServiceSkuP /// Publisher email. /// Publisher name. /// Keeps track of any properties unknown to the library. - internal ApiManagementServiceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ApiManagementServiceSkuProperties sku, ManagedServiceIdentity identity, ETag? etag, IList zones, string notificationSenderEmail, string provisioningState, string targetProvisioningState, DateTimeOffset? createdAtUtc, Uri gatewayUri, Uri gatewayRegionalUri, Uri portalUri, Uri managementApiUri, Uri scmUri, Uri developerPortalUri, IList hostnameConfigurations, IReadOnlyList publicIPAddresses, IReadOnlyList privateIPAddresses, ResourceIdentifier publicIPAddressId, PublicNetworkAccess? publicNetworkAccess, VirtualNetworkConfiguration virtualNetworkConfiguration, IList additionalLocations, IDictionary customProperties, IList certificates, bool? enableClientCertificate, bool? disableGateway, VirtualNetworkType? virtualNetworkType, ApiVersionConstraint apiVersionConstraint, bool? restore, IList privateEndpointConnections, PlatformVersion? platformVersion, string publisherEmail, string publisherName, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal ApiManagementServiceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ApiManagementServiceSkuProperties sku, ManagedServiceIdentity identity, ETag? etag, IList zones, string notificationSenderEmail, string provisioningState, string targetProvisioningState, DateTimeOffset? createdAtUtc, Uri gatewayUri, Uri gatewayRegionalUri, Uri portalUri, Uri managementApiUri, Uri scmUri, Uri developerPortalUri, IList hostnameConfigurations, IReadOnlyList publicIPAddresses, IReadOnlyList privateIPAddresses, ResourceIdentifier publicIPAddressId, PublicNetworkAccess? publicNetworkAccess, VirtualNetworkConfiguration virtualNetworkConfiguration, IList additionalLocations, IDictionary customProperties, IList certificates, bool? enableClientCertificate, ApiManagementNatGatewayState? natGatewayState, IReadOnlyList outboundPublicIPAddresses, bool? disableGateway, VirtualNetworkType? virtualNetworkType, ApiVersionConstraint apiVersionConstraint, bool? restore, IList privateEndpointConnections, PlatformVersion? platformVersion, string publisherEmail, string publisherName, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { Sku = sku; Identity = identity; @@ -143,6 +146,8 @@ internal ApiManagementServiceData(ResourceIdentifier id, string name, ResourceTy CustomProperties = customProperties; Certificates = certificates; EnableClientCertificate = enableClientCertificate; + NatGatewayState = natGatewayState; + OutboundPublicIPAddresses = outboundPublicIPAddresses; DisableGateway = disableGateway; VirtualNetworkType = virtualNetworkType; ApiVersionConstraint = apiVersionConstraint; @@ -160,60 +165,93 @@ internal ApiManagementServiceData() } /// SKU properties of the API Management service. + [WirePath("sku")] public ApiManagementServiceSkuProperties Sku { get; set; } /// Managed service identity of the Api Management service. + [WirePath("identity")] public ManagedServiceIdentity Identity { get; set; } /// ETag of the resource. + [WirePath("etag")] public ETag? ETag { get; } /// A list of availability zones denoting where the resource needs to come from. + [WirePath("zones")] public IList Zones { get; } /// Email address from which the notification will be sent. + [WirePath("properties.notificationSenderEmail")] public string NotificationSenderEmail { get; set; } /// The current provisioning state of the API Management service which can be one of the following: Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. + [WirePath("properties.provisioningState")] public string ProvisioningState { get; } /// The provisioning state of the API Management service, which is targeted by the long running operation started on the service. + [WirePath("properties.targetProvisioningState")] public string TargetProvisioningState { get; } /// Creation UTC date of the API Management service.The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + [WirePath("properties.createdAtUtc")] public DateTimeOffset? CreatedAtUtc { get; } /// Gateway URL of the API Management service. + [WirePath("properties.gatewayUrl")] public Uri GatewayUri { get; } /// Gateway URL of the API Management service in the Default Region. + [WirePath("properties.gatewayRegionalUrl")] public Uri GatewayRegionalUri { get; } /// Publisher portal endpoint Url of the API Management service. + [WirePath("properties.portalUrl")] public Uri PortalUri { get; } /// Management API endpoint URL of the API Management service. + [WirePath("properties.managementApiUrl")] public Uri ManagementApiUri { get; } /// SCM endpoint URL of the API Management service. + [WirePath("properties.scmUrl")] public Uri ScmUri { get; } /// DEveloper Portal endpoint URL of the API Management service. + [WirePath("properties.developerPortalUrl")] public Uri DeveloperPortalUri { get; } /// Custom hostname configuration of the API Management service. + [WirePath("properties.hostnameConfigurations")] public IList HostnameConfigurations { get; } /// Public Static Load Balanced IP addresses of the API Management service in Primary region. Available only for Basic, Standard, Premium and Isolated SKU. + [WirePath("properties.publicIPAddresses")] public IReadOnlyList PublicIPAddresses { get; } /// Private Static Load Balanced IP addresses of the API Management service in Primary region which is deployed in an Internal Virtual Network. Available only for Basic, Standard, Premium and Isolated SKU. + [WirePath("properties.privateIPAddresses")] public IReadOnlyList PrivateIPAddresses { get; } /// Public Standard SKU IP V4 based IP address to be associated with Virtual Network deployed service in the region. Supported only for Developer and Premium SKU being deployed in Virtual Network. + [WirePath("properties.publicIpAddressId")] public ResourceIdentifier PublicIPAddressId { get; set; } /// Whether or not public endpoint access is allowed for this API Management service. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'. + [WirePath("properties.publicNetworkAccess")] public PublicNetworkAccess? PublicNetworkAccess { get; set; } /// Virtual network configuration of the API Management service. + [WirePath("properties.virtualNetworkConfiguration")] public VirtualNetworkConfiguration VirtualNetworkConfiguration { get; set; } /// Additional datacenter locations of the API Management service. + [WirePath("properties.additionalLocations")] public IList AdditionalLocations { get; } - /// Custom properties of the API Management service.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2).</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` can be used to disable just TLS 1.1.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` can be used to disable TLS 1.0 on an API Management service.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11` can be used to disable just TLS 1.1 for communications with backends.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10` can be used to disable TLS 1.0 for communications with backends.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2` can be used to enable HTTP2 protocol on an API Management service.</br>Not specifying any of these properties on PATCH operation will reset omitted properties' values to their defaults. For all the settings except Http2 the default value is `True` if the service was created on or before April 1st 2018 and `False` otherwise. Http2 setting's default value is `False`.</br></br>You can disable any of next ciphers by using settings `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]`: TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. For example, `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:`false`. The default value is `true` for them. Note: next ciphers can't be disabled since they are required by Azure CloudService internal components: TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_RSA_WITH_AES_256_GCM_SHA384. + /// Custom properties of the API Management service.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2).</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` can be used to disable just TLS 1.1.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` can be used to disable TLS 1.0 on an API Management service.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11` can be used to disable just TLS 1.1 for communications with backends.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10` can be used to disable TLS 1.0 for communications with backends.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2` can be used to enable HTTP2 protocol on an API Management service.</br>Not specifying any of these properties on PATCH operation will reset omitted properties' values to their defaults. For all the settings except Http2 the default value is `True` if the service was created on or before April 1, 2018 and `False` otherwise. Http2 setting's default value is `False`.</br></br>You can disable any of the following ciphers by using settings `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]`: TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. For example, `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:`false`. The default value is `true` for them.</br> Note: The following ciphers can't be disabled since they are required by internal platform components: TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256. + [WirePath("properties.customProperties")] public IDictionary CustomProperties { get; } /// List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10. + [WirePath("properties.certificates")] public IList Certificates { get; } /// Property only meant to be used for Consumption SKU Service. This enforces a client certificate to be presented on each request to the gateway. This also enables the ability to authenticate the certificate in the policy on the gateway. + [WirePath("properties.enableClientCertificate")] public bool? EnableClientCertificate { get; set; } + /// Property can be used to enable NAT Gateway for this API Management service. + [WirePath("properties.natGatewayState")] + public ApiManagementNatGatewayState? NatGatewayState { get; set; } + /// Outbound public IPV4 address prefixes associated with NAT Gateway deployed service. Available only for Premium SKU on stv2 platform. + [WirePath("properties.outboundPublicIPAddresses")] + public IReadOnlyList OutboundPublicIPAddresses { get; } /// Property only valid for an Api Management service deployed in multiple locations. This can be used to disable the gateway in master region. + [WirePath("properties.disableGateway")] public bool? DisableGateway { get; set; } /// The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only. + [WirePath("properties.virtualNetworkType")] public VirtualNetworkType? VirtualNetworkType { get; set; } /// Control Plane Apis version constraint for the API Management service. internal ApiVersionConstraint ApiVersionConstraint { get; set; } /// Limit control plane API calls to API Management service with version equal to or newer than this value. + [WirePath("properties.apiVersionConstraint.minApiVersion")] public string MinApiVersion { get => ApiVersionConstraint is null ? default : ApiVersionConstraint.MinApiVersion; @@ -226,14 +264,19 @@ public string MinApiVersion } /// Undelete Api Management Service if it was previously soft-deleted. If this flag is specified and set to True all other properties will be ignored. + [WirePath("properties.restore")] public bool? Restore { get; set; } /// List of Private Endpoint Connections of this service. + [WirePath("properties.privateEndpointConnections")] public IList PrivateEndpointConnections { get; } /// Compute Platform Version running the service in this location. + [WirePath("properties.platformVersion")] public PlatformVersion? PlatformVersion { get; } /// Publisher email. + [WirePath("properties.publisherEmail")] public string PublisherEmail { get; set; } /// Publisher name. + [WirePath("properties.publisherName")] public string PublisherName { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementServiceResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementServiceResource.cs index 474a7ba629156..78a5911a611d2 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementServiceResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementServiceResource.cs @@ -178,7 +178,7 @@ public virtual ApiCollection GetApis() /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -209,7 +209,7 @@ public virtual async Task> GetApiAsync(string apiId, Cance /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -247,7 +247,7 @@ public virtual ApiManagementPolicyCollection GetApiManagementPolicies() /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -277,7 +277,7 @@ public virtual async Task> GetApiManagemen /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -314,7 +314,7 @@ public virtual ApiManagementTagCollection GetApiManagementTags() /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> GetApiManagementTa /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -383,7 +383,7 @@ public virtual ApiManagementDiagnosticCollection GetApiManagementDiagnostics() /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -414,7 +414,7 @@ public virtual async Task> GetApiManag /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -452,7 +452,7 @@ public virtual ApiManagementIssueCollection GetApiManagementIssues() /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -483,7 +483,7 @@ public virtual async Task> GetApiManagement /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -521,7 +521,7 @@ public virtual ApiVersionSetCollection GetApiVersionSets() /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -552,7 +552,7 @@ public virtual async Task> GetApiVersionSetAsync /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -590,7 +590,7 @@ public virtual ApiManagementAuthorizationServerCollection GetApiManagementAuthor /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -621,7 +621,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -639,6 +639,75 @@ public virtual Response GetApiManageme return GetApiManagementAuthorizationServers().Get(authsid, cancellationToken); } + /// Gets a collection of AuthorizationProviderContractResources in the ApiManagementService. + /// An object representing collection of AuthorizationProviderContractResources and their operations over a AuthorizationProviderContractResource. + public virtual AuthorizationProviderContractCollection GetAuthorizationProviderContracts() + { + return GetCachedClient(client => new AuthorizationProviderContractCollection(client, Id)); + } + + /// + /// Gets the details of the authorization provider specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId} + /// + /// + /// Operation Id + /// AuthorizationProvider_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Identifier of the authorization provider. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetAuthorizationProviderContractAsync(string authorizationProviderId, CancellationToken cancellationToken = default) + { + return await GetAuthorizationProviderContracts().GetAsync(authorizationProviderId, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the details of the authorization provider specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId} + /// + /// + /// Operation Id + /// AuthorizationProvider_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Identifier of the authorization provider. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetAuthorizationProviderContract(string authorizationProviderId, CancellationToken cancellationToken = default) + { + return GetAuthorizationProviderContracts().Get(authorizationProviderId, cancellationToken); + } + /// Gets a collection of ApiManagementBackendResources in the ApiManagementService. /// An object representing collection of ApiManagementBackendResources and their operations over a ApiManagementBackendResource. public virtual ApiManagementBackendCollection GetApiManagementBackends() @@ -659,7 +728,7 @@ public virtual ApiManagementBackendCollection GetApiManagementBackends() /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -690,7 +759,7 @@ public virtual async Task> GetApiManageme /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -728,7 +797,7 @@ public virtual ApiManagementCacheCollection GetApiManagementCaches() /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -759,7 +828,7 @@ public virtual async Task> GetApiManagement /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -797,7 +866,7 @@ public virtual ApiManagementCertificateCollection GetApiManagementCertificates() /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -828,7 +897,7 @@ public virtual async Task> GetApiMana /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -866,7 +935,7 @@ public virtual ApiManagementEmailTemplateCollection GetApiManagementEmailTemplat /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -895,7 +964,7 @@ public virtual async Task> GetApiMa /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -931,7 +1000,7 @@ public virtual ApiManagementGatewayCollection GetApiManagementGateways() /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -962,7 +1031,7 @@ public virtual async Task> GetApiManageme /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1000,7 +1069,7 @@ public virtual ApiManagementGroupCollection GetApiManagementGroups() /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1031,7 +1100,7 @@ public virtual async Task> GetApiManagement /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1069,7 +1138,7 @@ public virtual ApiManagementIdentityProviderCollection GetApiManagementIdentityP /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1098,7 +1167,7 @@ public virtual async Task> GetAp /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1134,7 +1203,7 @@ public virtual ApiManagementLoggerCollection GetApiManagementLoggers() /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1165,7 +1234,7 @@ public virtual async Task> GetApiManagemen /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1203,7 +1272,7 @@ public virtual ApiManagementNamedValueCollection GetApiManagementNamedValues() /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1234,7 +1303,7 @@ public virtual async Task> GetApiManag /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1272,7 +1341,7 @@ public virtual ApiManagementNotificationCollection GetApiManagementNotifications /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1301,7 +1370,7 @@ public virtual async Task> GetApiMan /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1337,7 +1406,7 @@ public virtual ApiManagementOpenIdConnectProviderCollection GetApiManagementOpen /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1368,7 +1437,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1386,6 +1455,146 @@ public virtual Response GetApiManage return GetApiManagementOpenIdConnectProviders().Get(openId, cancellationToken); } + /// Gets a collection of PolicyFragmentContractResources in the ApiManagementService. + /// An object representing collection of PolicyFragmentContractResources and their operations over a PolicyFragmentContractResource. + public virtual PolicyFragmentContractCollection GetPolicyFragmentContracts() + { + return GetCachedClient(client => new PolicyFragmentContractCollection(client, Id)); + } + + /// + /// Gets a policy fragment. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id} + /// + /// + /// Operation Id + /// PolicyFragment_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// A resource identifier. + /// Policy fragment content format. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetPolicyFragmentContractAsync(string id, PolicyFragmentContentFormat? format = null, CancellationToken cancellationToken = default) + { + return await GetPolicyFragmentContracts().GetAsync(id, format, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets a policy fragment. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id} + /// + /// + /// Operation Id + /// PolicyFragment_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// A resource identifier. + /// Policy fragment content format. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetPolicyFragmentContract(string id, PolicyFragmentContentFormat? format = null, CancellationToken cancellationToken = default) + { + return GetPolicyFragmentContracts().Get(id, format, cancellationToken); + } + + /// Gets a collection of PortalConfigContractResources in the ApiManagementService. + /// An object representing collection of PortalConfigContractResources and their operations over a PortalConfigContractResource. + public virtual PortalConfigContractCollection GetPortalConfigContracts() + { + return GetCachedClient(client => new PortalConfigContractCollection(client, Id)); + } + + /// + /// Get the developer portal configuration. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId} + /// + /// + /// Operation Id + /// PortalConfig_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Portal configuration identifier. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetPortalConfigContractAsync(string portalConfigId, CancellationToken cancellationToken = default) + { + return await GetPortalConfigContracts().GetAsync(portalConfigId, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get the developer portal configuration. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId} + /// + /// + /// Operation Id + /// PortalConfig_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Portal configuration identifier. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetPortalConfigContract(string portalConfigId, CancellationToken cancellationToken = default) + { + return GetPortalConfigContracts().Get(portalConfigId, cancellationToken); + } + /// Gets a collection of ApiManagementPortalRevisionResources in the ApiManagementService. /// An object representing collection of ApiManagementPortalRevisionResources and their operations over a ApiManagementPortalRevisionResource. public virtual ApiManagementPortalRevisionCollection GetApiManagementPortalRevisions() @@ -1406,7 +1615,7 @@ public virtual ApiManagementPortalRevisionCollection GetApiManagementPortalRevis /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1437,7 +1646,7 @@ public virtual async Task> GetApiM /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1496,7 +1705,7 @@ public virtual ApiManagementPrivateEndpointConnectionCollection GetApiManagement /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1527,7 +1736,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1565,7 +1774,7 @@ public virtual ApiManagementPrivateLinkResourceCollection GetApiManagementPrivat /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1596,7 +1805,7 @@ public virtual async Task> GetApiMana /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1634,7 +1843,7 @@ public virtual ApiManagementProductCollection GetApiManagementProducts() /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1665,7 +1874,7 @@ public virtual async Task> GetApiManageme /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1703,7 +1912,7 @@ public virtual ApiManagementGlobalSchemaCollection GetApiManagementGlobalSchemas /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1734,7 +1943,7 @@ public virtual async Task> GetApiMan /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1772,7 +1981,7 @@ public virtual ApiManagementTenantSettingCollection GetApiManagementTenantSettin /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1801,7 +2010,7 @@ public virtual async Task> GetApiMa /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1837,7 +2046,7 @@ public virtual ApiManagementSubscriptionCollection GetApiManagementSubscriptions /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1868,7 +2077,7 @@ public virtual async Task> GetApiMan /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1906,7 +2115,7 @@ public virtual TenantAccessInfoCollection GetTenantAccessInfos() /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1935,7 +2144,7 @@ public virtual async Task> GetTenantAccessInf /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1971,7 +2180,7 @@ public virtual ApiManagementUserCollection GetApiManagementUsers() /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -2002,7 +2211,7 @@ public virtual async Task> GetApiManagementU /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -2020,6 +2229,75 @@ public virtual Response GetApiManagementUser(string u return GetApiManagementUsers().Get(userId, cancellationToken); } + /// Gets a collection of DocumentationContractResources in the ApiManagementService. + /// An object representing collection of DocumentationContractResources and their operations over a DocumentationContractResource. + public virtual DocumentationContractCollection GetDocumentationContracts() + { + return GetCachedClient(client => new DocumentationContractCollection(client, Id)); + } + + /// + /// Gets the details of the Documentation specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId} + /// + /// + /// Operation Id + /// Documentation_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Documentation identifier. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetDocumentationContractAsync(string documentationId, CancellationToken cancellationToken = default) + { + return await GetDocumentationContracts().GetAsync(documentationId, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the details of the Documentation specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId} + /// + /// + /// Operation Id + /// Documentation_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Documentation identifier. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetDocumentationContract(string documentationId, CancellationToken cancellationToken = default) + { + return GetDocumentationContracts().Get(documentationId, cancellationToken); + } + /// /// Gets an API Management service resource description. /// @@ -2033,7 +2311,7 @@ public virtual Response GetApiManagementUser(string u /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -2073,7 +2351,7 @@ public virtual async Task> GetAsync(Cance /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -2113,7 +2391,7 @@ public virtual Response Get(CancellationToken canc /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -2155,7 +2433,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -2197,7 +2475,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -2243,7 +2521,7 @@ public virtual async Task> UpdateAsyn /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -2289,7 +2567,7 @@ public virtual ArmOperation Update(WaitUntil waitU /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -2323,7 +2601,7 @@ public virtual AsyncPageable GetApisByTagsAsync(stri /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -2357,7 +2635,7 @@ public virtual Pageable GetApisByTags(string filter /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -2399,7 +2677,7 @@ public virtual async Task> PerformConnecti /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -2441,7 +2719,7 @@ public virtual ArmOperation PerformConnectivityCheckAsy /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -2467,7 +2745,7 @@ public virtual AsyncPageable GetContentTypesAsync(Canc /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -2493,7 +2771,7 @@ public virtual Pageable GetContentTypes(CancellationTo /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -2532,7 +2810,7 @@ public virtual async Task> GetContentTypeAsyn /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -2571,7 +2849,7 @@ public virtual Response GetContentType(string contentT /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -2611,7 +2889,7 @@ public virtual async Task> CreateOrUpdateCont /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -2651,7 +2929,7 @@ public virtual Response CreateOrUpdateContentType(stri /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -2691,7 +2969,7 @@ public virtual async Task DeleteContentTypeAsync(string contentTypeId, /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -2731,7 +3009,7 @@ public virtual Response DeleteContentType(string contentTypeId, ETag ifMatch, Ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -2762,7 +3040,7 @@ public virtual AsyncPageable GetContentItemsAsync(stri /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -2793,7 +3071,7 @@ public virtual Pageable GetContentItems(string content /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -2834,7 +3112,7 @@ public virtual async Task> GetContentItemEntityTagAsync(string co /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -2875,7 +3153,7 @@ public virtual Response GetContentItemEntityTag(string contentTypeId, stri /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -2916,7 +3194,7 @@ public virtual async Task> GetContentItemAsyn /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -2957,7 +3235,7 @@ public virtual Response GetContentItem(string contentT /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -2999,7 +3277,7 @@ public virtual async Task> CreateOrUpdateCont /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -3041,7 +3319,7 @@ public virtual Response CreateOrUpdateContentItem(stri /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -3083,7 +3361,7 @@ public virtual async Task DeleteContentItemAsync(string contentTypeId, /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -3125,7 +3403,7 @@ public virtual Response DeleteContentItem(string contentTypeId, string contentIt /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -3151,7 +3429,7 @@ public virtual AsyncPageable GetAvailabl /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -3177,7 +3455,7 @@ public virtual Pageable GetAvailableApiM /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -3223,7 +3501,7 @@ public virtual async Task> RestoreAsy /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -3269,7 +3547,7 @@ public virtual ArmOperation Restore(WaitUntil wait /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -3315,7 +3593,7 @@ public virtual async Task> BackupAsyn /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -3348,6 +3626,90 @@ public virtual ArmOperation Backup(WaitUntil waitU } } + /// + /// Upgrades an API Management service to the Stv2 platform. For details refer to https://aka.ms/apim-migrate-stv2. This change is not reversible. This is long running operation and could take several minutes to complete. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/migrateToStv2 + /// + /// + /// Operation Id + /// ApiManagementService_MigrateToStv2 + /// + /// + /// Default Api Version + /// 2022-08-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> MigrateToStv2Async(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _apiManagementServiceClientDiagnostics.CreateScope("ApiManagementServiceResource.MigrateToStv2"); + scope.Start(); + try + { + var response = await _apiManagementServiceRestClient.MigrateToStv2Async(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new ApiManagementArmOperation(new ApiManagementServiceOperationSource(Client), _apiManagementServiceClientDiagnostics, Pipeline, _apiManagementServiceRestClient.CreateMigrateToStv2Request(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Upgrades an API Management service to the Stv2 platform. For details refer to https://aka.ms/apim-migrate-stv2. This change is not reversible. This is long running operation and could take several minutes to complete. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/migrateToStv2 + /// + /// + /// Operation Id + /// ApiManagementService_MigrateToStv2 + /// + /// + /// Default Api Version + /// 2022-08-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 MigrateToStv2(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _apiManagementServiceClientDiagnostics.CreateScope("ApiManagementServiceResource.MigrateToStv2"); + scope.Start(); + try + { + var response = _apiManagementServiceRestClient.MigrateToStv2(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new ApiManagementArmOperation(new ApiManagementServiceOperationSource(Client), _apiManagementServiceClientDiagnostics, Pipeline, _apiManagementServiceRestClient.CreateMigrateToStv2Request(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + /// /// Gets the Single-Sign-On token for the API Management Service which is valid for 5 Minutes. /// @@ -3361,7 +3723,7 @@ public virtual ArmOperation Backup(WaitUntil waitU /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -3399,7 +3761,7 @@ public virtual async Task> GetSs /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -3437,7 +3799,7 @@ public virtual Response GetSsoToken(Cance /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -3480,7 +3842,7 @@ public virtual async Task> ApplyNetwo /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -3523,7 +3885,7 @@ public virtual ArmOperation ApplyNetworkConfigurat /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -3548,7 +3910,7 @@ public virtual AsyncPageable GetNetworkStatus /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -3573,7 +3935,7 @@ public virtual Pageable GetNetworkStatuses(Ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -3608,7 +3970,7 @@ public virtual async Task> GetNetworkStatusByLoc /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -3643,7 +4005,7 @@ public virtual Response GetNetworkStatusByLocation(AzureL /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -3668,7 +4030,7 @@ public virtual AsyncPageable GetOutboundNetworkDepe /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -3693,7 +4055,7 @@ public virtual Pageable GetOutboundNetworkDependenc /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -3719,7 +4081,7 @@ public virtual AsyncPageable GetPolicyDescription /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -3745,7 +4107,7 @@ public virtual Pageable GetPolicyDescriptions(Pol /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -3774,7 +4136,7 @@ public virtual AsyncPageable GetPortalSettingsAsync( /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -3803,7 +4165,7 @@ public virtual Pageable GetPortalSettings(Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -3837,7 +4199,7 @@ public virtual AsyncPageable GetProductsByTagsAsync( /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -3871,7 +4233,7 @@ public virtual Pageable GetProductsByTags(string fil /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -3901,7 +4263,7 @@ public virtual AsyncPageable GetQuotaByCounterKeysAsync(st /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -3931,7 +4293,7 @@ public virtual Pageable GetQuotaByCounterKeys(string quota /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -3963,7 +4325,7 @@ public virtual AsyncPageable UpdateQuotaByCounterKeysAsync /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -3995,7 +4357,7 @@ public virtual Pageable UpdateQuotaByCounterKeys(string qu /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -4036,7 +4398,7 @@ public virtual async Task> GetQuotaByPeriodKeyAsy /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -4077,7 +4439,7 @@ public virtual Response GetQuotaByPeriodKey(string quotaCo /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -4120,7 +4482,7 @@ public virtual async Task> UpdateQuotaByPeriodKey /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -4163,7 +4525,7 @@ public virtual Response UpdateQuotaByPeriodKey(string quot /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -4189,7 +4551,7 @@ public virtual AsyncPageable GetRegionsAsync(CancellationToken c /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -4215,7 +4577,7 @@ public virtual Pageable GetRegions(CancellationToken cancellatio /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -4248,7 +4610,7 @@ public virtual AsyncPageable GetReportsByApiAsync(string f /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -4281,7 +4643,7 @@ public virtual Pageable GetReportsByApi(string filter, int /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -4314,7 +4676,7 @@ public virtual AsyncPageable GetReportsByUserAsync(string /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -4347,7 +4709,7 @@ public virtual Pageable GetReportsByUser(string filter, in /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -4380,7 +4742,7 @@ public virtual AsyncPageable GetReportsByOperationAsync(st /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -4413,7 +4775,7 @@ public virtual Pageable GetReportsByOperation(string filte /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -4446,7 +4808,7 @@ public virtual AsyncPageable GetReportsByProductAsync(stri /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -4479,7 +4841,7 @@ public virtual Pageable GetReportsByProduct(string filter, /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -4511,7 +4873,7 @@ public virtual AsyncPageable GetReportsByGeoAsync(string f /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -4543,7 +4905,7 @@ public virtual Pageable GetReportsByGeo(string filter, int /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -4576,7 +4938,7 @@ public virtual AsyncPageable GetReportsBySubscriptionAsync /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -4609,7 +4971,7 @@ public virtual Pageable GetReportsBySubscription(string fi /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -4643,7 +5005,7 @@ public virtual AsyncPageable GetReportsByTimeAsync(string /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -4677,7 +5039,7 @@ public virtual Pageable GetReportsByTime(string filter, Ti /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -4708,7 +5070,7 @@ public virtual AsyncPageable GetReportsByRequestAsy /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -4739,7 +5101,7 @@ public virtual Pageable GetReportsByRequest(string /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -4768,7 +5130,7 @@ public virtual AsyncPageable GetTagResourcesAsync(st /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -4797,7 +5159,7 @@ public virtual Pageable GetTagResources(string filte /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -4840,7 +5202,7 @@ public virtual async Task> DeployTe /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -4883,7 +5245,7 @@ public virtual ArmOperation DeployTenantConfigur /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -4926,7 +5288,7 @@ public virtual async Task> SaveTena /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -4969,7 +5331,7 @@ public virtual ArmOperation SaveTenantConfigurat /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -5012,7 +5374,7 @@ public virtual async Task> Validate /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -5055,7 +5417,7 @@ public virtual ArmOperation ValidateTenantConfig /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -5090,7 +5452,7 @@ public virtual async Task> GetTen /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -5125,7 +5487,7 @@ public virtual Response GetTenantConfigura /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -5187,7 +5549,7 @@ public virtual async Task> AddTagAsync(st /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -5249,7 +5611,7 @@ public virtual Response AddTag(string key, string /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -5306,7 +5668,7 @@ public virtual async Task> SetTagsAsync(I /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -5363,7 +5725,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -5423,7 +5785,7 @@ public virtual async Task> RemoveTagAsync /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementSubscriptionCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementSubscriptionCollection.cs index 2cef402d6885c..f909f74e5f0ca 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementSubscriptionCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementSubscriptionCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -123,7 +123,7 @@ public virtual async Task> Creat /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual ArmOperation CreateOrUpdate(Wa /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -271,7 +271,7 @@ public virtual Response Get(string sid, Cance /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -304,7 +304,7 @@ public virtual AsyncPageable GetAllAsync(stri /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -337,7 +337,7 @@ public virtual Pageable GetAll(string filter /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -380,7 +380,7 @@ public virtual async Task> ExistsAsync(string sid, CancellationTo /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -423,7 +423,7 @@ public virtual Response Exists(string sid, CancellationToken cancellationT /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -468,7 +468,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementSubscriptionResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementSubscriptionResource.cs index 7d16f0e36c26e..1d6fc7822e9dd 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementSubscriptionResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementSubscriptionResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -272,7 +272,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -321,7 +321,7 @@ public virtual async Task> UpdateAsy /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -370,7 +370,7 @@ public virtual Response Update(ETag ifMatch, /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -408,7 +408,7 @@ public virtual async Task RegeneratePrimaryKeyAsync(CancellationToken /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -446,7 +446,7 @@ public virtual Response RegeneratePrimaryKey(CancellationToken cancellationToken /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -484,7 +484,7 @@ public virtual async Task RegenerateSecondaryKeyAsync(CancellationToke /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -522,7 +522,7 @@ public virtual Response RegenerateSecondaryKey(CancellationToken cancellationTok /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -560,7 +560,7 @@ public virtual async Task> GetSecretsAsync(Ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -598,7 +598,7 @@ public virtual Response GetSecrets(CancellationToken c /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -636,7 +636,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementTagCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementTagCollection.cs index 3a9d31e1b8f93..0cd4c342dc585 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementTagCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementTagCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -117,7 +117,7 @@ public virtual async Task> CreateOrUpdate /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -169,7 +169,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil w /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual async Task> GetAsync(string ta /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -259,7 +259,7 @@ public virtual Response Get(string tagId, Cancellation /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -293,7 +293,7 @@ public virtual AsyncPageable GetAllAsync(string filter /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -327,7 +327,7 @@ public virtual Pageable GetAll(string filter = null, i /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -370,7 +370,7 @@ public virtual async Task> ExistsAsync(string tagId, Cancellation /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -413,7 +413,7 @@ public virtual Response Exists(string tagId, CancellationToken cancellatio /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -458,7 +458,7 @@ public virtual async Task> GetIfExist /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementTagResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementTagResource.cs index e6c82bf2d1908..611e353b4e3cb 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementTagResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementTagResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Cancellat /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken cancella /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -272,7 +272,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual async Task> UpdateAsync(ETag i /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -358,7 +358,7 @@ public virtual Response Update(ETag ifMatch, ApiManage /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -396,7 +396,7 @@ public virtual async Task> GetEntityStateAsync(CancellationToken /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementTenantSettingCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementTenantSettingCollection.cs index 78c61b176b5b5..57492293ea221 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementTenantSettingCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementTenantSettingCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -106,7 +106,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -147,7 +147,7 @@ public virtual Response Get(SettingsType set /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -178,7 +178,7 @@ public virtual AsyncPageable GetAllAsync(str /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -209,7 +209,7 @@ public virtual Pageable GetAll(string filter /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -248,7 +248,7 @@ public virtual async Task> ExistsAsync(SettingsType settingsType, /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -287,7 +287,7 @@ public virtual Response Exists(SettingsType settingsType, CancellationToke /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -328,7 +328,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementTenantSettingData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementTenantSettingData.Serialization.cs index 30a181b3246ef..a14aa55ab631c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementTenantSettingData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementTenantSettingData.Serialization.cs @@ -8,6 +8,8 @@ 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; @@ -173,6 +175,114 @@ internal static ApiManagementTenantSettingData DeserializeApiManagementTenantSet 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(Settings), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" settings: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Settings)) + { + if (Settings.Any()) + { + builder.Append(" settings: "); + builder.AppendLine("{"); + foreach (var item in Settings) + { + 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(" }"); + } + } + } + + 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; @@ -181,6 +291,8 @@ BinaryData IPersistableModel.Write(ModelReaderWr { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementTenantSettingData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementTenantSettingData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementTenantSettingData.cs index 896d4e46692f0..61bc5bcc1533e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementTenantSettingData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementTenantSettingData.cs @@ -70,6 +70,7 @@ internal ApiManagementTenantSettingData(ResourceIdentifier id, string name, Reso } /// Tenant settings. + [WirePath("properties.settings")] public IDictionary Settings { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementTenantSettingResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementTenantSettingResource.cs index 53779e346be43..44a05f5db7565 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementTenantSettingResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementTenantSettingResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementUserCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementUserCollection.cs index 291e5e3e480f8..60d1b487909f2 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementUserCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementUserCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -118,7 +118,7 @@ public virtual async Task> CreateOrUpdat /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -171,7 +171,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -216,7 +216,7 @@ public virtual async Task> GetAsync(string u /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -261,7 +261,7 @@ public virtual Response Get(string userId, Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -295,7 +295,7 @@ public virtual AsyncPageable GetAllAsync(string filte /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -329,7 +329,7 @@ public virtual Pageable GetAll(string filter = null, /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -372,7 +372,7 @@ public virtual async Task> ExistsAsync(string userId, Cancellatio /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -415,7 +415,7 @@ public virtual Response Exists(string userId, CancellationToken cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -460,7 +460,7 @@ public virtual async Task> GetIfExis /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementUserResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementUserResource.cs index c45a1e2d8eb10..b77a6f9ba12d6 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementUserResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementUserResource.cs @@ -122,7 +122,7 @@ public virtual ApiManagementUserSubscriptionCollection GetApiManagementUserSubsc /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -153,7 +153,7 @@ public virtual async Task> GetAp /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual Response GetApiManagementU /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task> GetAsync(Cancella /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -264,7 +264,7 @@ public virtual Response Get(CancellationToken cancell /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -360,7 +360,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, bool? dele /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -403,7 +403,7 @@ public virtual async Task> UpdateAsync(ETag /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -446,7 +446,7 @@ public virtual Response Update(ETag ifMatch, ApiManag /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -484,7 +484,7 @@ public virtual async Task> GenerateSsoUriAsync(Ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -522,7 +522,7 @@ public virtual Response GenerateSsoUri(CancellationToken c /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -564,7 +564,7 @@ public virtual async Task> GetSharedAccessTokenAsync(U /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -606,7 +606,7 @@ public virtual Response GetSharedAccessToken(UserTokenContent c /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -635,7 +635,7 @@ public virtual AsyncPageable GetUserGroupsAsync(stri /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -664,7 +664,7 @@ public virtual Pageable GetUserGroups(string filter /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -690,7 +690,7 @@ public virtual AsyncPageable GetUserIdentitiesAsync(Cancel /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -716,7 +716,7 @@ public virtual Pageable GetUserIdentities(CancellationToke /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -751,7 +751,7 @@ public virtual async Task SendUserConfirmationPasswordAsync(AppType? a /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -786,7 +786,7 @@ public virtual Response SendUserConfirmationPassword(AppType? appType = null, Ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -824,7 +824,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementUserSubscriptionCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementUserSubscriptionCollection.cs index 09d6ab8ab00b5..c4a9a8a043926 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementUserSubscriptionCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementUserSubscriptionCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAs /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string sid, C /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -187,7 +187,7 @@ public virtual AsyncPageable GetAllAsync( /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -220,7 +220,7 @@ public virtual Pageable GetAll(string fil /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -263,7 +263,7 @@ public virtual async Task> ExistsAsync(string sid, CancellationTo /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -306,7 +306,7 @@ public virtual Response Exists(string sid, CancellationToken cancellationT /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -351,7 +351,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementUserSubscriptionResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementUserSubscriptionResource.cs index 0f711aa2cad61..8be2a98bcee2b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementUserSubscriptionResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementUserSubscriptionResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAs /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationCollection.cs index a8abaa8243a5e..495ddf99c1a8e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> CreateOrUpdateAsyn /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -168,7 +168,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitU /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task> GetAsync(string operat /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -258,7 +258,7 @@ public virtual Response Get(string operationId, Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -292,7 +292,7 @@ public virtual AsyncPageable GetAllAsync(string filter = n /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -326,7 +326,7 @@ public virtual Pageable GetAll(string filter = null, int? /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -369,7 +369,7 @@ public virtual async Task> ExistsAsync(string operationId, Cancel /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -412,7 +412,7 @@ public virtual Response Exists(string operationId, CancellationToken cance /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -457,7 +457,7 @@ public virtual async Task> GetIfExistsAsy /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationData.Serialization.cs index cf952700a92b3..c175723a82735 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationData.Serialization.cs @@ -8,6 +8,8 @@ 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.ApiManagement.Models; @@ -275,6 +277,253 @@ internal static ApiOperationData DeserializeApiOperationData(JsonElement element 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(TemplateParameters), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" templateParameters: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(TemplateParameters)) + { + if (TemplateParameters.Any()) + { + builder.Append(" templateParameters: "); + builder.AppendLine("["); + foreach (var item in TemplateParameters) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " templateParameters: "); + } + builder.AppendLine(" ]"); + } + } + } + + 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}'"); + } + } + } + + 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, 4, false, " request: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Responses), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" responses: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Responses)) + { + if (Responses.Any()) + { + builder.Append(" responses: "); + builder.AppendLine("["); + foreach (var item in Responses) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " responses: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Policies), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" policies: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Policies)) + { + builder.Append(" policies: "); + if (Policies.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Policies}'''"); + } + else + { + builder.AppendLine($"'{Policies}'"); + } + } + } + + 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(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(UriTemplate), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" urlTemplate: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(UriTemplate)) + { + builder.Append(" urlTemplate: "); + if (UriTemplate.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{UriTemplate}'''"); + } + else + { + builder.AppendLine($"'{UriTemplate}'"); + } + } + } + + 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; @@ -283,6 +532,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions op { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiOperationData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationData.cs index 6b06a12f3b47d..2e1ae079e135a 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationData.cs @@ -86,20 +86,28 @@ internal ApiOperationData(ResourceIdentifier id, string name, ResourceType resou } /// Collection of URL template parameters. + [WirePath("properties.templateParameters")] public IList TemplateParameters { get; } /// Description of the operation. May include HTML formatting tags. + [WirePath("properties.description")] public string Description { get; set; } /// An entity containing request details. + [WirePath("properties.request")] public RequestContract Request { get; set; } /// Array of Operation responses. + [WirePath("properties.responses")] public IList Responses { get; } /// Operation Policies. + [WirePath("properties.policies")] public string Policies { get; set; } /// Operation Name. + [WirePath("properties.displayName")] public string DisplayName { get; set; } /// A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only them. + [WirePath("properties.method")] public string Method { get; set; } /// Relative URL template identifying the target resource for this operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date}. + [WirePath("properties.urlTemplate")] public string UriTemplate { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationPolicyCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationPolicyCollection.cs index e38f3742c6a4c..d1645c6395cb8 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationPolicyCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationPolicyCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> CreateOrUpda /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -165,7 +165,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(PolicyN /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -249,7 +249,7 @@ public virtual Response Get(PolicyName policyId, Pol /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -278,7 +278,7 @@ public virtual AsyncPageable GetAllAsync(Cancellatio /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -307,7 +307,7 @@ public virtual Pageable GetAll(CancellationToken can /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -347,7 +347,7 @@ public virtual async Task> ExistsAsync(PolicyName policyId, Polic /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -387,7 +387,7 @@ public virtual Response Exists(PolicyName policyId, PolicyExportFormat? fo /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -429,7 +429,7 @@ public virtual async Task> GetIfExi /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationPolicyResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationPolicyResource.cs index b5adcbffa2d4c..01cb4a0818526 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationPolicyResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationPolicyResource.cs @@ -104,7 +104,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -145,7 +145,7 @@ public virtual async Task> GetAsync(PolicyE /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -186,7 +186,7 @@ public virtual Response Get(PolicyExportFormat? form /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -231,7 +231,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -276,7 +276,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -325,7 +325,7 @@ public virtual async Task> UpdateAsync( /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -374,7 +374,7 @@ public virtual ArmOperation Update(WaitUntil waitUnt /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -412,7 +412,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationResource.cs index b7d4fdc7d1ed8..960279dd7f0d8 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationResource.cs @@ -110,7 +110,7 @@ public virtual ApiOperationPolicyCollection GetApiOperationPolicies() /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> GetApiOperationP /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -177,7 +177,7 @@ public virtual ApiOperationTagCollection GetApiOperationTags() /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetApiOperationTagA /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -239,7 +239,7 @@ public virtual Response GetApiOperationTag(string tagId /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -279,7 +279,7 @@ public virtual async Task> GetAsync(CancellationT /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -319,7 +319,7 @@ public virtual Response Get(CancellationToken cancellation /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -364,7 +364,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -409,7 +409,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -452,7 +452,7 @@ public virtual async Task> UpdateAsync(ETag ifMat /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -495,7 +495,7 @@ public virtual Response Update(ETag ifMatch, ApiOperationP /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -533,7 +533,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationTagCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationTagCollection.cs index 6cde8743d10ec..e0a7313fd5d22 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationTagCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationTagCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdateA /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wa /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string tag /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string tagId, CancellationT /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -285,7 +285,7 @@ public virtual AsyncPageable GetAllAsync(string filter /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -318,7 +318,7 @@ public virtual Pageable GetAll(string filter = null, in /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -361,7 +361,7 @@ public virtual async Task> ExistsAsync(string tagId, Cancellation /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -404,7 +404,7 @@ public virtual Response Exists(string tagId, CancellationToken cancellatio /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -449,7 +449,7 @@ public virtual async Task> GetIfExists /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationTagResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationTagResource.cs index cd23c96cbd26c..70f8d4f624e50 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationTagResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationTagResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken cancellat /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -271,7 +271,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual async Task> UpdateAsync(Wai /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -397,7 +397,7 @@ public virtual async Task> GetEntityStateByOperationAsync(Cancell /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiPolicyCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiPolicyCollection.cs index 450361d4e2e67..08372caec3855 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiPolicyCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiPolicyCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> CreateOrUpdateAsync(W /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -165,7 +165,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUnti /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(PolicyName polic /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -249,7 +249,7 @@ public virtual Response Get(PolicyName policyId, PolicyExport /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -278,7 +278,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -307,7 +307,7 @@ public virtual Pageable GetAll(CancellationToken cancellation /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -347,7 +347,7 @@ public virtual async Task> ExistsAsync(PolicyName policyId, Polic /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -387,7 +387,7 @@ public virtual Response Exists(PolicyName policyId, PolicyExportFormat? fo /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -429,7 +429,7 @@ public virtual async Task> GetIfExistsAsync( /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiPolicyResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiPolicyResource.cs index c4b5a6daaeb53..4a65fd9be187f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiPolicyResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiPolicyResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -144,7 +144,7 @@ public virtual async Task> GetAsync(PolicyExportForm /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -185,7 +185,7 @@ public virtual Response Get(PolicyExportFormat? format = null /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -230,7 +230,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -275,7 +275,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -324,7 +324,7 @@ public virtual async Task> UpdateAsync(WaitUntil /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -373,7 +373,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, Polic /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -411,7 +411,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiReleaseCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiReleaseCollection.cs index 4de4c0f9cf713..49883c2adcee9 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiReleaseCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiReleaseCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> CreateOrUpdateAsync( /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -168,7 +168,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUnt /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task> GetAsync(string releaseI /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -258,7 +258,7 @@ public virtual Response Get(string releaseId, CancellationTo /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -291,7 +291,7 @@ public virtual AsyncPageable GetAllAsync(string filter = nul /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -324,7 +324,7 @@ public virtual Pageable GetAll(string filter = null, int? to /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -367,7 +367,7 @@ public virtual async Task> ExistsAsync(string releaseId, Cancella /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -410,7 +410,7 @@ public virtual Response Exists(string releaseId, CancellationToken cancell /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -455,7 +455,7 @@ public virtual async Task> GetIfExistsAsync /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiReleaseData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiReleaseData.Serialization.cs index b9d2d558063e0..16b166c096ae1 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiReleaseData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiReleaseData.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Models; @@ -206,6 +207,147 @@ internal static ApiReleaseData DeserializeApiReleaseData(JsonElement element, Mo 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(ApiId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiId)) + { + builder.Append(" apiId: "); + builder.AppendLine($"'{ApiId.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CreatedOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" createdDateTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CreatedOn)) + { + builder.Append(" createdDateTime: "); + var formattedDateTimeString = TypeFormatters.ToString(CreatedOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(UpdatedOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" updatedDateTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(UpdatedOn)) + { + builder.Append(" updatedDateTime: "); + var formattedDateTimeString = TypeFormatters.ToString(UpdatedOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Notes), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" notes: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Notes)) + { + builder.Append(" notes: "); + if (Notes.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Notes}'''"); + } + else + { + builder.AppendLine($"'{Notes}'"); + } + } + } + + 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; @@ -214,6 +356,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions opti { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiReleaseData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiReleaseData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiReleaseData.cs index 0d516688781a4..1cbde28dfe46f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiReleaseData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiReleaseData.cs @@ -75,12 +75,16 @@ internal ApiReleaseData(ResourceIdentifier id, string name, ResourceType resourc } /// Identifier of the API the release belongs to. + [WirePath("properties.apiId")] public ResourceIdentifier ApiId { get; set; } /// The time the API was released. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. + [WirePath("properties.createdDateTime")] public DateTimeOffset? CreatedOn { get; } /// The time the API release was updated. + [WirePath("properties.updatedDateTime")] public DateTimeOffset? UpdatedOn { get; } /// Release Notes. + [WirePath("properties.notes")] public string Notes { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiReleaseResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiReleaseResource.cs index 236a2753dfd87..456ba44019969 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiReleaseResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiReleaseResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(CancellationTok /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken cancellationTo /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -272,7 +272,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual async Task> UpdateAsync(ETag ifMatch /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -358,7 +358,7 @@ public virtual Response Update(ETag ifMatch, ApiReleaseData /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -396,7 +396,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiResource.cs index e1b065a37034a..e94d8a033acc0 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiResource.cs @@ -122,7 +122,7 @@ public virtual ApiReleaseCollection GetApiReleases() /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -153,7 +153,7 @@ public virtual async Task> GetApiReleaseAsync(strin /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -191,7 +191,7 @@ public virtual ApiOperationCollection GetApiOperations() /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -222,7 +222,7 @@ public virtual async Task> GetApiOperationAsync(s /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -260,7 +260,7 @@ public virtual ApiPolicyCollection GetApiPolicies() /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -290,7 +290,7 @@ public virtual async Task> GetApiPolicyAsync(PolicyN /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -327,7 +327,7 @@ public virtual ApiTagCollection GetApiTags() /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -358,7 +358,7 @@ public virtual async Task> GetApiTagAsync(string tagId, /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -376,6 +376,75 @@ public virtual Response GetApiTag(string tagId, CancellationToke return GetApiTags().Get(tagId, cancellationToken); } + /// Gets a collection of ResolverContractResources in the Api. + /// An object representing collection of ResolverContractResources and their operations over a ResolverContractResource. + public virtual ResolverContractCollection GetResolverContracts() + { + return GetCachedClient(client => new ResolverContractCollection(client, Id)); + } + + /// + /// Gets the details of the GraphQL API Resolver specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId} + /// + /// + /// Operation Id + /// GraphQLApiResolver_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetResolverContractAsync(string resolverId, CancellationToken cancellationToken = default) + { + return await GetResolverContracts().GetAsync(resolverId, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the details of the GraphQL API Resolver specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId} + /// + /// + /// Operation Id + /// GraphQLApiResolver_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetResolverContract(string resolverId, CancellationToken cancellationToken = default) + { + return GetResolverContracts().Get(resolverId, cancellationToken); + } + /// Gets a collection of ApiSchemaResources in the Api. /// An object representing collection of ApiSchemaResources and their operations over a ApiSchemaResource. public virtual ApiSchemaCollection GetApiSchemas() @@ -396,7 +465,7 @@ public virtual ApiSchemaCollection GetApiSchemas() /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -427,7 +496,7 @@ public virtual async Task> GetApiSchemaAsync(string /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -465,7 +534,7 @@ public virtual ApiDiagnosticCollection GetApiDiagnostics() /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -496,7 +565,7 @@ public virtual async Task> GetApiDiagnosticAsync /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -534,7 +603,7 @@ public virtual ApiIssueCollection GetApiIssues() /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -566,7 +635,7 @@ public virtual async Task> GetApiIssueAsync(string is /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -605,7 +674,7 @@ public virtual ApiTagDescriptionCollection GetApiTagDescriptions() /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -636,7 +705,7 @@ public virtual async Task> GetApiTagDescript /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -654,6 +723,13 @@ public virtual Response GetApiTagDescription(string t return GetApiTagDescriptions().Get(tagDescriptionId, cancellationToken); } + /// Gets an object representing a ServiceApiWikiResource along with the instance operations that can be performed on it in the Api. + /// Returns a object. + public virtual ServiceApiWikiResource GetServiceApiWiki() + { + return new ServiceApiWikiResource(Client, Id.AppendChildResource("wikis", "default")); + } + /// /// Gets the details of the API specified by its identifier. /// @@ -667,7 +743,7 @@ public virtual Response GetApiTagDescription(string t /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -707,7 +783,7 @@ public virtual async Task> GetAsync(CancellationToken canc /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -747,7 +823,7 @@ public virtual Response Get(CancellationToken cancellationToken = d /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -793,7 +869,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -839,7 +915,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, bool? dele /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -882,7 +958,7 @@ public virtual async Task> UpdateAsync(ETag ifMatch, ApiPa /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -925,7 +1001,7 @@ public virtual Response Update(ETag ifMatch, ApiPatch patch, Cancel /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -954,7 +1030,7 @@ public virtual AsyncPageable GetApiRevisionsByServiceAsync( /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -983,7 +1059,7 @@ public virtual Pageable GetApiRevisionsByService(string fil /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -1012,7 +1088,7 @@ public virtual AsyncPageable GetApiProductsAsync(s /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -1041,7 +1117,7 @@ public virtual Pageable GetApiProducts(string filt /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -1071,7 +1147,7 @@ public virtual AsyncPageable GetOperationsByTagsAsyn /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -1101,7 +1177,7 @@ public virtual Pageable GetOperationsByTags(string f /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1139,7 +1215,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiSchemaCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiSchemaCollection.cs index 662e3c4cbc035..3a6befff828b2 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiSchemaCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiSchemaCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateAsync(W /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -164,7 +164,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUnti /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -209,7 +209,7 @@ public virtual async Task> GetAsync(string schemaId, /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -254,7 +254,7 @@ public virtual Response Get(string schemaId, CancellationToke /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -287,7 +287,7 @@ public virtual AsyncPageable GetAllAsync(string filter = null /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -320,7 +320,7 @@ public virtual Pageable GetAll(string filter = null, int? top /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -363,7 +363,7 @@ public virtual async Task> ExistsAsync(string schemaId, Cancellat /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -406,7 +406,7 @@ public virtual Response Exists(string schemaId, CancellationToken cancella /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -451,7 +451,7 @@ public virtual async Task> GetIfExistsAsync( /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiSchemaData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiSchemaData.Serialization.cs index 2801e81446dea..d93f5cfaf2cc4 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiSchemaData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiSchemaData.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Models; @@ -231,6 +232,156 @@ internal static ApiSchemaData DeserializeApiSchemaData(JsonElement element, Mode 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(ContentType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" contentType: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ContentType)) + { + builder.Append(" contentType: "); + if (ContentType.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ContentType}'''"); + } + else + { + builder.AppendLine($"'{ContentType}'"); + } + } + } + + builder.Append(" document:"); + 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(Definitions), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" definitions: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Definitions)) + { + builder.Append(" definitions: "); + builder.AppendLine($"'{Definitions.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Components), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" components: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Components)) + { + builder.Append(" components: "); + builder.AppendLine($"'{Components.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; @@ -239,6 +390,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions optio { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiSchemaData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiSchemaData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiSchemaData.cs index 99699f9833cf8..d72454e2509ca 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiSchemaData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiSchemaData.cs @@ -75,8 +75,10 @@ internal ApiSchemaData(ResourceIdentifier id, string name, ResourceType resource } /// Must be a valid a media type used in a Content-Type header as defined in the RFC 2616. Media type of the schema document (e.g. application/json, application/xml). </br> - `Swagger` Schema use `application/vnd.ms-azure-apim.swagger.definitions+json` </br> - `WSDL` Schema use `application/vnd.ms-azure-apim.xsd+xml` </br> - `OpenApi` Schema use `application/vnd.oai.openapi.components+json` </br> - `WADL Schema` use `application/vnd.ms-azure-apim.wadl.grammars+xml`. + [WirePath("properties.contentType")] public string ContentType { get; set; } /// Json escaped string defining the document representing the Schema. Used for schemas other than Swagger/OpenAPI. + [WirePath("properties.value")] public string Value { get; set; } /// /// Types definitions. Used for Swagger/OpenAPI v1 schemas only, null otherwise. @@ -108,6 +110,7 @@ internal ApiSchemaData(ResourceIdentifier id, string name, ResourceType resource /// /// /// + [WirePath("properties.definitions")] public BinaryData Definitions { get; set; } /// /// Types definitions. Used for Swagger/OpenAPI v2/v3 schemas only, null otherwise. @@ -139,6 +142,7 @@ internal ApiSchemaData(ResourceIdentifier id, string name, ResourceType resource /// /// /// + [WirePath("properties.components")] public BinaryData Components { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiSchemaResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiSchemaResource.cs index c45ef60a4eafd..79f0dea70d113 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiSchemaResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiSchemaResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(CancellationToke /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken cancellationTok /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -228,7 +228,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -274,7 +274,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, bool? forc /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -321,7 +321,7 @@ public virtual async Task> UpdateAsync(WaitUntil /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -368,7 +368,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, ApiSc /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -406,7 +406,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiTagCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiTagCollection.cs index aac045d81e85c..82285fd94f58f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiTagCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiTagCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdateAsync(Wait /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string tagId, Cance /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string tagId, CancellationToken canc /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -285,7 +285,7 @@ public virtual AsyncPageable GetAllAsync(string filter = null, i /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -318,7 +318,7 @@ public virtual Pageable GetAll(string filter = null, int? top = /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -361,7 +361,7 @@ public virtual async Task> ExistsAsync(string tagId, Cancellation /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -404,7 +404,7 @@ public virtual Response Exists(string tagId, CancellationToken cancellatio /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -449,7 +449,7 @@ public virtual async Task> GetIfExistsAsync(str /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiTagDescriptionCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiTagDescriptionCollection.cs index a1b0c07a4ead5..3bc5b16b7c4c4 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiTagDescriptionCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiTagDescriptionCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -117,7 +117,7 @@ public virtual async Task> CreateOrUpdat /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -169,7 +169,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual async Task> GetAsync(string t /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -259,7 +259,7 @@ public virtual Response Get(string tagDescriptionId, /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -292,7 +292,7 @@ public virtual AsyncPageable GetAllAsync(string filte /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -325,7 +325,7 @@ public virtual Pageable GetAll(string filter = null, /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -368,7 +368,7 @@ public virtual async Task> ExistsAsync(string tagDescriptionId, C /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -411,7 +411,7 @@ public virtual Response Exists(string tagDescriptionId, CancellationToken /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -456,7 +456,7 @@ public virtual async Task> GetIfExis /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiTagDescriptionData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiTagDescriptionData.Serialization.cs index c74cb7eeaa243..896051d60ec2a 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiTagDescriptionData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiTagDescriptionData.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Models; @@ -210,6 +211,184 @@ internal static ApiTagDescriptionData DeserializeApiTagDescriptionData(JsonEleme 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(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}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ExternalDocsUri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" externalDocsUrl: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ExternalDocsUri)) + { + builder.Append(" externalDocsUrl: "); + builder.AppendLine($"'{ExternalDocsUri.AbsoluteUri}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ExternalDocsDescription), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" externalDocsDescription: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ExternalDocsDescription)) + { + builder.Append(" externalDocsDescription: "); + if (ExternalDocsDescription.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ExternalDocsDescription}'''"); + } + else + { + builder.AppendLine($"'{ExternalDocsDescription}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TagId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" tagId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TagId)) + { + builder.Append(" tagId: "); + if (TagId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{TagId}'''"); + } + else + { + builder.AppendLine($"'{TagId}'"); + } + } + } + + 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}'"); + } + } + } + + 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; @@ -218,6 +397,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptio { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiTagDescriptionData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiTagDescriptionData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiTagDescriptionData.cs index d233f3d7d546b..2eb3537dbc568 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiTagDescriptionData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiTagDescriptionData.cs @@ -77,14 +77,19 @@ internal ApiTagDescriptionData(ResourceIdentifier id, string name, ResourceType } /// Description of the Tag. + [WirePath("properties.description")] public string Description { get; set; } /// Absolute URL of external resources describing the tag. + [WirePath("properties.externalDocsUrl")] public Uri ExternalDocsUri { get; set; } /// Description of the external resources describing the tag. + [WirePath("properties.externalDocsDescription")] public string ExternalDocsDescription { get; set; } /// Identifier of the tag in the form of /tags/{tagId}. + [WirePath("properties.tagId")] public string TagId { get; set; } /// Tag name. + [WirePath("properties.displayName")] public string DisplayName { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiTagDescriptionResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiTagDescriptionResource.cs index 36b71742ac943..e7f70792ee244 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiTagDescriptionResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiTagDescriptionResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Cancella /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken cancell /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -228,7 +228,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -273,7 +273,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -322,7 +322,7 @@ public virtual async Task> UpdateAsync(W /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -371,7 +371,7 @@ public virtual ArmOperation Update(WaitUntil waitUnti /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -409,7 +409,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiTagResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiTagResource.cs index 21abb56359dc0..2dd94f6fdafaa 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiTagResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiTagResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(CancellationToken c /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken cancellationToken /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -270,7 +270,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -314,7 +314,7 @@ public virtual async Task> UpdateAsync(WaitUntil wa /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -358,7 +358,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, Cancella /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -396,7 +396,7 @@ public virtual async Task> GetEntityStateByApiAsync(CancellationT /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiVersionSetCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiVersionSetCollection.cs index 0ab17409e940a..1c5dbe0cfa8a5 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiVersionSetCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiVersionSetCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> CreateOrUpdateAsy /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -168,7 +168,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wait /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task> GetAsync(string versi /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -258,7 +258,7 @@ public virtual Response Get(string versionSetId, Cancella /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -291,7 +291,7 @@ public virtual AsyncPageable GetAllAsync(string filter = /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -324,7 +324,7 @@ public virtual Pageable GetAll(string filter = null, int? /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -367,7 +367,7 @@ public virtual async Task> ExistsAsync(string versionSetId, Cance /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -410,7 +410,7 @@ public virtual Response Exists(string versionSetId, CancellationToken canc /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -455,7 +455,7 @@ public virtual async Task> GetIfExistsAs /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiVersionSetData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiVersionSetData.Serialization.cs index 6df06118c358a..ba9ea48880f49 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiVersionSetData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiVersionSetData.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.ApiManagement.Models; @@ -211,6 +212,184 @@ internal static ApiVersionSetData DeserializeApiVersionSetData(JsonElement eleme 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(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}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(VersionQueryName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" versionQueryName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(VersionQueryName)) + { + builder.Append(" versionQueryName: "); + if (VersionQueryName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{VersionQueryName}'''"); + } + else + { + builder.AppendLine($"'{VersionQueryName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(VersionHeaderName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" versionHeaderName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(VersionHeaderName)) + { + builder.Append(" versionHeaderName: "); + if (VersionHeaderName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{VersionHeaderName}'''"); + } + else + { + builder.AppendLine($"'{VersionHeaderName}'"); + } + } + } + + 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(VersioningScheme), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" versioningScheme: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(VersioningScheme)) + { + builder.Append(" versioningScheme: "); + builder.AppendLine($"'{VersioningScheme.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; @@ -219,6 +398,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions o { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiVersionSetData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiVersionSetData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiVersionSetData.cs index 24576d57922cd..a2d624b30f715 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiVersionSetData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiVersionSetData.cs @@ -78,14 +78,19 @@ internal ApiVersionSetData(ResourceIdentifier id, string name, ResourceType reso } /// Description of API Version Set. + [WirePath("properties.description")] public string Description { get; set; } /// Name of query parameter that indicates the API Version if versioningScheme is set to `query`. + [WirePath("properties.versionQueryName")] public string VersionQueryName { get; set; } /// Name of HTTP header parameter that indicates the API Version if versioningScheme is set to `header`. + [WirePath("properties.versionHeaderName")] public string VersionHeaderName { get; set; } /// Name of API Version Set. + [WirePath("properties.displayName")] public string DisplayName { get; set; } /// An value that determines where the API Version identifier will be located in a HTTP request. + [WirePath("properties.versioningScheme")] public VersioningScheme? VersioningScheme { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiVersionSetResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiVersionSetResource.cs index 2c0a3862330d6..b7c49f99abd6c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiVersionSetResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiVersionSetResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Cancellation /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken cancellatio /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -272,7 +272,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual async Task> UpdateAsync(ETag ifMa /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -358,7 +358,7 @@ public virtual Response Update(ETag ifMatch, ApiVersionSe /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -396,7 +396,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ArmApiManagementModelFactory.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ArmApiManagementModelFactory.cs index 9e94cd377d887..91b1807d48cae 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ArmApiManagementModelFactory.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ArmApiManagementModelFactory.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using System.ComponentModel; using System.Linq; using System.Net; using Azure.Core; @@ -147,8 +148,9 @@ public static ApiEntityBaseContract ApiEntityBaseContract(string description = n /// * `websocket` creates websocket API /// * `graphql` creates GraphQL API. /// + /// Strategy of translating required query parameters to template ones. By default has value 'template'. Possible values: 'template', 'query'. /// A new instance for mocking. - public static ApiCreateOrUpdateContent ApiCreateOrUpdateContent(string description = null, AuthenticationSettingsContract authenticationSettings = null, SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames = null, ApiType? apiType = null, string apiRevision = null, string apiVersion = null, bool? isCurrent = null, bool? isOnline = null, string apiRevisionDescription = null, string apiVersionDescription = null, ResourceIdentifier apiVersionSetId = null, bool? isSubscriptionRequired = null, string termsOfServiceLink = null, ApiContactInformation contact = null, ApiLicenseInformation license = null, ResourceIdentifier sourceApiId = null, string displayName = null, string serviceLink = null, string path = null, IEnumerable protocols = null, ApiVersionSetContractDetails apiVersionSet = null, string value = null, ContentFormat? format = null, ApiCreateOrUpdatePropertiesWsdlSelector wsdlSelector = null, SoapApiType? soapApiType = null) + public static ApiCreateOrUpdateContent ApiCreateOrUpdateContent(string description = null, AuthenticationSettingsContract authenticationSettings = null, SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames = null, ApiType? apiType = null, string apiRevision = null, string apiVersion = null, bool? isCurrent = null, bool? isOnline = null, string apiRevisionDescription = null, string apiVersionDescription = null, ResourceIdentifier apiVersionSetId = null, bool? isSubscriptionRequired = null, string termsOfServiceLink = null, ApiContactInformation contact = null, ApiLicenseInformation license = null, ResourceIdentifier sourceApiId = null, string displayName = null, string serviceLink = null, string path = null, IEnumerable protocols = null, ApiVersionSetContractDetails apiVersionSet = null, string value = null, ContentFormat? format = null, ApiCreateOrUpdatePropertiesWsdlSelector wsdlSelector = null, SoapApiType? soapApiType = null, TranslateRequiredQueryParametersConduct? translateRequiredQueryParametersConduct = null) { protocols ??= new List(); @@ -178,6 +180,7 @@ public static ApiCreateOrUpdateContent ApiCreateOrUpdateContent(string descripti format, wsdlSelector, soapApiType, + translateRequiredQueryParametersConduct, serializedAdditionalRawData: null); } @@ -350,6 +353,28 @@ public static TagContractData TagContractData(ResourceIdentifier id = null, stri serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Resolver Name. + /// Path is type/field being resolved. + /// Description of the resolver. May include HTML formatting tags. + /// A new instance for mocking. + public static ResolverContractData ResolverContractData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string displayName = null, string path = null, string description = null) + { + return new ResolverContractData( + id, + name, + resourceType, + systemData, + displayName, + path, + description, + serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The id. /// The name. @@ -676,6 +701,26 @@ public static AssociatedProductProperties AssociatedProductProperties(string des name); } + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Collection wiki documents included into this wiki. + /// A new instance for mocking. + public static WikiContractData WikiContractData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IEnumerable documents = null) + { + documents ??= new List(); + + return new WikiContractData( + id, + name, + resourceType, + systemData, + documents?.ToList(), + serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The id. /// The name. @@ -718,13 +763,15 @@ public static ApiVersionSetData ApiVersionSetData(ResourceIdentifier id = null, /// Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username. /// Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password. /// User-friendly authorization server name. + /// If true, the authorization server may be used in the developer portal test console. True by default if no value is provided. + /// If true, the authorization server will be used in the API documentation in the developer portal. False by default if no value is provided. /// Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute URL to entity being referenced. /// OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2. /// Form of an authorization grant, which the client uses to request the access token. /// Client or app id registered with this authorization server. /// Client or app secret registered with this authorization server. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. /// A new instance for mocking. - public static ApiManagementAuthorizationServerData ApiManagementAuthorizationServerData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string description = null, IEnumerable authorizationMethods = null, IEnumerable clientAuthenticationMethods = null, IEnumerable tokenBodyParameters = null, string tokenEndpoint = null, bool? doesSupportState = null, string defaultScope = null, IEnumerable bearerTokenSendingMethods = null, string resourceOwnerUsername = null, string resourceOwnerPassword = null, string displayName = null, string clientRegistrationEndpoint = null, string authorizationEndpoint = null, IEnumerable grantTypes = null, string clientId = null, string clientSecret = null) + public static ApiManagementAuthorizationServerData ApiManagementAuthorizationServerData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string description = null, IEnumerable authorizationMethods = null, IEnumerable clientAuthenticationMethods = null, IEnumerable tokenBodyParameters = null, string tokenEndpoint = null, bool? doesSupportState = null, string defaultScope = null, IEnumerable bearerTokenSendingMethods = null, string resourceOwnerUsername = null, string resourceOwnerPassword = null, string displayName = null, bool? useInTestConsole = null, bool? useInApiDocumentation = null, string clientRegistrationEndpoint = null, string authorizationEndpoint = null, IEnumerable grantTypes = null, string clientId = null, string clientSecret = null) { authorizationMethods ??= new List(); clientAuthenticationMethods ??= new List(); @@ -748,6 +795,8 @@ public static ApiManagementAuthorizationServerData ApiManagementAuthorizationSer resourceOwnerUsername, resourceOwnerPassword, displayName, + useInTestConsole, + useInApiDocumentation, clientRegistrationEndpoint, authorizationEndpoint, grantTypes?.ToList(), @@ -772,13 +821,15 @@ public static ApiManagementAuthorizationServerData ApiManagementAuthorizationSer /// Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username. /// Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password. /// User-friendly authorization server name. + /// If true, the authorization server may be used in the developer portal test console. True by default if no value is provided. + /// If true, the authorization server will be used in the API documentation in the developer portal. False by default if no value is provided. /// Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute URL to entity being referenced. /// OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2. /// Form of an authorization grant, which the client uses to request the access token. /// Client or app id registered with this authorization server. /// Client or app secret registered with this authorization server. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. /// A new instance for mocking. - public static ApiManagementAuthorizationServerPatch ApiManagementAuthorizationServerPatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string description = null, IEnumerable authorizationMethods = null, IEnumerable clientAuthenticationMethods = null, IEnumerable tokenBodyParameters = null, string tokenEndpoint = null, bool? doesSupportState = null, string defaultScope = null, IEnumerable bearerTokenSendingMethods = null, string resourceOwnerUsername = null, string resourceOwnerPassword = null, string displayName = null, string clientRegistrationEndpoint = null, string authorizationEndpoint = null, IEnumerable grantTypes = null, string clientId = null, string clientSecret = null) + public static ApiManagementAuthorizationServerPatch ApiManagementAuthorizationServerPatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string description = null, IEnumerable authorizationMethods = null, IEnumerable clientAuthenticationMethods = null, IEnumerable tokenBodyParameters = null, string tokenEndpoint = null, bool? doesSupportState = null, string defaultScope = null, IEnumerable bearerTokenSendingMethods = null, string resourceOwnerUsername = null, string resourceOwnerPassword = null, string displayName = null, bool? useInTestConsole = null, bool? useInApiDocumentation = null, string clientRegistrationEndpoint = null, string authorizationEndpoint = null, IEnumerable grantTypes = null, string clientId = null, string clientSecret = null) { authorizationMethods ??= new List(); clientAuthenticationMethods ??= new List(); @@ -802,6 +853,8 @@ public static ApiManagementAuthorizationServerPatch ApiManagementAuthorizationSe resourceOwnerUsername, resourceOwnerPassword, displayName, + useInTestConsole, + useInApiDocumentation, clientRegistrationEndpoint, authorizationEndpoint, grantTypes?.ToList(), @@ -820,6 +873,84 @@ public static AuthorizationServerSecretsContract AuthorizationServerSecretsContr return new AuthorizationServerSecretsContract(clientSecret, resourceOwnerUsername, resourceOwnerPassword, serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Authorization Provider name. Must be 1 to 300 characters long. + /// Identity provider name. Must be 1 to 300 characters long. + /// OAuth2 settings. + /// A new instance for mocking. + public static AuthorizationProviderContractData AuthorizationProviderContractData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string displayName = null, string identityProvider = null, AuthorizationProviderOAuth2Settings oauth2 = null) + { + return new AuthorizationProviderContractData( + id, + name, + resourceType, + systemData, + displayName, + identityProvider, + oauth2, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Authorization type options. + /// OAuth2 grant type options. + /// Authorization parameters. + /// Authorization error details. + /// Status of the Authorization. + /// A new instance for mocking. + public static AuthorizationContractData AuthorizationContractData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ApiManagementAuthorizationType? authorizationType = null, OAuth2GrantType? oAuth2GrantType = null, IDictionary parameters = null, ApiManagementAuthorizationError error = null, string status = null) + { + parameters ??= new Dictionary(); + + return new AuthorizationContractData( + id, + name, + resourceType, + systemData, + authorizationType, + oAuth2GrantType, + parameters, + error, + status, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The login link. + /// A new instance for mocking. + public static AuthorizationLoginResult AuthorizationLoginResult(string loginLink = null) + { + return new AuthorizationLoginResult(loginLink, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The Tenant Id. + /// The Object Id. + /// A new instance for mocking. + public static AuthorizationAccessPolicyContractData AuthorizationAccessPolicyContractData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, Guid? tenantId = null, string objectId = null) + { + return new AuthorizationAccessPolicyContractData( + id, + name, + resourceType, + systemData, + tenantId, + objectId, + serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The id. /// The name. @@ -827,10 +958,10 @@ public static AuthorizationServerSecretsContract AuthorizationServerSecretsContr /// The systemData. /// Backend Title. /// Backend Description. - /// Management Uri of the Resource in External System. This url can be the Arm Resource Id of Logic Apps, Function Apps or API Apps. + /// Management Uri of the Resource in External System. This URL can be the Arm Resource Id of Logic Apps, Function Apps or API Apps. /// Backend Properties contract. /// Backend Credentials Contract Properties. - /// Backend Proxy Contract Properties. + /// Backend gateway Contract Properties. /// Backend TLS Properties. /// Runtime Url of the Backend. /// Backend communication protocol. @@ -1103,9 +1234,11 @@ public static ApiManagementServiceBackupRestoreContent ApiManagementServiceBacku /// Whether or not public endpoint access is allowed for this API Management service. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'. /// Virtual network configuration of the API Management service. /// Additional datacenter locations of the API Management service. - /// Custom properties of the API Management service.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2).</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` can be used to disable just TLS 1.1.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` can be used to disable TLS 1.0 on an API Management service.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11` can be used to disable just TLS 1.1 for communications with backends.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10` can be used to disable TLS 1.0 for communications with backends.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2` can be used to enable HTTP2 protocol on an API Management service.</br>Not specifying any of these properties on PATCH operation will reset omitted properties' values to their defaults. For all the settings except Http2 the default value is `True` if the service was created on or before April 1st 2018 and `False` otherwise. Http2 setting's default value is `False`.</br></br>You can disable any of next ciphers by using settings `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]`: TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. For example, `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:`false`. The default value is `true` for them. Note: next ciphers can't be disabled since they are required by Azure CloudService internal components: TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_RSA_WITH_AES_256_GCM_SHA384. + /// Custom properties of the API Management service.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2).</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` can be used to disable just TLS 1.1.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` can be used to disable TLS 1.0 on an API Management service.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11` can be used to disable just TLS 1.1 for communications with backends.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10` can be used to disable TLS 1.0 for communications with backends.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2` can be used to enable HTTP2 protocol on an API Management service.</br>Not specifying any of these properties on PATCH operation will reset omitted properties' values to their defaults. For all the settings except Http2 the default value is `True` if the service was created on or before April 1, 2018 and `False` otherwise. Http2 setting's default value is `False`.</br></br>You can disable any of the following ciphers by using settings `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]`: TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. For example, `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:`false`. The default value is `true` for them.</br> Note: The following ciphers can't be disabled since they are required by internal platform components: TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256. /// List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10. /// Property only meant to be used for Consumption SKU Service. This enforces a client certificate to be presented on each request to the gateway. This also enables the ability to authenticate the certificate in the policy on the gateway. + /// Property can be used to enable NAT Gateway for this API Management service. + /// Outbound public IPV4 address prefixes associated with NAT Gateway deployed service. Available only for Premium SKU on stv2 platform. /// Property only valid for an Api Management service deployed in multiple locations. This can be used to disable the gateway in master region. /// The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only. /// Control Plane Apis version constraint for the API Management service. @@ -1115,7 +1248,7 @@ public static ApiManagementServiceBackupRestoreContent ApiManagementServiceBacku /// Publisher email. /// Publisher name. /// A new instance for mocking. - public static ApiManagementServiceData ApiManagementServiceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ApiManagementServiceSkuProperties sku = null, ManagedServiceIdentity identity = null, ETag? etag = null, IEnumerable zones = null, string notificationSenderEmail = null, string provisioningState = null, string targetProvisioningState = null, DateTimeOffset? createdAtUtc = null, Uri gatewayUri = null, Uri gatewayRegionalUri = null, Uri portalUri = null, Uri managementApiUri = null, Uri scmUri = null, Uri developerPortalUri = null, IEnumerable hostnameConfigurations = null, IEnumerable publicIPAddresses = null, IEnumerable privateIPAddresses = null, ResourceIdentifier publicIPAddressId = null, PublicNetworkAccess? publicNetworkAccess = null, VirtualNetworkConfiguration virtualNetworkConfiguration = null, IEnumerable additionalLocations = null, IDictionary customProperties = null, IEnumerable certificates = null, bool? enableClientCertificate = null, bool? disableGateway = null, VirtualNetworkType? virtualNetworkType = null, string minApiVersion = null, bool? restore = null, IEnumerable privateEndpointConnections = null, PlatformVersion? platformVersion = null, string publisherEmail = null, string publisherName = null) + public static ApiManagementServiceData ApiManagementServiceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ApiManagementServiceSkuProperties sku = null, ManagedServiceIdentity identity = null, ETag? etag = null, IEnumerable zones = null, string notificationSenderEmail = null, string provisioningState = null, string targetProvisioningState = null, DateTimeOffset? createdAtUtc = null, Uri gatewayUri = null, Uri gatewayRegionalUri = null, Uri portalUri = null, Uri managementApiUri = null, Uri scmUri = null, Uri developerPortalUri = null, IEnumerable hostnameConfigurations = null, IEnumerable publicIPAddresses = null, IEnumerable privateIPAddresses = null, ResourceIdentifier publicIPAddressId = null, PublicNetworkAccess? publicNetworkAccess = null, VirtualNetworkConfiguration virtualNetworkConfiguration = null, IEnumerable additionalLocations = null, IDictionary customProperties = null, IEnumerable certificates = null, bool? enableClientCertificate = null, ApiManagementNatGatewayState? natGatewayState = null, IEnumerable outboundPublicIPAddresses = null, bool? disableGateway = null, VirtualNetworkType? virtualNetworkType = null, string minApiVersion = null, bool? restore = null, IEnumerable privateEndpointConnections = null, PlatformVersion? platformVersion = null, string publisherEmail = null, string publisherName = null) { tags ??= new Dictionary(); zones ??= new List(); @@ -1125,6 +1258,7 @@ public static ApiManagementServiceData ApiManagementServiceData(ResourceIdentifi additionalLocations ??= new List(); customProperties ??= new Dictionary(); certificates ??= new List(); + outboundPublicIPAddresses ??= new List(); privateEndpointConnections ??= new List(); return new ApiManagementServiceData( @@ -1158,6 +1292,8 @@ public static ApiManagementServiceData ApiManagementServiceData(ResourceIdentifi customProperties, certificates?.ToList(), enableClientCertificate, + natGatewayState, + outboundPublicIPAddresses?.ToList(), disableGateway, virtualNetworkType, minApiVersion != null ? new ApiVersionConstraint(minApiVersion, serializedAdditionalRawData: null) : null, @@ -1188,14 +1324,17 @@ public static VirtualNetworkConfiguration VirtualNetworkConfiguration(Guid? vnet /// Public Standard SKU IP V4 based IP address to be associated with Virtual Network deployed service in the location. Supported only for Premium SKU being deployed in Virtual Network. /// Virtual network configuration for the location. /// Gateway URL of the API Management service in the Region. + /// Property can be used to enable NAT Gateway for this API Management service. + /// Outbound public IPV4 address prefixes associated with NAT Gateway deployed service. Available only for Premium SKU on stv2 platform. /// Property only valid for an Api Management service deployed in multiple locations. This can be used to disable the gateway in this additional location. /// Compute Platform Version running the service. /// A new instance for mocking. - public static AdditionalLocation AdditionalLocation(AzureLocation location = default, ApiManagementServiceSkuProperties sku = null, IEnumerable zones = null, IEnumerable publicIPAddresses = null, IEnumerable privateIPAddresses = null, ResourceIdentifier publicIPAddressId = null, VirtualNetworkConfiguration virtualNetworkConfiguration = null, Uri gatewayRegionalUri = null, bool? disableGateway = null, PlatformVersion? platformVersion = null) + public static AdditionalLocation AdditionalLocation(AzureLocation location = default, ApiManagementServiceSkuProperties sku = null, IEnumerable zones = null, IEnumerable publicIPAddresses = null, IEnumerable privateIPAddresses = null, ResourceIdentifier publicIPAddressId = null, VirtualNetworkConfiguration virtualNetworkConfiguration = null, Uri gatewayRegionalUri = null, ApiManagementNatGatewayState? natGatewayState = null, IEnumerable outboundPublicIPAddresses = null, bool? disableGateway = null, PlatformVersion? platformVersion = null) { zones ??= new List(); publicIPAddresses ??= new List(); privateIPAddresses ??= new List(); + outboundPublicIPAddresses ??= new List(); return new AdditionalLocation( location, @@ -1206,6 +1345,8 @@ public static AdditionalLocation AdditionalLocation(AzureLocation location = def publicIPAddressId, virtualNetworkConfiguration, gatewayRegionalUri, + natGatewayState, + outboundPublicIPAddresses?.ToList(), disableGateway, platformVersion, serializedAdditionalRawData: null); @@ -1261,9 +1402,11 @@ public static RemotePrivateEndpointConnectionWrapper RemotePrivateEndpointConnec /// Whether or not public endpoint access is allowed for this API Management service. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'. /// Virtual network configuration of the API Management service. /// Additional datacenter locations of the API Management service. - /// Custom properties of the API Management service.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2).</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` can be used to disable just TLS 1.1.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` can be used to disable TLS 1.0 on an API Management service.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11` can be used to disable just TLS 1.1 for communications with backends.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10` can be used to disable TLS 1.0 for communications with backends.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2` can be used to enable HTTP2 protocol on an API Management service.</br>Not specifying any of these properties on PATCH operation will reset omitted properties' values to their defaults. For all the settings except Http2 the default value is `True` if the service was created on or before April 1st 2018 and `False` otherwise. Http2 setting's default value is `False`.</br></br>You can disable any of next ciphers by using settings `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]`: TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. For example, `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:`false`. The default value is `true` for them. Note: next ciphers can't be disabled since they are required by Azure CloudService internal components: TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_RSA_WITH_AES_256_GCM_SHA384. + /// Custom properties of the API Management service.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2).</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` can be used to disable just TLS 1.1.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` can be used to disable TLS 1.0 on an API Management service.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11` can be used to disable just TLS 1.1 for communications with backends.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10` can be used to disable TLS 1.0 for communications with backends.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2` can be used to enable HTTP2 protocol on an API Management service.</br>Not specifying any of these properties on PATCH operation will reset omitted properties' values to their defaults. For all the settings except Http2 the default value is `True` if the service was created on or before April 1, 2018 and `False` otherwise. Http2 setting's default value is `False`.</br></br>You can disable any of the following ciphers by using settings `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]`: TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. For example, `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:`false`. The default value is `true` for them.</br> Note: The following ciphers can't be disabled since they are required by internal platform components: TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256. /// List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10. /// Property only meant to be used for Consumption SKU Service. This enforces a client certificate to be presented on each request to the gateway. This also enables the ability to authenticate the certificate in the policy on the gateway. + /// Property can be used to enable NAT Gateway for this API Management service. + /// Outbound public IPV4 address prefixes associated with NAT Gateway deployed service. Available only for Premium SKU on stv2 platform. /// Property only valid for an Api Management service deployed in multiple locations. This can be used to disable the gateway in master region. /// The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only. /// Control Plane Apis version constraint for the API Management service. @@ -1274,7 +1417,7 @@ public static RemotePrivateEndpointConnectionWrapper RemotePrivateEndpointConnec /// Publisher name. /// Resource tags. /// A new instance for mocking. - public static ApiManagementServicePatch ApiManagementServicePatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ApiManagementServiceSkuProperties sku = null, ManagedServiceIdentity identity = null, ETag? etag = null, IEnumerable zones = null, string notificationSenderEmail = null, string provisioningState = null, string targetProvisioningState = null, DateTimeOffset? createdAtUtc = null, Uri gatewayUri = null, Uri gatewayRegionalUri = null, Uri portalUri = null, Uri managementApiUri = null, Uri scmUri = null, Uri developerPortalUri = null, IEnumerable hostnameConfigurations = null, IEnumerable publicIPAddresses = null, IEnumerable privateIPAddresses = null, ResourceIdentifier publicIPAddressId = null, PublicNetworkAccess? publicNetworkAccess = null, VirtualNetworkConfiguration virtualNetworkConfiguration = null, IEnumerable additionalLocations = null, IDictionary customProperties = null, IEnumerable certificates = null, bool? enableClientCertificate = null, bool? disableGateway = null, VirtualNetworkType? virtualNetworkType = null, string minApiVersion = null, bool? restore = null, IEnumerable privateEndpointConnections = null, PlatformVersion? platformVersion = null, string publisherEmail = null, string publisherName = null, IDictionary tags = null) + public static ApiManagementServicePatch ApiManagementServicePatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ApiManagementServiceSkuProperties sku = null, ManagedServiceIdentity identity = null, ETag? etag = null, IEnumerable zones = null, string notificationSenderEmail = null, string provisioningState = null, string targetProvisioningState = null, DateTimeOffset? createdAtUtc = null, Uri gatewayUri = null, Uri gatewayRegionalUri = null, Uri portalUri = null, Uri managementApiUri = null, Uri scmUri = null, Uri developerPortalUri = null, IEnumerable hostnameConfigurations = null, IEnumerable publicIPAddresses = null, IEnumerable privateIPAddresses = null, ResourceIdentifier publicIPAddressId = null, PublicNetworkAccess? publicNetworkAccess = null, VirtualNetworkConfiguration virtualNetworkConfiguration = null, IEnumerable additionalLocations = null, IDictionary customProperties = null, IEnumerable certificates = null, bool? enableClientCertificate = null, ApiManagementNatGatewayState? natGatewayState = null, IEnumerable outboundPublicIPAddresses = null, bool? disableGateway = null, VirtualNetworkType? virtualNetworkType = null, string minApiVersion = null, bool? restore = null, IEnumerable privateEndpointConnections = null, PlatformVersion? platformVersion = null, string publisherEmail = null, string publisherName = null, IDictionary tags = null) { zones ??= new List(); hostnameConfigurations ??= new List(); @@ -1283,6 +1426,7 @@ public static ApiManagementServicePatch ApiManagementServicePatch(ResourceIdenti additionalLocations ??= new List(); customProperties ??= new Dictionary(); certificates ??= new List(); + outboundPublicIPAddresses ??= new List(); privateEndpointConnections ??= new List(); tags ??= new Dictionary(); @@ -1315,6 +1459,8 @@ public static ApiManagementServicePatch ApiManagementServicePatch(ResourceIdenti customProperties, certificates?.ToList(), enableClientCertificate, + natGatewayState, + outboundPublicIPAddresses?.ToList(), disableGateway, virtualNetworkType, minApiVersion != null ? new ApiVersionConstraint(minApiVersion, serializedAdditionalRawData: null) : null, @@ -1677,10 +1823,11 @@ public static UserContractData UserContractData(ResourceIdentifier id = null, st /// Signin Policy Name. Only applies to AAD B2C Identity Provider. /// Profile Editing Policy Name. Only applies to AAD B2C Identity Provider. /// Password Reset Policy Name. Only applies to AAD B2C Identity Provider. + /// The client library to be used in the developer portal. Only applies to AAD and AAD B2C Identity Provider. /// Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft. /// Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. /// A new instance for mocking. - public static ApiManagementIdentityProviderData ApiManagementIdentityProviderData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IdentityProviderType? identityProviderType = null, string signInTenant = null, IEnumerable allowedTenants = null, string authority = null, string signUpPolicyName = null, string signInPolicyName = null, string profileEditingPolicyName = null, string passwordResetPolicyName = null, string clientId = null, string clientSecret = null) + public static ApiManagementIdentityProviderData ApiManagementIdentityProviderData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IdentityProviderType? identityProviderType = null, string signInTenant = null, IEnumerable allowedTenants = null, string authority = null, string signUpPolicyName = null, string signInPolicyName = null, string profileEditingPolicyName = null, string passwordResetPolicyName = null, string clientLibrary = null, string clientId = null, string clientSecret = null) { allowedTenants ??= new List(); @@ -1697,6 +1844,7 @@ public static ApiManagementIdentityProviderData ApiManagementIdentityProviderDat signInPolicyName, profileEditingPolicyName, passwordResetPolicyName, + clientLibrary, clientId, clientSecret, serializedAdditionalRawData: null); @@ -1715,10 +1863,11 @@ public static ApiManagementIdentityProviderData ApiManagementIdentityProviderDat /// Signin Policy Name. Only applies to AAD B2C Identity Provider. /// Profile Editing Policy Name. Only applies to AAD B2C Identity Provider. /// Password Reset Policy Name. Only applies to AAD B2C Identity Provider. + /// The client library to be used in the developer portal. Only applies to AAD and AAD B2C Identity Provider. /// Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft. /// Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. /// A new instance for mocking. - public static ApiManagementIdentityProviderCreateOrUpdateContent ApiManagementIdentityProviderCreateOrUpdateContent(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IdentityProviderType? identityProviderType = null, string signInTenant = null, IEnumerable allowedTenants = null, string authority = null, string signUpPolicyName = null, string signInPolicyName = null, string profileEditingPolicyName = null, string passwordResetPolicyName = null, string clientId = null, string clientSecret = null) + public static ApiManagementIdentityProviderCreateOrUpdateContent ApiManagementIdentityProviderCreateOrUpdateContent(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IdentityProviderType? identityProviderType = null, string signInTenant = null, IEnumerable allowedTenants = null, string authority = null, string signUpPolicyName = null, string signInPolicyName = null, string profileEditingPolicyName = null, string passwordResetPolicyName = null, string clientLibrary = null, string clientId = null, string clientSecret = null) { allowedTenants ??= new List(); @@ -1735,6 +1884,7 @@ public static ApiManagementIdentityProviderCreateOrUpdateContent ApiManagementId signInPolicyName, profileEditingPolicyName, passwordResetPolicyName, + clientLibrary, clientId, clientSecret, serializedAdditionalRawData: null); @@ -1960,8 +2110,10 @@ public static RecipientEmailContract RecipientEmailContract(ResourceIdentifier i /// Metadata endpoint URI. /// Client ID of developer console which is the client application. /// Client Secret of developer console which is the client application. + /// If true, the Open ID Connect provider may be used in the developer portal test console. True by default if no value is provided. + /// If true, the Open ID Connect provider will be used in the API documentation in the developer portal. False by default if no value is provided. /// A new instance for mocking. - public static ApiManagementOpenIdConnectProviderData ApiManagementOpenIdConnectProviderData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string displayName = null, string description = null, string metadataEndpoint = null, string clientId = null, string clientSecret = null) + public static ApiManagementOpenIdConnectProviderData ApiManagementOpenIdConnectProviderData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string displayName = null, string description = null, string metadataEndpoint = null, string clientId = null, string clientSecret = null, bool? useInTestConsole = null, bool? useInApiDocumentation = null) { return new ApiManagementOpenIdConnectProviderData( id, @@ -1973,6 +2125,8 @@ public static ApiManagementOpenIdConnectProviderData ApiManagementOpenIdConnectP metadataEndpoint, clientId, clientSecret, + useInTestConsole, + useInApiDocumentation, serializedAdditionalRawData: null); } @@ -2027,6 +2181,69 @@ public static PolicyDescriptionContractData PolicyDescriptionContractData(Resour serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Contents of the policy fragment. + /// Policy fragment description. + /// Format of the policy fragment content. + /// A new instance for mocking. + public static PolicyFragmentContractData PolicyFragmentContractData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string value = null, string description = null, PolicyFragmentContentFormat? format = null) + { + return new PolicyFragmentContractData( + id, + name, + resourceType, + systemData, + value, + description, + format, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// A new instance for mocking. + public static ResourceCollectionValueItem ResourceCollectionValueItem(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null) + { + return new ResourceCollectionValueItem(id, name, resourceType, systemData, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Enable or disable Basic authentication method. + /// + /// + /// The developer portal delegation settings. + /// The developer portal Cross-Origin Resource Sharing (CORS) settings. + /// The developer portal Content Security Policy (CSP) settings. + /// A new instance for mocking. + public static PortalConfigContractData PortalConfigContractData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, bool? enableBasicAuth = null, bool? require = null, PortalConfigTermsOfServiceProperties signupTermsOfService = null, PortalConfigDelegationProperties delegation = null, IEnumerable corsAllowedOrigins = null, PortalConfigCspProperties csp = null) + { + corsAllowedOrigins ??= new List(); + + return new PortalConfigContractData( + id, + name, + resourceType, + systemData, + enableBasicAuth, + require != null ? new PortalConfigPropertiesSignin(require, serializedAdditionalRawData: null) : null, + signupTermsOfService != null ? new PortalConfigPropertiesSignup(signupTermsOfService, serializedAdditionalRawData: null) : null, + delegation, + corsAllowedOrigins != null ? new PortalConfigCorsProperties(corsAllowedOrigins?.ToList(), serializedAdditionalRawData: null) : null, + csp, + serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The id. /// The name. @@ -2404,7 +2621,7 @@ public static RegionContract RegionContract(string name = null, bool? isMasterRe /// Subscription identifier path. /subscriptions/{subscriptionId}. /// Number of successful calls. This includes calls returning HttpStatusCode <= 301 and HttpStatusCode.NotModified and HttpStatusCode.TemporaryRedirect. /// Number of calls blocked due to invalid credentials. This includes calls returning HttpStatusCode.Unauthorized and HttpStatusCode.Forbidden and HttpStatusCode.TooManyRequests. - /// Number of calls failed due to proxy or backend errors. This includes calls returning HttpStatusCode.BadRequest(400) and any Code between HttpStatusCode.InternalServerError (500) and 600. + /// Number of calls failed due to gateway or backend errors. This includes calls returning HttpStatusCode.BadRequest(400) and any Code between HttpStatusCode.InternalServerError (500) and 600. /// Number of other calls. /// Total number of calls. /// Bandwidth consumed. @@ -2808,5 +3025,251 @@ public static UserTokenResult UserTokenResult(string value = null) { return new UserTokenResult(value, serializedAdditionalRawData: null); } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// documentation title. + /// Markdown documentation content. + /// A new instance for mocking. + public static DocumentationContractData DocumentationContractData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string title = null, string content = null) + { + return new DocumentationContractData( + id, + name, + resourceType, + systemData, + title, + content, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of ApiManagementAuthorizationServerData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Description of the authorization server. Can contain HTML formatting tags. + /// HTTP verbs supported by the authorization endpoint. GET must be always present. POST is optional. + /// Method of authentication supported by the token endpoint of this authorization server. Possible values are Basic and/or Body. When Body is specified, client credentials and other parameters are passed within the request body in the application/x-www-form-urlencoded format. + /// Additional parameters required by the token endpoint of this authorization server represented as an array of JSON objects with name and value string properties, i.e. {"name" : "name value", "value": "a value"}. + /// OAuth token endpoint. Contains absolute URI to entity being referenced. + /// If true, authorization server will include state parameter from the authorization request to its response. Client may use state parameter to raise protocol security. + /// Access token scope that is going to be requested by default. Can be overridden at the API level. Should be provided in the form of a string containing space-delimited values. + /// Specifies the mechanism by which access token is passed to the API. + /// Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username. + /// Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password. + /// User-friendly authorization server name. + /// Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute URL to entity being referenced. + /// OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2. + /// Form of an authorization grant, which the client uses to request the access token. + /// Client or app id registered with this authorization server. + /// Client or app secret registered with this authorization server. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static ApiManagementAuthorizationServerData ApiManagementAuthorizationServerData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string description, IEnumerable authorizationMethods, IEnumerable clientAuthenticationMethods, IEnumerable tokenBodyParameters, string tokenEndpoint, bool? doesSupportState, string defaultScope, IEnumerable bearerTokenSendingMethods, string resourceOwnerUsername, string resourceOwnerPassword, string displayName, string clientRegistrationEndpoint, string authorizationEndpoint, IEnumerable grantTypes, string clientId, string clientSecret) + { + return ApiManagementAuthorizationServerData(id: id, name: name, resourceType: resourceType, systemData: systemData, description: description, authorizationMethods: authorizationMethods, clientAuthenticationMethods: clientAuthenticationMethods, tokenBodyParameters: tokenBodyParameters, tokenEndpoint: tokenEndpoint, doesSupportState: doesSupportState, defaultScope: defaultScope, bearerTokenSendingMethods: bearerTokenSendingMethods, resourceOwnerUsername: resourceOwnerUsername, resourceOwnerPassword: resourceOwnerPassword, displayName: displayName, useInTestConsole: default, useInApiDocumentation: default, clientRegistrationEndpoint: clientRegistrationEndpoint, authorizationEndpoint: authorizationEndpoint, grantTypes: grantTypes, clientId: clientId, clientSecret: clientSecret); + } + + /// Initializes a new instance of ApiManagementAuthorizationServerPatch. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Description of the authorization server. Can contain HTML formatting tags. + /// HTTP verbs supported by the authorization endpoint. GET must be always present. POST is optional. + /// Method of authentication supported by the token endpoint of this authorization server. Possible values are Basic and/or Body. When Body is specified, client credentials and other parameters are passed within the request body in the application/x-www-form-urlencoded format. + /// Additional parameters required by the token endpoint of this authorization server represented as an array of JSON objects with name and value string properties, i.e. {"name" : "name value", "value": "a value"}. + /// OAuth token endpoint. Contains absolute URI to entity being referenced. + /// If true, authorization server will include state parameter from the authorization request to its response. Client may use state parameter to raise protocol security. + /// Access token scope that is going to be requested by default. Can be overridden at the API level. Should be provided in the form of a string containing space-delimited values. + /// Specifies the mechanism by which access token is passed to the API. + /// Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username. + /// Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password. + /// User-friendly authorization server name. + /// Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute URL to entity being referenced. + /// OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2. + /// Form of an authorization grant, which the client uses to request the access token. + /// Client or app id registered with this authorization server. + /// Client or app secret registered with this authorization server. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static ApiManagementAuthorizationServerPatch ApiManagementAuthorizationServerPatch(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string description, IEnumerable authorizationMethods, IEnumerable clientAuthenticationMethods, IEnumerable tokenBodyParameters, string tokenEndpoint, bool? doesSupportState, string defaultScope, IEnumerable bearerTokenSendingMethods, string resourceOwnerUsername, string resourceOwnerPassword, string displayName, string clientRegistrationEndpoint, string authorizationEndpoint, IEnumerable grantTypes, string clientId, string clientSecret) + { + return ApiManagementAuthorizationServerPatch(id: id, name: name, resourceType: resourceType, systemData: systemData, description: description, authorizationMethods: authorizationMethods, clientAuthenticationMethods: clientAuthenticationMethods, tokenBodyParameters: tokenBodyParameters, tokenEndpoint: tokenEndpoint, doesSupportState: doesSupportState, defaultScope: defaultScope, bearerTokenSendingMethods: bearerTokenSendingMethods, resourceOwnerUsername: resourceOwnerUsername, resourceOwnerPassword: resourceOwnerPassword, displayName: displayName, useInTestConsole: default, useInApiDocumentation: default, clientRegistrationEndpoint: clientRegistrationEndpoint, authorizationEndpoint: authorizationEndpoint, grantTypes: grantTypes, clientId: clientId, clientSecret: clientSecret); + } + + /// Initializes a new instance of ApiManagementServiceData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// SKU properties of the API Management service. + /// Managed service identity of the Api Management service. + /// ETag of the resource. + /// A list of availability zones denoting where the resource needs to come from. + /// Email address from which the notification will be sent. + /// The current provisioning state of the API Management service which can be one of the following: Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. + /// The provisioning state of the API Management service, which is targeted by the long running operation started on the service. + /// Creation UTC date of the API Management service.The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + /// Gateway URL of the API Management service. + /// Gateway URL of the API Management service in the Default Region. + /// Publisher portal endpoint Url of the API Management service. + /// Management API endpoint URL of the API Management service. + /// SCM endpoint URL of the API Management service. + /// DEveloper Portal endpoint URL of the API Management service. + /// Custom hostname configuration of the API Management service. + /// Public Static Load Balanced IP addresses of the API Management service in Primary region. Available only for Basic, Standard, Premium and Isolated SKU. + /// Private Static Load Balanced IP addresses of the API Management service in Primary region which is deployed in an Internal Virtual Network. Available only for Basic, Standard, Premium and Isolated SKU. + /// Public Standard SKU IP V4 based IP address to be associated with Virtual Network deployed service in the region. Supported only for Developer and Premium SKU being deployed in Virtual Network. + /// Whether or not public endpoint access is allowed for this API Management service. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'. + /// Virtual network configuration of the API Management service. + /// Additional datacenter locations of the API Management service. + /// Custom properties of the API Management service.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2).</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` can be used to disable just TLS 1.1.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` can be used to disable TLS 1.0 on an API Management service.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11` can be used to disable just TLS 1.1 for communications with backends.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10` can be used to disable TLS 1.0 for communications with backends.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2` can be used to enable HTTP2 protocol on an API Management service.</br>Not specifying any of these properties on PATCH operation will reset omitted properties' values to their defaults. For all the settings except Http2 the default value is `True` if the service was created on or before April 1st 2018 and `False` otherwise. Http2 setting's default value is `False`.</br></br>You can disable any of next ciphers by using settings `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]`: TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. For example, `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:`false`. The default value is `true` for them. Note: next ciphers can't be disabled since they are required by Azure CloudService internal components: TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_RSA_WITH_AES_256_GCM_SHA384. + /// List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10. + /// Property only meant to be used for Consumption SKU Service. This enforces a client certificate to be presented on each request to the gateway. This also enables the ability to authenticate the certificate in the policy on the gateway. + /// Property only valid for an Api Management service deployed in multiple locations. This can be used to disable the gateway in master region. + /// The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only. + /// Control Plane Apis version constraint for the API Management service. + /// Undelete Api Management Service if it was previously soft-deleted. If this flag is specified and set to True all other properties will be ignored. + /// List of Private Endpoint Connections of this service. + /// Compute Platform Version running the service in this location. + /// Publisher email. + /// Publisher name. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static ApiManagementServiceData ApiManagementServiceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ApiManagementServiceSkuProperties sku, ManagedServiceIdentity identity, ETag? etag, IEnumerable zones, string notificationSenderEmail, string provisioningState, string targetProvisioningState, DateTimeOffset? createdAtUtc, Uri gatewayUri, Uri gatewayRegionalUri, Uri portalUri, Uri managementApiUri, Uri scmUri, Uri developerPortalUri, IEnumerable hostnameConfigurations, IEnumerable publicIPAddresses, IEnumerable privateIPAddresses, ResourceIdentifier publicIPAddressId, PublicNetworkAccess? publicNetworkAccess, VirtualNetworkConfiguration virtualNetworkConfiguration, IEnumerable additionalLocations, IDictionary customProperties, IEnumerable certificates, bool? enableClientCertificate, bool? disableGateway, VirtualNetworkType? virtualNetworkType, string minApiVersion, bool? restore, IEnumerable privateEndpointConnections, PlatformVersion? platformVersion, string publisherEmail, string publisherName) + { + return ApiManagementServiceData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, sku: sku, identity: identity, etag: etag, zones: zones, notificationSenderEmail: notificationSenderEmail, provisioningState: provisioningState, targetProvisioningState: targetProvisioningState, createdAtUtc: createdAtUtc, gatewayUri: gatewayUri, gatewayRegionalUri: gatewayRegionalUri, portalUri: portalUri, managementApiUri: managementApiUri, scmUri: scmUri, developerPortalUri: developerPortalUri, hostnameConfigurations: hostnameConfigurations, publicIPAddresses: publicIPAddresses, privateIPAddresses: privateIPAddresses, publicIPAddressId: publicIPAddressId, publicNetworkAccess: publicNetworkAccess, virtualNetworkConfiguration: virtualNetworkConfiguration, additionalLocations: additionalLocations, customProperties: customProperties, certificates: certificates, enableClientCertificate: enableClientCertificate, natGatewayState: default, outboundPublicIPAddresses: default, disableGateway: disableGateway, virtualNetworkType: virtualNetworkType, minApiVersion: minApiVersion, restore: restore, privateEndpointConnections: privateEndpointConnections, platformVersion: platformVersion, publisherEmail: publisherEmail, publisherName: publisherName); + } + + /// Initializes a new instance of AdditionalLocation. + /// The location name of the additional region among Azure Data center regions. + /// SKU properties of the API Management service. + /// A list of availability zones denoting where the resource needs to come from. + /// Public Static Load Balanced IP addresses of the API Management service in the additional location. Available only for Basic, Standard, Premium and Isolated SKU. + /// Private Static Load Balanced IP addresses of the API Management service which is deployed in an Internal Virtual Network in a particular additional location. Available only for Basic, Standard, Premium and Isolated SKU. + /// Public Standard SKU IP V4 based IP address to be associated with Virtual Network deployed service in the location. Supported only for Premium SKU being deployed in Virtual Network. + /// Virtual network configuration for the location. + /// Gateway URL of the API Management service in the Region. + /// Property only valid for an Api Management service deployed in multiple locations. This can be used to disable the gateway in this additional location. + /// Compute Platform Version running the service. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static AdditionalLocation AdditionalLocation(AzureLocation location, ApiManagementServiceSkuProperties sku, IEnumerable zones, IEnumerable publicIPAddresses, IEnumerable privateIPAddresses, ResourceIdentifier publicIPAddressId, VirtualNetworkConfiguration virtualNetworkConfiguration, Uri gatewayRegionalUri, bool? disableGateway, PlatformVersion? platformVersion) + { + return AdditionalLocation(location: location, sku: sku, zones: zones, publicIPAddresses: publicIPAddresses, privateIPAddresses: privateIPAddresses, publicIPAddressId: publicIPAddressId, virtualNetworkConfiguration: virtualNetworkConfiguration, gatewayRegionalUri: gatewayRegionalUri, natGatewayState: default, outboundPublicIPAddresses: default, disableGateway: disableGateway, platformVersion: platformVersion); + } + + /// Initializes a new instance of ApiManagementServicePatch. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// SKU properties of the API Management service. + /// Managed service identity of the Api Management service. + /// ETag of the resource. + /// A list of availability zones denoting where the resource needs to come from. + /// Email address from which the notification will be sent. + /// The current provisioning state of the API Management service which can be one of the following: Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. + /// The provisioning state of the API Management service, which is targeted by the long running operation started on the service. + /// Creation UTC date of the API Management service.The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + /// Gateway URL of the API Management service. + /// Gateway URL of the API Management service in the Default Region. + /// Publisher portal endpoint Url of the API Management service. + /// Management API endpoint URL of the API Management service. + /// SCM endpoint URL of the API Management service. + /// DEveloper Portal endpoint URL of the API Management service. + /// Custom hostname configuration of the API Management service. + /// Public Static Load Balanced IP addresses of the API Management service in Primary region. Available only for Basic, Standard, Premium and Isolated SKU. + /// Private Static Load Balanced IP addresses of the API Management service in Primary region which is deployed in an Internal Virtual Network. Available only for Basic, Standard, Premium and Isolated SKU. + /// Public Standard SKU IP V4 based IP address to be associated with Virtual Network deployed service in the region. Supported only for Developer and Premium SKU being deployed in Virtual Network. + /// Whether or not public endpoint access is allowed for this API Management service. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'. + /// Virtual network configuration of the API Management service. + /// Additional datacenter locations of the API Management service. + /// Custom properties of the API Management service.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2).</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` can be used to disable just TLS 1.1.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` can be used to disable TLS 1.0 on an API Management service.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11` can be used to disable just TLS 1.1 for communications with backends.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10` can be used to disable TLS 1.0 for communications with backends.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2` can be used to enable HTTP2 protocol on an API Management service.</br>Not specifying any of these properties on PATCH operation will reset omitted properties' values to their defaults. For all the settings except Http2 the default value is `True` if the service was created on or before April 1st 2018 and `False` otherwise. Http2 setting's default value is `False`.</br></br>You can disable any of next ciphers by using settings `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]`: TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. For example, `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:`false`. The default value is `true` for them. Note: next ciphers can't be disabled since they are required by Azure CloudService internal components: TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_RSA_WITH_AES_256_GCM_SHA384. + /// List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10. + /// Property only meant to be used for Consumption SKU Service. This enforces a client certificate to be presented on each request to the gateway. This also enables the ability to authenticate the certificate in the policy on the gateway. + /// Property only valid for an Api Management service deployed in multiple locations. This can be used to disable the gateway in master region. + /// The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only. + /// Control Plane Apis version constraint for the API Management service. + /// Undelete Api Management Service if it was previously soft-deleted. If this flag is specified and set to True all other properties will be ignored. + /// List of Private Endpoint Connections of this service. + /// Compute Platform Version running the service in this location. + /// Publisher email. + /// Publisher name. + /// Resource tags. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static ApiManagementServicePatch ApiManagementServicePatch(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ApiManagementServiceSkuProperties sku, ManagedServiceIdentity identity, ETag? etag, IEnumerable zones, string notificationSenderEmail, string provisioningState, string targetProvisioningState, DateTimeOffset? createdAtUtc, Uri gatewayUri, Uri gatewayRegionalUri, Uri portalUri, Uri managementApiUri, Uri scmUri, Uri developerPortalUri, IEnumerable hostnameConfigurations, IEnumerable publicIPAddresses, IEnumerable privateIPAddresses, ResourceIdentifier publicIPAddressId, PublicNetworkAccess? publicNetworkAccess, VirtualNetworkConfiguration virtualNetworkConfiguration, IEnumerable additionalLocations, IDictionary customProperties, IEnumerable certificates, bool? enableClientCertificate, bool? disableGateway, VirtualNetworkType? virtualNetworkType, string minApiVersion, bool? restore, IEnumerable privateEndpointConnections, PlatformVersion? platformVersion, string publisherEmail, string publisherName, IDictionary tags) + { + return ApiManagementServicePatch(id: id, name: name, resourceType: resourceType, systemData: systemData, sku: sku, identity: identity, etag: etag, zones: zones, notificationSenderEmail: notificationSenderEmail, provisioningState: provisioningState, targetProvisioningState: targetProvisioningState, createdAtUtc: createdAtUtc, gatewayUri: gatewayUri, gatewayRegionalUri: gatewayRegionalUri, portalUri: portalUri, managementApiUri: managementApiUri, scmUri: scmUri, developerPortalUri: developerPortalUri, hostnameConfigurations: hostnameConfigurations, publicIPAddresses: publicIPAddresses, privateIPAddresses: privateIPAddresses, publicIPAddressId: publicIPAddressId, publicNetworkAccess: publicNetworkAccess, virtualNetworkConfiguration: virtualNetworkConfiguration, additionalLocations: additionalLocations, customProperties: customProperties, certificates: certificates, enableClientCertificate: enableClientCertificate, natGatewayState: default, outboundPublicIPAddresses: default, disableGateway: disableGateway, virtualNetworkType: virtualNetworkType, minApiVersion: minApiVersion, restore: restore, privateEndpointConnections: privateEndpointConnections, platformVersion: platformVersion, publisherEmail: publisherEmail, publisherName: publisherName, tags: tags); + } + + /// Initializes a new instance of ApiManagementIdentityProviderData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Identity Provider Type identifier. + /// The TenantId to use instead of Common when logging into Active Directory. + /// List of Allowed Tenants when configuring Azure Active Directory login. + /// OpenID Connect discovery endpoint hostname for AAD or AAD B2C. + /// Signup Policy Name. Only applies to AAD B2C Identity Provider. + /// Signin Policy Name. Only applies to AAD B2C Identity Provider. + /// Profile Editing Policy Name. Only applies to AAD B2C Identity Provider. + /// Password Reset Policy Name. Only applies to AAD B2C Identity Provider. + /// Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft. + /// Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static ApiManagementIdentityProviderData ApiManagementIdentityProviderData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IdentityProviderType? identityProviderType, string signInTenant, IEnumerable allowedTenants, string authority, string signUpPolicyName, string signInPolicyName, string profileEditingPolicyName, string passwordResetPolicyName, string clientId, string clientSecret) + { + return ApiManagementIdentityProviderData(id: id, name: name, resourceType: resourceType, systemData: systemData, identityProviderType: identityProviderType, signInTenant: signInTenant, allowedTenants: allowedTenants, authority: authority, signUpPolicyName: signUpPolicyName, signInPolicyName: signInPolicyName, profileEditingPolicyName: profileEditingPolicyName, passwordResetPolicyName: passwordResetPolicyName, clientLibrary: default, clientId: clientId, clientSecret: clientSecret); + } + + /// Initializes a new instance of ApiManagementIdentityProviderCreateOrUpdateContent. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Identity Provider Type identifier. + /// The TenantId to use instead of Common when logging into Active Directory. + /// List of Allowed Tenants when configuring Azure Active Directory login. + /// OpenID Connect discovery endpoint hostname for AAD or AAD B2C. + /// Signup Policy Name. Only applies to AAD B2C Identity Provider. + /// Signin Policy Name. Only applies to AAD B2C Identity Provider. + /// Profile Editing Policy Name. Only applies to AAD B2C Identity Provider. + /// Password Reset Policy Name. Only applies to AAD B2C Identity Provider. + /// Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft. + /// Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static ApiManagementIdentityProviderCreateOrUpdateContent ApiManagementIdentityProviderCreateOrUpdateContent(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IdentityProviderType? identityProviderType, string signInTenant, IEnumerable allowedTenants, string authority, string signUpPolicyName, string signInPolicyName, string profileEditingPolicyName, string passwordResetPolicyName, string clientId, string clientSecret) + { + return ApiManagementIdentityProviderCreateOrUpdateContent(id: id, name: name, resourceType: resourceType, systemData: systemData, identityProviderType: identityProviderType, signInTenant: signInTenant, allowedTenants: allowedTenants, authority: authority, signUpPolicyName: signUpPolicyName, signInPolicyName: signInPolicyName, profileEditingPolicyName: profileEditingPolicyName, passwordResetPolicyName: passwordResetPolicyName, clientLibrary: default, clientId: clientId, clientSecret: clientSecret); + } + + /// Initializes a new instance of ApiManagementOpenIdConnectProviderData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// User-friendly OpenID Connect Provider name. + /// User-friendly description of OpenID Connect Provider. + /// Metadata endpoint URI. + /// Client ID of developer console which is the client application. + /// Client Secret of developer console which is the client application. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static ApiManagementOpenIdConnectProviderData ApiManagementOpenIdConnectProviderData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string displayName, string description, string metadataEndpoint, string clientId, string clientSecret) + { + return ApiManagementOpenIdConnectProviderData(id: id, name: name, resourceType: resourceType, systemData: systemData, displayName: displayName, description: description, metadataEndpoint: metadataEndpoint, clientId: clientId, clientSecret: clientSecret, useInTestConsole: default, useInApiDocumentation: default); + } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationAccessPolicyContractCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationAccessPolicyContractCollection.cs new file mode 100644 index 0000000000000..70fd0f00ac964 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationAccessPolicyContractCollection.cs @@ -0,0 +1,505 @@ +// 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.ApiManagement +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get an instance call the GetAuthorizationAccessPolicyContracts method from an instance of . + /// + public partial class AuthorizationAccessPolicyContractCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _authorizationAccessPolicyContractAuthorizationAccessPolicyClientDiagnostics; + private readonly AuthorizationAccessPolicyRestOperations _authorizationAccessPolicyContractAuthorizationAccessPolicyRestClient; + + /// Initializes a new instance of the class for mocking. + protected AuthorizationAccessPolicyContractCollection() + { + } + + /// 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 AuthorizationAccessPolicyContractCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _authorizationAccessPolicyContractAuthorizationAccessPolicyClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", AuthorizationAccessPolicyContractResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(AuthorizationAccessPolicyContractResource.ResourceType, out string authorizationAccessPolicyContractAuthorizationAccessPolicyApiVersion); + _authorizationAccessPolicyContractAuthorizationAccessPolicyRestClient = new AuthorizationAccessPolicyRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, authorizationAccessPolicyContractAuthorizationAccessPolicyApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != AuthorizationContractResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, AuthorizationContractResource.ResourceType), nameof(id)); + } + + /// + /// Creates or updates Authorization Access Policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies/{authorizationAccessPolicyId} + /// + /// + /// Operation Id + /// AuthorizationAccessPolicy_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2022-08-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. + /// Identifier of the authorization access policy. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an 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 authorizationAccessPolicyId, AuthorizationAccessPolicyContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(authorizationAccessPolicyId, nameof(authorizationAccessPolicyId)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _authorizationAccessPolicyContractAuthorizationAccessPolicyClientDiagnostics.CreateScope("AuthorizationAccessPolicyContractCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _authorizationAccessPolicyContractAuthorizationAccessPolicyRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, authorizationAccessPolicyId, data, ifMatch, cancellationToken).ConfigureAwait(false); + var uri = _authorizationAccessPolicyContractAuthorizationAccessPolicyRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, authorizationAccessPolicyId, data, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(Response.FromValue(new AuthorizationAccessPolicyContractResource(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 Authorization Access Policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies/{authorizationAccessPolicyId} + /// + /// + /// Operation Id + /// AuthorizationAccessPolicy_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2022-08-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. + /// Identifier of the authorization access policy. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an 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 authorizationAccessPolicyId, AuthorizationAccessPolicyContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(authorizationAccessPolicyId, nameof(authorizationAccessPolicyId)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _authorizationAccessPolicyContractAuthorizationAccessPolicyClientDiagnostics.CreateScope("AuthorizationAccessPolicyContractCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _authorizationAccessPolicyContractAuthorizationAccessPolicyRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, authorizationAccessPolicyId, data, ifMatch, cancellationToken); + var uri = _authorizationAccessPolicyContractAuthorizationAccessPolicyRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, authorizationAccessPolicyId, data, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(Response.FromValue(new AuthorizationAccessPolicyContractResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the authorization access policy specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies/{authorizationAccessPolicyId} + /// + /// + /// Operation Id + /// AuthorizationAccessPolicy_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Identifier of the authorization access policy. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string authorizationAccessPolicyId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(authorizationAccessPolicyId, nameof(authorizationAccessPolicyId)); + + using var scope = _authorizationAccessPolicyContractAuthorizationAccessPolicyClientDiagnostics.CreateScope("AuthorizationAccessPolicyContractCollection.Get"); + scope.Start(); + try + { + var response = await _authorizationAccessPolicyContractAuthorizationAccessPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, authorizationAccessPolicyId, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AuthorizationAccessPolicyContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the authorization access policy specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies/{authorizationAccessPolicyId} + /// + /// + /// Operation Id + /// AuthorizationAccessPolicy_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Identifier of the authorization access policy. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string authorizationAccessPolicyId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(authorizationAccessPolicyId, nameof(authorizationAccessPolicyId)); + + using var scope = _authorizationAccessPolicyContractAuthorizationAccessPolicyClientDiagnostics.CreateScope("AuthorizationAccessPolicyContractCollection.Get"); + scope.Start(); + try + { + var response = _authorizationAccessPolicyContractAuthorizationAccessPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, authorizationAccessPolicyId, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AuthorizationAccessPolicyContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists a collection of authorization access policy defined within a authorization. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies + /// + /// + /// Operation Id + /// AuthorizationAccessPolicy_ListByAuthorization + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _authorizationAccessPolicyContractAuthorizationAccessPolicyRestClient.CreateListByAuthorizationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, filter, top, skip); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _authorizationAccessPolicyContractAuthorizationAccessPolicyRestClient.CreateListByAuthorizationNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, filter, top, skip); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new AuthorizationAccessPolicyContractResource(Client, AuthorizationAccessPolicyContractData.DeserializeAuthorizationAccessPolicyContractData(e)), _authorizationAccessPolicyContractAuthorizationAccessPolicyClientDiagnostics, Pipeline, "AuthorizationAccessPolicyContractCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Lists a collection of authorization access policy defined within a authorization. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies + /// + /// + /// Operation Id + /// AuthorizationAccessPolicy_ListByAuthorization + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _authorizationAccessPolicyContractAuthorizationAccessPolicyRestClient.CreateListByAuthorizationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, filter, top, skip); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _authorizationAccessPolicyContractAuthorizationAccessPolicyRestClient.CreateListByAuthorizationNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, filter, top, skip); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new AuthorizationAccessPolicyContractResource(Client, AuthorizationAccessPolicyContractData.DeserializeAuthorizationAccessPolicyContractData(e)), _authorizationAccessPolicyContractAuthorizationAccessPolicyClientDiagnostics, Pipeline, "AuthorizationAccessPolicyContractCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies/{authorizationAccessPolicyId} + /// + /// + /// Operation Id + /// AuthorizationAccessPolicy_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Identifier of the authorization access policy. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string authorizationAccessPolicyId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(authorizationAccessPolicyId, nameof(authorizationAccessPolicyId)); + + using var scope = _authorizationAccessPolicyContractAuthorizationAccessPolicyClientDiagnostics.CreateScope("AuthorizationAccessPolicyContractCollection.Exists"); + scope.Start(); + try + { + var response = await _authorizationAccessPolicyContractAuthorizationAccessPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, authorizationAccessPolicyId, 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.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies/{authorizationAccessPolicyId} + /// + /// + /// Operation Id + /// AuthorizationAccessPolicy_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Identifier of the authorization access policy. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string authorizationAccessPolicyId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(authorizationAccessPolicyId, nameof(authorizationAccessPolicyId)); + + using var scope = _authorizationAccessPolicyContractAuthorizationAccessPolicyClientDiagnostics.CreateScope("AuthorizationAccessPolicyContractCollection.Exists"); + scope.Start(); + try + { + var response = _authorizationAccessPolicyContractAuthorizationAccessPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, authorizationAccessPolicyId, 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.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies/{authorizationAccessPolicyId} + /// + /// + /// Operation Id + /// AuthorizationAccessPolicy_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Identifier of the authorization access policy. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string authorizationAccessPolicyId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(authorizationAccessPolicyId, nameof(authorizationAccessPolicyId)); + + using var scope = _authorizationAccessPolicyContractAuthorizationAccessPolicyClientDiagnostics.CreateScope("AuthorizationAccessPolicyContractCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _authorizationAccessPolicyContractAuthorizationAccessPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, authorizationAccessPolicyId, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new AuthorizationAccessPolicyContractResource(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.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies/{authorizationAccessPolicyId} + /// + /// + /// Operation Id + /// AuthorizationAccessPolicy_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Identifier of the authorization access policy. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string authorizationAccessPolicyId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(authorizationAccessPolicyId, nameof(authorizationAccessPolicyId)); + + using var scope = _authorizationAccessPolicyContractAuthorizationAccessPolicyClientDiagnostics.CreateScope("AuthorizationAccessPolicyContractCollection.GetIfExists"); + scope.Start(); + try + { + var response = _authorizationAccessPolicyContractAuthorizationAccessPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, authorizationAccessPolicyId, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new AuthorizationAccessPolicyContractResource(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/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationAccessPolicyContractData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationAccessPolicyContractData.Serialization.cs new file mode 100644 index 0000000000000..b6b9d88712252 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationAccessPolicyContractData.Serialization.cs @@ -0,0 +1,320 @@ +// 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.ApiManagement +{ + public partial class AuthorizationAccessPolicyContractData : 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(AuthorizationAccessPolicyContractData)} 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 (Optional.IsDefined(TenantId)) + { + writer.WritePropertyName("tenantId"u8); + writer.WriteStringValue(TenantId.Value); + } + if (Optional.IsDefined(ObjectId)) + { + writer.WritePropertyName("objectId"u8); + writer.WriteStringValue(ObjectId); + } + 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(); + } + + AuthorizationAccessPolicyContractData 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(AuthorizationAccessPolicyContractData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAuthorizationAccessPolicyContractData(document.RootElement, options); + } + + internal static AuthorizationAccessPolicyContractData DeserializeAuthorizationAccessPolicyContractData(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; + Guid? tenantId = default; + string objectId = 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("tenantId"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tenantId = property0.Value.GetGuid(); + continue; + } + if (property0.NameEquals("objectId"u8)) + { + objectId = property0.Value.GetString(); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AuthorizationAccessPolicyContractData( + id, + name, + type, + systemData, + tenantId, + objectId, + 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(TenantId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" tenantId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TenantId)) + { + builder.Append(" tenantId: "); + builder.AppendLine($"'{TenantId.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ObjectId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" objectId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ObjectId)) + { + builder.Append(" objectId: "); + if (ObjectId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ObjectId}'''"); + } + else + { + builder.AppendLine($"'{ObjectId}'"); + } + } + } + + 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(AuthorizationAccessPolicyContractData)} does not support writing '{options.Format}' format."); + } + } + + AuthorizationAccessPolicyContractData 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 DeserializeAuthorizationAccessPolicyContractData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AuthorizationAccessPolicyContractData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationAccessPolicyContractData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationAccessPolicyContractData.cs new file mode 100644 index 0000000000000..527cc0068b676 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationAccessPolicyContractData.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 Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + /// + /// A class representing the AuthorizationAccessPolicyContract data model. + /// Authorization access policy contract. + /// + public partial class AuthorizationAccessPolicyContractData : 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 AuthorizationAccessPolicyContractData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The Tenant Id. + /// The Object Id. + /// Keeps track of any properties unknown to the library. + internal AuthorizationAccessPolicyContractData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, Guid? tenantId, string objectId, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + TenantId = tenantId; + ObjectId = objectId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The Tenant Id. + [WirePath("properties.tenantId")] + public Guid? TenantId { get; set; } + /// The Object Id. + [WirePath("properties.objectId")] + public string ObjectId { get; set; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationAccessPolicyContractResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationAccessPolicyContractResource.Serialization.cs new file mode 100644 index 0000000000000..103b23710e2bc --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationAccessPolicyContractResource.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.ApiManagement +{ + public partial class AuthorizationAccessPolicyContractResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + AuthorizationAccessPolicyContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + AuthorizationAccessPolicyContractData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationAccessPolicyContractResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationAccessPolicyContractResource.cs new file mode 100644 index 0000000000000..2267676cc0cb8 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationAccessPolicyContractResource.cs @@ -0,0 +1,361 @@ +// 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.ApiManagement +{ + /// + /// A Class representing an AuthorizationAccessPolicyContract along with the instance operations that can be performed on it. + /// If you have a you can construct an + /// from an instance of using the GetAuthorizationAccessPolicyContractResource method. + /// Otherwise you can get one from its parent resource using the GetAuthorizationAccessPolicyContract method. + /// + public partial class AuthorizationAccessPolicyContractResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The serviceName. + /// The authorizationProviderId. + /// The authorizationId. + /// The authorizationAccessPolicyId. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, string authorizationAccessPolicyId) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies/{authorizationAccessPolicyId}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _authorizationAccessPolicyContractAuthorizationAccessPolicyClientDiagnostics; + private readonly AuthorizationAccessPolicyRestOperations _authorizationAccessPolicyContractAuthorizationAccessPolicyRestClient; + private readonly AuthorizationAccessPolicyContractData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.ApiManagement/service/authorizationProviders/authorizations/accessPolicies"; + + /// Initializes a new instance of the class for mocking. + protected AuthorizationAccessPolicyContractResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal AuthorizationAccessPolicyContractResource(ArmClient client, AuthorizationAccessPolicyContractData 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 AuthorizationAccessPolicyContractResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _authorizationAccessPolicyContractAuthorizationAccessPolicyClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string authorizationAccessPolicyContractAuthorizationAccessPolicyApiVersion); + _authorizationAccessPolicyContractAuthorizationAccessPolicyRestClient = new AuthorizationAccessPolicyRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, authorizationAccessPolicyContractAuthorizationAccessPolicyApiVersion); +#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 AuthorizationAccessPolicyContractData 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 the details of the authorization access policy specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies/{authorizationAccessPolicyId} + /// + /// + /// Operation Id + /// AuthorizationAccessPolicy_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _authorizationAccessPolicyContractAuthorizationAccessPolicyClientDiagnostics.CreateScope("AuthorizationAccessPolicyContractResource.Get"); + scope.Start(); + try + { + var response = await _authorizationAccessPolicyContractAuthorizationAccessPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, 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 AuthorizationAccessPolicyContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the authorization access policy specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies/{authorizationAccessPolicyId} + /// + /// + /// Operation Id + /// AuthorizationAccessPolicy_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _authorizationAccessPolicyContractAuthorizationAccessPolicyClientDiagnostics.CreateScope("AuthorizationAccessPolicyContractResource.Get"); + scope.Start(); + try + { + var response = _authorizationAccessPolicyContractAuthorizationAccessPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, 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 AuthorizationAccessPolicyContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes specific access policy from the Authorization. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies/{authorizationAccessPolicyId} + /// + /// + /// Operation Id + /// AuthorizationAccessPolicy_Delete + /// + /// + /// Default Api Version + /// 2022-08-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. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag ifMatch, CancellationToken cancellationToken = default) + { + using var scope = _authorizationAccessPolicyContractAuthorizationAccessPolicyClientDiagnostics.CreateScope("AuthorizationAccessPolicyContractResource.Delete"); + scope.Start(); + try + { + var response = await _authorizationAccessPolicyContractAuthorizationAccessPolicyRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ifMatch, cancellationToken).ConfigureAwait(false); + var uri = _authorizationAccessPolicyContractAuthorizationAccessPolicyRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes specific access policy from the Authorization. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies/{authorizationAccessPolicyId} + /// + /// + /// Operation Id + /// AuthorizationAccessPolicy_Delete + /// + /// + /// Default Api Version + /// 2022-08-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. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, CancellationToken cancellationToken = default) + { + using var scope = _authorizationAccessPolicyContractAuthorizationAccessPolicyClientDiagnostics.CreateScope("AuthorizationAccessPolicyContractResource.Delete"); + scope.Start(); + try + { + var response = _authorizationAccessPolicyContractAuthorizationAccessPolicyRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ifMatch, cancellationToken); + var uri = _authorizationAccessPolicyContractAuthorizationAccessPolicyRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates Authorization Access Policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies/{authorizationAccessPolicyId} + /// + /// + /// Operation Id + /// AuthorizationAccessPolicy_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2022-08-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. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, AuthorizationAccessPolicyContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _authorizationAccessPolicyContractAuthorizationAccessPolicyClientDiagnostics.CreateScope("AuthorizationAccessPolicyContractResource.Update"); + scope.Start(); + try + { + var response = await _authorizationAccessPolicyContractAuthorizationAccessPolicyRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, ifMatch, cancellationToken).ConfigureAwait(false); + var uri = _authorizationAccessPolicyContractAuthorizationAccessPolicyRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(Response.FromValue(new AuthorizationAccessPolicyContractResource(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 Authorization Access Policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies/{authorizationAccessPolicyId} + /// + /// + /// Operation Id + /// AuthorizationAccessPolicy_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2022-08-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. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, AuthorizationAccessPolicyContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _authorizationAccessPolicyContractAuthorizationAccessPolicyClientDiagnostics.CreateScope("AuthorizationAccessPolicyContractResource.Update"); + scope.Start(); + try + { + var response = _authorizationAccessPolicyContractAuthorizationAccessPolicyRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, ifMatch, cancellationToken); + var uri = _authorizationAccessPolicyContractAuthorizationAccessPolicyRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(Response.FromValue(new AuthorizationAccessPolicyContractResource(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/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationContractCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationContractCollection.cs new file mode 100644 index 0000000000000..53ccde733ad56 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationContractCollection.cs @@ -0,0 +1,505 @@ +// 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.ApiManagement +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get an instance call the GetAuthorizationContracts method from an instance of . + /// + public partial class AuthorizationContractCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _authorizationContractAuthorizationClientDiagnostics; + private readonly AuthorizationRestOperations _authorizationContractAuthorizationRestClient; + + /// Initializes a new instance of the class for mocking. + protected AuthorizationContractCollection() + { + } + + /// 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 AuthorizationContractCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _authorizationContractAuthorizationClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", AuthorizationContractResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(AuthorizationContractResource.ResourceType, out string authorizationContractAuthorizationApiVersion); + _authorizationContractAuthorizationRestClient = new AuthorizationRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, authorizationContractAuthorizationApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != AuthorizationProviderContractResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, AuthorizationProviderContractResource.ResourceType), nameof(id)); + } + + /// + /// Creates or updates authorization. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId} + /// + /// + /// Operation Id + /// Authorization_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2022-08-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. + /// Identifier of the authorization. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an 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 authorizationId, AuthorizationContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _authorizationContractAuthorizationClientDiagnostics.CreateScope("AuthorizationContractCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _authorizationContractAuthorizationRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, authorizationId, data, ifMatch, cancellationToken).ConfigureAwait(false); + var uri = _authorizationContractAuthorizationRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, authorizationId, data, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(Response.FromValue(new AuthorizationContractResource(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 authorization. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId} + /// + /// + /// Operation Id + /// Authorization_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2022-08-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. + /// Identifier of the authorization. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an 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 authorizationId, AuthorizationContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _authorizationContractAuthorizationClientDiagnostics.CreateScope("AuthorizationContractCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _authorizationContractAuthorizationRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, authorizationId, data, ifMatch, cancellationToken); + var uri = _authorizationContractAuthorizationRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, authorizationId, data, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(Response.FromValue(new AuthorizationContractResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the authorization specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId} + /// + /// + /// Operation Id + /// Authorization_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Identifier of the authorization. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string authorizationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + + using var scope = _authorizationContractAuthorizationClientDiagnostics.CreateScope("AuthorizationContractCollection.Get"); + scope.Start(); + try + { + var response = await _authorizationContractAuthorizationRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, authorizationId, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AuthorizationContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the authorization specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId} + /// + /// + /// Operation Id + /// Authorization_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Identifier of the authorization. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string authorizationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + + using var scope = _authorizationContractAuthorizationClientDiagnostics.CreateScope("AuthorizationContractCollection.Get"); + scope.Start(); + try + { + var response = _authorizationContractAuthorizationRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, authorizationId, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AuthorizationContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists a collection of authorization providers defined within a authorization provider. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations + /// + /// + /// Operation Id + /// Authorization_ListByAuthorizationProvider + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _authorizationContractAuthorizationRestClient.CreateListByAuthorizationProviderRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, filter, top, skip); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _authorizationContractAuthorizationRestClient.CreateListByAuthorizationProviderNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, filter, top, skip); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new AuthorizationContractResource(Client, AuthorizationContractData.DeserializeAuthorizationContractData(e)), _authorizationContractAuthorizationClientDiagnostics, Pipeline, "AuthorizationContractCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Lists a collection of authorization providers defined within a authorization provider. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations + /// + /// + /// Operation Id + /// Authorization_ListByAuthorizationProvider + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _authorizationContractAuthorizationRestClient.CreateListByAuthorizationProviderRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, filter, top, skip); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _authorizationContractAuthorizationRestClient.CreateListByAuthorizationProviderNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, filter, top, skip); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new AuthorizationContractResource(Client, AuthorizationContractData.DeserializeAuthorizationContractData(e)), _authorizationContractAuthorizationClientDiagnostics, Pipeline, "AuthorizationContractCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId} + /// + /// + /// Operation Id + /// Authorization_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Identifier of the authorization. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string authorizationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + + using var scope = _authorizationContractAuthorizationClientDiagnostics.CreateScope("AuthorizationContractCollection.Exists"); + scope.Start(); + try + { + var response = await _authorizationContractAuthorizationRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, authorizationId, 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.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId} + /// + /// + /// Operation Id + /// Authorization_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Identifier of the authorization. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string authorizationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + + using var scope = _authorizationContractAuthorizationClientDiagnostics.CreateScope("AuthorizationContractCollection.Exists"); + scope.Start(); + try + { + var response = _authorizationContractAuthorizationRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, authorizationId, 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.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId} + /// + /// + /// Operation Id + /// Authorization_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Identifier of the authorization. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string authorizationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + + using var scope = _authorizationContractAuthorizationClientDiagnostics.CreateScope("AuthorizationContractCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _authorizationContractAuthorizationRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, authorizationId, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new AuthorizationContractResource(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.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId} + /// + /// + /// Operation Id + /// Authorization_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Identifier of the authorization. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string authorizationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + + using var scope = _authorizationContractAuthorizationClientDiagnostics.CreateScope("AuthorizationContractCollection.GetIfExists"); + scope.Start(); + try + { + var response = _authorizationContractAuthorizationRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, authorizationId, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new AuthorizationContractResource(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/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationContractData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationContractData.Serialization.cs new file mode 100644 index 0000000000000..e733b47acc4ec --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationContractData.Serialization.cs @@ -0,0 +1,448 @@ +// 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.ApiManagement.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + public partial class AuthorizationContractData : 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(AuthorizationContractData)} 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 (Optional.IsDefined(AuthorizationType)) + { + writer.WritePropertyName("authorizationType"u8); + writer.WriteStringValue(AuthorizationType.Value.ToString()); + } + if (Optional.IsDefined(OAuth2GrantType)) + { + writer.WritePropertyName("oauth2grantType"u8); + writer.WriteStringValue(OAuth2GrantType.Value.ToString()); + } + if (Optional.IsCollectionDefined(Parameters)) + { + writer.WritePropertyName("parameters"u8); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(Error)) + { + writer.WritePropertyName("error"u8); + writer.WriteObjectValue(Error, options); + } + if (Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status); + } + 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(); + } + + AuthorizationContractData 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(AuthorizationContractData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAuthorizationContractData(document.RootElement, options); + } + + internal static AuthorizationContractData DeserializeAuthorizationContractData(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; + ApiManagementAuthorizationType? authorizationType = default; + OAuth2GrantType? oauth2grantType = default; + IDictionary parameters = default; + ApiManagementAuthorizationError error = default; + string status = 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("authorizationType"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + authorizationType = new ApiManagementAuthorizationType(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("oauth2grantType"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + oauth2grantType = new OAuth2GrantType(property0.Value.GetString()); + 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, property1.Value.GetString()); + } + parameters = dictionary; + continue; + } + if (property0.NameEquals("error"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + error = ApiManagementAuthorizationError.DeserializeApiManagementAuthorizationError(property0.Value, options); + continue; + } + if (property0.NameEquals("status"u8)) + { + status = property0.Value.GetString(); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AuthorizationContractData( + id, + name, + type, + systemData, + authorizationType, + oauth2grantType, + parameters ?? new ChangeTrackingDictionary(), + error, + status, + 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(AuthorizationType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" authorizationType: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AuthorizationType)) + { + builder.Append(" authorizationType: "); + builder.AppendLine($"'{AuthorizationType.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(OAuth2GrantType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" oauth2grantType: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(OAuth2GrantType)) + { + builder.Append(" oauth2grantType: "); + builder.AppendLine($"'{OAuth2GrantType.Value.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}': "); + 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(Error), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" error: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Error)) + { + builder.Append(" error: "); + BicepSerializationHelpers.AppendChildObject(builder, Error, options, 4, false, " error: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Status), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" status: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Status)) + { + builder.Append(" status: "); + if (Status.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Status}'''"); + } + else + { + builder.AppendLine($"'{Status}'"); + } + } + } + + 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(AuthorizationContractData)} does not support writing '{options.Format}' format."); + } + } + + AuthorizationContractData 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 DeserializeAuthorizationContractData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AuthorizationContractData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationContractData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationContractData.cs new file mode 100644 index 0000000000000..2f281bf6a3666 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationContractData.cs @@ -0,0 +1,97 @@ +// 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.ApiManagement.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + /// + /// A class representing the AuthorizationContract data model. + /// Authorization contract. + /// + public partial class AuthorizationContractData : 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 AuthorizationContractData() + { + Parameters = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Authorization type options. + /// OAuth2 grant type options. + /// Authorization parameters. + /// Authorization error details. + /// Status of the Authorization. + /// Keeps track of any properties unknown to the library. + internal AuthorizationContractData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ApiManagementAuthorizationType? authorizationType, OAuth2GrantType? oAuth2GrantType, IDictionary parameters, ApiManagementAuthorizationError error, string status, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + AuthorizationType = authorizationType; + OAuth2GrantType = oAuth2GrantType; + Parameters = parameters; + Error = error; + Status = status; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Authorization type options. + [WirePath("properties.authorizationType")] + public ApiManagementAuthorizationType? AuthorizationType { get; set; } + /// OAuth2 grant type options. + [WirePath("properties.oauth2grantType")] + public OAuth2GrantType? OAuth2GrantType { get; set; } + /// Authorization parameters. + [WirePath("properties.parameters")] + public IDictionary Parameters { get; } + /// Authorization error details. + [WirePath("properties.error")] + public ApiManagementAuthorizationError Error { get; set; } + /// Status of the Authorization. + [WirePath("properties.status")] + public string Status { get; set; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationContractResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationContractResource.Serialization.cs new file mode 100644 index 0000000000000..43128b49cb45c --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationContractResource.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.ApiManagement +{ + public partial class AuthorizationContractResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + AuthorizationContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + AuthorizationContractData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationContractResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationContractResource.cs new file mode 100644 index 0000000000000..da9a3672d9da8 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationContractResource.cs @@ -0,0 +1,594 @@ +// 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.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + /// + /// A Class representing an AuthorizationContract along with the instance operations that can be performed on it. + /// If you have a you can construct an + /// from an instance of using the GetAuthorizationContractResource method. + /// Otherwise you can get one from its parent resource using the GetAuthorizationContract method. + /// + public partial class AuthorizationContractResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The serviceName. + /// The authorizationProviderId. + /// The authorizationId. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _authorizationContractAuthorizationClientDiagnostics; + private readonly AuthorizationRestOperations _authorizationContractAuthorizationRestClient; + private readonly ClientDiagnostics _authorizationLoginLinksClientDiagnostics; + private readonly AuthorizationLoginLinksRestOperations _authorizationLoginLinksRestClient; + private readonly AuthorizationContractData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.ApiManagement/service/authorizationProviders/authorizations"; + + /// Initializes a new instance of the class for mocking. + protected AuthorizationContractResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal AuthorizationContractResource(ArmClient client, AuthorizationContractData 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 AuthorizationContractResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _authorizationContractAuthorizationClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string authorizationContractAuthorizationApiVersion); + _authorizationContractAuthorizationRestClient = new AuthorizationRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, authorizationContractAuthorizationApiVersion); + _authorizationLoginLinksClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", ProviderConstants.DefaultProviderNamespace, Diagnostics); + _authorizationLoginLinksRestClient = new AuthorizationLoginLinksRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); +#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 AuthorizationContractData 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 AuthorizationAccessPolicyContractResources in the AuthorizationContract. + /// An object representing collection of AuthorizationAccessPolicyContractResources and their operations over a AuthorizationAccessPolicyContractResource. + public virtual AuthorizationAccessPolicyContractCollection GetAuthorizationAccessPolicyContracts() + { + return GetCachedClient(client => new AuthorizationAccessPolicyContractCollection(client, Id)); + } + + /// + /// Gets the details of the authorization access policy specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies/{authorizationAccessPolicyId} + /// + /// + /// Operation Id + /// AuthorizationAccessPolicy_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Identifier of the authorization access policy. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetAuthorizationAccessPolicyContractAsync(string authorizationAccessPolicyId, CancellationToken cancellationToken = default) + { + return await GetAuthorizationAccessPolicyContracts().GetAsync(authorizationAccessPolicyId, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the details of the authorization access policy specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies/{authorizationAccessPolicyId} + /// + /// + /// Operation Id + /// AuthorizationAccessPolicy_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Identifier of the authorization access policy. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetAuthorizationAccessPolicyContract(string authorizationAccessPolicyId, CancellationToken cancellationToken = default) + { + return GetAuthorizationAccessPolicyContracts().Get(authorizationAccessPolicyId, cancellationToken); + } + + /// + /// Gets the details of the authorization specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId} + /// + /// + /// Operation Id + /// Authorization_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _authorizationContractAuthorizationClientDiagnostics.CreateScope("AuthorizationContractResource.Get"); + scope.Start(); + try + { + var response = await _authorizationContractAuthorizationRestClient.GetAsync(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 AuthorizationContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the authorization specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId} + /// + /// + /// Operation Id + /// Authorization_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _authorizationContractAuthorizationClientDiagnostics.CreateScope("AuthorizationContractResource.Get"); + scope.Start(); + try + { + var response = _authorizationContractAuthorizationRestClient.Get(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 AuthorizationContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes specific Authorization from the Authorization provider. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId} + /// + /// + /// Operation Id + /// Authorization_Delete + /// + /// + /// Default Api Version + /// 2022-08-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. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag ifMatch, CancellationToken cancellationToken = default) + { + using var scope = _authorizationContractAuthorizationClientDiagnostics.CreateScope("AuthorizationContractResource.Delete"); + scope.Start(); + try + { + var response = await _authorizationContractAuthorizationRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ifMatch, cancellationToken).ConfigureAwait(false); + var uri = _authorizationContractAuthorizationRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes specific Authorization from the Authorization provider. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId} + /// + /// + /// Operation Id + /// Authorization_Delete + /// + /// + /// Default Api Version + /// 2022-08-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. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, CancellationToken cancellationToken = default) + { + using var scope = _authorizationContractAuthorizationClientDiagnostics.CreateScope("AuthorizationContractResource.Delete"); + scope.Start(); + try + { + var response = _authorizationContractAuthorizationRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ifMatch, cancellationToken); + var uri = _authorizationContractAuthorizationRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates authorization. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId} + /// + /// + /// Operation Id + /// Authorization_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2022-08-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. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, AuthorizationContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _authorizationContractAuthorizationClientDiagnostics.CreateScope("AuthorizationContractResource.Update"); + scope.Start(); + try + { + var response = await _authorizationContractAuthorizationRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, ifMatch, cancellationToken).ConfigureAwait(false); + var uri = _authorizationContractAuthorizationRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(Response.FromValue(new AuthorizationContractResource(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 authorization. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId} + /// + /// + /// Operation Id + /// Authorization_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2022-08-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. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, AuthorizationContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _authorizationContractAuthorizationClientDiagnostics.CreateScope("AuthorizationContractResource.Update"); + scope.Start(); + try + { + var response = _authorizationContractAuthorizationRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, ifMatch, cancellationToken); + var uri = _authorizationContractAuthorizationRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(Response.FromValue(new AuthorizationContractResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Confirm valid consent code to suppress Authorizations anti-phishing page. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/confirmConsentCode + /// + /// + /// Operation Id + /// Authorization_ConfirmConsentCode + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Create parameters. + /// The cancellation token to use. + /// is null. + public virtual async Task ConfirmConsentCodeAsync(AuthorizationConfirmConsentCodeContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _authorizationContractAuthorizationClientDiagnostics.CreateScope("AuthorizationContractResource.ConfirmConsentCode"); + scope.Start(); + try + { + var response = await _authorizationContractAuthorizationRestClient.ConfirmConsentCodeAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Confirm valid consent code to suppress Authorizations anti-phishing page. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/confirmConsentCode + /// + /// + /// Operation Id + /// Authorization_ConfirmConsentCode + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Create parameters. + /// The cancellation token to use. + /// is null. + public virtual Response ConfirmConsentCode(AuthorizationConfirmConsentCodeContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _authorizationContractAuthorizationClientDiagnostics.CreateScope("AuthorizationContractResource.ConfirmConsentCode"); + scope.Start(); + try + { + var response = _authorizationContractAuthorizationRestClient.ConfirmConsentCode(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, content, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets authorization login links. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/getLoginLinks + /// + /// + /// Operation Id + /// AuthorizationLoginLinks_Post + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// + /// Create parameters. + /// The cancellation token to use. + /// is null. + public virtual async Task> PostAuthorizationLoginLinkAsync(AuthorizationLoginContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _authorizationLoginLinksClientDiagnostics.CreateScope("AuthorizationContractResource.PostAuthorizationLoginLink"); + scope.Start(); + try + { + var response = await _authorizationLoginLinksRestClient.PostAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets authorization login links. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/getLoginLinks + /// + /// + /// Operation Id + /// AuthorizationLoginLinks_Post + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// + /// Create parameters. + /// The cancellation token to use. + /// is null. + public virtual Response PostAuthorizationLoginLink(AuthorizationLoginContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _authorizationLoginLinksClientDiagnostics.CreateScope("AuthorizationContractResource.PostAuthorizationLoginLink"); + scope.Start(); + try + { + var response = _authorizationLoginLinksRestClient.Post(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, content, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationProviderContractCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationProviderContractCollection.cs new file mode 100644 index 0000000000000..9c07c1f8b69d0 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationProviderContractCollection.cs @@ -0,0 +1,505 @@ +// 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.ApiManagement +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get an instance call the GetAuthorizationProviderContracts method from an instance of . + /// + public partial class AuthorizationProviderContractCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _authorizationProviderContractAuthorizationProviderClientDiagnostics; + private readonly AuthorizationProviderRestOperations _authorizationProviderContractAuthorizationProviderRestClient; + + /// Initializes a new instance of the class for mocking. + protected AuthorizationProviderContractCollection() + { + } + + /// 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 AuthorizationProviderContractCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _authorizationProviderContractAuthorizationProviderClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", AuthorizationProviderContractResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(AuthorizationProviderContractResource.ResourceType, out string authorizationProviderContractAuthorizationProviderApiVersion); + _authorizationProviderContractAuthorizationProviderRestClient = new AuthorizationProviderRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, authorizationProviderContractAuthorizationProviderApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ApiManagementServiceResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ApiManagementServiceResource.ResourceType), nameof(id)); + } + + /// + /// Creates or updates authorization provider. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId} + /// + /// + /// Operation Id + /// AuthorizationProvider_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2022-08-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. + /// Identifier of the authorization provider. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an 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 authorizationProviderId, AuthorizationProviderContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _authorizationProviderContractAuthorizationProviderClientDiagnostics.CreateScope("AuthorizationProviderContractCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _authorizationProviderContractAuthorizationProviderRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, authorizationProviderId, data, ifMatch, cancellationToken).ConfigureAwait(false); + var uri = _authorizationProviderContractAuthorizationProviderRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, authorizationProviderId, data, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(Response.FromValue(new AuthorizationProviderContractResource(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 authorization provider. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId} + /// + /// + /// Operation Id + /// AuthorizationProvider_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2022-08-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. + /// Identifier of the authorization provider. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an 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 authorizationProviderId, AuthorizationProviderContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _authorizationProviderContractAuthorizationProviderClientDiagnostics.CreateScope("AuthorizationProviderContractCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _authorizationProviderContractAuthorizationProviderRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, authorizationProviderId, data, ifMatch, cancellationToken); + var uri = _authorizationProviderContractAuthorizationProviderRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, authorizationProviderId, data, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(Response.FromValue(new AuthorizationProviderContractResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the authorization provider specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId} + /// + /// + /// Operation Id + /// AuthorizationProvider_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Identifier of the authorization provider. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string authorizationProviderId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + + using var scope = _authorizationProviderContractAuthorizationProviderClientDiagnostics.CreateScope("AuthorizationProviderContractCollection.Get"); + scope.Start(); + try + { + var response = await _authorizationProviderContractAuthorizationProviderRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, authorizationProviderId, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AuthorizationProviderContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the authorization provider specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId} + /// + /// + /// Operation Id + /// AuthorizationProvider_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Identifier of the authorization provider. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string authorizationProviderId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + + using var scope = _authorizationProviderContractAuthorizationProviderClientDiagnostics.CreateScope("AuthorizationProviderContractCollection.Get"); + scope.Start(); + try + { + var response = _authorizationProviderContractAuthorizationProviderRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, authorizationProviderId, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AuthorizationProviderContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists a collection of authorization providers defined within a service instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders + /// + /// + /// Operation Id + /// AuthorizationProvider_ListByService + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _authorizationProviderContractAuthorizationProviderRestClient.CreateListByServiceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, top, skip); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _authorizationProviderContractAuthorizationProviderRestClient.CreateListByServiceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, top, skip); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new AuthorizationProviderContractResource(Client, AuthorizationProviderContractData.DeserializeAuthorizationProviderContractData(e)), _authorizationProviderContractAuthorizationProviderClientDiagnostics, Pipeline, "AuthorizationProviderContractCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Lists a collection of authorization providers defined within a service instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders + /// + /// + /// Operation Id + /// AuthorizationProvider_ListByService + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _authorizationProviderContractAuthorizationProviderRestClient.CreateListByServiceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, top, skip); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _authorizationProviderContractAuthorizationProviderRestClient.CreateListByServiceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, top, skip); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new AuthorizationProviderContractResource(Client, AuthorizationProviderContractData.DeserializeAuthorizationProviderContractData(e)), _authorizationProviderContractAuthorizationProviderClientDiagnostics, Pipeline, "AuthorizationProviderContractCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId} + /// + /// + /// Operation Id + /// AuthorizationProvider_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Identifier of the authorization provider. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string authorizationProviderId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + + using var scope = _authorizationProviderContractAuthorizationProviderClientDiagnostics.CreateScope("AuthorizationProviderContractCollection.Exists"); + scope.Start(); + try + { + var response = await _authorizationProviderContractAuthorizationProviderRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, authorizationProviderId, 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.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId} + /// + /// + /// Operation Id + /// AuthorizationProvider_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Identifier of the authorization provider. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string authorizationProviderId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + + using var scope = _authorizationProviderContractAuthorizationProviderClientDiagnostics.CreateScope("AuthorizationProviderContractCollection.Exists"); + scope.Start(); + try + { + var response = _authorizationProviderContractAuthorizationProviderRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, authorizationProviderId, 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.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId} + /// + /// + /// Operation Id + /// AuthorizationProvider_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Identifier of the authorization provider. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string authorizationProviderId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + + using var scope = _authorizationProviderContractAuthorizationProviderClientDiagnostics.CreateScope("AuthorizationProviderContractCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _authorizationProviderContractAuthorizationProviderRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, authorizationProviderId, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new AuthorizationProviderContractResource(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.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId} + /// + /// + /// Operation Id + /// AuthorizationProvider_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Identifier of the authorization provider. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string authorizationProviderId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + + using var scope = _authorizationProviderContractAuthorizationProviderClientDiagnostics.CreateScope("AuthorizationProviderContractCollection.GetIfExists"); + scope.Start(); + try + { + var response = _authorizationProviderContractAuthorizationProviderRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, authorizationProviderId, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new AuthorizationProviderContractResource(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/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationProviderContractData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationProviderContractData.Serialization.cs new file mode 100644 index 0000000000000..f518c211e52e7 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationProviderContractData.Serialization.cs @@ -0,0 +1,356 @@ +// 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.ApiManagement.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + public partial class AuthorizationProviderContractData : 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(AuthorizationProviderContractData)} 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 (Optional.IsDefined(DisplayName)) + { + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + } + if (Optional.IsDefined(IdentityProvider)) + { + writer.WritePropertyName("identityProvider"u8); + writer.WriteStringValue(IdentityProvider); + } + if (Optional.IsDefined(Oauth2)) + { + writer.WritePropertyName("oauth2"u8); + writer.WriteObjectValue(Oauth2, 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(); + } + + AuthorizationProviderContractData 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(AuthorizationProviderContractData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAuthorizationProviderContractData(document.RootElement, options); + } + + internal static AuthorizationProviderContractData DeserializeAuthorizationProviderContractData(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; + string displayName = default; + string identityProvider = default; + AuthorizationProviderOAuth2Settings oauth2 = 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("displayName"u8)) + { + displayName = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("identityProvider"u8)) + { + identityProvider = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("oauth2"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + oauth2 = AuthorizationProviderOAuth2Settings.DeserializeAuthorizationProviderOAuth2Settings(property0.Value, options); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AuthorizationProviderContractData( + id, + name, + type, + systemData, + displayName, + identityProvider, + oauth2, + 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(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(IdentityProvider), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" identityProvider: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IdentityProvider)) + { + builder.Append(" identityProvider: "); + if (IdentityProvider.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{IdentityProvider}'''"); + } + else + { + builder.AppendLine($"'{IdentityProvider}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Oauth2), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" oauth2: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Oauth2)) + { + builder.Append(" oauth2: "); + BicepSerializationHelpers.AppendChildObject(builder, Oauth2, options, 4, false, " oauth2: "); + } + } + + 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(AuthorizationProviderContractData)} does not support writing '{options.Format}' format."); + } + } + + AuthorizationProviderContractData 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 DeserializeAuthorizationProviderContractData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AuthorizationProviderContractData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationProviderContractData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationProviderContractData.cs new file mode 100644 index 0000000000000..827dc7e93a9a1 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationProviderContractData.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.ApiManagement.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + /// + /// A class representing the AuthorizationProviderContract data model. + /// Authorization Provider contract. + /// + public partial class AuthorizationProviderContractData : 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 AuthorizationProviderContractData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Authorization Provider name. Must be 1 to 300 characters long. + /// Identity provider name. Must be 1 to 300 characters long. + /// OAuth2 settings. + /// Keeps track of any properties unknown to the library. + internal AuthorizationProviderContractData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string displayName, string identityProvider, AuthorizationProviderOAuth2Settings oauth2, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + DisplayName = displayName; + IdentityProvider = identityProvider; + Oauth2 = oauth2; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Authorization Provider name. Must be 1 to 300 characters long. + [WirePath("properties.displayName")] + public string DisplayName { get; set; } + /// Identity provider name. Must be 1 to 300 characters long. + [WirePath("properties.identityProvider")] + public string IdentityProvider { get; set; } + /// OAuth2 settings. + [WirePath("properties.oauth2")] + public AuthorizationProviderOAuth2Settings Oauth2 { get; set; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationProviderContractResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationProviderContractResource.Serialization.cs new file mode 100644 index 0000000000000..3c0ec6922b4e0 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationProviderContractResource.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.ApiManagement +{ + public partial class AuthorizationProviderContractResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + AuthorizationProviderContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + AuthorizationProviderContractData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationProviderContractResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationProviderContractResource.cs new file mode 100644 index 0000000000000..fbafc87b9fec3 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationProviderContractResource.cs @@ -0,0 +1,428 @@ +// 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.ApiManagement +{ + /// + /// A Class representing an AuthorizationProviderContract along with the instance operations that can be performed on it. + /// If you have a you can construct an + /// from an instance of using the GetAuthorizationProviderContractResource method. + /// Otherwise you can get one from its parent resource using the GetAuthorizationProviderContract method. + /// + public partial class AuthorizationProviderContractResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The serviceName. + /// The authorizationProviderId. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _authorizationProviderContractAuthorizationProviderClientDiagnostics; + private readonly AuthorizationProviderRestOperations _authorizationProviderContractAuthorizationProviderRestClient; + private readonly AuthorizationProviderContractData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.ApiManagement/service/authorizationProviders"; + + /// Initializes a new instance of the class for mocking. + protected AuthorizationProviderContractResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal AuthorizationProviderContractResource(ArmClient client, AuthorizationProviderContractData 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 AuthorizationProviderContractResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _authorizationProviderContractAuthorizationProviderClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string authorizationProviderContractAuthorizationProviderApiVersion); + _authorizationProviderContractAuthorizationProviderRestClient = new AuthorizationProviderRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, authorizationProviderContractAuthorizationProviderApiVersion); +#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 AuthorizationProviderContractData 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 AuthorizationContractResources in the AuthorizationProviderContract. + /// An object representing collection of AuthorizationContractResources and their operations over a AuthorizationContractResource. + public virtual AuthorizationContractCollection GetAuthorizationContracts() + { + return GetCachedClient(client => new AuthorizationContractCollection(client, Id)); + } + + /// + /// Gets the details of the authorization specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId} + /// + /// + /// Operation Id + /// Authorization_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Identifier of the authorization. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetAuthorizationContractAsync(string authorizationId, CancellationToken cancellationToken = default) + { + return await GetAuthorizationContracts().GetAsync(authorizationId, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the details of the authorization specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId} + /// + /// + /// Operation Id + /// Authorization_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Identifier of the authorization. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetAuthorizationContract(string authorizationId, CancellationToken cancellationToken = default) + { + return GetAuthorizationContracts().Get(authorizationId, cancellationToken); + } + + /// + /// Gets the details of the authorization provider specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId} + /// + /// + /// Operation Id + /// AuthorizationProvider_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _authorizationProviderContractAuthorizationProviderClientDiagnostics.CreateScope("AuthorizationProviderContractResource.Get"); + scope.Start(); + try + { + var response = await _authorizationProviderContractAuthorizationProviderRestClient.GetAsync(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 AuthorizationProviderContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the authorization provider specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId} + /// + /// + /// Operation Id + /// AuthorizationProvider_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _authorizationProviderContractAuthorizationProviderClientDiagnostics.CreateScope("AuthorizationProviderContractResource.Get"); + scope.Start(); + try + { + var response = _authorizationProviderContractAuthorizationProviderRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AuthorizationProviderContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes specific authorization provider from the API Management service instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId} + /// + /// + /// Operation Id + /// AuthorizationProvider_Delete + /// + /// + /// Default Api Version + /// 2022-08-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. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag ifMatch, CancellationToken cancellationToken = default) + { + using var scope = _authorizationProviderContractAuthorizationProviderClientDiagnostics.CreateScope("AuthorizationProviderContractResource.Delete"); + scope.Start(); + try + { + var response = await _authorizationProviderContractAuthorizationProviderRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken).ConfigureAwait(false); + var uri = _authorizationProviderContractAuthorizationProviderRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes specific authorization provider from the API Management service instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId} + /// + /// + /// Operation Id + /// AuthorizationProvider_Delete + /// + /// + /// Default Api Version + /// 2022-08-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. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, CancellationToken cancellationToken = default) + { + using var scope = _authorizationProviderContractAuthorizationProviderClientDiagnostics.CreateScope("AuthorizationProviderContractResource.Delete"); + scope.Start(); + try + { + var response = _authorizationProviderContractAuthorizationProviderRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken); + var uri = _authorizationProviderContractAuthorizationProviderRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates authorization provider. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId} + /// + /// + /// Operation Id + /// AuthorizationProvider_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2022-08-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. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, AuthorizationProviderContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _authorizationProviderContractAuthorizationProviderClientDiagnostics.CreateScope("AuthorizationProviderContractResource.Update"); + scope.Start(); + try + { + var response = await _authorizationProviderContractAuthorizationProviderRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch, cancellationToken).ConfigureAwait(false); + var uri = _authorizationProviderContractAuthorizationProviderRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(Response.FromValue(new AuthorizationProviderContractResource(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 authorization provider. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId} + /// + /// + /// Operation Id + /// AuthorizationProvider_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2022-08-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. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, AuthorizationProviderContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _authorizationProviderContractAuthorizationProviderClientDiagnostics.CreateScope("AuthorizationProviderContractResource.Update"); + scope.Start(); + try + { + var response = _authorizationProviderContractAuthorizationProviderRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch, cancellationToken); + var uri = _authorizationProviderContractAuthorizationProviderRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(Response.FromValue(new AuthorizationProviderContractResource(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/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/DiagnosticContractData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/DiagnosticContractData.Serialization.cs index edd6281a0ab56..c8d64e221e41b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/DiagnosticContractData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/DiagnosticContractData.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.ApiManagement.Models; @@ -303,6 +304,237 @@ internal static DiagnosticContractData DeserializeDiagnosticContractData(JsonEle 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(AlwaysLog), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" alwaysLog: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AlwaysLog)) + { + builder.Append(" alwaysLog: "); + builder.AppendLine($"'{AlwaysLog.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(LoggerId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" loggerId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(LoggerId)) + { + builder.Append(" loggerId: "); + if (LoggerId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{LoggerId}'''"); + } + else + { + builder.AppendLine($"'{LoggerId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Sampling), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" sampling: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Sampling)) + { + builder.Append(" sampling: "); + BicepSerializationHelpers.AppendChildObject(builder, Sampling, options, 4, false, " sampling: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Frontend), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" frontend: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Frontend)) + { + builder.Append(" frontend: "); + BicepSerializationHelpers.AppendChildObject(builder, Frontend, options, 4, false, " frontend: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Backend), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" backend: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Backend)) + { + builder.Append(" backend: "); + BicepSerializationHelpers.AppendChildObject(builder, Backend, options, 4, false, " backend: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsLogClientIPEnabled), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" logClientIp: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsLogClientIPEnabled)) + { + builder.Append(" logClientIp: "); + var boolValue = IsLogClientIPEnabled.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(HttpCorrelationProtocol), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" httpCorrelationProtocol: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(HttpCorrelationProtocol)) + { + builder.Append(" httpCorrelationProtocol: "); + builder.AppendLine($"'{HttpCorrelationProtocol.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Verbosity), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" verbosity: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Verbosity)) + { + builder.Append(" verbosity: "); + builder.AppendLine($"'{Verbosity.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(OperationNameFormat), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" operationNameFormat: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(OperationNameFormat)) + { + builder.Append(" operationNameFormat: "); + builder.AppendLine($"'{OperationNameFormat.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Metrics), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" metrics: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Metrics)) + { + builder.Append(" metrics: "); + var boolValue = Metrics.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + 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; @@ -311,6 +543,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOpti { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(DiagnosticContractData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/DiagnosticContractData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/DiagnosticContractData.cs index 9d469e4399a2e..0405757e710c6 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/DiagnosticContractData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/DiagnosticContractData.cs @@ -88,24 +88,34 @@ internal DiagnosticContractData(ResourceIdentifier id, string name, ResourceType } /// Specifies for what type of messages sampling settings should not apply. + [WirePath("properties.alwaysLog")] public AlwaysLog? AlwaysLog { get; set; } /// Resource Id of a target logger. + [WirePath("properties.loggerId")] public string LoggerId { get; set; } /// Sampling settings for Diagnostic. + [WirePath("properties.sampling")] public SamplingSettings Sampling { get; set; } /// Diagnostic settings for incoming/outgoing HTTP messages to the Gateway. + [WirePath("properties.frontend")] public PipelineDiagnosticSettings Frontend { get; set; } /// Diagnostic settings for incoming/outgoing HTTP messages to the Backend. + [WirePath("properties.backend")] public PipelineDiagnosticSettings Backend { get; set; } /// Log the ClientIP. Default is false. + [WirePath("properties.logClientIp")] public bool? IsLogClientIPEnabled { get; set; } /// Sets correlation protocol to use for Application Insights diagnostics. + [WirePath("properties.httpCorrelationProtocol")] public HttpCorrelationProtocol? HttpCorrelationProtocol { get; set; } /// The verbosity level applied to traces emitted by trace policies. + [WirePath("properties.verbosity")] public TraceVerbosityLevel? Verbosity { get; set; } /// The format of the Operation Name for Application Insights telemetries. Default is Name. + [WirePath("properties.operationNameFormat")] public OperationNameFormat? OperationNameFormat { get; set; } /// Emit custom metrics via emit-metric policy. Applicable only to Application Insights diagnostic settings. + [WirePath("properties.metrics")] public bool? Metrics { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/DocumentationContractCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/DocumentationContractCollection.cs new file mode 100644 index 0000000000000..5fa773da4d0ea --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/DocumentationContractCollection.cs @@ -0,0 +1,505 @@ +// 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.ApiManagement +{ + /// + /// 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 GetDocumentationContracts method from an instance of . + /// + public partial class DocumentationContractCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _documentationContractDocumentationClientDiagnostics; + private readonly DocumentationRestOperations _documentationContractDocumentationRestClient; + + /// Initializes a new instance of the class for mocking. + protected DocumentationContractCollection() + { + } + + /// 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 DocumentationContractCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _documentationContractDocumentationClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", DocumentationContractResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(DocumentationContractResource.ResourceType, out string documentationContractDocumentationApiVersion); + _documentationContractDocumentationRestClient = new DocumentationRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, documentationContractDocumentationApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ApiManagementServiceResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ApiManagementServiceResource.ResourceType), nameof(id)); + } + + /// + /// Creates a new Documentation or updates an existing one. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId} + /// + /// + /// Operation Id + /// Documentation_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2022-08-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. + /// Documentation identifier. Must be unique in the current API Management service instance. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an 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 documentationId, DocumentationContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(documentationId, nameof(documentationId)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _documentationContractDocumentationClientDiagnostics.CreateScope("DocumentationContractCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _documentationContractDocumentationRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, documentationId, data, ifMatch, cancellationToken).ConfigureAwait(false); + var uri = _documentationContractDocumentationRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, documentationId, data, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(Response.FromValue(new DocumentationContractResource(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 a new Documentation or updates an existing one. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId} + /// + /// + /// Operation Id + /// Documentation_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2022-08-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. + /// Documentation identifier. Must be unique in the current API Management service instance. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an 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 documentationId, DocumentationContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(documentationId, nameof(documentationId)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _documentationContractDocumentationClientDiagnostics.CreateScope("DocumentationContractCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _documentationContractDocumentationRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, documentationId, data, ifMatch, cancellationToken); + var uri = _documentationContractDocumentationRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, documentationId, data, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(Response.FromValue(new DocumentationContractResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the Documentation specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId} + /// + /// + /// Operation Id + /// Documentation_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Documentation identifier. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string documentationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(documentationId, nameof(documentationId)); + + using var scope = _documentationContractDocumentationClientDiagnostics.CreateScope("DocumentationContractCollection.Get"); + scope.Start(); + try + { + var response = await _documentationContractDocumentationRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, documentationId, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DocumentationContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the Documentation specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId} + /// + /// + /// Operation Id + /// Documentation_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Documentation identifier. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string documentationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(documentationId, nameof(documentationId)); + + using var scope = _documentationContractDocumentationClientDiagnostics.CreateScope("DocumentationContractCollection.Get"); + scope.Start(); + try + { + var response = _documentationContractDocumentationRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, documentationId, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DocumentationContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists all Documentations of the API Management service instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations + /// + /// + /// Operation Id + /// Documentation_ListByService + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | eq | contains |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _documentationContractDocumentationRestClient.CreateListByServiceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, top, skip); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _documentationContractDocumentationRestClient.CreateListByServiceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, top, skip); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DocumentationContractResource(Client, DocumentationContractData.DeserializeDocumentationContractData(e)), _documentationContractDocumentationClientDiagnostics, Pipeline, "DocumentationContractCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Lists all Documentations of the API Management service instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations + /// + /// + /// Operation Id + /// Documentation_ListByService + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | eq | contains |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _documentationContractDocumentationRestClient.CreateListByServiceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, top, skip); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _documentationContractDocumentationRestClient.CreateListByServiceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, top, skip); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DocumentationContractResource(Client, DocumentationContractData.DeserializeDocumentationContractData(e)), _documentationContractDocumentationClientDiagnostics, Pipeline, "DocumentationContractCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId} + /// + /// + /// Operation Id + /// Documentation_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Documentation identifier. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string documentationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(documentationId, nameof(documentationId)); + + using var scope = _documentationContractDocumentationClientDiagnostics.CreateScope("DocumentationContractCollection.Exists"); + scope.Start(); + try + { + var response = await _documentationContractDocumentationRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, documentationId, 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.ApiManagement/service/{serviceName}/documentations/{documentationId} + /// + /// + /// Operation Id + /// Documentation_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Documentation identifier. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string documentationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(documentationId, nameof(documentationId)); + + using var scope = _documentationContractDocumentationClientDiagnostics.CreateScope("DocumentationContractCollection.Exists"); + scope.Start(); + try + { + var response = _documentationContractDocumentationRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, documentationId, 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.ApiManagement/service/{serviceName}/documentations/{documentationId} + /// + /// + /// Operation Id + /// Documentation_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Documentation identifier. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string documentationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(documentationId, nameof(documentationId)); + + using var scope = _documentationContractDocumentationClientDiagnostics.CreateScope("DocumentationContractCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _documentationContractDocumentationRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, documentationId, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DocumentationContractResource(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.ApiManagement/service/{serviceName}/documentations/{documentationId} + /// + /// + /// Operation Id + /// Documentation_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Documentation identifier. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string documentationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(documentationId, nameof(documentationId)); + + using var scope = _documentationContractDocumentationClientDiagnostics.CreateScope("DocumentationContractCollection.GetIfExists"); + scope.Start(); + try + { + var response = _documentationContractDocumentationRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, documentationId, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DocumentationContractResource(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/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/DocumentationContractData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/DocumentationContractData.Serialization.cs new file mode 100644 index 0000000000000..28e388f827db9 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/DocumentationContractData.Serialization.cs @@ -0,0 +1,324 @@ +// 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.ApiManagement +{ + public partial class DocumentationContractData : 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(DocumentationContractData)} 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 (Optional.IsDefined(Title)) + { + writer.WritePropertyName("title"u8); + writer.WriteStringValue(Title); + } + if (Optional.IsDefined(Content)) + { + writer.WritePropertyName("content"u8); + writer.WriteStringValue(Content); + } + 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(); + } + + DocumentationContractData 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(DocumentationContractData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDocumentationContractData(document.RootElement, options); + } + + internal static DocumentationContractData DeserializeDocumentationContractData(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; + string title = default; + string content = 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("title"u8)) + { + title = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("content"u8)) + { + content = property0.Value.GetString(); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DocumentationContractData( + id, + name, + type, + systemData, + 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(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(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(" }"); + 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(DocumentationContractData)} does not support writing '{options.Format}' format."); + } + } + + DocumentationContractData 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 DeserializeDocumentationContractData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DocumentationContractData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/DocumentationContractData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/DocumentationContractData.cs new file mode 100644 index 0000000000000..56fffa486a223 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/DocumentationContractData.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 Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + /// + /// A class representing the DocumentationContract data model. + /// Markdown documentation details. + /// + public partial class DocumentationContractData : 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 DocumentationContractData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// documentation title. + /// Markdown documentation content. + /// Keeps track of any properties unknown to the library. + internal DocumentationContractData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string title, string content, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Title = title; + Content = content; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// documentation title. + [WirePath("properties.title")] + public string Title { get; set; } + /// Markdown documentation content. + [WirePath("properties.content")] + public string Content { get; set; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/DocumentationContractResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/DocumentationContractResource.Serialization.cs new file mode 100644 index 0000000000000..a2ee3859a6791 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/DocumentationContractResource.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.ApiManagement +{ + public partial class DocumentationContractResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + DocumentationContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + DocumentationContractData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/DocumentationContractResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/DocumentationContractResource.cs new file mode 100644 index 0000000000000..549ed750d83a3 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/DocumentationContractResource.cs @@ -0,0 +1,424 @@ +// 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.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + /// + /// A Class representing a DocumentationContract 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 GetDocumentationContractResource method. + /// Otherwise you can get one from its parent resource using the GetDocumentationContract method. + /// + public partial class DocumentationContractResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The serviceName. + /// The documentationId. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string documentationId) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _documentationContractDocumentationClientDiagnostics; + private readonly DocumentationRestOperations _documentationContractDocumentationRestClient; + private readonly DocumentationContractData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.ApiManagement/service/documentations"; + + /// Initializes a new instance of the class for mocking. + protected DocumentationContractResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal DocumentationContractResource(ArmClient client, DocumentationContractData 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 DocumentationContractResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _documentationContractDocumentationClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string documentationContractDocumentationApiVersion); + _documentationContractDocumentationRestClient = new DocumentationRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, documentationContractDocumentationApiVersion); +#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 DocumentationContractData 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 the details of the Documentation specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId} + /// + /// + /// Operation Id + /// Documentation_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _documentationContractDocumentationClientDiagnostics.CreateScope("DocumentationContractResource.Get"); + scope.Start(); + try + { + var response = await _documentationContractDocumentationRestClient.GetAsync(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 DocumentationContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the Documentation specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId} + /// + /// + /// Operation Id + /// Documentation_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _documentationContractDocumentationClientDiagnostics.CreateScope("DocumentationContractResource.Get"); + scope.Start(); + try + { + var response = _documentationContractDocumentationRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DocumentationContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes the specified Documentation from an API. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId} + /// + /// + /// Operation Id + /// Documentation_Delete + /// + /// + /// Default Api Version + /// 2022-08-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. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag ifMatch, CancellationToken cancellationToken = default) + { + using var scope = _documentationContractDocumentationClientDiagnostics.CreateScope("DocumentationContractResource.Delete"); + scope.Start(); + try + { + var response = await _documentationContractDocumentationRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken).ConfigureAwait(false); + var uri = _documentationContractDocumentationRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes the specified Documentation from an API. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId} + /// + /// + /// Operation Id + /// Documentation_Delete + /// + /// + /// Default Api Version + /// 2022-08-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. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, CancellationToken cancellationToken = default) + { + using var scope = _documentationContractDocumentationClientDiagnostics.CreateScope("DocumentationContractResource.Delete"); + scope.Start(); + try + { + var response = _documentationContractDocumentationRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken); + var uri = _documentationContractDocumentationRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates the details of the Documentation for an API specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId} + /// + /// + /// Operation Id + /// Documentation_Update + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// Documentation Update parameters. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(ETag ifMatch, DocumentationContractPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _documentationContractDocumentationClientDiagnostics.CreateScope("DocumentationContractResource.Update"); + scope.Start(); + try + { + var response = await _documentationContractDocumentationRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, patch, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new DocumentationContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates the details of the Documentation for an API specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId} + /// + /// + /// Operation Id + /// Documentation_Update + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// Documentation Update parameters. + /// The cancellation token to use. + /// is null. + public virtual Response Update(ETag ifMatch, DocumentationContractPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _documentationContractDocumentationClientDiagnostics.CreateScope("DocumentationContractResource.Update"); + scope.Start(); + try + { + var response = _documentationContractDocumentationRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, patch, cancellationToken); + return Response.FromValue(new DocumentationContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the entity state (Etag) version of the Documentation by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId} + /// + /// + /// Operation Id + /// Documentation_GetEntityTag + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetEntityTagAsync(CancellationToken cancellationToken = default) + { + using var scope = _documentationContractDocumentationClientDiagnostics.CreateScope("DocumentationContractResource.GetEntityTag"); + scope.Start(); + try + { + var response = await _documentationContractDocumentationRestClient.GetEntityTagAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the entity state (Etag) version of the Documentation by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId} + /// + /// + /// Operation Id + /// Documentation_GetEntityTag + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response GetEntityTag(CancellationToken cancellationToken = default) + { + using var scope = _documentationContractDocumentationClientDiagnostics.CreateScope("DocumentationContractResource.GetEntityTag"); + scope.Start(); + try + { + var response = _documentationContractDocumentationRestClient.GetEntityTag(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Extensions/ApiManagementExtensions.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Extensions/ApiManagementExtensions.cs index 32c3e69bf08b0..1eea71d4435e2 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Extensions/ApiManagementExtensions.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Extensions/ApiManagementExtensions.cs @@ -109,6 +109,25 @@ public static ApiOperationPolicyResource GetApiOperationPolicyResource(this ArmC return GetMockableApiManagementArmClient(client).GetApiOperationPolicyResource(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 ServiceApiResolverPolicyResource GetServiceApiResolverPolicyResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableApiManagementArmClient(client).GetServiceApiResolverPolicyResource(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. @@ -242,6 +261,25 @@ public static ApiManagementTagResource GetApiManagementTagResource(this ArmClien return GetMockableApiManagementArmClient(client).GetApiManagementTagResource(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 ResolverContractResource GetResolverContractResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableApiManagementArmClient(client).GetResolverContractResource(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. @@ -394,6 +432,44 @@ public static ApiTagDescriptionResource GetApiTagDescriptionResource(this ArmCli return GetMockableApiManagementArmClient(client).GetApiTagDescriptionResource(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 ServiceApiWikiResource GetServiceApiWikiResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableApiManagementArmClient(client).GetServiceApiWikiResource(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 ServiceProductWikiResource GetServiceProductWikiResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableApiManagementArmClient(client).GetServiceProductWikiResource(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. @@ -432,6 +508,63 @@ public static ApiManagementAuthorizationServerResource GetApiManagementAuthoriza return GetMockableApiManagementArmClient(client).GetApiManagementAuthorizationServerResource(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. + /// + /// 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 AuthorizationProviderContractResource GetAuthorizationProviderContractResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableApiManagementArmClient(client).GetAuthorizationProviderContractResource(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. + /// + /// 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 AuthorizationContractResource GetAuthorizationContractResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableApiManagementArmClient(client).GetAuthorizationContractResource(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. + /// + /// 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 AuthorizationAccessPolicyContractResource GetAuthorizationAccessPolicyContractResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableApiManagementArmClient(client).GetAuthorizationAccessPolicyContractResource(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. @@ -717,6 +850,44 @@ public static ApiManagementOpenIdConnectProviderResource GetApiManagementOpenIdC return GetMockableApiManagementArmClient(client).GetApiManagementOpenIdConnectProviderResource(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 PolicyFragmentContractResource GetPolicyFragmentContractResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableApiManagementArmClient(client).GetPolicyFragmentContractResource(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 PortalConfigContractResource GetPortalConfigContractResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableApiManagementArmClient(client).GetPortalConfigContractResource(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. @@ -964,6 +1135,25 @@ public static ApiManagementUserResource GetApiManagementUserResource(this ArmCli return GetMockableApiManagementArmClient(client).GetApiManagementUserResource(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 DocumentationContractResource GetDocumentationContractResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableApiManagementArmClient(client).GetDocumentationContractResource(id); + } + /// /// Gets a collection of ApiManagementServiceResources in the ResourceGroupResource. /// @@ -994,7 +1184,7 @@ public static ApiManagementServiceCollection GetApiManagementServices(this Resou /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1032,7 +1222,7 @@ public static async Task> GetApiManagemen /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1087,7 +1277,7 @@ public static ApiManagementDeletedServiceCollection GetApiManagementDeletedServi /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1126,7 +1316,7 @@ public static async Task> GetApiMa /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1165,7 +1355,7 @@ public static Response GetApiManagementDele /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1201,7 +1391,7 @@ public static AsyncPageable GetApiManagemen /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1237,7 +1427,7 @@ public static Pageable GetApiManagementDele /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1273,7 +1463,7 @@ public static AsyncPageable GetApiManagementServic /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1309,7 +1499,7 @@ public static Pageable GetApiManagementServices(th /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1345,7 +1535,7 @@ public static async Task> C /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1381,7 +1571,7 @@ public static Response CheckApiManag /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1416,7 +1606,7 @@ public static async Task /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1451,7 +1641,7 @@ public static Response G /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -1483,7 +1673,7 @@ public static AsyncPageable GetApiManagementSkusAsync(this Sub /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Extensions/MockableApiManagementArmClient.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Extensions/MockableApiManagementArmClient.cs index 11823f7f36558..8181d894624ff 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Extensions/MockableApiManagementArmClient.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Extensions/MockableApiManagementArmClient.cs @@ -82,6 +82,18 @@ public virtual ApiOperationPolicyResource GetApiOperationPolicyResource(Resource return new ApiOperationPolicyResource(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 ServiceApiResolverPolicyResource GetServiceApiResolverPolicyResource(ResourceIdentifier id) + { + ServiceApiResolverPolicyResource.ValidateResourceId(id); + return new ServiceApiResolverPolicyResource(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. @@ -166,6 +178,18 @@ public virtual ApiManagementTagResource GetApiManagementTagResource(ResourceIden return new ApiManagementTagResource(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 ResolverContractResource GetResolverContractResource(ResourceIdentifier id) + { + ResolverContractResource.ValidateResourceId(id); + return new ResolverContractResource(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. @@ -262,6 +286,30 @@ public virtual ApiTagDescriptionResource GetApiTagDescriptionResource(ResourceId return new ApiTagDescriptionResource(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 ServiceApiWikiResource GetServiceApiWikiResource(ResourceIdentifier id) + { + ServiceApiWikiResource.ValidateResourceId(id); + return new ServiceApiWikiResource(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 ServiceProductWikiResource GetServiceProductWikiResource(ResourceIdentifier id) + { + ServiceProductWikiResource.ValidateResourceId(id); + return new ServiceProductWikiResource(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. @@ -286,6 +334,42 @@ public virtual ApiManagementAuthorizationServerResource GetApiManagementAuthoriz return new ApiManagementAuthorizationServerResource(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. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual AuthorizationProviderContractResource GetAuthorizationProviderContractResource(ResourceIdentifier id) + { + AuthorizationProviderContractResource.ValidateResourceId(id); + return new AuthorizationProviderContractResource(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. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual AuthorizationContractResource GetAuthorizationContractResource(ResourceIdentifier id) + { + AuthorizationContractResource.ValidateResourceId(id); + return new AuthorizationContractResource(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. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual AuthorizationAccessPolicyContractResource GetAuthorizationAccessPolicyContractResource(ResourceIdentifier id) + { + AuthorizationAccessPolicyContractResource.ValidateResourceId(id); + return new AuthorizationAccessPolicyContractResource(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. @@ -466,6 +550,30 @@ public virtual ApiManagementOpenIdConnectProviderResource GetApiManagementOpenId return new ApiManagementOpenIdConnectProviderResource(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 PolicyFragmentContractResource GetPolicyFragmentContractResource(ResourceIdentifier id) + { + PolicyFragmentContractResource.ValidateResourceId(id); + return new PolicyFragmentContractResource(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 PortalConfigContractResource GetPortalConfigContractResource(ResourceIdentifier id) + { + PortalConfigContractResource.ValidateResourceId(id); + return new PortalConfigContractResource(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. @@ -621,5 +729,17 @@ public virtual ApiManagementUserResource GetApiManagementUserResource(ResourceId ApiManagementUserResource.ValidateResourceId(id); return new ApiManagementUserResource(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 DocumentationContractResource GetDocumentationContractResource(ResourceIdentifier id) + { + DocumentationContractResource.ValidateResourceId(id); + return new DocumentationContractResource(Client, id); + } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Extensions/MockableApiManagementResourceGroupResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Extensions/MockableApiManagementResourceGroupResource.cs index 9514323645906..d7eeb299e0795 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Extensions/MockableApiManagementResourceGroupResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Extensions/MockableApiManagementResourceGroupResource.cs @@ -53,7 +53,7 @@ public virtual ApiManagementServiceCollection GetApiManagementServices() /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -84,7 +84,7 @@ public virtual async Task> GetApiManageme /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Extensions/MockableApiManagementSubscriptionResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Extensions/MockableApiManagementSubscriptionResource.cs index 19843b5f6bfc6..e2981468c8dd2 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Extensions/MockableApiManagementSubscriptionResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Extensions/MockableApiManagementSubscriptionResource.cs @@ -70,7 +70,7 @@ public virtual ApiManagementDeletedServiceCollection GetApiManagementDeletedServ /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -102,7 +102,7 @@ public virtual async Task> GetApiM /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -134,7 +134,7 @@ public virtual Response GetApiManagementDel /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -164,7 +164,7 @@ public virtual AsyncPageable GetApiManageme /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -194,7 +194,7 @@ public virtual Pageable GetApiManagementDel /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual AsyncPageable GetApiManagementServi /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -254,7 +254,7 @@ public virtual Pageable GetApiManagementServices(C /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -296,7 +296,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -338,7 +338,7 @@ public virtual Response CheckApiMana /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -376,7 +376,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -414,7 +414,7 @@ public virtual Response /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -440,7 +440,7 @@ public virtual AsyncPageable GetApiManagementSkusAsync(Cancell /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Internal/BicepSerializationHelpers.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Internal/BicepSerializationHelpers.cs new file mode 100644 index 0000000000000..d971137925fbd --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Internal/BicepSerializationHelpers.cs @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text; + +namespace Azure.ResourceManager.ApiManagement +{ + internal static class BicepSerializationHelpers + { + public static void AppendChildObject(StringBuilder stringBuilder, object childObject, ModelReaderWriterOptions options, int spaces, bool indentFirstLine, string formattedPropertyName) + { + string indent = new string(' ', spaces); + int emptyObjectLength = 2 + spaces + Environment.NewLine.Length + Environment.NewLine.Length; + int length = stringBuilder.Length; + bool inMultilineString = false; + + BinaryData data = ModelReaderWriter.Write(childObject, options); + string[] lines = data.ToString().Split(Environment.NewLine.ToCharArray(), StringSplitOptions.RemoveEmptyEntries); + for (int i = 0; i < lines.Length; i++) + { + string line = lines[i]; + if (inMultilineString) + { + if (line.Contains("'''")) + { + inMultilineString = false; + } + stringBuilder.AppendLine(line); + continue; + } + if (line.Contains("'''")) + { + inMultilineString = true; + stringBuilder.AppendLine($"{indent}{line}"); + continue; + } + if (i == 0 && !indentFirstLine) + { + stringBuilder.AppendLine($"{line}"); + } + else + { + stringBuilder.AppendLine($"{indent}{line}"); + } + } + if (stringBuilder.Length == length + emptyObjectLength) + { + stringBuilder.Length = stringBuilder.Length - emptyObjectLength - formattedPropertyName.Length; + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Internal/WirePathAttribute.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Internal/WirePathAttribute.cs new file mode 100644 index 0000000000000..bfd1c4d381e28 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Internal/WirePathAttribute.cs @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.ApiManagement +{ + [AttributeUsage(AttributeTargets.Property)] + internal class WirePathAttribute : Attribute + { + private string _wirePath; + + public WirePathAttribute(string wirePath) + { + _wirePath = wirePath; + } + + public override string ToString() + { + return _wirePath; + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/IssueContractData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/IssueContractData.Serialization.cs index 02c353e26767e..36f20e4e76ef3 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/IssueContractData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/IssueContractData.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.ApiManagement.Models; @@ -235,6 +236,184 @@ internal static IssueContractData DeserializeIssueContractData(JsonElement eleme 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(CreatedOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" createdDate: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CreatedOn)) + { + builder.Append(" createdDate: "); + var formattedDateTimeString = TypeFormatters.ToString(CreatedOn.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(ApiId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiId)) + { + builder.Append(" apiId: "); + builder.AppendLine($"'{ApiId.ToString()}'"); + } + } + + 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(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}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(UserId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" userId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(UserId)) + { + builder.Append(" userId: "); + builder.AppendLine($"'{UserId.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; @@ -243,6 +422,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions o { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(IssueContractData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/IssueContractData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/IssueContractData.cs index 5aa0040ea2f61..ff148367dee77 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/IssueContractData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/IssueContractData.cs @@ -80,16 +80,22 @@ internal IssueContractData(ResourceIdentifier id, string name, ResourceType reso } /// Date and time when the issue was created. + [WirePath("properties.createdDate")] public DateTimeOffset? CreatedOn { get; set; } /// Status of the issue. + [WirePath("properties.state")] public IssueState? State { get; set; } /// A resource identifier for the API the issue was created for. + [WirePath("properties.apiId")] public ResourceIdentifier ApiId { get; set; } /// The issue title. + [WirePath("properties.title")] public string Title { get; set; } /// Text describing the issue. + [WirePath("properties.description")] public string Description { get; set; } /// A resource identifier for the user created the issue. + [WirePath("properties.userId")] public ResourceIdentifier UserId { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/LongRunningOperation/PolicyFragmentContractOperationSource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/LongRunningOperation/PolicyFragmentContractOperationSource.cs new file mode 100644 index 0000000000000..35a218457b1f5 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/LongRunningOperation/PolicyFragmentContractOperationSource.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.ApiManagement +{ + internal class PolicyFragmentContractOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal PolicyFragmentContractOperationSource(ArmClient client) + { + _client = client; + } + + PolicyFragmentContractResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = PolicyFragmentContractData.DeserializePolicyFragmentContractData(document.RootElement); + return new PolicyFragmentContractResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = PolicyFragmentContractData.DeserializePolicyFragmentContractData(document.RootElement); + return new PolicyFragmentContractResource(_client, data); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AccessInformationListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AccessInformationListResult.Serialization.cs index f9db70c8f9306..ba2d02bf0540d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AccessInformationListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AccessInformationListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static AccessInformationListResult DeserializeAccessInformationListResu return new AccessInformationListResult(value ?? new ChangeTrackingList(), count, 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(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + 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; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReaderWrite { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(AccessInformationListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AdditionalLocation.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AdditionalLocation.Serialization.cs index 26b2503663e7d..0456e14621511 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AdditionalLocation.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AdditionalLocation.Serialization.cs @@ -8,7 +8,9 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; using System.Net; +using System.Text; using System.Text.Json; using Azure.Core; @@ -86,6 +88,21 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("gatewayRegionalUrl"u8); writer.WriteStringValue(GatewayRegionalUri.AbsoluteUri); } + if (Optional.IsDefined(NatGatewayState)) + { + writer.WritePropertyName("natGatewayState"u8); + writer.WriteStringValue(NatGatewayState.Value.ToString()); + } + if (options.Format != "W" && Optional.IsCollectionDefined(OutboundPublicIPAddresses)) + { + writer.WritePropertyName("outboundPublicIPAddresses"u8); + writer.WriteStartArray(); + foreach (var item in OutboundPublicIPAddresses) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } if (Optional.IsDefined(DisableGateway)) { writer.WritePropertyName("disableGateway"u8); @@ -142,6 +159,8 @@ internal static AdditionalLocation DeserializeAdditionalLocation(JsonElement ele ResourceIdentifier publicIPAddressId = default; VirtualNetworkConfiguration virtualNetworkConfiguration = default; Uri gatewayRegionalUri = default; + ApiManagementNatGatewayState? natGatewayState = default; + IReadOnlyList outboundPublicIPAddresses = default; bool? disableGateway = default; PlatformVersion? platformVersion = default; IDictionary serializedAdditionalRawData = default; @@ -241,6 +260,29 @@ internal static AdditionalLocation DeserializeAdditionalLocation(JsonElement ele gatewayRegionalUri = new Uri(property.Value.GetString()); continue; } + if (property.NameEquals("natGatewayState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + natGatewayState = new ApiManagementNatGatewayState(property.Value.GetString()); + continue; + } + if (property.NameEquals("outboundPublicIPAddresses"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + outboundPublicIPAddresses = array; + continue; + } if (property.NameEquals("disableGateway"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -274,11 +316,274 @@ internal static AdditionalLocation DeserializeAdditionalLocation(JsonElement ele publicIPAddressId, virtualNetworkConfiguration, gatewayRegionalUri, + natGatewayState, + outboundPublicIPAddresses ?? new ChangeTrackingList(), disableGateway, platformVersion, 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(Location), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" location: "); + builder.AppendLine(propertyOverride); + } + else + { + builder.Append(" location: "); + builder.AppendLine($"'{Location.ToString()}'"); + } + + 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, 2, false, " sku: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Zones), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" zones: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Zones)) + { + if (Zones.Any()) + { + builder.Append(" zones: "); + builder.AppendLine("["); + foreach (var item in Zones) + { + 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(PublicIPAddresses), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" publicIPAddresses: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(PublicIPAddresses)) + { + if (PublicIPAddresses.Any()) + { + builder.Append(" publicIPAddresses: "); + builder.AppendLine("["); + foreach (var item in PublicIPAddresses) + { + if (item == null) + { + builder.Append("null"); + continue; + } + builder.AppendLine($" '{item.ToString()}'"); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PrivateIPAddresses), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" privateIPAddresses: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(PrivateIPAddresses)) + { + if (PrivateIPAddresses.Any()) + { + builder.Append(" privateIPAddresses: "); + builder.AppendLine("["); + foreach (var item in PrivateIPAddresses) + { + if (item == null) + { + builder.Append("null"); + continue; + } + builder.AppendLine($" '{item.ToString()}'"); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PublicIPAddressId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" publicIpAddressId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PublicIPAddressId)) + { + builder.Append(" publicIpAddressId: "); + builder.AppendLine($"'{PublicIPAddressId.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(VirtualNetworkConfiguration), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" virtualNetworkConfiguration: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(VirtualNetworkConfiguration)) + { + builder.Append(" virtualNetworkConfiguration: "); + BicepSerializationHelpers.AppendChildObject(builder, VirtualNetworkConfiguration, options, 2, false, " virtualNetworkConfiguration: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(GatewayRegionalUri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" gatewayRegionalUrl: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(GatewayRegionalUri)) + { + builder.Append(" gatewayRegionalUrl: "); + builder.AppendLine($"'{GatewayRegionalUri.AbsoluteUri}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NatGatewayState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" natGatewayState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NatGatewayState)) + { + builder.Append(" natGatewayState: "); + builder.AppendLine($"'{NatGatewayState.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(OutboundPublicIPAddresses), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" outboundPublicIPAddresses: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(OutboundPublicIPAddresses)) + { + if (OutboundPublicIPAddresses.Any()) + { + builder.Append(" outboundPublicIPAddresses: "); + builder.AppendLine("["); + foreach (var item in OutboundPublicIPAddresses) + { + 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(DisableGateway), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" disableGateway: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DisableGateway)) + { + builder.Append(" disableGateway: "); + var boolValue = DisableGateway.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PlatformVersion), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" platformVersion: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PlatformVersion)) + { + builder.Append(" platformVersion: "); + builder.AppendLine($"'{PlatformVersion.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; @@ -287,6 +592,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(AdditionalLocation)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AdditionalLocation.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AdditionalLocation.cs index e7c94ae3c4ce8..7b250444258f1 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AdditionalLocation.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AdditionalLocation.cs @@ -60,6 +60,7 @@ public AdditionalLocation(AzureLocation location, ApiManagementServiceSkuPropert Zones = new ChangeTrackingList(); PublicIPAddresses = new ChangeTrackingList(); PrivateIPAddresses = new ChangeTrackingList(); + OutboundPublicIPAddresses = new ChangeTrackingList(); } /// Initializes a new instance of . @@ -71,10 +72,12 @@ public AdditionalLocation(AzureLocation location, ApiManagementServiceSkuPropert /// Public Standard SKU IP V4 based IP address to be associated with Virtual Network deployed service in the location. Supported only for Premium SKU being deployed in Virtual Network. /// Virtual network configuration for the location. /// Gateway URL of the API Management service in the Region. + /// Property can be used to enable NAT Gateway for this API Management service. + /// Outbound public IPV4 address prefixes associated with NAT Gateway deployed service. Available only for Premium SKU on stv2 platform. /// Property only valid for an Api Management service deployed in multiple locations. This can be used to disable the gateway in this additional location. /// Compute Platform Version running the service. /// Keeps track of any properties unknown to the library. - internal AdditionalLocation(AzureLocation location, ApiManagementServiceSkuProperties sku, IList zones, IReadOnlyList publicIPAddresses, IReadOnlyList privateIPAddresses, ResourceIdentifier publicIPAddressId, VirtualNetworkConfiguration virtualNetworkConfiguration, Uri gatewayRegionalUri, bool? disableGateway, PlatformVersion? platformVersion, IDictionary serializedAdditionalRawData) + internal AdditionalLocation(AzureLocation location, ApiManagementServiceSkuProperties sku, IList zones, IReadOnlyList publicIPAddresses, IReadOnlyList privateIPAddresses, ResourceIdentifier publicIPAddressId, VirtualNetworkConfiguration virtualNetworkConfiguration, Uri gatewayRegionalUri, ApiManagementNatGatewayState? natGatewayState, IReadOnlyList outboundPublicIPAddresses, bool? disableGateway, PlatformVersion? platformVersion, IDictionary serializedAdditionalRawData) { Location = location; Sku = sku; @@ -84,6 +87,8 @@ internal AdditionalLocation(AzureLocation location, ApiManagementServiceSkuPrope PublicIPAddressId = publicIPAddressId; VirtualNetworkConfiguration = virtualNetworkConfiguration; GatewayRegionalUri = gatewayRegionalUri; + NatGatewayState = natGatewayState; + OutboundPublicIPAddresses = outboundPublicIPAddresses; DisableGateway = disableGateway; PlatformVersion = platformVersion; _serializedAdditionalRawData = serializedAdditionalRawData; @@ -95,24 +100,40 @@ internal AdditionalLocation() } /// The location name of the additional region among Azure Data center regions. + [WirePath("location")] public AzureLocation Location { get; set; } /// SKU properties of the API Management service. + [WirePath("sku")] public ApiManagementServiceSkuProperties Sku { get; set; } /// A list of availability zones denoting where the resource needs to come from. + [WirePath("zones")] public IList Zones { get; } /// Public Static Load Balanced IP addresses of the API Management service in the additional location. Available only for Basic, Standard, Premium and Isolated SKU. + [WirePath("publicIPAddresses")] public IReadOnlyList PublicIPAddresses { get; } /// Private Static Load Balanced IP addresses of the API Management service which is deployed in an Internal Virtual Network in a particular additional location. Available only for Basic, Standard, Premium and Isolated SKU. + [WirePath("privateIPAddresses")] public IReadOnlyList PrivateIPAddresses { get; } /// Public Standard SKU IP V4 based IP address to be associated with Virtual Network deployed service in the location. Supported only for Premium SKU being deployed in Virtual Network. + [WirePath("publicIpAddressId")] public ResourceIdentifier PublicIPAddressId { get; set; } /// Virtual network configuration for the location. + [WirePath("virtualNetworkConfiguration")] public VirtualNetworkConfiguration VirtualNetworkConfiguration { get; set; } /// Gateway URL of the API Management service in the Region. + [WirePath("gatewayRegionalUrl")] public Uri GatewayRegionalUri { get; } + /// Property can be used to enable NAT Gateway for this API Management service. + [WirePath("natGatewayState")] + public ApiManagementNatGatewayState? NatGatewayState { get; set; } + /// Outbound public IPV4 address prefixes associated with NAT Gateway deployed service. Available only for Premium SKU on stv2 platform. + [WirePath("outboundPublicIPAddresses")] + public IReadOnlyList OutboundPublicIPAddresses { get; } /// Property only valid for an Api Management service deployed in multiple locations. This can be used to disable the gateway in this additional location. + [WirePath("disableGateway")] public bool? DisableGateway { get; set; } /// Compute Platform Version running the service. + [WirePath("platformVersion")] public PlatformVersion? PlatformVersion { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiContactInformation.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiContactInformation.Serialization.cs index 97a0b5b68fdfe..22d873e11081c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiContactInformation.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiContactInformation.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -114,6 +115,82 @@ internal static ApiContactInformation DeserializeApiContactInformation(JsonEleme return new ApiContactInformation(name, uri, email, 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(Uri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" url: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Uri)) + { + builder.Append(" url: "); + builder.AppendLine($"'{Uri.AbsoluteUri}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Email), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" email: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Email)) + { + builder.Append(" email: "); + if (Email.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Email}'''"); + } + else + { + builder.AppendLine($"'{Email}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -122,6 +199,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptio { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiContactInformation)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiContactInformation.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiContactInformation.cs index 23e7adc66caea..529f32388450b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiContactInformation.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiContactInformation.cs @@ -64,10 +64,13 @@ internal ApiContactInformation(string name, Uri uri, string email, IDictionary The identifying name of the contact person/organization. + [WirePath("name")] public string Name { get; set; } /// The URL pointing to the contact information. MUST be in the format of a URL. + [WirePath("url")] public Uri Uri { get; set; } /// The email address of the contact person/organization. MUST be in the format of an email address. + [WirePath("email")] public string Email { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiCreateOrUpdateContent.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiCreateOrUpdateContent.Serialization.cs index ee8c14c040e1a..e5e49f9600450 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiCreateOrUpdateContent.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiCreateOrUpdateContent.Serialization.cs @@ -158,6 +158,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead writer.WritePropertyName("apiType"u8); writer.WriteStringValue(SoapApiType.Value.ToString()); } + if (Optional.IsDefined(TranslateRequiredQueryParametersConduct)) + { + writer.WritePropertyName("translateRequiredQueryParameters"u8); + writer.WriteStringValue(TranslateRequiredQueryParametersConduct.Value.ToString()); + } writer.WriteEndObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -222,6 +227,7 @@ internal static ApiCreateOrUpdateContent DeserializeApiCreateOrUpdateContent(Jso ContentFormat? format = default; ApiCreateOrUpdatePropertiesWsdlSelector wsdlSelector = default; SoapApiType? apiType = default; + TranslateRequiredQueryParametersConduct? translateRequiredQueryParameters = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -425,6 +431,15 @@ internal static ApiCreateOrUpdateContent DeserializeApiCreateOrUpdateContent(Jso apiType = new SoapApiType(property0.Value.GetString()); continue; } + if (property0.NameEquals("translateRequiredQueryParameters"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + translateRequiredQueryParameters = new TranslateRequiredQueryParametersConduct(property0.Value.GetString()); + continue; + } } continue; } @@ -460,6 +475,7 @@ internal static ApiCreateOrUpdateContent DeserializeApiCreateOrUpdateContent(Jso format, wsdlSelector, apiType, + translateRequiredQueryParameters, serializedAdditionalRawData); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiCreateOrUpdateContent.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiCreateOrUpdateContent.cs index 00b71cc243218..5f4e29f45b162 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiCreateOrUpdateContent.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiCreateOrUpdateContent.cs @@ -84,8 +84,9 @@ public ApiCreateOrUpdateContent() /// * `websocket` creates websocket API /// * `graphql` creates GraphQL API. /// + /// Strategy of translating required query parameters to template ones. By default has value 'template'. Possible values: 'template', 'query'. /// Keeps track of any properties unknown to the library. - internal ApiCreateOrUpdateContent(string description, AuthenticationSettingsContract authenticationSettings, SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames, ApiType? apiType, string apiRevision, string apiVersion, bool? isCurrent, bool? isOnline, string apiRevisionDescription, string apiVersionDescription, ResourceIdentifier apiVersionSetId, bool? isSubscriptionRequired, string termsOfServiceLink, ApiContactInformation contact, ApiLicenseInformation license, ResourceIdentifier sourceApiId, string displayName, string serviceLink, string path, IList protocols, ApiVersionSetContractDetails apiVersionSet, string value, ContentFormat? format, ApiCreateOrUpdatePropertiesWsdlSelector wsdlSelector, SoapApiType? soapApiType, IDictionary serializedAdditionalRawData) + internal ApiCreateOrUpdateContent(string description, AuthenticationSettingsContract authenticationSettings, SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames, ApiType? apiType, string apiRevision, string apiVersion, bool? isCurrent, bool? isOnline, string apiRevisionDescription, string apiVersionDescription, ResourceIdentifier apiVersionSetId, bool? isSubscriptionRequired, string termsOfServiceLink, ApiContactInformation contact, ApiLicenseInformation license, ResourceIdentifier sourceApiId, string displayName, string serviceLink, string path, IList protocols, ApiVersionSetContractDetails apiVersionSet, string value, ContentFormat? format, ApiCreateOrUpdatePropertiesWsdlSelector wsdlSelector, SoapApiType? soapApiType, TranslateRequiredQueryParametersConduct? translateRequiredQueryParametersConduct, IDictionary serializedAdditionalRawData) { Description = description; AuthenticationSettings = authenticationSettings; @@ -112,56 +113,81 @@ internal ApiCreateOrUpdateContent(string description, AuthenticationSettingsCont Format = format; WsdlSelector = wsdlSelector; SoapApiType = soapApiType; + TranslateRequiredQueryParametersConduct = translateRequiredQueryParametersConduct; _serializedAdditionalRawData = serializedAdditionalRawData; } /// Description of the API. May include HTML formatting tags. + [WirePath("properties.description")] public string Description { get; set; } /// Collection of authentication settings included into this API. + [WirePath("properties.authenticationSettings")] public AuthenticationSettingsContract AuthenticationSettings { get; set; } /// Protocols over which API is made available. + [WirePath("properties.subscriptionKeyParameterNames")] public SubscriptionKeyParameterNamesContract SubscriptionKeyParameterNames { get; set; } /// Type of API. + [WirePath("properties.type")] public ApiType? ApiType { get; set; } /// Describes the revision of the API. If no value is provided, default revision 1 is created. + [WirePath("properties.apiRevision")] public string ApiRevision { get; set; } /// Indicates the version identifier of the API if the API is versioned. + [WirePath("properties.apiVersion")] public string ApiVersion { get; set; } /// Indicates if API revision is current api revision. + [WirePath("properties.isCurrent")] public bool? IsCurrent { get; set; } /// Indicates if API revision is accessible via the gateway. + [WirePath("properties.isOnline")] public bool? IsOnline { get; } /// Description of the API Revision. + [WirePath("properties.apiRevisionDescription")] public string ApiRevisionDescription { get; set; } /// Description of the API Version. + [WirePath("properties.apiVersionDescription")] public string ApiVersionDescription { get; set; } /// A resource identifier for the related ApiVersionSet. + [WirePath("properties.apiVersionSetId")] public ResourceIdentifier ApiVersionSetId { get; set; } /// Specifies whether an API or Product subscription is required for accessing the API. + [WirePath("properties.subscriptionRequired")] public bool? IsSubscriptionRequired { get; set; } /// A URL to the Terms of Service for the API. MUST be in the format of a URL. + [WirePath("properties.termsOfServiceUrl")] public string TermsOfServiceLink { get; set; } /// Contact information for the API. + [WirePath("properties.contact")] public ApiContactInformation Contact { get; set; } /// License information for the API. + [WirePath("properties.license")] public ApiLicenseInformation License { get; set; } /// API identifier of the source API. + [WirePath("properties.sourceApiId")] public ResourceIdentifier SourceApiId { get; set; } /// API name. Must be 1 to 300 characters long. + [WirePath("properties.displayName")] public string DisplayName { get; set; } /// Absolute URL of the backend service implementing this API. Cannot be more than 2000 characters long. + [WirePath("properties.serviceUrl")] public string ServiceLink { get; set; } /// Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API. + [WirePath("properties.path")] public string Path { get; set; } /// Describes on which protocols the operations in this API can be invoked. + [WirePath("properties.protocols")] public IList Protocols { get; } /// Version set details. + [WirePath("properties.apiVersionSet")] public ApiVersionSetContractDetails ApiVersionSet { get; set; } /// Content value when Importing an API. + [WirePath("properties.value")] public string Value { get; set; } /// Format of the Content in which the API is getting imported. + [WirePath("properties.format")] public ContentFormat? Format { get; set; } /// Criteria to limit import of WSDL to a subset of the document. + [WirePath("properties.wsdlSelector")] public ApiCreateOrUpdatePropertiesWsdlSelector WsdlSelector { get; set; } /// /// Type of API to create. @@ -170,6 +196,10 @@ internal ApiCreateOrUpdateContent(string description, AuthenticationSettingsCont /// * `websocket` creates websocket API /// * `graphql` creates GraphQL API. /// + [WirePath("properties.apiType")] public SoapApiType? SoapApiType { get; set; } + /// Strategy of translating required query parameters to template ones. By default has value 'template'. Possible values: 'template', 'query'. + [WirePath("properties.translateRequiredQueryParameters")] + public TranslateRequiredQueryParametersConduct? TranslateRequiredQueryParametersConduct { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiCreateOrUpdatePropertiesWsdlSelector.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiCreateOrUpdatePropertiesWsdlSelector.Serialization.cs index 3154ad4809265..fb79997f544da 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiCreateOrUpdatePropertiesWsdlSelector.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiCreateOrUpdatePropertiesWsdlSelector.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -99,6 +100,67 @@ internal static ApiCreateOrUpdatePropertiesWsdlSelector DeserializeApiCreateOrUp return new ApiCreateOrUpdatePropertiesWsdlSelector(wsdlServiceName, wsdlEndpointName, 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(WsdlServiceName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" wsdlServiceName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(WsdlServiceName)) + { + builder.Append(" wsdlServiceName: "); + if (WsdlServiceName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{WsdlServiceName}'''"); + } + else + { + builder.AppendLine($"'{WsdlServiceName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(WsdlEndpointName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" wsdlEndpointName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(WsdlEndpointName)) + { + builder.Append(" wsdlEndpointName: "); + if (WsdlEndpointName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{WsdlEndpointName}'''"); + } + else + { + builder.AppendLine($"'{WsdlEndpointName}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -107,6 +169,8 @@ BinaryData IPersistableModel.Write(Mode { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiCreateOrUpdatePropertiesWsdlSelector)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiCreateOrUpdatePropertiesWsdlSelector.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiCreateOrUpdatePropertiesWsdlSelector.cs index 5afe74cf3f2d3..e90b78cf237de 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiCreateOrUpdatePropertiesWsdlSelector.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiCreateOrUpdatePropertiesWsdlSelector.cs @@ -62,8 +62,10 @@ internal ApiCreateOrUpdatePropertiesWsdlSelector(string wsdlServiceName, string } /// Name of service to import from WSDL. + [WirePath("wsdlServiceName")] public string WsdlServiceName { get; set; } /// Name of endpoint(port) to import from WSDL. + [WirePath("wsdlEndpointName")] public string WsdlEndpointName { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiEntityBaseContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiEntityBaseContract.Serialization.cs index 0bc19d546b6c0..f60ed776a6988 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiEntityBaseContract.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiEntityBaseContract.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -294,6 +295,297 @@ internal static ApiEntityBaseContract DeserializeApiEntityBaseContract(JsonEleme 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(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}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AuthenticationSettings), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" authenticationSettings: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AuthenticationSettings)) + { + builder.Append(" authenticationSettings: "); + BicepSerializationHelpers.AppendChildObject(builder, AuthenticationSettings, options, 2, false, " authenticationSettings: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SubscriptionKeyParameterNames), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" subscriptionKeyParameterNames: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SubscriptionKeyParameterNames)) + { + builder.Append(" subscriptionKeyParameterNames: "); + BicepSerializationHelpers.AppendChildObject(builder, SubscriptionKeyParameterNames, options, 2, false, " subscriptionKeyParameterNames: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" type: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiType)) + { + builder.Append(" type: "); + builder.AppendLine($"'{ApiType.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiRevision), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiRevision: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiRevision)) + { + builder.Append(" apiRevision: "); + if (ApiRevision.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ApiRevision}'''"); + } + else + { + builder.AppendLine($"'{ApiRevision}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiVersion), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiVersion: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiVersion)) + { + builder.Append(" apiVersion: "); + if (ApiVersion.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ApiVersion}'''"); + } + else + { + builder.AppendLine($"'{ApiVersion}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsCurrent), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" isCurrent: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsCurrent)) + { + builder.Append(" isCurrent: "); + var boolValue = IsCurrent.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsOnline), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" isOnline: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsOnline)) + { + builder.Append(" isOnline: "); + var boolValue = IsOnline.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiRevisionDescription), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiRevisionDescription: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiRevisionDescription)) + { + builder.Append(" apiRevisionDescription: "); + if (ApiRevisionDescription.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ApiRevisionDescription}'''"); + } + else + { + builder.AppendLine($"'{ApiRevisionDescription}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiVersionDescription), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiVersionDescription: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiVersionDescription)) + { + builder.Append(" apiVersionDescription: "); + if (ApiVersionDescription.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ApiVersionDescription}'''"); + } + else + { + builder.AppendLine($"'{ApiVersionDescription}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiVersionSetId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiVersionSetId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiVersionSetId)) + { + builder.Append(" apiVersionSetId: "); + builder.AppendLine($"'{ApiVersionSetId.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsSubscriptionRequired), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" subscriptionRequired: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsSubscriptionRequired)) + { + builder.Append(" subscriptionRequired: "); + var boolValue = IsSubscriptionRequired.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TermsOfServiceLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" termsOfServiceUrl: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TermsOfServiceLink)) + { + builder.Append(" termsOfServiceUrl: "); + if (TermsOfServiceLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{TermsOfServiceLink}'''"); + } + else + { + builder.AppendLine($"'{TermsOfServiceLink}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Contact), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" contact: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Contact)) + { + builder.Append(" contact: "); + BicepSerializationHelpers.AppendChildObject(builder, Contact, options, 2, false, " contact: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(License), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" license: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(License)) + { + builder.Append(" license: "); + BicepSerializationHelpers.AppendChildObject(builder, License, options, 2, false, " license: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -302,6 +594,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptio { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiEntityBaseContract)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiEntityBaseContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiEntityBaseContract.cs index 118dc6f7fe770..0991e5c62670e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiEntityBaseContract.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiEntityBaseContract.cs @@ -89,34 +89,49 @@ internal ApiEntityBaseContract(string description, AuthenticationSettingsContrac } /// Description of the API. May include HTML formatting tags. + [WirePath("description")] public string Description { get; } /// Collection of authentication settings included into this API. + [WirePath("authenticationSettings")] public AuthenticationSettingsContract AuthenticationSettings { get; } /// Protocols over which API is made available. + [WirePath("subscriptionKeyParameterNames")] public SubscriptionKeyParameterNamesContract SubscriptionKeyParameterNames { get; } /// Type of API. + [WirePath("type")] public ApiType? ApiType { get; } /// Describes the revision of the API. If no value is provided, default revision 1 is created. + [WirePath("apiRevision")] public string ApiRevision { get; } /// Indicates the version identifier of the API if the API is versioned. + [WirePath("apiVersion")] public string ApiVersion { get; } /// Indicates if API revision is current api revision. + [WirePath("isCurrent")] public bool? IsCurrent { get; } /// Indicates if API revision is accessible via the gateway. + [WirePath("isOnline")] public bool? IsOnline { get; } /// Description of the API Revision. + [WirePath("apiRevisionDescription")] public string ApiRevisionDescription { get; } /// Description of the API Version. + [WirePath("apiVersionDescription")] public string ApiVersionDescription { get; } /// A resource identifier for the related ApiVersionSet. + [WirePath("apiVersionSetId")] public ResourceIdentifier ApiVersionSetId { get; } /// Specifies whether an API or Product subscription is required for accessing the API. + [WirePath("subscriptionRequired")] public bool? IsSubscriptionRequired { get; } /// A URL to the Terms of Service for the API. MUST be in the format of a URL. + [WirePath("termsOfServiceUrl")] public string TermsOfServiceLink { get; } /// Contact information for the API. + [WirePath("contact")] public ApiContactInformation Contact { get; } /// License information for the API. + [WirePath("license")] public ApiLicenseInformation License { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiIssuePatch.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiIssuePatch.cs index 46a2a3bd828b9..c1ea48798f030 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiIssuePatch.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiIssuePatch.cs @@ -71,16 +71,22 @@ internal ApiIssuePatch(DateTimeOffset? createdOn, IssueState? state, ResourceIde } /// Date and time when the issue was created. + [WirePath("properties.createdDate")] public DateTimeOffset? CreatedOn { get; set; } /// Status of the issue. + [WirePath("properties.state")] public IssueState? State { get; set; } /// A resource identifier for the API the issue was created for. + [WirePath("properties.apiId")] public ResourceIdentifier ApiId { get; set; } /// The issue title. + [WirePath("properties.title")] public string Title { get; set; } /// Text describing the issue. + [WirePath("properties.description")] public string Description { get; set; } /// A resource identifier for the user created the issue. + [WirePath("properties.userId")] public string UserId { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiLicenseInformation.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiLicenseInformation.Serialization.cs index 357a82776e498..22f90ea82e652 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiLicenseInformation.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiLicenseInformation.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -103,6 +104,59 @@ internal static ApiLicenseInformation DeserializeApiLicenseInformation(JsonEleme return new ApiLicenseInformation(name, uri, 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(Uri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" url: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Uri)) + { + builder.Append(" url: "); + builder.AppendLine($"'{Uri.AbsoluteUri}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -111,6 +165,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptio { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiLicenseInformation)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiLicenseInformation.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiLicenseInformation.cs index 3f1256a0d298a..b21dc4b340ce1 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiLicenseInformation.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiLicenseInformation.cs @@ -62,8 +62,10 @@ internal ApiLicenseInformation(string name, Uri uri, IDictionary The license name used for the API. + [WirePath("name")] public string Name { get; set; } /// A URL to the license used for the API. MUST be in the format of a URL. + [WirePath("url")] public Uri Uri { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiListResult.Serialization.cs index ee1ea7b06f32d..a9f59a70e52a5 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static ApiListResult DeserializeApiListResult(JsonElement element, Mode return new ApiListResult(value ?? new ChangeTrackingList(), count, 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(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + 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; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions optio { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementAuthorizationError.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementAuthorizationError.Serialization.cs new file mode 100644 index 0000000000000..f98f0545b6e6d --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementAuthorizationError.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.ApiManagement.Models +{ + public partial class ApiManagementAuthorizationError : 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(ApiManagementAuthorizationError)} 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(); + } + + ApiManagementAuthorizationError 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(ApiManagementAuthorizationError)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeApiManagementAuthorizationError(document.RootElement, options); + } + + internal static ApiManagementAuthorizationError DeserializeApiManagementAuthorizationError(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 ApiManagementAuthorizationError(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(ApiManagementAuthorizationError)} does not support writing '{options.Format}' format."); + } + } + + ApiManagementAuthorizationError 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 DeserializeApiManagementAuthorizationError(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ApiManagementAuthorizationError)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementAuthorizationError.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementAuthorizationError.cs new file mode 100644 index 0000000000000..af1e111a8f49d --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementAuthorizationError.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.ApiManagement.Models +{ + /// Authorization error details. + public partial class ApiManagementAuthorizationError + { + /// + /// 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 ApiManagementAuthorizationError() + { + } + + /// Initializes a new instance of . + /// Error code. + /// Error message. + /// Keeps track of any properties unknown to the library. + internal ApiManagementAuthorizationError(string code, string message, IDictionary serializedAdditionalRawData) + { + Code = code; + Message = message; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Error code. + [WirePath("code")] + public string Code { get; set; } + /// Error message. + [WirePath("message")] + public string Message { get; set; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementAuthorizationServerPatch.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementAuthorizationServerPatch.Serialization.cs index 8febff3e9d568..9d8e85f1f9205 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementAuthorizationServerPatch.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementAuthorizationServerPatch.Serialization.cs @@ -8,6 +8,8 @@ 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; @@ -124,6 +126,16 @@ void IJsonModel.Write(Utf8JsonWriter writ writer.WritePropertyName("displayName"u8); writer.WriteStringValue(DisplayName); } + if (Optional.IsDefined(UseInTestConsole)) + { + writer.WritePropertyName("useInTestConsole"u8); + writer.WriteBooleanValue(UseInTestConsole.Value); + } + if (Optional.IsDefined(UseInApiDocumentation)) + { + writer.WritePropertyName("useInApiDocumentation"u8); + writer.WriteBooleanValue(UseInApiDocumentation.Value); + } if (Optional.IsDefined(ClientRegistrationEndpoint)) { writer.WritePropertyName("clientRegistrationEndpoint"u8); @@ -208,6 +220,8 @@ internal static ApiManagementAuthorizationServerPatch DeserializeApiManagementAu string resourceOwnerUsername = default; string resourceOwnerPassword = default; string displayName = default; + bool? useInTestConsole = default; + bool? useInApiDocumentation = default; string clientRegistrationEndpoint = default; string authorizationEndpoint = default; IList grantTypes = default; @@ -345,6 +359,24 @@ internal static ApiManagementAuthorizationServerPatch DeserializeApiManagementAu displayName = property0.Value.GetString(); continue; } + if (property0.NameEquals("useInTestConsole"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + useInTestConsole = property0.Value.GetBoolean(); + continue; + } + if (property0.NameEquals("useInApiDocumentation"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + useInApiDocumentation = property0.Value.GetBoolean(); + continue; + } if (property0.NameEquals("clientRegistrationEndpoint"u8)) { clientRegistrationEndpoint = property0.Value.GetString(); @@ -404,6 +436,8 @@ internal static ApiManagementAuthorizationServerPatch DeserializeApiManagementAu resourceOwnerUsername, resourceOwnerPassword, displayName, + useInTestConsole, + useInApiDocumentation, clientRegistrationEndpoint, authorizationEndpoint, grantTypes ?? new ChangeTrackingList(), @@ -412,6 +446,470 @@ internal static ApiManagementAuthorizationServerPatch DeserializeApiManagementAu 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(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}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AuthorizationMethods), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" authorizationMethods: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(AuthorizationMethods)) + { + if (AuthorizationMethods.Any()) + { + builder.Append(" authorizationMethods: "); + builder.AppendLine("["); + foreach (var item in AuthorizationMethods) + { + builder.AppendLine($" '{item.ToSerialString()}'"); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ClientAuthenticationMethods), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" clientAuthenticationMethod: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(ClientAuthenticationMethods)) + { + if (ClientAuthenticationMethods.Any()) + { + builder.Append(" clientAuthenticationMethod: "); + builder.AppendLine("["); + foreach (var item in ClientAuthenticationMethods) + { + builder.AppendLine($" '{item.ToString()}'"); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TokenBodyParameters), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" tokenBodyParameters: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(TokenBodyParameters)) + { + if (TokenBodyParameters.Any()) + { + builder.Append(" tokenBodyParameters: "); + builder.AppendLine("["); + foreach (var item in TokenBodyParameters) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " tokenBodyParameters: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TokenEndpoint), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" tokenEndpoint: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TokenEndpoint)) + { + builder.Append(" tokenEndpoint: "); + if (TokenEndpoint.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{TokenEndpoint}'''"); + } + else + { + builder.AppendLine($"'{TokenEndpoint}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DoesSupportState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" supportState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DoesSupportState)) + { + builder.Append(" supportState: "); + var boolValue = DoesSupportState.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DefaultScope), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" defaultScope: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DefaultScope)) + { + builder.Append(" defaultScope: "); + if (DefaultScope.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{DefaultScope}'''"); + } + else + { + builder.AppendLine($"'{DefaultScope}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(BearerTokenSendingMethods), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" bearerTokenSendingMethods: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(BearerTokenSendingMethods)) + { + if (BearerTokenSendingMethods.Any()) + { + builder.Append(" bearerTokenSendingMethods: "); + builder.AppendLine("["); + foreach (var item in BearerTokenSendingMethods) + { + builder.AppendLine($" '{item.ToString()}'"); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ResourceOwnerUsername), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" resourceOwnerUsername: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ResourceOwnerUsername)) + { + builder.Append(" resourceOwnerUsername: "); + if (ResourceOwnerUsername.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ResourceOwnerUsername}'''"); + } + else + { + builder.AppendLine($"'{ResourceOwnerUsername}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ResourceOwnerPassword), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" resourceOwnerPassword: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ResourceOwnerPassword)) + { + builder.Append(" resourceOwnerPassword: "); + if (ResourceOwnerPassword.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ResourceOwnerPassword}'''"); + } + else + { + builder.AppendLine($"'{ResourceOwnerPassword}'"); + } + } + } + + 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(UseInTestConsole), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" useInTestConsole: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(UseInTestConsole)) + { + builder.Append(" useInTestConsole: "); + var boolValue = UseInTestConsole.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(UseInApiDocumentation), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" useInApiDocumentation: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(UseInApiDocumentation)) + { + builder.Append(" useInApiDocumentation: "); + var boolValue = UseInApiDocumentation.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ClientRegistrationEndpoint), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" clientRegistrationEndpoint: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ClientRegistrationEndpoint)) + { + builder.Append(" clientRegistrationEndpoint: "); + if (ClientRegistrationEndpoint.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ClientRegistrationEndpoint}'''"); + } + else + { + builder.AppendLine($"'{ClientRegistrationEndpoint}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AuthorizationEndpoint), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" authorizationEndpoint: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AuthorizationEndpoint)) + { + builder.Append(" authorizationEndpoint: "); + if (AuthorizationEndpoint.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{AuthorizationEndpoint}'''"); + } + else + { + builder.AppendLine($"'{AuthorizationEndpoint}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(GrantTypes), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" grantTypes: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(GrantTypes)) + { + if (GrantTypes.Any()) + { + builder.Append(" grantTypes: "); + builder.AppendLine("["); + foreach (var item in GrantTypes) + { + builder.AppendLine($" '{item.ToString()}'"); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ClientId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" clientId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ClientId)) + { + builder.Append(" clientId: "); + if (ClientId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ClientId}'''"); + } + else + { + builder.AppendLine($"'{ClientId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ClientSecret), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" clientSecret: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ClientSecret)) + { + builder.Append(" clientSecret: "); + if (ClientSecret.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ClientSecret}'''"); + } + else + { + builder.AppendLine($"'{ClientSecret}'"); + } + } + } + + 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; @@ -420,6 +918,8 @@ BinaryData IPersistableModel.Write(ModelR { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementAuthorizationServerPatch)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementAuthorizationServerPatch.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementAuthorizationServerPatch.cs index ffa2d8d830857..4ab0b289c2198 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementAuthorizationServerPatch.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementAuthorizationServerPatch.cs @@ -73,13 +73,15 @@ public ApiManagementAuthorizationServerPatch() /// Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username. /// Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password. /// User-friendly authorization server name. + /// If true, the authorization server may be used in the developer portal test console. True by default if no value is provided. + /// If true, the authorization server will be used in the API documentation in the developer portal. False by default if no value is provided. /// Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute URL to entity being referenced. /// OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2. /// Form of an authorization grant, which the client uses to request the access token. /// Client or app id registered with this authorization server. /// Client or app secret registered with this authorization server. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. /// Keeps track of any properties unknown to the library. - internal ApiManagementAuthorizationServerPatch(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string description, IList authorizationMethods, IList clientAuthenticationMethods, IList tokenBodyParameters, string tokenEndpoint, bool? doesSupportState, string defaultScope, IList bearerTokenSendingMethods, string resourceOwnerUsername, string resourceOwnerPassword, string displayName, string clientRegistrationEndpoint, string authorizationEndpoint, IList grantTypes, string clientId, string clientSecret, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal ApiManagementAuthorizationServerPatch(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string description, IList authorizationMethods, IList clientAuthenticationMethods, IList tokenBodyParameters, string tokenEndpoint, bool? doesSupportState, string defaultScope, IList bearerTokenSendingMethods, string resourceOwnerUsername, string resourceOwnerPassword, string displayName, bool? useInTestConsole, bool? useInApiDocumentation, string clientRegistrationEndpoint, string authorizationEndpoint, IList grantTypes, string clientId, string clientSecret, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { Description = description; AuthorizationMethods = authorizationMethods; @@ -92,6 +94,8 @@ internal ApiManagementAuthorizationServerPatch(ResourceIdentifier id, string nam ResourceOwnerUsername = resourceOwnerUsername; ResourceOwnerPassword = resourceOwnerPassword; DisplayName = displayName; + UseInTestConsole = useInTestConsole; + UseInApiDocumentation = useInApiDocumentation; ClientRegistrationEndpoint = clientRegistrationEndpoint; AuthorizationEndpoint = authorizationEndpoint; GrantTypes = grantTypes; @@ -101,36 +105,58 @@ internal ApiManagementAuthorizationServerPatch(ResourceIdentifier id, string nam } /// Description of the authorization server. Can contain HTML formatting tags. + [WirePath("properties.description")] public string Description { get; set; } /// HTTP verbs supported by the authorization endpoint. GET must be always present. POST is optional. + [WirePath("properties.authorizationMethods")] public IList AuthorizationMethods { get; } /// Method of authentication supported by the token endpoint of this authorization server. Possible values are Basic and/or Body. When Body is specified, client credentials and other parameters are passed within the request body in the application/x-www-form-urlencoded format. + [WirePath("properties.clientAuthenticationMethod")] public IList ClientAuthenticationMethods { get; } /// Additional parameters required by the token endpoint of this authorization server represented as an array of JSON objects with name and value string properties, i.e. {"name" : "name value", "value": "a value"}. + [WirePath("properties.tokenBodyParameters")] public IList TokenBodyParameters { get; } /// OAuth token endpoint. Contains absolute URI to entity being referenced. + [WirePath("properties.tokenEndpoint")] public string TokenEndpoint { get; set; } /// If true, authorization server will include state parameter from the authorization request to its response. Client may use state parameter to raise protocol security. + [WirePath("properties.supportState")] public bool? DoesSupportState { get; set; } /// Access token scope that is going to be requested by default. Can be overridden at the API level. Should be provided in the form of a string containing space-delimited values. + [WirePath("properties.defaultScope")] public string DefaultScope { get; set; } /// Specifies the mechanism by which access token is passed to the API. + [WirePath("properties.bearerTokenSendingMethods")] public IList BearerTokenSendingMethods { get; } /// Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username. + [WirePath("properties.resourceOwnerUsername")] public string ResourceOwnerUsername { get; set; } /// Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password. + [WirePath("properties.resourceOwnerPassword")] public string ResourceOwnerPassword { get; set; } /// User-friendly authorization server name. + [WirePath("properties.displayName")] public string DisplayName { get; set; } + /// If true, the authorization server may be used in the developer portal test console. True by default if no value is provided. + [WirePath("properties.useInTestConsole")] + public bool? UseInTestConsole { get; set; } + /// If true, the authorization server will be used in the API documentation in the developer portal. False by default if no value is provided. + [WirePath("properties.useInApiDocumentation")] + public bool? UseInApiDocumentation { get; set; } /// Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute URL to entity being referenced. + [WirePath("properties.clientRegistrationEndpoint")] public string ClientRegistrationEndpoint { get; set; } /// OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2. + [WirePath("properties.authorizationEndpoint")] public string AuthorizationEndpoint { get; set; } /// Form of an authorization grant, which the client uses to request the access token. + [WirePath("properties.grantTypes")] public IList GrantTypes { get; } /// Client or app id registered with this authorization server. + [WirePath("properties.clientId")] public string ClientId { get; set; } /// Client or app secret registered with this authorization server. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. + [WirePath("properties.clientSecret")] public string ClientSecret { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementAuthorizationType.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementAuthorizationType.cs new file mode 100644 index 0000000000000..a66fe58bab885 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementAuthorizationType.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.ApiManagement.Models +{ + /// Authorization type options. + public readonly partial struct ApiManagementAuthorizationType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ApiManagementAuthorizationType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string OAuth2Value = "OAuth2"; + + /// OAuth2 authorization type. + public static ApiManagementAuthorizationType OAuth2 { get; } = new ApiManagementAuthorizationType(OAuth2Value); + /// Determines if two values are the same. + public static bool operator ==(ApiManagementAuthorizationType left, ApiManagementAuthorizationType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ApiManagementAuthorizationType left, ApiManagementAuthorizationType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ApiManagementAuthorizationType(string value) => new ApiManagementAuthorizationType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ApiManagementAuthorizationType other && Equals(other); + /// + public bool Equals(ApiManagementAuthorizationType 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/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementBackendPatch.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementBackendPatch.cs index 8568ba8466b01..38a46c38895f4 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementBackendPatch.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementBackendPatch.cs @@ -53,10 +53,10 @@ public ApiManagementBackendPatch() /// Initializes a new instance of . /// Backend Title. /// Backend Description. - /// Management Uri of the Resource in External System. This url can be the Arm Resource Id of Logic Apps, Function Apps or API Apps. + /// Management Uri of the Resource in External System. This URL can be the Arm Resource Id of Logic Apps, Function Apps or API Apps. /// Backend Properties contract. /// Backend Credentials Contract Properties. - /// Backend Proxy Contract Properties. + /// Backend gateway Contract Properties. /// Backend TLS Properties. /// Runtime Url of the Backend. /// Backend communication protocol. @@ -76,14 +76,18 @@ internal ApiManagementBackendPatch(string title, string description, Uri resourc } /// Backend Title. + [WirePath("properties.title")] public string Title { get; set; } /// Backend Description. + [WirePath("properties.description")] public string Description { get; set; } - /// Management Uri of the Resource in External System. This url can be the Arm Resource Id of Logic Apps, Function Apps or API Apps. + /// Management Uri of the Resource in External System. This URL can be the Arm Resource Id of Logic Apps, Function Apps or API Apps. + [WirePath("properties.resourceId")] public Uri ResourceUri { get; set; } /// Backend Properties contract. internal BackendProperties Properties { get; set; } /// Backend Service Fabric Cluster Properties. + [WirePath("properties.properties.serviceFabricCluster")] public BackendServiceFabricClusterProperties BackendServiceFabricCluster { get => Properties is null ? default : Properties.ServiceFabricCluster; @@ -96,14 +100,19 @@ public BackendServiceFabricClusterProperties BackendServiceFabricCluster } /// Backend Credentials Contract Properties. + [WirePath("properties.credentials")] public BackendCredentialsContract Credentials { get; set; } - /// Backend Proxy Contract Properties. + /// Backend gateway Contract Properties. + [WirePath("properties.proxy")] public BackendProxyContract Proxy { get; set; } /// Backend TLS Properties. + [WirePath("properties.tls")] public BackendTlsProperties Tls { get; set; } /// Runtime Url of the Backend. + [WirePath("properties.url")] public Uri Uri { get; set; } /// Backend communication protocol. + [WirePath("properties.protocol")] public BackendProtocol? Protocol { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementCachePatch.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementCachePatch.cs index a0a77f6551b41..5ff887f3ed6e3 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementCachePatch.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementCachePatch.cs @@ -66,12 +66,16 @@ internal ApiManagementCachePatch(string description, string connectionString, st } /// Cache description. + [WirePath("properties.description")] public string Description { get; set; } /// Runtime connection string to cache. + [WirePath("properties.connectionString")] public string ConnectionString { get; set; } /// Location identifier to use cache from (should be either 'default' or valid Azure region identifier). + [WirePath("properties.useFromLocation")] public string UseFromLocation { get; set; } /// Original uri of entity in external system cache points to. + [WirePath("properties.resourceId")] public Uri ResourceUri { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementCertificateCreateOrUpdateContent.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementCertificateCreateOrUpdateContent.cs index 452eeeef951c3..0432d942c8feb 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementCertificateCreateOrUpdateContent.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementCertificateCreateOrUpdateContent.cs @@ -64,10 +64,13 @@ internal ApiManagementCertificateCreateOrUpdateContent(string data, string passw } /// Base 64 encoded certificate using the application/x-pkcs12 representation. + [WirePath("properties.data")] public string Data { get; set; } /// Password for the Certificate. + [WirePath("properties.password")] public string Password { get; set; } /// KeyVault location details of the certificate. + [WirePath("properties.keyVault")] public KeyVaultContractCreateProperties KeyVaultDetails { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementEmailTemplateCreateOrUpdateContent.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementEmailTemplateCreateOrUpdateContent.cs index 0bc7ea85cbbbd..31833d415e6f7 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementEmailTemplateCreateOrUpdateContent.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementEmailTemplateCreateOrUpdateContent.cs @@ -69,14 +69,19 @@ internal ApiManagementEmailTemplateCreateOrUpdateContent(string subject, string } /// Subject of the Template. + [WirePath("properties.subject")] public string Subject { get; set; } /// Title of the Template. + [WirePath("properties.title")] public string Title { get; set; } /// Description of the Email Template. + [WirePath("properties.description")] public string Description { get; set; } /// Email Template Body. This should be a valid XDocument. + [WirePath("properties.body")] public string Body { get; set; } /// Email Template Parameter values. + [WirePath("properties.parameters")] public IList Parameters { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementGatewayApiListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementGatewayApiListResult.Serialization.cs index 1bc1586ba3962..7010f063eed24 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementGatewayApiListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementGatewayApiListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static ApiManagementGatewayApiListResult DeserializeApiManagementGatewa return new ApiManagementGatewayApiListResult(value ?? new ChangeTrackingList(), count, 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(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + 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; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReade { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementGatewayApiListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementGroupCreateOrUpdateContent.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementGroupCreateOrUpdateContent.cs index 239a8886fd756..ca4d1429c9f18 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementGroupCreateOrUpdateContent.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementGroupCreateOrUpdateContent.cs @@ -66,12 +66,16 @@ internal ApiManagementGroupCreateOrUpdateContent(string displayName, string desc } /// Group name. + [WirePath("properties.displayName")] public string DisplayName { get; set; } /// Group description. + [WirePath("properties.description")] public string Description { get; set; } /// Group type. + [WirePath("properties.type")] public ApiManagementGroupType? ApiManagementGroupType { get; set; } /// Identifier of the external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory `aad://<tenant>.onmicrosoft.com/groups/<group object id>`; otherwise the value is null. + [WirePath("properties.externalId")] public string ExternalId { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementGroupPatch.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementGroupPatch.cs index e8c8602888245..b2d35ee9bbf39 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementGroupPatch.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementGroupPatch.cs @@ -66,12 +66,16 @@ internal ApiManagementGroupPatch(string displayName, string description, ApiMana } /// Group name. + [WirePath("properties.displayName")] public string DisplayName { get; set; } /// Group description. + [WirePath("properties.description")] public string Description { get; set; } /// Group type. + [WirePath("properties.type")] public ApiManagementGroupType? ApiManagementGroupType { get; set; } /// Identifier of the external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory `aad://<tenant>.onmicrosoft.com/groups/<group object id>`; otherwise the value is null. + [WirePath("properties.externalId")] public string ExternalId { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementGroupUserData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementGroupUserData.Serialization.cs index 3f60b01679a06..9552f3bd847b7 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementGroupUserData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementGroupUserData.Serialization.cs @@ -8,6 +8,8 @@ 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; @@ -278,6 +280,246 @@ internal static ApiManagementGroupUserData DeserializeApiManagementGroupUserData 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(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(Note), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" note: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Note)) + { + builder.Append(" note: "); + if (Note.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Note}'''"); + } + else + { + builder.AppendLine($"'{Note}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Identities), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" identities: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Identities)) + { + if (Identities.Any()) + { + builder.Append(" identities: "); + builder.AppendLine("["); + foreach (var item in Identities) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " identities: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(FirstName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" firstName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(FirstName)) + { + builder.Append(" firstName: "); + if (FirstName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{FirstName}'''"); + } + else + { + builder.AppendLine($"'{FirstName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(LastName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" lastName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(LastName)) + { + builder.Append(" lastName: "); + if (LastName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{LastName}'''"); + } + else + { + builder.AppendLine($"'{LastName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Email), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" email: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Email)) + { + builder.Append(" email: "); + if (Email.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Email}'''"); + } + else + { + builder.AppendLine($"'{Email}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(RegistriesOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" registrationDate: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(RegistriesOn)) + { + builder.Append(" registrationDate: "); + var formattedDateTimeString = TypeFormatters.ToString(RegistriesOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Groups), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" groups: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Groups)) + { + if (Groups.Any()) + { + builder.Append(" groups: "); + builder.AppendLine("["); + foreach (var item in Groups) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " groups: "); + } + 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; @@ -286,6 +528,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriter { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementGroupUserData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementGroupUserData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementGroupUserData.cs index dafc8c7505ac5..337152e17aa78 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementGroupUserData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementGroupUserData.cs @@ -85,23 +85,31 @@ internal ApiManagementGroupUserData(ResourceIdentifier id, string name, Resource } /// Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal or call any APIs of subscribed products. Default state is Active. + [WirePath("properties.state")] public ApiManagementUserState? State { get; set; } /// Optional note about a user set by the administrator. + [WirePath("properties.note")] public string Note { get; set; } /// Collection of user identities. + [WirePath("properties.identities")] public IList Identities { get; } /// First name. + [WirePath("properties.firstName")] public string FirstName { get; set; } /// Last name. + [WirePath("properties.lastName")] public string LastName { get; set; } /// Email address. + [WirePath("properties.email")] public string Email { get; set; } /// /// Date of user registration. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. /// /// + [WirePath("properties.registrationDate")] public DateTimeOffset? RegistriesOn { get; set; } /// Collection of groups user is part of. + [WirePath("properties.groups")] public IReadOnlyList Groups { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementGroupUserListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementGroupUserListResult.Serialization.cs index 9f3c7adeb75cb..63e2550806192 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementGroupUserListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementGroupUserListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static ApiManagementGroupUserListResult DeserializeApiManagementGroupUs return new ApiManagementGroupUserListResult(value ?? new ChangeTrackingList(), count, 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(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + 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; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReader { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementGroupUserListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementIdentityProviderCreateOrUpdateContent.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementIdentityProviderCreateOrUpdateContent.Serialization.cs index 5ef243c4d1ef4..ba73f79edcf28 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementIdentityProviderCreateOrUpdateContent.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementIdentityProviderCreateOrUpdateContent.Serialization.cs @@ -8,6 +8,8 @@ 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; @@ -94,6 +96,11 @@ void IJsonModel.Write(Utf8Js writer.WritePropertyName("passwordResetPolicyName"u8); writer.WriteStringValue(PasswordResetPolicyName); } + if (Optional.IsDefined(ClientLibrary)) + { + writer.WritePropertyName("clientLibrary"u8); + writer.WriteStringValue(ClientLibrary); + } if (Optional.IsDefined(ClientId)) { writer.WritePropertyName("clientId"u8); @@ -155,6 +162,7 @@ internal static ApiManagementIdentityProviderCreateOrUpdateContent DeserializeAp string signinPolicyName = default; string profileEditingPolicyName = default; string passwordResetPolicyName = default; + string clientLibrary = default; string clientId = default; string clientSecret = default; IDictionary serializedAdditionalRawData = default; @@ -247,6 +255,11 @@ internal static ApiManagementIdentityProviderCreateOrUpdateContent DeserializeAp passwordResetPolicyName = property0.Value.GetString(); continue; } + if (property0.NameEquals("clientLibrary"u8)) + { + clientLibrary = property0.Value.GetString(); + continue; + } if (property0.NameEquals("clientId"u8)) { clientId = property0.Value.GetString(); @@ -279,11 +292,341 @@ internal static ApiManagementIdentityProviderCreateOrUpdateContent DeserializeAp signinPolicyName, profileEditingPolicyName, passwordResetPolicyName, + clientLibrary, clientId, clientSecret, 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(IdentityProviderType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" type: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IdentityProviderType)) + { + builder.Append(" type: "); + builder.AppendLine($"'{IdentityProviderType.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SignInTenant), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" signinTenant: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SignInTenant)) + { + builder.Append(" signinTenant: "); + if (SignInTenant.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{SignInTenant}'''"); + } + else + { + builder.AppendLine($"'{SignInTenant}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AllowedTenants), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" allowedTenants: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(AllowedTenants)) + { + if (AllowedTenants.Any()) + { + builder.Append(" allowedTenants: "); + builder.AppendLine("["); + foreach (var item in AllowedTenants) + { + 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(Authority), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" authority: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Authority)) + { + builder.Append(" authority: "); + if (Authority.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Authority}'''"); + } + else + { + builder.AppendLine($"'{Authority}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SignUpPolicyName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" signupPolicyName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SignUpPolicyName)) + { + builder.Append(" signupPolicyName: "); + if (SignUpPolicyName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{SignUpPolicyName}'''"); + } + else + { + builder.AppendLine($"'{SignUpPolicyName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SignInPolicyName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" signinPolicyName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SignInPolicyName)) + { + builder.Append(" signinPolicyName: "); + if (SignInPolicyName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{SignInPolicyName}'''"); + } + else + { + builder.AppendLine($"'{SignInPolicyName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProfileEditingPolicyName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" profileEditingPolicyName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ProfileEditingPolicyName)) + { + builder.Append(" profileEditingPolicyName: "); + if (ProfileEditingPolicyName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ProfileEditingPolicyName}'''"); + } + else + { + builder.AppendLine($"'{ProfileEditingPolicyName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PasswordResetPolicyName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" passwordResetPolicyName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PasswordResetPolicyName)) + { + builder.Append(" passwordResetPolicyName: "); + if (PasswordResetPolicyName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{PasswordResetPolicyName}'''"); + } + else + { + builder.AppendLine($"'{PasswordResetPolicyName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ClientLibrary), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" clientLibrary: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ClientLibrary)) + { + builder.Append(" clientLibrary: "); + if (ClientLibrary.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ClientLibrary}'''"); + } + else + { + builder.AppendLine($"'{ClientLibrary}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ClientId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" clientId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ClientId)) + { + builder.Append(" clientId: "); + if (ClientId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ClientId}'''"); + } + else + { + builder.AppendLine($"'{ClientId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ClientSecret), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" clientSecret: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ClientSecret)) + { + builder.Append(" clientSecret: "); + if (ClientSecret.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ClientSecret}'''"); + } + else + { + builder.AppendLine($"'{ClientSecret}'"); + } + } + } + + 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; @@ -292,6 +635,8 @@ BinaryData IPersistableModel { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementIdentityProviderCreateOrUpdateContent)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementIdentityProviderCreateOrUpdateContent.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementIdentityProviderCreateOrUpdateContent.cs index ff7a762ce17bf..ea335ee2fb645 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementIdentityProviderCreateOrUpdateContent.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementIdentityProviderCreateOrUpdateContent.cs @@ -66,10 +66,11 @@ public ApiManagementIdentityProviderCreateOrUpdateContent() /// Signin Policy Name. Only applies to AAD B2C Identity Provider. /// Profile Editing Policy Name. Only applies to AAD B2C Identity Provider. /// Password Reset Policy Name. Only applies to AAD B2C Identity Provider. + /// The client library to be used in the developer portal. Only applies to AAD and AAD B2C Identity Provider. /// Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft. /// Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. /// Keeps track of any properties unknown to the library. - internal ApiManagementIdentityProviderCreateOrUpdateContent(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IdentityProviderType? identityProviderType, string signInTenant, IList allowedTenants, string authority, string signUpPolicyName, string signInPolicyName, string profileEditingPolicyName, string passwordResetPolicyName, string clientId, string clientSecret, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal ApiManagementIdentityProviderCreateOrUpdateContent(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IdentityProviderType? identityProviderType, string signInTenant, IList allowedTenants, string authority, string signUpPolicyName, string signInPolicyName, string profileEditingPolicyName, string passwordResetPolicyName, string clientLibrary, string clientId, string clientSecret, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { IdentityProviderType = identityProviderType; SignInTenant = signInTenant; @@ -79,30 +80,44 @@ internal ApiManagementIdentityProviderCreateOrUpdateContent(ResourceIdentifier i SignInPolicyName = signInPolicyName; ProfileEditingPolicyName = profileEditingPolicyName; PasswordResetPolicyName = passwordResetPolicyName; + ClientLibrary = clientLibrary; ClientId = clientId; ClientSecret = clientSecret; _serializedAdditionalRawData = serializedAdditionalRawData; } /// Identity Provider Type identifier. + [WirePath("properties.type")] public IdentityProviderType? IdentityProviderType { get; set; } /// The TenantId to use instead of Common when logging into Active Directory. + [WirePath("properties.signinTenant")] public string SignInTenant { get; set; } /// List of Allowed Tenants when configuring Azure Active Directory login. + [WirePath("properties.allowedTenants")] public IList AllowedTenants { get; } /// OpenID Connect discovery endpoint hostname for AAD or AAD B2C. + [WirePath("properties.authority")] public string Authority { get; set; } /// Signup Policy Name. Only applies to AAD B2C Identity Provider. + [WirePath("properties.signupPolicyName")] public string SignUpPolicyName { get; set; } /// Signin Policy Name. Only applies to AAD B2C Identity Provider. + [WirePath("properties.signinPolicyName")] public string SignInPolicyName { get; set; } /// Profile Editing Policy Name. Only applies to AAD B2C Identity Provider. + [WirePath("properties.profileEditingPolicyName")] public string ProfileEditingPolicyName { get; set; } /// Password Reset Policy Name. Only applies to AAD B2C Identity Provider. + [WirePath("properties.passwordResetPolicyName")] public string PasswordResetPolicyName { get; set; } + /// The client library to be used in the developer portal. Only applies to AAD and AAD B2C Identity Provider. + [WirePath("properties.clientLibrary")] + public string ClientLibrary { get; set; } /// Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft. + [WirePath("properties.clientId")] public string ClientId { get; set; } /// Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. + [WirePath("properties.clientSecret")] public string ClientSecret { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementIdentityProviderPatch.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementIdentityProviderPatch.Serialization.cs index 57d5927d5ecd7..80756ca4a05ed 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementIdentityProviderPatch.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementIdentityProviderPatch.Serialization.cs @@ -73,6 +73,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WritePropertyName("passwordResetPolicyName"u8); writer.WriteStringValue(PasswordResetPolicyName); } + if (Optional.IsDefined(ClientLibrary)) + { + writer.WritePropertyName("clientLibrary"u8); + writer.WriteStringValue(ClientLibrary); + } if (Optional.IsDefined(ClientId)) { writer.WritePropertyName("clientId"u8); @@ -130,6 +135,7 @@ internal static ApiManagementIdentityProviderPatch DeserializeApiManagementIdent string signinPolicyName = default; string profileEditingPolicyName = default; string passwordResetPolicyName = default; + string clientLibrary = default; string clientId = default; string clientSecret = default; IDictionary serializedAdditionalRawData = default; @@ -198,6 +204,11 @@ internal static ApiManagementIdentityProviderPatch DeserializeApiManagementIdent passwordResetPolicyName = property0.Value.GetString(); continue; } + if (property0.NameEquals("clientLibrary"u8)) + { + clientLibrary = property0.Value.GetString(); + continue; + } if (property0.NameEquals("clientId"u8)) { clientId = property0.Value.GetString(); @@ -226,6 +237,7 @@ internal static ApiManagementIdentityProviderPatch DeserializeApiManagementIdent signinPolicyName, profileEditingPolicyName, passwordResetPolicyName, + clientLibrary, clientId, clientSecret, serializedAdditionalRawData); diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementIdentityProviderPatch.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementIdentityProviderPatch.cs index aaee40873a3c8..6d7aa8f3e0233 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementIdentityProviderPatch.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementIdentityProviderPatch.cs @@ -60,10 +60,11 @@ public ApiManagementIdentityProviderPatch() /// Signin Policy Name. Only applies to AAD B2C Identity Provider. /// Profile Editing Policy Name. Only applies to AAD B2C Identity Provider. /// Password Reset Policy Name. Only applies to AAD B2C Identity Provider. + /// The client library to be used in the developer portal. Only applies to AAD and AAD B2C Identity Provider. /// Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft. /// Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft. /// Keeps track of any properties unknown to the library. - internal ApiManagementIdentityProviderPatch(IdentityProviderType? identityProviderType, string signInTenant, IList allowedTenants, string authority, string signUpPolicyName, string signInPolicyName, string profileEditingPolicyName, string passwordResetPolicyName, string clientId, string clientSecret, IDictionary serializedAdditionalRawData) + internal ApiManagementIdentityProviderPatch(IdentityProviderType? identityProviderType, string signInTenant, IList allowedTenants, string authority, string signUpPolicyName, string signInPolicyName, string profileEditingPolicyName, string passwordResetPolicyName, string clientLibrary, string clientId, string clientSecret, IDictionary serializedAdditionalRawData) { IdentityProviderType = identityProviderType; SignInTenant = signInTenant; @@ -73,30 +74,44 @@ internal ApiManagementIdentityProviderPatch(IdentityProviderType? identityProvid SignInPolicyName = signInPolicyName; ProfileEditingPolicyName = profileEditingPolicyName; PasswordResetPolicyName = passwordResetPolicyName; + ClientLibrary = clientLibrary; ClientId = clientId; ClientSecret = clientSecret; _serializedAdditionalRawData = serializedAdditionalRawData; } /// Identity Provider Type identifier. + [WirePath("properties.type")] public IdentityProviderType? IdentityProviderType { get; set; } /// The TenantId to use instead of Common when logging into Active Directory. + [WirePath("properties.signinTenant")] public string SignInTenant { get; set; } /// List of Allowed Tenants when configuring Azure Active Directory login. + [WirePath("properties.allowedTenants")] public IList AllowedTenants { get; } /// OpenID Connect discovery endpoint hostname for AAD or AAD B2C. + [WirePath("properties.authority")] public string Authority { get; set; } /// Signup Policy Name. Only applies to AAD B2C Identity Provider. + [WirePath("properties.signupPolicyName")] public string SignUpPolicyName { get; set; } /// Signin Policy Name. Only applies to AAD B2C Identity Provider. + [WirePath("properties.signinPolicyName")] public string SignInPolicyName { get; set; } /// Profile Editing Policy Name. Only applies to AAD B2C Identity Provider. + [WirePath("properties.profileEditingPolicyName")] public string ProfileEditingPolicyName { get; set; } /// Password Reset Policy Name. Only applies to AAD B2C Identity Provider. + [WirePath("properties.passwordResetPolicyName")] public string PasswordResetPolicyName { get; set; } + /// The client library to be used in the developer portal. Only applies to AAD and AAD B2C Identity Provider. + [WirePath("properties.clientLibrary")] + public string ClientLibrary { get; set; } /// Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft. + [WirePath("properties.clientId")] public string ClientId { get; set; } /// Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft. + [WirePath("properties.clientSecret")] public string ClientSecret { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementLoggerPatch.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementLoggerPatch.cs index 69b4463e00a46..5a5f6bb3a1975 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementLoggerPatch.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementLoggerPatch.cs @@ -67,12 +67,16 @@ internal ApiManagementLoggerPatch(LoggerType? loggerType, string description, ID } /// Logger type. + [WirePath("properties.loggerType")] public LoggerType? LoggerType { get; set; } /// Logger description. + [WirePath("properties.description")] public string Description { get; set; } /// Logger credentials. + [WirePath("properties.credentials")] public IDictionary Credentials { get; } /// Whether records are buffered in the logger before publishing. Default is assumed to be true. + [WirePath("properties.isBuffered")] public bool? IsBuffered { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementNamedValueCreateOrUpdateContent.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementNamedValueCreateOrUpdateContent.Serialization.cs index a98ad19588533..d32bc1f106ce8 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementNamedValueCreateOrUpdateContent.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementNamedValueCreateOrUpdateContent.Serialization.cs @@ -8,6 +8,8 @@ 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; @@ -228,6 +230,190 @@ internal static ApiManagementNamedValueCreateOrUpdateContent DeserializeApiManag 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(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) + { + 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(IsSecret), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" secret: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsSecret)) + { + builder.Append(" secret: "); + var boolValue = IsSecret.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + 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(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(KeyVault), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" keyVault: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(KeyVault)) + { + builder.Append(" keyVault: "); + BicepSerializationHelpers.AppendChildObject(builder, KeyVault, options, 4, false, " keyVault: "); + } + } + + 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; @@ -236,6 +422,8 @@ BinaryData IPersistableModel.Write { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementNamedValueCreateOrUpdateContent)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementNamedValueCreateOrUpdateContent.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementNamedValueCreateOrUpdateContent.cs index 0bc095dd436f9..bfee23d1dc57b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementNamedValueCreateOrUpdateContent.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementNamedValueCreateOrUpdateContent.cs @@ -75,14 +75,19 @@ internal ApiManagementNamedValueCreateOrUpdateContent(ResourceIdentifier id, str } /// Optional tags that when provided can be used to filter the NamedValue list. + [WirePath("properties.tags")] public IList Tags { get; } /// Determines whether the value is a secret and should be encrypted or not. Default value is false. + [WirePath("properties.secret")] public bool? IsSecret { get; set; } /// Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore characters. + [WirePath("properties.displayName")] public string DisplayName { get; set; } /// Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of whitespace. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. + [WirePath("properties.value")] public string Value { get; set; } /// KeyVault location details of the namedValue. + [WirePath("properties.keyVault")] public KeyVaultContractCreateProperties KeyVault { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementNamedValuePatch.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementNamedValuePatch.cs index e5412f12e9bc2..abcf9cc777b8e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementNamedValuePatch.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementNamedValuePatch.cs @@ -69,14 +69,19 @@ internal ApiManagementNamedValuePatch(IList tags, bool? isSecret, string } /// Optional tags that when provided can be used to filter the NamedValue list. + [WirePath("properties.tags")] public IList Tags { get; } /// Determines whether the value is a secret and should be encrypted or not. Default value is false. + [WirePath("properties.secret")] public bool? IsSecret { get; set; } /// Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore characters. + [WirePath("properties.displayName")] public string DisplayName { get; set; } /// Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of whitespace. + [WirePath("properties.value")] public string Value { get; set; } /// KeyVault location details of the namedValue. + [WirePath("properties.keyVault")] public KeyVaultContractCreateProperties KeyVault { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementNatGatewayState.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementNatGatewayState.cs new file mode 100644 index 0000000000000..bf96b039df767 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementNatGatewayState.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.ApiManagement.Models +{ + /// Property can be used to enable NAT Gateway for this API Management service. + public readonly partial struct ApiManagementNatGatewayState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ApiManagementNatGatewayState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EnabledValue = "Enabled"; + private const string DisabledValue = "Disabled"; + + /// Nat Gateway is enabled for the service. + public static ApiManagementNatGatewayState Enabled { get; } = new ApiManagementNatGatewayState(EnabledValue); + /// Nat Gateway is disabled for the service. + public static ApiManagementNatGatewayState Disabled { get; } = new ApiManagementNatGatewayState(DisabledValue); + /// Determines if two values are the same. + public static bool operator ==(ApiManagementNatGatewayState left, ApiManagementNatGatewayState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ApiManagementNatGatewayState left, ApiManagementNatGatewayState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ApiManagementNatGatewayState(string value) => new ApiManagementNatGatewayState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ApiManagementNatGatewayState other && Equals(other); + /// + public bool Equals(ApiManagementNatGatewayState 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/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementOpenIdConnectProviderPatch.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementOpenIdConnectProviderPatch.Serialization.cs index d3326eef680c5..74e2d6a20ac7a 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementOpenIdConnectProviderPatch.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementOpenIdConnectProviderPatch.Serialization.cs @@ -53,6 +53,16 @@ void IJsonModel.Write(Utf8JsonWriter wr writer.WritePropertyName("clientSecret"u8); writer.WriteStringValue(ClientSecret); } + if (Optional.IsDefined(UseInTestConsole)) + { + writer.WritePropertyName("useInTestConsole"u8); + writer.WriteBooleanValue(UseInTestConsole.Value); + } + if (Optional.IsDefined(UseInApiDocumentation)) + { + writer.WritePropertyName("useInApiDocumentation"u8); + writer.WriteBooleanValue(UseInApiDocumentation.Value); + } writer.WriteEndObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -97,6 +107,8 @@ internal static ApiManagementOpenIdConnectProviderPatch DeserializeApiManagement string metadataEndpoint = default; string clientId = default; string clientSecret = default; + bool? useInTestConsole = default; + bool? useInApiDocumentation = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -135,6 +147,24 @@ internal static ApiManagementOpenIdConnectProviderPatch DeserializeApiManagement clientSecret = property0.Value.GetString(); continue; } + if (property0.NameEquals("useInTestConsole"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + useInTestConsole = property0.Value.GetBoolean(); + continue; + } + if (property0.NameEquals("useInApiDocumentation"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + useInApiDocumentation = property0.Value.GetBoolean(); + continue; + } } continue; } @@ -150,6 +180,8 @@ internal static ApiManagementOpenIdConnectProviderPatch DeserializeApiManagement metadataEndpoint, clientId, clientSecret, + useInTestConsole, + useInApiDocumentation, serializedAdditionalRawData); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementOpenIdConnectProviderPatch.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementOpenIdConnectProviderPatch.cs index 44defa7db4fdb..395217d3a10a6 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementOpenIdConnectProviderPatch.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementOpenIdConnectProviderPatch.cs @@ -56,26 +56,41 @@ public ApiManagementOpenIdConnectProviderPatch() /// Metadata endpoint URI. /// Client ID of developer console which is the client application. /// Client Secret of developer console which is the client application. + /// If true, the Open ID Connect provider may be used in the developer portal test console. True by default if no value is provided. + /// If true, the Open ID Connect provider will be used in the API documentation in the developer portal. False by default if no value is provided. /// Keeps track of any properties unknown to the library. - internal ApiManagementOpenIdConnectProviderPatch(string displayName, string description, string metadataEndpoint, string clientId, string clientSecret, IDictionary serializedAdditionalRawData) + internal ApiManagementOpenIdConnectProviderPatch(string displayName, string description, string metadataEndpoint, string clientId, string clientSecret, bool? useInTestConsole, bool? useInApiDocumentation, IDictionary serializedAdditionalRawData) { DisplayName = displayName; Description = description; MetadataEndpoint = metadataEndpoint; ClientId = clientId; ClientSecret = clientSecret; + UseInTestConsole = useInTestConsole; + UseInApiDocumentation = useInApiDocumentation; _serializedAdditionalRawData = serializedAdditionalRawData; } /// User-friendly OpenID Connect Provider name. + [WirePath("properties.displayName")] public string DisplayName { get; set; } /// User-friendly description of OpenID Connect Provider. + [WirePath("properties.description")] public string Description { get; set; } /// Metadata endpoint URI. + [WirePath("properties.metadataEndpoint")] public string MetadataEndpoint { get; set; } /// Client ID of developer console which is the client application. + [WirePath("properties.clientId")] public string ClientId { get; set; } /// Client Secret of developer console which is the client application. + [WirePath("properties.clientSecret")] public string ClientSecret { get; set; } + /// If true, the Open ID Connect provider may be used in the developer portal test console. True by default if no value is provided. + [WirePath("properties.useInTestConsole")] + public bool? UseInTestConsole { get; set; } + /// If true, the Open ID Connect provider will be used in the API documentation in the developer portal. False by default if no value is provided. + [WirePath("properties.useInApiDocumentation")] + public bool? UseInApiDocumentation { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementPrivateEndpointConnectionCreateOrUpdateContent.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementPrivateEndpointConnectionCreateOrUpdateContent.cs index 73588779ef104..11f3ea41dc6c9 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementPrivateEndpointConnectionCreateOrUpdateContent.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementPrivateEndpointConnectionCreateOrUpdateContent.cs @@ -63,10 +63,12 @@ internal ApiManagementPrivateEndpointConnectionCreateOrUpdateContent(ResourceIde } /// Private Endpoint Connection Resource Id. + [WirePath("id")] public ResourceIdentifier Id { get; set; } /// The connection state of the private endpoint connection. internal PrivateEndpointConnectionRequestProperties Properties { get; set; } /// A collection of information about the state of the connection between service consumer and provider. + [WirePath("properties.privateLinkServiceConnectionState")] public ApiManagementPrivateLinkServiceConnectionState PrivateLinkServiceConnectionState { get => Properties is null ? default : Properties.PrivateLinkServiceConnectionState; diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementPrivateEndpointConnectionListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementPrivateEndpointConnectionListResult.Serialization.cs index ce118db94b46a..17283fc53c4c3 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementPrivateEndpointConnectionListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementPrivateEndpointConnectionListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -102,6 +104,44 @@ internal static ApiManagementPrivateEndpointConnectionListResult DeserializeApiM return new ApiManagementPrivateEndpointConnectionListResult(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(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; @@ -110,6 +150,8 @@ BinaryData IPersistableModel.W { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementPrivateEndpointConnectionListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementPrivateLinkResourceListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementPrivateLinkResourceListResult.Serialization.cs index 351c9041eb07a..1d4d1941c0b76 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementPrivateLinkResourceListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementPrivateLinkResourceListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -102,6 +104,44 @@ internal static ApiManagementPrivateLinkResourceListResult DeserializeApiManagem return new ApiManagementPrivateLinkResourceListResult(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(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; @@ -110,6 +150,8 @@ BinaryData IPersistableModel.Write(M { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementPrivateLinkResourceListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementPrivateLinkResourceListResult.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementPrivateLinkResourceListResult.cs index 6b0e80c08398f..2257c96c357ca 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementPrivateLinkResourceListResult.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementPrivateLinkResourceListResult.cs @@ -61,6 +61,7 @@ internal ApiManagementPrivateLinkResourceListResult(IReadOnlyList Array of private link resources. + [WirePath("value")] public IReadOnlyList Value { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementPrivateLinkServiceConnectionState.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementPrivateLinkServiceConnectionState.Serialization.cs index 5da37c812c146..7aa67e2f7f6cb 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementPrivateLinkServiceConnectionState.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementPrivateLinkServiceConnectionState.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -114,6 +115,82 @@ internal static ApiManagementPrivateLinkServiceConnectionState DeserializeApiMan return new ApiManagementPrivateLinkServiceConnectionState(status, description, actionsRequired, 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(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(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}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ActionsRequired), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" actionsRequired: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ActionsRequired)) + { + builder.Append(" actionsRequired: "); + if (ActionsRequired.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ActionsRequired}'''"); + } + else + { + builder.AppendLine($"'{ActionsRequired}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -122,6 +199,8 @@ BinaryData IPersistableModel.Wri { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementPrivateLinkServiceConnectionState)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementPrivateLinkServiceConnectionState.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementPrivateLinkServiceConnectionState.cs index e50866503f811..0d924d7a94a4c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementPrivateLinkServiceConnectionState.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementPrivateLinkServiceConnectionState.cs @@ -64,10 +64,13 @@ internal ApiManagementPrivateLinkServiceConnectionState(ApiManagementPrivateEndp } /// Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. + [WirePath("status")] public ApiManagementPrivateEndpointServiceConnectionStatus? Status { get; set; } /// The reason for approval/rejection of the connection. + [WirePath("description")] public string Description { get; set; } /// A message indicating if changes on the service provider require any updates on the consumer. + [WirePath("actionsRequired")] public string ActionsRequired { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementProductApiListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementProductApiListResult.Serialization.cs index a1b10a443272c..fa2ea8c71e13d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementProductApiListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementProductApiListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static ApiManagementProductApiListResult DeserializeApiManagementProduc return new ApiManagementProductApiListResult(value ?? new ChangeTrackingList(), count, 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(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + 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; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReade { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementProductApiListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementProductGroupListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementProductGroupListResult.Serialization.cs index 43c13a908f73c..b4688b64b9d5c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementProductGroupListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementProductGroupListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static ApiManagementProductGroupListResult DeserializeApiManagementProd return new ApiManagementProductGroupListResult(value ?? new ChangeTrackingList(), count, 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(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + 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; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelRea { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementProductGroupListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementProductPatch.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementProductPatch.cs index af493f0a7faf0..f7aa2bc8e7ce8 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementProductPatch.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementProductPatch.cs @@ -72,18 +72,25 @@ internal ApiManagementProductPatch(string description, string terms, bool? isSub } /// Product description. May include HTML formatting tags. + [WirePath("properties.description")] public string Description { get; set; } /// Product terms of use. Developers trying to subscribe to the product will be presented and required to accept these terms before they can complete the subscription process. + [WirePath("properties.terms")] public string Terms { get; set; } /// Whether a product subscription is required for accessing APIs included in this product. If true, the product is referred to as "protected" and a valid subscription key is required for a request to an API included in the product to succeed. If false, the product is referred to as "open" and requests to an API included in the product can be made without a subscription key. If property is omitted when creating a new product it's value is assumed to be true. + [WirePath("properties.subscriptionRequired")] public bool? IsSubscriptionRequired { get; set; } /// whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the product’s APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present only if subscriptionRequired property is present and has a value of false. + [WirePath("properties.approvalRequired")] public bool? IsApprovalRequired { get; set; } /// Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false. + [WirePath("properties.subscriptionsLimit")] public int? SubscriptionsLimit { get; set; } /// whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished. + [WirePath("properties.state")] public ApiManagementProductState? State { get; set; } /// Product name. + [WirePath("properties.displayName")] public string DisplayName { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementResourceSkuCapacity.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementResourceSkuCapacity.Serialization.cs index 72437976eb6ae..0d5ecde437630 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementResourceSkuCapacity.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementResourceSkuCapacity.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -137,6 +138,81 @@ internal static ApiManagementResourceSkuCapacity DeserializeApiManagementResourc return new ApiManagementResourceSkuCapacity(minimum, maximum, @default, scaleType, 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(Minimum), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" minimum: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Minimum)) + { + builder.Append(" minimum: "); + builder.AppendLine($"{Minimum.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Maximum), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" maximum: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Maximum)) + { + builder.Append(" maximum: "); + builder.AppendLine($"{Maximum.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Default), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" default: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Default)) + { + builder.Append(" default: "); + builder.AppendLine($"{Default.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ScaleType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" scaleType: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ScaleType)) + { + builder.Append(" scaleType: "); + builder.AppendLine($"'{ScaleType.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; @@ -145,6 +221,8 @@ BinaryData IPersistableModel.Write(ModelReader { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementResourceSkuCapacity)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementResourceSkuCapacity.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementResourceSkuCapacity.cs index 726ac8f5f56df..7935fbd0bf7d1 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementResourceSkuCapacity.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementResourceSkuCapacity.cs @@ -66,12 +66,16 @@ internal ApiManagementResourceSkuCapacity(int? minimum, int? maximum, int? @defa } /// The minimum capacity. + [WirePath("minimum")] public int? Minimum { get; } /// The maximum capacity that can be set. + [WirePath("maximum")] public int? Maximum { get; } /// The default capacity. + [WirePath("default")] public int? Default { get; } /// The scale type applicable to the sku. + [WirePath("scaleType")] public ApiManagementResourceSkuCapacityScaleType? ScaleType { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceApplyNetworkConfigurationContent.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceApplyNetworkConfigurationContent.cs index b12714d252316..a94e97a909089 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceApplyNetworkConfigurationContent.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceApplyNetworkConfigurationContent.cs @@ -61,6 +61,7 @@ internal ApiManagementServiceApplyNetworkConfigurationContent(AzureLocation? loc } /// Location of the Api Management service to update for a multi-region service. For a service deployed in a single region, this parameter is not required. + [WirePath("location")] public AzureLocation? Location { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceBackupRestoreContent.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceBackupRestoreContent.cs index d6d5b19447a03..db67e7ca9a5e7 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceBackupRestoreContent.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceBackupRestoreContent.cs @@ -86,16 +86,22 @@ internal ApiManagementServiceBackupRestoreContent() } /// The name of the Azure storage account (used to place/retrieve the backup). + [WirePath("storageAccount")] public string StorageAccount { get; } /// The name of the blob container (used to place/retrieve the backup). + [WirePath("containerName")] public string ContainerName { get; } /// The name of the backup file to create/retrieve. + [WirePath("backupName")] public string BackupName { get; } /// The type of access to be used for the storage account. + [WirePath("accessType")] public StorageAccountAccessType? AccessType { get; set; } /// Storage account access key. Required only if `accessType` is set to `AccessKey`. + [WirePath("accessKey")] public string AccessKey { get; set; } /// The Client ID of user assigned managed identity. Required only if `accessType` is set to `UserAssignedManagedIdentity`. + [WirePath("clientId")] public string ClientId { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceGetDomainOwnershipIdentifierResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceGetDomainOwnershipIdentifierResult.Serialization.cs index 737ba79fc45af..6cfa3572c3912 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceGetDomainOwnershipIdentifierResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceGetDomainOwnershipIdentifierResult.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -88,6 +89,44 @@ internal static ApiManagementServiceGetDomainOwnershipIdentifierResult Deseriali return new ApiManagementServiceGetDomainOwnershipIdentifierResult(domainOwnershipIdentifier, 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(DomainOwnershipIdentifier), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" domainOwnershipIdentifier: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DomainOwnershipIdentifier)) + { + builder.Append(" domainOwnershipIdentifier: "); + if (DomainOwnershipIdentifier.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{DomainOwnershipIdentifier}'''"); + } + else + { + builder.AppendLine($"'{DomainOwnershipIdentifier}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -96,6 +135,8 @@ BinaryData IPersistableModel The domain ownership identifier value. + [WirePath("domainOwnershipIdentifier")] public string DomainOwnershipIdentifier { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceGetSsoTokenResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceGetSsoTokenResult.Serialization.cs index 1b5028d18d547..a102dc21c8a8f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceGetSsoTokenResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceGetSsoTokenResult.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -92,6 +93,36 @@ internal static ApiManagementServiceGetSsoTokenResult DeserializeApiManagementSe return new ApiManagementServiceGetSsoTokenResult(redirectUri, 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(RedirectUri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" redirectUri: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(RedirectUri)) + { + builder.Append(" redirectUri: "); + builder.AppendLine($"'{RedirectUri.AbsoluteUri}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -100,6 +131,8 @@ BinaryData IPersistableModel.Write(ModelR { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementServiceGetSsoTokenResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceGetSsoTokenResult.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceGetSsoTokenResult.cs index 2de990ca06a08..de75fff67b6e0 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceGetSsoTokenResult.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceGetSsoTokenResult.cs @@ -60,6 +60,7 @@ internal ApiManagementServiceGetSsoTokenResult(Uri redirectUri, IDictionary Redirect URL to the Publisher Portal containing the SSO token. + [WirePath("redirectUri")] public Uri RedirectUri { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceListResult.Serialization.cs index 899dfd5eca9b2..931ab2d6c9aa3 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -106,6 +108,67 @@ internal static ApiManagementServiceListResult DeserializeApiManagementServiceLi return new ApiManagementServiceListResult(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; @@ -114,6 +177,8 @@ BinaryData IPersistableModel.Write(ModelReaderWr { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementServiceListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceNameAvailabilityContent.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceNameAvailabilityContent.cs index 9da1c98abf7a0..4e952162e732a 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceNameAvailabilityContent.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceNameAvailabilityContent.cs @@ -70,6 +70,7 @@ internal ApiManagementServiceNameAvailabilityContent() } /// The name to check for availability. + [WirePath("name")] public string Name { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceNameAvailabilityResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceNameAvailabilityResult.Serialization.cs index 21adff3ca37ab..f4f1e333c4557 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceNameAvailabilityResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceNameAvailabilityResult.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -118,6 +119,75 @@ internal static ApiManagementServiceNameAvailabilityResult DeserializeApiManagem return new ApiManagementServiceNameAvailabilityResult(nameAvailable, message, reason, 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(IsNameAvailable), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nameAvailable: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsNameAvailable)) + { + builder.Append(" nameAvailable: "); + var boolValue = IsNameAvailable.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + 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(Reason), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" reason: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Reason)) + { + builder.Append(" reason: "); + builder.AppendLine($"'{Reason.Value.ToSerialString()}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -126,6 +196,8 @@ BinaryData IPersistableModel.Write(M { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementServiceNameAvailabilityResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceNameAvailabilityResult.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceNameAvailabilityResult.cs index 81afe6805738f..9513450e7419c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceNameAvailabilityResult.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceNameAvailabilityResult.cs @@ -64,10 +64,13 @@ internal ApiManagementServiceNameAvailabilityResult(bool? isNameAvailable, strin } /// True if the name is available and can be used to create a new API Management service; otherwise false. + [WirePath("nameAvailable")] public bool? IsNameAvailable { get; } /// If reason == invalid, provide the user with the reason why the given name is invalid, and provide the resource naming requirements so that the user can select a valid name. If reason == AlreadyExists, explain that <resourceName> is already in use, and direct them to select a different name. + [WirePath("message")] public string Message { get; } /// Invalid indicates the name provided does not match the resource provider’s naming requirements (incorrect length, unsupported characters, etc.) AlreadyExists indicates that the name is already in use and is therefore unavailable. + [WirePath("reason")] public ApiManagementServiceNameUnavailableReason? Reason { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServicePatch.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServicePatch.Serialization.cs index 4af4c3564dedf..5d1fd1e385b93 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServicePatch.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServicePatch.Serialization.cs @@ -8,7 +8,9 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; using System.Net; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Models; @@ -227,6 +229,21 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WritePropertyName("enableClientCertificate"u8); writer.WriteBooleanValue(EnableClientCertificate.Value); } + if (Optional.IsDefined(NatGatewayState)) + { + writer.WritePropertyName("natGatewayState"u8); + writer.WriteStringValue(NatGatewayState.Value.ToString()); + } + if (options.Format != "W" && Optional.IsCollectionDefined(OutboundPublicIPAddresses)) + { + writer.WritePropertyName("outboundPublicIPAddresses"u8); + writer.WriteStartArray(); + foreach (var item in OutboundPublicIPAddresses) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } if (Optional.IsDefined(DisableGateway)) { writer.WritePropertyName("disableGateway"u8); @@ -340,6 +357,8 @@ internal static ApiManagementServicePatch DeserializeApiManagementServicePatch(J IDictionary customProperties = default; IList certificates = default; bool? enableClientCertificate = default; + ApiManagementNatGatewayState? natGatewayState = default; + IReadOnlyList outboundPublicIPAddresses = default; bool? disableGateway = default; VirtualNetworkType? virtualNetworkType = default; ApiVersionConstraint apiVersionConstraint = default; @@ -652,6 +671,29 @@ internal static ApiManagementServicePatch DeserializeApiManagementServicePatch(J enableClientCertificate = property0.Value.GetBoolean(); continue; } + if (property0.NameEquals("natGatewayState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + natGatewayState = new ApiManagementNatGatewayState(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("outboundPublicIPAddresses"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + outboundPublicIPAddresses = array; + continue; + } if (property0.NameEquals("disableGateway"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -759,6 +801,8 @@ internal static ApiManagementServicePatch DeserializeApiManagementServicePatch(J customProperties ?? new ChangeTrackingDictionary(), certificates ?? new ChangeTrackingList(), enableClientCertificate, + natGatewayState, + outboundPublicIPAddresses ?? new ChangeTrackingList(), disableGateway, virtualNetworkType, apiVersionConstraint, @@ -771,6 +815,795 @@ internal static ApiManagementServicePatch DeserializeApiManagementServicePatch(J 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(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(Sku), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" sku: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Sku)) + { + builder.Append(" sku: "); + BicepSerializationHelpers.AppendChildObject(builder, Sku, options, 2, false, " sku: "); + } + } + + 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(ETag), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" etag: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ETag)) + { + builder.Append(" etag: "); + builder.AppendLine($"'{ETag.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Zones), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" zones: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Zones)) + { + if (Zones.Any()) + { + builder.Append(" zones: "); + builder.AppendLine("["); + foreach (var item in Zones) + { + 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(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(NotificationSenderEmail), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" notificationSenderEmail: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NotificationSenderEmail)) + { + builder.Append(" notificationSenderEmail: "); + if (NotificationSenderEmail.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NotificationSenderEmail}'''"); + } + else + { + builder.AppendLine($"'{NotificationSenderEmail}'"); + } + } + } + + 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}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TargetProvisioningState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" targetProvisioningState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TargetProvisioningState)) + { + builder.Append(" targetProvisioningState: "); + if (TargetProvisioningState.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{TargetProvisioningState}'''"); + } + else + { + builder.AppendLine($"'{TargetProvisioningState}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CreatedAtUtc), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" createdAtUtc: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CreatedAtUtc)) + { + builder.Append(" createdAtUtc: "); + var formattedDateTimeString = TypeFormatters.ToString(CreatedAtUtc.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(GatewayUri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" gatewayUrl: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(GatewayUri)) + { + builder.Append(" gatewayUrl: "); + builder.AppendLine($"'{GatewayUri.AbsoluteUri}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(GatewayRegionalUri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" gatewayRegionalUrl: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(GatewayRegionalUri)) + { + builder.Append(" gatewayRegionalUrl: "); + builder.AppendLine($"'{GatewayRegionalUri.AbsoluteUri}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PortalUri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" portalUrl: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PortalUri)) + { + builder.Append(" portalUrl: "); + builder.AppendLine($"'{PortalUri.AbsoluteUri}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ManagementApiUri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" managementApiUrl: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ManagementApiUri)) + { + builder.Append(" managementApiUrl: "); + builder.AppendLine($"'{ManagementApiUri.AbsoluteUri}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ScmUri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" scmUrl: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ScmUri)) + { + builder.Append(" scmUrl: "); + builder.AppendLine($"'{ScmUri.AbsoluteUri}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DeveloperPortalUri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" developerPortalUrl: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DeveloperPortalUri)) + { + builder.Append(" developerPortalUrl: "); + builder.AppendLine($"'{DeveloperPortalUri.AbsoluteUri}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(HostnameConfigurations), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" hostnameConfigurations: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(HostnameConfigurations)) + { + if (HostnameConfigurations.Any()) + { + builder.Append(" hostnameConfigurations: "); + builder.AppendLine("["); + foreach (var item in HostnameConfigurations) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " hostnameConfigurations: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PublicIPAddresses), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" publicIPAddresses: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(PublicIPAddresses)) + { + if (PublicIPAddresses.Any()) + { + builder.Append(" publicIPAddresses: "); + builder.AppendLine("["); + foreach (var item in PublicIPAddresses) + { + if (item == null) + { + builder.Append("null"); + continue; + } + builder.AppendLine($" '{item.ToString()}'"); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PrivateIPAddresses), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" privateIPAddresses: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(PrivateIPAddresses)) + { + if (PrivateIPAddresses.Any()) + { + builder.Append(" privateIPAddresses: "); + builder.AppendLine("["); + foreach (var item in PrivateIPAddresses) + { + if (item == null) + { + builder.Append("null"); + continue; + } + builder.AppendLine($" '{item.ToString()}'"); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PublicIPAddressId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" publicIpAddressId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PublicIPAddressId)) + { + builder.Append(" publicIpAddressId: "); + builder.AppendLine($"'{PublicIPAddressId.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: "); + builder.AppendLine($"'{PublicNetworkAccess.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(VirtualNetworkConfiguration), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" virtualNetworkConfiguration: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(VirtualNetworkConfiguration)) + { + builder.Append(" virtualNetworkConfiguration: "); + BicepSerializationHelpers.AppendChildObject(builder, VirtualNetworkConfiguration, options, 4, false, " virtualNetworkConfiguration: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AdditionalLocations), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" additionalLocations: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(AdditionalLocations)) + { + if (AdditionalLocations.Any()) + { + builder.Append(" additionalLocations: "); + builder.AppendLine("["); + foreach (var item in AdditionalLocations) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " additionalLocations: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CustomProperties), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" customProperties: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(CustomProperties)) + { + if (CustomProperties.Any()) + { + builder.Append(" customProperties: "); + builder.AppendLine("{"); + foreach (var item in CustomProperties) + { + 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(Certificates), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" certificates: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Certificates)) + { + if (Certificates.Any()) + { + builder.Append(" certificates: "); + builder.AppendLine("["); + foreach (var item in Certificates) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " certificates: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EnableClientCertificate), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" enableClientCertificate: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(EnableClientCertificate)) + { + builder.Append(" enableClientCertificate: "); + var boolValue = EnableClientCertificate.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NatGatewayState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" natGatewayState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NatGatewayState)) + { + builder.Append(" natGatewayState: "); + builder.AppendLine($"'{NatGatewayState.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(OutboundPublicIPAddresses), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" outboundPublicIPAddresses: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(OutboundPublicIPAddresses)) + { + if (OutboundPublicIPAddresses.Any()) + { + builder.Append(" outboundPublicIPAddresses: "); + builder.AppendLine("["); + foreach (var item in OutboundPublicIPAddresses) + { + 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(DisableGateway), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" disableGateway: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DisableGateway)) + { + builder.Append(" disableGateway: "); + var boolValue = DisableGateway.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(VirtualNetworkType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" virtualNetworkType: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(VirtualNetworkType)) + { + builder.Append(" virtualNetworkType: "); + builder.AppendLine($"'{VirtualNetworkType.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("MinApiVersion", out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiVersionConstraint: "); + builder.AppendLine("{"); + builder.AppendLine(" apiVersionConstraint: {"); + builder.Append(" minApiVersion: "); + builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); + builder.AppendLine(" }"); + } + else + { + if (Optional.IsDefined(ApiVersionConstraint)) + { + builder.Append(" apiVersionConstraint: "); + BicepSerializationHelpers.AppendChildObject(builder, ApiVersionConstraint, options, 4, false, " apiVersionConstraint: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Restore), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" restore: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Restore)) + { + builder.Append(" restore: "); + var boolValue = Restore.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PrivateEndpointConnections), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" privateEndpointConnections: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(PrivateEndpointConnections)) + { + if (PrivateEndpointConnections.Any()) + { + builder.Append(" privateEndpointConnections: "); + builder.AppendLine("["); + foreach (var item in PrivateEndpointConnections) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " privateEndpointConnections: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PlatformVersion), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" platformVersion: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PlatformVersion)) + { + builder.Append(" platformVersion: "); + builder.AppendLine($"'{PlatformVersion.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PublisherEmail), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" publisherEmail: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PublisherEmail)) + { + builder.Append(" publisherEmail: "); + if (PublisherEmail.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{PublisherEmail}'''"); + } + else + { + builder.AppendLine($"'{PublisherEmail}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PublisherName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" publisherName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PublisherName)) + { + builder.Append(" publisherName: "); + if (PublisherName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{PublisherName}'''"); + } + else + { + builder.AppendLine($"'{PublisherName}'"); + } + } + } + + 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; @@ -779,6 +1612,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterO { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementServicePatch)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServicePatch.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServicePatch.cs index 41bc969b6f6b5..3de4738e68ada 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServicePatch.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServicePatch.cs @@ -58,6 +58,7 @@ public ApiManagementServicePatch() AdditionalLocations = new ChangeTrackingList(); CustomProperties = new ChangeTrackingDictionary(); Certificates = new ChangeTrackingList(); + OutboundPublicIPAddresses = new ChangeTrackingList(); PrivateEndpointConnections = new ChangeTrackingList(); Tags = new ChangeTrackingDictionary(); } @@ -88,9 +89,11 @@ public ApiManagementServicePatch() /// Whether or not public endpoint access is allowed for this API Management service. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'. /// Virtual network configuration of the API Management service. /// Additional datacenter locations of the API Management service. - /// Custom properties of the API Management service.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2).</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` can be used to disable just TLS 1.1.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` can be used to disable TLS 1.0 on an API Management service.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11` can be used to disable just TLS 1.1 for communications with backends.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10` can be used to disable TLS 1.0 for communications with backends.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2` can be used to enable HTTP2 protocol on an API Management service.</br>Not specifying any of these properties on PATCH operation will reset omitted properties' values to their defaults. For all the settings except Http2 the default value is `True` if the service was created on or before April 1st 2018 and `False` otherwise. Http2 setting's default value is `False`.</br></br>You can disable any of next ciphers by using settings `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]`: TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. For example, `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:`false`. The default value is `true` for them. Note: next ciphers can't be disabled since they are required by Azure CloudService internal components: TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_RSA_WITH_AES_256_GCM_SHA384. + /// Custom properties of the API Management service.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2).</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` can be used to disable just TLS 1.1.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` can be used to disable TLS 1.0 on an API Management service.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11` can be used to disable just TLS 1.1 for communications with backends.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10` can be used to disable TLS 1.0 for communications with backends.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2` can be used to enable HTTP2 protocol on an API Management service.</br>Not specifying any of these properties on PATCH operation will reset omitted properties' values to their defaults. For all the settings except Http2 the default value is `True` if the service was created on or before April 1, 2018 and `False` otherwise. Http2 setting's default value is `False`.</br></br>You can disable any of the following ciphers by using settings `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]`: TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. For example, `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:`false`. The default value is `true` for them.</br> Note: The following ciphers can't be disabled since they are required by internal platform components: TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256. /// List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10. /// Property only meant to be used for Consumption SKU Service. This enforces a client certificate to be presented on each request to the gateway. This also enables the ability to authenticate the certificate in the policy on the gateway. + /// Property can be used to enable NAT Gateway for this API Management service. + /// Outbound public IPV4 address prefixes associated with NAT Gateway deployed service. Available only for Premium SKU on stv2 platform. /// Property only valid for an Api Management service deployed in multiple locations. This can be used to disable the gateway in master region. /// The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only. /// Control Plane Apis version constraint for the API Management service. @@ -101,7 +104,7 @@ public ApiManagementServicePatch() /// Publisher name. /// Resource tags. /// Keeps track of any properties unknown to the library. - internal ApiManagementServicePatch(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ApiManagementServiceSkuProperties sku, ManagedServiceIdentity identity, ETag? etag, IList zones, string notificationSenderEmail, string provisioningState, string targetProvisioningState, DateTimeOffset? createdAtUtc, Uri gatewayUri, Uri gatewayRegionalUri, Uri portalUri, Uri managementApiUri, Uri scmUri, Uri developerPortalUri, IList hostnameConfigurations, IReadOnlyList publicIPAddresses, IReadOnlyList privateIPAddresses, ResourceIdentifier publicIPAddressId, PublicNetworkAccess? publicNetworkAccess, VirtualNetworkConfiguration virtualNetworkConfiguration, IList additionalLocations, IDictionary customProperties, IList certificates, bool? enableClientCertificate, bool? disableGateway, VirtualNetworkType? virtualNetworkType, ApiVersionConstraint apiVersionConstraint, bool? restore, IList privateEndpointConnections, PlatformVersion? platformVersion, string publisherEmail, string publisherName, IDictionary tags, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal ApiManagementServicePatch(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ApiManagementServiceSkuProperties sku, ManagedServiceIdentity identity, ETag? etag, IList zones, string notificationSenderEmail, string provisioningState, string targetProvisioningState, DateTimeOffset? createdAtUtc, Uri gatewayUri, Uri gatewayRegionalUri, Uri portalUri, Uri managementApiUri, Uri scmUri, Uri developerPortalUri, IList hostnameConfigurations, IReadOnlyList publicIPAddresses, IReadOnlyList privateIPAddresses, ResourceIdentifier publicIPAddressId, PublicNetworkAccess? publicNetworkAccess, VirtualNetworkConfiguration virtualNetworkConfiguration, IList additionalLocations, IDictionary customProperties, IList certificates, bool? enableClientCertificate, ApiManagementNatGatewayState? natGatewayState, IReadOnlyList outboundPublicIPAddresses, bool? disableGateway, VirtualNetworkType? virtualNetworkType, ApiVersionConstraint apiVersionConstraint, bool? restore, IList privateEndpointConnections, PlatformVersion? platformVersion, string publisherEmail, string publisherName, IDictionary tags, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { Sku = sku; Identity = identity; @@ -127,6 +130,8 @@ internal ApiManagementServicePatch(ResourceIdentifier id, string name, ResourceT CustomProperties = customProperties; Certificates = certificates; EnableClientCertificate = enableClientCertificate; + NatGatewayState = natGatewayState; + OutboundPublicIPAddresses = outboundPublicIPAddresses; DisableGateway = disableGateway; VirtualNetworkType = virtualNetworkType; ApiVersionConstraint = apiVersionConstraint; @@ -140,60 +145,93 @@ internal ApiManagementServicePatch(ResourceIdentifier id, string name, ResourceT } /// SKU properties of the API Management service. + [WirePath("sku")] public ApiManagementServiceSkuProperties Sku { get; set; } /// Managed service identity of the Api Management service. + [WirePath("identity")] public ManagedServiceIdentity Identity { get; set; } /// ETag of the resource. + [WirePath("etag")] public ETag? ETag { get; } /// A list of availability zones denoting where the resource needs to come from. + [WirePath("zones")] public IList Zones { get; } /// Email address from which the notification will be sent. + [WirePath("properties.notificationSenderEmail")] public string NotificationSenderEmail { get; set; } /// The current provisioning state of the API Management service which can be one of the following: Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. + [WirePath("properties.provisioningState")] public string ProvisioningState { get; } /// The provisioning state of the API Management service, which is targeted by the long running operation started on the service. + [WirePath("properties.targetProvisioningState")] public string TargetProvisioningState { get; } /// Creation UTC date of the API Management service.The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + [WirePath("properties.createdAtUtc")] public DateTimeOffset? CreatedAtUtc { get; } /// Gateway URL of the API Management service. + [WirePath("properties.gatewayUrl")] public Uri GatewayUri { get; } /// Gateway URL of the API Management service in the Default Region. + [WirePath("properties.gatewayRegionalUrl")] public Uri GatewayRegionalUri { get; } /// Publisher portal endpoint Url of the API Management service. + [WirePath("properties.portalUrl")] public Uri PortalUri { get; } /// Management API endpoint URL of the API Management service. + [WirePath("properties.managementApiUrl")] public Uri ManagementApiUri { get; } /// SCM endpoint URL of the API Management service. + [WirePath("properties.scmUrl")] public Uri ScmUri { get; } /// DEveloper Portal endpoint URL of the API Management service. + [WirePath("properties.developerPortalUrl")] public Uri DeveloperPortalUri { get; } /// Custom hostname configuration of the API Management service. + [WirePath("properties.hostnameConfigurations")] public IList HostnameConfigurations { get; } /// Public Static Load Balanced IP addresses of the API Management service in Primary region. Available only for Basic, Standard, Premium and Isolated SKU. + [WirePath("properties.publicIPAddresses")] public IReadOnlyList PublicIPAddresses { get; } /// Private Static Load Balanced IP addresses of the API Management service in Primary region which is deployed in an Internal Virtual Network. Available only for Basic, Standard, Premium and Isolated SKU. + [WirePath("properties.privateIPAddresses")] public IReadOnlyList PrivateIPAddresses { get; } /// Public Standard SKU IP V4 based IP address to be associated with Virtual Network deployed service in the region. Supported only for Developer and Premium SKU being deployed in Virtual Network. + [WirePath("properties.publicIpAddressId")] public ResourceIdentifier PublicIPAddressId { get; set; } /// Whether or not public endpoint access is allowed for this API Management service. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'. + [WirePath("properties.publicNetworkAccess")] public PublicNetworkAccess? PublicNetworkAccess { get; set; } /// Virtual network configuration of the API Management service. + [WirePath("properties.virtualNetworkConfiguration")] public VirtualNetworkConfiguration VirtualNetworkConfiguration { get; set; } /// Additional datacenter locations of the API Management service. + [WirePath("properties.additionalLocations")] public IList AdditionalLocations { get; } - /// Custom properties of the API Management service.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2).</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` can be used to disable just TLS 1.1.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` can be used to disable TLS 1.0 on an API Management service.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11` can be used to disable just TLS 1.1 for communications with backends.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10` can be used to disable TLS 1.0 for communications with backends.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2` can be used to enable HTTP2 protocol on an API Management service.</br>Not specifying any of these properties on PATCH operation will reset omitted properties' values to their defaults. For all the settings except Http2 the default value is `True` if the service was created on or before April 1st 2018 and `False` otherwise. Http2 setting's default value is `False`.</br></br>You can disable any of next ciphers by using settings `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]`: TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. For example, `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:`false`. The default value is `true` for them. Note: next ciphers can't be disabled since they are required by Azure CloudService internal components: TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_RSA_WITH_AES_256_GCM_SHA384. + /// Custom properties of the API Management service.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2).</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` can be used to disable just TLS 1.1.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` can be used to disable TLS 1.0 on an API Management service.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11` can be used to disable just TLS 1.1 for communications with backends.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10` can be used to disable TLS 1.0 for communications with backends.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2` can be used to enable HTTP2 protocol on an API Management service.</br>Not specifying any of these properties on PATCH operation will reset omitted properties' values to their defaults. For all the settings except Http2 the default value is `True` if the service was created on or before April 1, 2018 and `False` otherwise. Http2 setting's default value is `False`.</br></br>You can disable any of the following ciphers by using settings `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]`: TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. For example, `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:`false`. The default value is `true` for them.</br> Note: The following ciphers can't be disabled since they are required by internal platform components: TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256. + [WirePath("properties.customProperties")] public IDictionary CustomProperties { get; } /// List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10. + [WirePath("properties.certificates")] public IList Certificates { get; } /// Property only meant to be used for Consumption SKU Service. This enforces a client certificate to be presented on each request to the gateway. This also enables the ability to authenticate the certificate in the policy on the gateway. + [WirePath("properties.enableClientCertificate")] public bool? EnableClientCertificate { get; set; } + /// Property can be used to enable NAT Gateway for this API Management service. + [WirePath("properties.natGatewayState")] + public ApiManagementNatGatewayState? NatGatewayState { get; set; } + /// Outbound public IPV4 address prefixes associated with NAT Gateway deployed service. Available only for Premium SKU on stv2 platform. + [WirePath("properties.outboundPublicIPAddresses")] + public IReadOnlyList OutboundPublicIPAddresses { get; } /// Property only valid for an Api Management service deployed in multiple locations. This can be used to disable the gateway in master region. + [WirePath("properties.disableGateway")] public bool? DisableGateway { get; set; } /// The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only. + [WirePath("properties.virtualNetworkType")] public VirtualNetworkType? VirtualNetworkType { get; set; } /// Control Plane Apis version constraint for the API Management service. internal ApiVersionConstraint ApiVersionConstraint { get; set; } /// Limit control plane API calls to API Management service with version equal to or newer than this value. + [WirePath("properties.apiVersionConstraint.minApiVersion")] public string MinApiVersion { get => ApiVersionConstraint is null ? default : ApiVersionConstraint.MinApiVersion; @@ -206,16 +244,22 @@ public string MinApiVersion } /// Undelete Api Management Service if it was previously soft-deleted. If this flag is specified and set to True all other properties will be ignored. + [WirePath("properties.restore")] public bool? Restore { get; set; } /// List of Private Endpoint Connections of this service. + [WirePath("properties.privateEndpointConnections")] public IList PrivateEndpointConnections { get; } /// Compute Platform Version running the service in this location. + [WirePath("properties.platformVersion")] public PlatformVersion? PlatformVersion { get; } /// Publisher email. + [WirePath("properties.publisherEmail")] public string PublisherEmail { get; set; } /// Publisher name. + [WirePath("properties.publisherName")] public string PublisherName { get; set; } /// Resource tags. + [WirePath("tags")] public IDictionary Tags { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceSkuProperties.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceSkuProperties.Serialization.cs index edd30cdfd6efa..1ff49d620e0eb 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceSkuProperties.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceSkuProperties.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -93,6 +94,45 @@ internal static ApiManagementServiceSkuProperties DeserializeApiManagementServic return new ApiManagementServiceSkuProperties(name, capacity, 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(Capacity), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" capacity: "); + builder.AppendLine(propertyOverride); + } + else + { + builder.Append(" capacity: "); + builder.AppendLine($"{Capacity}"); + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -101,6 +141,8 @@ BinaryData IPersistableModel.Write(ModelReade { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementServiceSkuProperties)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceSkuProperties.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceSkuProperties.cs index 35dba6e0eb103..b3950fe0f239c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceSkuProperties.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceSkuProperties.cs @@ -71,8 +71,10 @@ internal ApiManagementServiceSkuProperties() } /// Name of the Sku. + [WirePath("name")] public ApiManagementServiceSkuType Name { get; set; } /// Capacity of the SKU (number of deployed units of the SKU). For Consumption SKU capacity must be specified as 0. + [WirePath("capacity")] public int Capacity { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSku.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSku.Serialization.cs index 04d44fa42e908..35e99913cb2a6 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSku.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSku.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -322,6 +324,325 @@ internal static ApiManagementSku DeserializeApiManagementSku(JsonElement element 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(ResourceType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" resourceType: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ResourceType)) + { + builder.Append(" resourceType: "); + if (ResourceType.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ResourceType}'''"); + } + else + { + builder.AppendLine($"'{ResourceType}'"); + } + } + } + + 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(Tier), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" tier: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Tier)) + { + builder.Append(" tier: "); + if (Tier.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Tier}'''"); + } + else + { + builder.AppendLine($"'{Tier}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Size), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" size: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Size)) + { + builder.Append(" size: "); + if (Size.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Size}'''"); + } + else + { + builder.AppendLine($"'{Size}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Family), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" family: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Family)) + { + builder.Append(" family: "); + if (Family.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Family}'''"); + } + else + { + builder.AppendLine($"'{Family}'"); + } + } + } + + 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(Capacity), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" capacity: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Capacity)) + { + builder.Append(" capacity: "); + BicepSerializationHelpers.AppendChildObject(builder, Capacity, options, 2, false, " capacity: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Locations), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" locations: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Locations)) + { + if (Locations.Any()) + { + builder.Append(" locations: "); + builder.AppendLine("["); + foreach (var item in Locations) + { + builder.AppendLine($" '{item.ToString()}'"); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(LocationInfo), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" locationInfo: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(LocationInfo)) + { + if (LocationInfo.Any()) + { + builder.Append(" locationInfo: "); + builder.AppendLine("["); + foreach (var item in LocationInfo) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " locationInfo: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiVersions), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiVersions: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(ApiVersions)) + { + if (ApiVersions.Any()) + { + builder.Append(" apiVersions: "); + builder.AppendLine("["); + foreach (var item in ApiVersions) + { + 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(Costs), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" costs: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Costs)) + { + if (Costs.Any()) + { + builder.Append(" costs: "); + builder.AppendLine("["); + foreach (var item in Costs) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " costs: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Capabilities), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" capabilities: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Capabilities)) + { + if (Capabilities.Any()) + { + builder.Append(" capabilities: "); + builder.AppendLine("["); + foreach (var item in Capabilities) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " capabilities: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Restrictions), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" restrictions: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Restrictions)) + { + if (Restrictions.Any()) + { + builder.Append(" restrictions: "); + builder.AppendLine("["); + foreach (var item in Restrictions) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " restrictions: "); + } + 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; @@ -330,6 +651,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions op { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementSku)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSku.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSku.cs index 3f4eeb4a5797b..67ad2222a5a85 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSku.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSku.cs @@ -91,30 +91,43 @@ internal ApiManagementSku(string resourceType, string name, string tier, string } /// The type of resource the SKU applies to. + [WirePath("resourceType")] public string ResourceType { get; } /// The name of SKU. + [WirePath("name")] public string Name { get; } /// Specifies the tier of virtual machines in a scale set.<br /><br /> Possible Values:<br /><br /> **Standard**<br /><br /> **Basic**. + [WirePath("tier")] public string Tier { get; } /// The Size of the SKU. + [WirePath("size")] public string Size { get; } /// The Family of this particular SKU. + [WirePath("family")] public string Family { get; } /// The Kind of resources that are supported in this SKU. + [WirePath("kind")] public string Kind { get; } /// Specifies the number of virtual machines in the scale set. + [WirePath("capacity")] public ApiManagementSkuCapacity Capacity { get; } /// The set of locations that the SKU is available. + [WirePath("locations")] public IReadOnlyList Locations { get; } /// A list of locations and availability zones in those locations where the SKU is available. + [WirePath("locationInfo")] public IReadOnlyList LocationInfo { get; } /// The api versions that support this SKU. + [WirePath("apiVersions")] public IReadOnlyList ApiVersions { get; } /// Metadata for retrieving price info. + [WirePath("costs")] public IReadOnlyList Costs { get; } /// A name value pair to describe the capability. + [WirePath("capabilities")] public IReadOnlyList Capabilities { get; } /// The restrictions because of which SKU cannot be used. This is empty if there are no restrictions. + [WirePath("restrictions")] public IReadOnlyList Restrictions { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuCapabilities.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuCapabilities.Serialization.cs index 5b40e9b1e77ed..17a5ab9877baf 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuCapabilities.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuCapabilities.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -99,6 +100,67 @@ internal static ApiManagementSkuCapabilities DeserializeApiManagementSkuCapabili return new ApiManagementSkuCapabilities(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; @@ -107,6 +169,8 @@ BinaryData IPersistableModel.Write(ModelReaderWrit { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementSkuCapabilities)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuCapabilities.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuCapabilities.cs index 23c0faf407c38..de810333ae7cd 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuCapabilities.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuCapabilities.cs @@ -62,8 +62,10 @@ internal ApiManagementSkuCapabilities(string name, string value, IDictionary An invariant to describe the feature. + [WirePath("name")] public string Name { get; } /// An invariant if the feature is measured by quantity. + [WirePath("value")] public string Value { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuCapacity.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuCapacity.Serialization.cs index 75947c05f3782..5a9f3aaab6605 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuCapacity.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuCapacity.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -137,6 +138,81 @@ internal static ApiManagementSkuCapacity DeserializeApiManagementSkuCapacity(Jso return new ApiManagementSkuCapacity(minimum, maximum, @default, scaleType, 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(Minimum), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" minimum: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Minimum)) + { + builder.Append(" minimum: "); + builder.AppendLine($"{Minimum.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Maximum), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" maximum: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Maximum)) + { + builder.Append(" maximum: "); + builder.AppendLine($"{Maximum.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Default), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" default: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Default)) + { + builder.Append(" default: "); + builder.AppendLine($"{Default.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ScaleType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" scaleType: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ScaleType)) + { + builder.Append(" scaleType: "); + builder.AppendLine($"'{ScaleType.Value.ToSerialString()}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -145,6 +221,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOp { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementSkuCapacity)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuCapacity.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuCapacity.cs index 6a1c544ee9f12..16e96e2e967e9 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuCapacity.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuCapacity.cs @@ -66,12 +66,16 @@ internal ApiManagementSkuCapacity(int? minimum, int? maximum, int? @default, Api } /// The minimum capacity. + [WirePath("minimum")] public int? Minimum { get; } /// The maximum capacity that can be set. + [WirePath("maximum")] public int? Maximum { get; } /// The default capacity. + [WirePath("default")] public int? Default { get; } /// The scale type applicable to the sku. + [WirePath("scaleType")] public ApiManagementSkuCapacityScaleType? ScaleType { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuCosts.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuCosts.Serialization.cs index 201a6f5e9c68f..f88c792e3c136 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuCosts.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuCosts.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -114,6 +115,82 @@ internal static ApiManagementSkuCosts DeserializeApiManagementSkuCosts(JsonEleme return new ApiManagementSkuCosts(meterId, quantity, extendedUnit, 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(MeterId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" meterID: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(MeterId)) + { + builder.Append(" meterID: "); + if (MeterId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{MeterId}'''"); + } + else + { + builder.AppendLine($"'{MeterId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Quantity), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" quantity: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Quantity)) + { + builder.Append(" quantity: "); + builder.AppendLine($"'{Quantity.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ExtendedUnit), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" extendedUnit: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ExtendedUnit)) + { + builder.Append(" extendedUnit: "); + if (ExtendedUnit.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ExtendedUnit}'''"); + } + else + { + builder.AppendLine($"'{ExtendedUnit}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -122,6 +199,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptio { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementSkuCosts)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuCosts.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuCosts.cs index 28fd16920408a..0cb7f0c4a698b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuCosts.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuCosts.cs @@ -64,10 +64,13 @@ internal ApiManagementSkuCosts(string meterId, long? quantity, string extendedUn } /// Used for querying price from commerce. + [WirePath("meterID")] public string MeterId { get; } /// The multiplier is needed to extend the base metered cost. + [WirePath("quantity")] public long? Quantity { get; } /// An invariant to show the extended unit. + [WirePath("extendedUnit")] public string ExtendedUnit { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuLocationInfo.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuLocationInfo.Serialization.cs index f01d92cb23713..c9a32029a93f5 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuLocationInfo.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuLocationInfo.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -142,6 +144,95 @@ internal static ApiManagementSkuLocationInfo DeserializeApiManagementSkuLocation return new ApiManagementSkuLocationInfo(location, zones ?? new ChangeTrackingList(), zoneDetails ?? 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(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(Zones), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" zones: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Zones)) + { + if (Zones.Any()) + { + builder.Append(" zones: "); + builder.AppendLine("["); + foreach (var item in Zones) + { + 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(ZoneDetails), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" zoneDetails: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(ZoneDetails)) + { + if (ZoneDetails.Any()) + { + builder.Append(" zoneDetails: "); + builder.AppendLine("["); + foreach (var item in ZoneDetails) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " zoneDetails: "); + } + 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; @@ -150,6 +241,8 @@ BinaryData IPersistableModel.Write(ModelReaderWrit { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementSkuLocationInfo)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuLocationInfo.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuLocationInfo.cs index c720f9b91925b..afba2782a3031 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuLocationInfo.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuLocationInfo.cs @@ -67,10 +67,13 @@ internal ApiManagementSkuLocationInfo(AzureLocation? location, IReadOnlyList Location of the SKU. + [WirePath("location")] public AzureLocation? Location { get; } /// List of availability zones where the SKU is supported. + [WirePath("zones")] public IReadOnlyList Zones { get; } /// Details of capabilities available to a SKU in specific zones. + [WirePath("zoneDetails")] public IReadOnlyList ZoneDetails { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuRestrictionInfo.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuRestrictionInfo.Serialization.cs index 0bdc3ef37d95b..3ee98de08acfe 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuRestrictionInfo.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuRestrictionInfo.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -127,6 +129,80 @@ internal static ApiManagementSkuRestrictionInfo DeserializeApiManagementSkuRestr return new ApiManagementSkuRestrictionInfo(locations ?? new ChangeTrackingList(), zones ?? 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(Locations), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" locations: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Locations)) + { + if (Locations.Any()) + { + builder.Append(" locations: "); + builder.AppendLine("["); + foreach (var item in Locations) + { + builder.AppendLine($" '{item.ToString()}'"); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Zones), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" zones: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Zones)) + { + if (Zones.Any()) + { + builder.Append(" zones: "); + builder.AppendLine("["); + foreach (var item in Zones) + { + 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; @@ -135,6 +211,8 @@ BinaryData IPersistableModel.Write(ModelReaderW { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementSkuRestrictionInfo)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuRestrictionInfo.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuRestrictionInfo.cs index b042e005cc76b..d67df0dd88546 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuRestrictionInfo.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuRestrictionInfo.cs @@ -65,8 +65,10 @@ internal ApiManagementSkuRestrictionInfo(IReadOnlyList locations, } /// Locations where the SKU is restricted. + [WirePath("locations")] public IReadOnlyList Locations { get; } /// List of availability zones where the SKU is restricted. + [WirePath("zones")] public IReadOnlyList Zones { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuRestrictions.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuRestrictions.Serialization.cs index a164574d40fb5..5dd7d8ee0f713 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuRestrictions.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuRestrictions.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -147,6 +149,102 @@ internal static ApiManagementSkuRestrictions DeserializeApiManagementSkuRestrict return new ApiManagementSkuRestrictions(type, values ?? new ChangeTrackingList(), restrictionInfo, reasonCode, 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(RestrictionsType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" type: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(RestrictionsType)) + { + builder.Append(" type: "); + builder.AppendLine($"'{RestrictionsType.Value.ToSerialString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Values), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" values: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Values)) + { + if (Values.Any()) + { + builder.Append(" values: "); + builder.AppendLine("["); + foreach (var item in Values) + { + 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(RestrictionInfo), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" restrictionInfo: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(RestrictionInfo)) + { + builder.Append(" restrictionInfo: "); + BicepSerializationHelpers.AppendChildObject(builder, RestrictionInfo, options, 2, false, " restrictionInfo: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ReasonCode), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" reasonCode: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ReasonCode)) + { + builder.Append(" reasonCode: "); + builder.AppendLine($"'{ReasonCode.Value.ToSerialString()}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -155,6 +253,8 @@ BinaryData IPersistableModel.Write(ModelReaderWrit { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementSkuRestrictions)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuRestrictions.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuRestrictions.cs index b770e8f158407..cd88ce4c98f53 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuRestrictions.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuRestrictions.cs @@ -67,12 +67,16 @@ internal ApiManagementSkuRestrictions(ApiManagementSkuRestrictionsType? restrict } /// The type of restrictions. + [WirePath("type")] public ApiManagementSkuRestrictionsType? RestrictionsType { get; } /// The value of restrictions. If the restriction type is set to location. This would be different locations where the SKU is restricted. + [WirePath("values")] public IReadOnlyList Values { get; } /// The information about the restriction where the SKU cannot be used. + [WirePath("restrictionInfo")] public ApiManagementSkuRestrictionInfo RestrictionInfo { get; } /// The reason for restriction. + [WirePath("reasonCode")] public ApiManagementSkuRestrictionsReasonCode? ReasonCode { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuZoneDetails.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuZoneDetails.Serialization.cs index 970c6f889703a..43263789f6e3f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuZoneDetails.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuZoneDetails.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -127,6 +129,80 @@ internal static ApiManagementSkuZoneDetails DeserializeApiManagementSkuZoneDetai return new ApiManagementSkuZoneDetails(name ?? new ChangeTrackingList(), capabilities ?? 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.IsCollectionDefined(Name)) + { + if (Name.Any()) + { + builder.Append(" name: "); + builder.AppendLine("["); + foreach (var item in Name) + { + 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(Capabilities), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" capabilities: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Capabilities)) + { + if (Capabilities.Any()) + { + builder.Append(" capabilities: "); + builder.AppendLine("["); + foreach (var item in Capabilities) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " capabilities: "); + } + 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; @@ -135,6 +211,8 @@ BinaryData IPersistableModel.Write(ModelReaderWrite { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementSkuZoneDetails)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuZoneDetails.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuZoneDetails.cs index b5de642b8c115..c8009a03e54fc 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuZoneDetails.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuZoneDetails.cs @@ -64,8 +64,10 @@ internal ApiManagementSkuZoneDetails(IReadOnlyList name, IReadOnlyList The set of zones that the SKU is available in with the specified capabilities. + [WirePath("name")] public IReadOnlyList Name { get; } /// A list of capabilities that are available for the SKU in the specified list of zones. + [WirePath("capabilities")] public IReadOnlyList Capabilities { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkusResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkusResult.Serialization.cs index 0cc07d4438920..e146b48f5a001 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkusResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkusResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -106,6 +108,67 @@ internal static ApiManagementSkusResult DeserializeApiManagementSkusResult(JsonE return new ApiManagementSkusResult(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; @@ -114,6 +177,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOpt { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementSkusResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSubscriptionCreateOrUpdateContent.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSubscriptionCreateOrUpdateContent.cs index e3655b96b8b38..1fd160cfaa29c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSubscriptionCreateOrUpdateContent.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSubscriptionCreateOrUpdateContent.cs @@ -72,18 +72,25 @@ internal ApiManagementSubscriptionCreateOrUpdateContent(string ownerId, string s } /// User (user id path) for whom subscription is being created in form /users/{userId}. + [WirePath("properties.ownerId")] public string OwnerId { get; set; } /// Scope like /products/{productId} or /apis or /apis/{apiId}. + [WirePath("properties.scope")] public string Scope { get; set; } /// Subscription name. + [WirePath("properties.displayName")] public string DisplayName { get; set; } /// Primary subscription key. If not specified during request key will be generated automatically. + [WirePath("properties.primaryKey")] public string PrimaryKey { get; set; } /// Secondary subscription key. If not specified during request key will be generated automatically. + [WirePath("properties.secondaryKey")] public string SecondaryKey { get; set; } /// Initial subscription state. If no value is specified, subscription is created with Submitted state. Possible states are * active – the subscription is active, * suspended – the subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted – the subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription request has been denied by an administrator, * cancelled – the subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration date and was deactivated. + [WirePath("properties.state")] public SubscriptionState? State { get; set; } /// Determines whether tracing can be enabled. + [WirePath("properties.allowTracing")] public bool? AllowTracing { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSubscriptionPatch.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSubscriptionPatch.cs index 5f7daffa0ff1c..e160d102f58cc 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSubscriptionPatch.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSubscriptionPatch.cs @@ -76,22 +76,31 @@ internal ApiManagementSubscriptionPatch(string ownerId, string scope, DateTimeOf } /// User identifier path: /users/{userId}. + [WirePath("properties.ownerId")] public string OwnerId { get; set; } /// Scope like /products/{productId} or /apis or /apis/{apiId}. + [WirePath("properties.scope")] public string Scope { get; set; } /// Subscription expiration date. The setting is for audit purposes only and the subscription is not automatically expired. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + [WirePath("properties.expirationDate")] public DateTimeOffset? ExpireOn { get; set; } /// Subscription name. + [WirePath("properties.displayName")] public string DisplayName { get; set; } /// Primary subscription key. + [WirePath("properties.primaryKey")] public string PrimaryKey { get; set; } /// Secondary subscription key. + [WirePath("properties.secondaryKey")] public string SecondaryKey { get; set; } /// Subscription state. Possible states are * active – the subscription is active, * suspended – the subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted – the subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription request has been denied by an administrator, * cancelled – the subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration date and was deactivated. + [WirePath("properties.state")] public SubscriptionState? State { get; set; } /// Comments describing subscription state change by the administrator when the state is changed to the 'rejected'. + [WirePath("properties.stateComment")] public string StateComment { get; set; } /// Determines whether tracing can be enabled. + [WirePath("properties.allowTracing")] public bool? AllowTracing { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementTagCreateOrUpdateContent.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementTagCreateOrUpdateContent.cs index bc02359295b71..75a5d1eb91870 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementTagCreateOrUpdateContent.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementTagCreateOrUpdateContent.cs @@ -60,6 +60,7 @@ internal ApiManagementTagCreateOrUpdateContent(string displayName, IDictionary Tag name. + [WirePath("properties.displayName")] public string DisplayName { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementUserCreateOrUpdateContent.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementUserCreateOrUpdateContent.cs index 50cce59aa3152..df26483d76607 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementUserCreateOrUpdateContent.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementUserCreateOrUpdateContent.cs @@ -77,22 +77,31 @@ internal ApiManagementUserCreateOrUpdateContent(ApiManagementUserState? state, s } /// Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal or call any APIs of subscribed products. Default state is Active. + [WirePath("properties.state")] public ApiManagementUserState? State { get; set; } /// Optional note about a user set by the administrator. + [WirePath("properties.note")] public string Note { get; set; } /// Collection of user identities. + [WirePath("properties.identities")] public IList Identities { get; } /// Email address. Must not be empty and must be unique within the service instance. + [WirePath("properties.email")] public string Email { get; set; } /// First name. + [WirePath("properties.firstName")] public string FirstName { get; set; } /// Last name. + [WirePath("properties.lastName")] public string LastName { get; set; } /// User Password. If no value is provided, a default password is generated. + [WirePath("properties.password")] public string Password { get; set; } /// Determines the type of application which send the create user request. Default is legacy portal. + [WirePath("properties.appType")] public AppType? AppType { get; set; } /// Determines the type of confirmation e-mail that will be sent to the newly created user. + [WirePath("properties.confirmation")] public ConfirmationEmailType? Confirmation { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementUserPatch.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementUserPatch.cs index 5b034be9596d1..023b0198b664b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementUserPatch.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementUserPatch.cs @@ -73,18 +73,25 @@ internal ApiManagementUserPatch(ApiManagementUserState? state, string note, ILis } /// Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal or call any APIs of subscribed products. Default state is Active. + [WirePath("properties.state")] public ApiManagementUserState? State { get; set; } /// Optional note about a user set by the administrator. + [WirePath("properties.note")] public string Note { get; set; } /// Collection of user identities. + [WirePath("properties.identities")] public IList Identities { get; } /// Email address. Must not be empty and must be unique within the service instance. + [WirePath("properties.email")] public string Email { get; set; } /// User Password. + [WirePath("properties.password")] public string Password { get; set; } /// First name. + [WirePath("properties.firstName")] public string FirstName { get; set; } /// Last name. + [WirePath("properties.lastName")] public string LastName { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiOperationPatch.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiOperationPatch.cs index a2be40d52a94d..098185fd0d90d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiOperationPatch.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiOperationPatch.cs @@ -76,20 +76,28 @@ internal ApiOperationPatch(IList templateParameters, string d } /// Collection of URL template parameters. + [WirePath("properties.templateParameters")] public IList TemplateParameters { get; } /// Description of the operation. May include HTML formatting tags. + [WirePath("properties.description")] public string Description { get; set; } /// An entity containing request details. + [WirePath("properties.request")] public RequestContract Request { get; set; } /// Array of Operation responses. + [WirePath("properties.responses")] public IList Responses { get; } /// Operation Policies. + [WirePath("properties.policies")] public string Policies { get; set; } /// Operation Name. + [WirePath("properties.displayName")] public string DisplayName { get; set; } /// A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only them. + [WirePath("properties.method")] public string Method { get; set; } /// Relative URL template identifying the target resource for this operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date}. + [WirePath("properties.urlTemplate")] public string UriTemplate { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiPatch.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiPatch.cs index d2cf6e203ca70..4acb5551f3156 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiPatch.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiPatch.cs @@ -98,42 +98,61 @@ internal ApiPatch(string description, AuthenticationSettingsContract authenticat } /// Description of the API. May include HTML formatting tags. + [WirePath("properties.description")] public string Description { get; set; } /// Collection of authentication settings included into this API. + [WirePath("properties.authenticationSettings")] public AuthenticationSettingsContract AuthenticationSettings { get; set; } /// Protocols over which API is made available. + [WirePath("properties.subscriptionKeyParameterNames")] public SubscriptionKeyParameterNamesContract SubscriptionKeyParameterNames { get; set; } /// Type of API. + [WirePath("properties.type")] public ApiType? ApiType { get; set; } /// Describes the revision of the API. If no value is provided, default revision 1 is created. + [WirePath("properties.apiRevision")] public string ApiRevision { get; set; } /// Indicates the version identifier of the API if the API is versioned. + [WirePath("properties.apiVersion")] public string ApiVersion { get; set; } /// Indicates if API revision is current api revision. + [WirePath("properties.isCurrent")] public bool? IsCurrent { get; set; } /// Indicates if API revision is accessible via the gateway. + [WirePath("properties.isOnline")] public bool? IsOnline { get; } /// Description of the API Revision. + [WirePath("properties.apiRevisionDescription")] public string ApiRevisionDescription { get; set; } /// Description of the API Version. + [WirePath("properties.apiVersionDescription")] public string ApiVersionDescription { get; set; } /// A resource identifier for the related ApiVersionSet. + [WirePath("properties.apiVersionSetId")] public ResourceIdentifier ApiVersionSetId { get; set; } /// Specifies whether an API or Product subscription is required for accessing the API. + [WirePath("properties.subscriptionRequired")] public bool? IsSubscriptionRequired { get; set; } /// A URL to the Terms of Service for the API. MUST be in the format of a URL. + [WirePath("properties.termsOfServiceUrl")] public string TermsOfServiceLink { get; set; } /// Contact information for the API. + [WirePath("properties.contact")] public ApiContactInformation Contact { get; set; } /// License information for the API. + [WirePath("properties.license")] public ApiLicenseInformation License { get; set; } /// API name. + [WirePath("properties.displayName")] public string DisplayName { get; set; } /// Absolute URL of the backend service implementing this API. + [WirePath("properties.serviceUrl")] public string ServiceLink { get; set; } /// Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API. + [WirePath("properties.path")] public string Path { get; set; } /// Describes on which protocols the operations in this API can be invoked. + [WirePath("properties.protocols")] public IList Protocols { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiReleaseListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiReleaseListResult.Serialization.cs index 18c85a0844d4b..0089b771dd219 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiReleaseListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiReleaseListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static ApiReleaseListResult DeserializeApiReleaseListResult(JsonElement return new ApiReleaseListResult(value ?? new ChangeTrackingList(), count, 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(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + 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; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOption { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiReleaseListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiRevisionContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiRevisionContract.Serialization.cs index 51bc9c8d13e4c..75073ee1431c9 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiRevisionContract.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiRevisionContract.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -190,6 +191,177 @@ internal static ApiRevisionContract DeserializeApiRevisionContract(JsonElement e 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(ApiId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiId)) + { + builder.Append(" apiId: "); + if (ApiId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ApiId}'''"); + } + else + { + builder.AppendLine($"'{ApiId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiRevision), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiRevision: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiRevision)) + { + builder.Append(" apiRevision: "); + if (ApiRevision.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ApiRevision}'''"); + } + else + { + builder.AppendLine($"'{ApiRevision}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CreatedOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" createdDateTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CreatedOn)) + { + builder.Append(" createdDateTime: "); + var formattedDateTimeString = TypeFormatters.ToString(CreatedOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(UpdatedOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" updatedDateTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(UpdatedOn)) + { + builder.Append(" updatedDateTime: "); + var formattedDateTimeString = TypeFormatters.ToString(UpdatedOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + 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}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PrivateUriString), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" privateUrl: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PrivateUriString)) + { + builder.Append(" privateUrl: "); + if (PrivateUriString.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{PrivateUriString}'''"); + } + else + { + builder.AppendLine($"'{PrivateUriString}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsOnline), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" isOnline: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsOnline)) + { + builder.Append(" isOnline: "); + var boolValue = IsOnline.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsCurrent), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" isCurrent: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsCurrent)) + { + builder.Append(" isCurrent: "); + var boolValue = IsCurrent.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; @@ -198,6 +370,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiRevisionContract)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiRevisionContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiRevisionContract.cs index 4dd6abbd5e28b..e3a7700c944ce 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiRevisionContract.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiRevisionContract.cs @@ -74,20 +74,28 @@ internal ApiRevisionContract(string apiId, string apiRevision, DateTimeOffset? c } /// Identifier of the API Revision. + [WirePath("apiId")] public string ApiId { get; } /// Revision number of API. + [WirePath("apiRevision")] public string ApiRevision { get; } /// The time the API Revision was created. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. + [WirePath("createdDateTime")] public DateTimeOffset? CreatedOn { get; } /// The time the API Revision were updated. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. + [WirePath("updatedDateTime")] public DateTimeOffset? UpdatedOn { get; } /// Description of the API Revision. + [WirePath("description")] public string Description { get; } /// Gateway URL for accessing the non-current API Revision. + [WirePath("privateUrl")] public string PrivateUriString { get; } /// Indicates if API revision is the current api revision. + [WirePath("isOnline")] public bool? IsOnline { get; } /// Indicates if API revision is accessible via the gateway. + [WirePath("isCurrent")] public bool? IsCurrent { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiRevisionListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiRevisionListResult.Serialization.cs index c679d045ce5a5..7a9d4f22f0a08 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiRevisionListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiRevisionListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static ApiRevisionListResult DeserializeApiRevisionListResult(JsonEleme return new ApiRevisionListResult(value ?? new ChangeTrackingList(), count, 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(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + 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; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptio { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiRevisionListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiSchemaType.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiSchemaType.cs index 7aadb858da33c..51bebe11b4114 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiSchemaType.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiSchemaType.cs @@ -25,7 +25,7 @@ public ApiSchemaType(string value) private const string XmlValue = "xml"; private const string JsonValue = "json"; - /// Xml schema type. + /// XML schema type. public static ApiSchemaType Xml { get; } = new ApiSchemaType(XmlValue); /// Json schema type. public static ApiSchemaType Json { get; } = new ApiSchemaType(JsonValue); diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiTagDescriptionCreateOrUpdateContent.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiTagDescriptionCreateOrUpdateContent.cs index 6fb7427d206f9..ee4bd1a7f34d2 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiTagDescriptionCreateOrUpdateContent.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiTagDescriptionCreateOrUpdateContent.cs @@ -64,10 +64,13 @@ internal ApiTagDescriptionCreateOrUpdateContent(string description, Uri external } /// Description of the Tag. + [WirePath("properties.description")] public string Description { get; set; } /// Absolute URL of external resources describing the tag. + [WirePath("properties.externalDocsUrl")] public Uri ExternalDocsUri { get; set; } /// Description of the external resources describing the tag. + [WirePath("properties.externalDocsDescription")] public string ExternalDocsDescription { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiVersionConstraint.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiVersionConstraint.Serialization.cs index 9072fc11d726f..f970cd23e467d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiVersionConstraint.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiVersionConstraint.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -88,6 +89,44 @@ internal static ApiVersionConstraint DeserializeApiVersionConstraint(JsonElement return new ApiVersionConstraint(minApiVersion, 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(MinApiVersion), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" minApiVersion: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(MinApiVersion)) + { + builder.Append(" minApiVersion: "); + if (MinApiVersion.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{MinApiVersion}'''"); + } + else + { + builder.AppendLine($"'{MinApiVersion}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -96,6 +135,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOption { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiVersionConstraint)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiVersionConstraint.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiVersionConstraint.cs index 178f256476457..0ba9ef23db6c6 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiVersionConstraint.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiVersionConstraint.cs @@ -60,6 +60,7 @@ internal ApiVersionConstraint(string minApiVersion, IDictionary Limit control plane API calls to API Management service with version equal to or newer than this value. + [WirePath("minApiVersion")] public string MinApiVersion { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiVersionSetContractDetails.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiVersionSetContractDetails.Serialization.cs index 3645c75f839c0..b099ab7f577d3 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiVersionSetContractDetails.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiVersionSetContractDetails.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -154,6 +155,151 @@ internal static ApiVersionSetContractDetails DeserializeApiVersionSetContractDet 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(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + if (Id.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Id}'''"); + } + else + { + builder.AppendLine($"'{Id}'"); + } + } + } + + 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(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}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(VersioningScheme), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" versioningScheme: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(VersioningScheme)) + { + builder.Append(" versioningScheme: "); + builder.AppendLine($"'{VersioningScheme.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(VersionQueryName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" versionQueryName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(VersionQueryName)) + { + builder.Append(" versionQueryName: "); + if (VersionQueryName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{VersionQueryName}'''"); + } + else + { + builder.AppendLine($"'{VersionQueryName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(VersionHeaderName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" versionHeaderName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(VersionHeaderName)) + { + builder.Append(" versionHeaderName: "); + if (VersionHeaderName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{VersionHeaderName}'''"); + } + else + { + builder.AppendLine($"'{VersionHeaderName}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -162,6 +308,8 @@ BinaryData IPersistableModel.Write(ModelReaderWrit { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiVersionSetContractDetails)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiVersionSetContractDetails.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiVersionSetContractDetails.cs index 215bf3d8bf32f..a5cab24b3295c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiVersionSetContractDetails.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiVersionSetContractDetails.cs @@ -70,16 +70,22 @@ internal ApiVersionSetContractDetails(string id, string name, string description } /// Identifier for existing API Version Set. Omit this value to create a new Version Set. + [WirePath("id")] public string Id { get; set; } /// The display Name of the API Version Set. + [WirePath("name")] public string Name { get; set; } /// Description of API Version Set. + [WirePath("description")] public string Description { get; set; } /// An value that determines where the API Version identifier will be located in a HTTP request. + [WirePath("versioningScheme")] public VersioningScheme? VersioningScheme { get; set; } /// Name of query parameter that indicates the API Version if versioningScheme is set to `query`. + [WirePath("versionQueryName")] public string VersionQueryName { get; set; } /// Name of HTTP header parameter that indicates the API Version if versioningScheme is set to `header`. + [WirePath("versionHeaderName")] public string VersionHeaderName { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiVersionSetListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiVersionSetListResult.Serialization.cs index 381bf710acc8b..38b36ab0b2d60 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiVersionSetListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiVersionSetListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static ApiVersionSetListResult DeserializeApiVersionSetListResult(JsonE return new ApiVersionSetListResult(value ?? new ChangeTrackingList(), count, 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(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + 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; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOpt { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiVersionSetListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiVersionSetPatch.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiVersionSetPatch.cs index 86c4bae42b969..18dc332ef649b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiVersionSetPatch.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiVersionSetPatch.cs @@ -68,14 +68,19 @@ internal ApiVersionSetPatch(string description, string versionQueryName, string } /// Description of API Version Set. + [WirePath("properties.description")] public string Description { get; set; } /// Name of query parameter that indicates the API Version if versioningScheme is set to `query`. + [WirePath("properties.versionQueryName")] public string VersionQueryName { get; set; } /// Name of HTTP header parameter that indicates the API Version if versioningScheme is set to `header`. + [WirePath("properties.versionHeaderName")] public string VersionHeaderName { get; set; } /// Name of API Version Set. + [WirePath("properties.displayName")] public string DisplayName { get; set; } /// An value that determines where the API Version identifier will be located in a HTTP request. + [WirePath("properties.versioningScheme")] public VersioningScheme? VersioningScheme { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AssociatedApiProperties.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AssociatedApiProperties.Serialization.cs index 545c2c7704f0f..9ef826d40e740 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AssociatedApiProperties.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AssociatedApiProperties.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -372,6 +374,389 @@ internal static AssociatedApiProperties DeserializeAssociatedApiProperties(JsonE protocols ?? 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(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: "); + if (Id.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Id}'''"); + } + else + { + builder.AppendLine($"'{Id}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ServiceUri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" serviceUrl: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ServiceUri)) + { + builder.Append(" serviceUrl: "); + builder.AppendLine($"'{ServiceUri.AbsoluteUri}'"); + } + } + + 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(Protocols), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" protocols: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Protocols)) + { + if (Protocols.Any()) + { + builder.Append(" protocols: "); + builder.AppendLine("["); + foreach (var item in Protocols) + { + builder.AppendLine($" '{item.ToString()}'"); + } + builder.AppendLine(" ]"); + } + } + } + + 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}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AuthenticationSettings), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" authenticationSettings: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AuthenticationSettings)) + { + builder.Append(" authenticationSettings: "); + BicepSerializationHelpers.AppendChildObject(builder, AuthenticationSettings, options, 2, false, " authenticationSettings: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SubscriptionKeyParameterNames), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" subscriptionKeyParameterNames: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SubscriptionKeyParameterNames)) + { + builder.Append(" subscriptionKeyParameterNames: "); + BicepSerializationHelpers.AppendChildObject(builder, SubscriptionKeyParameterNames, options, 2, false, " subscriptionKeyParameterNames: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiRevision), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiRevision: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiRevision)) + { + builder.Append(" apiRevision: "); + if (ApiRevision.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ApiRevision}'''"); + } + else + { + builder.AppendLine($"'{ApiRevision}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiVersion), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiVersion: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiVersion)) + { + builder.Append(" apiVersion: "); + if (ApiVersion.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ApiVersion}'''"); + } + else + { + builder.AppendLine($"'{ApiVersion}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsCurrent), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" isCurrent: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsCurrent)) + { + builder.Append(" isCurrent: "); + var boolValue = IsCurrent.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsOnline), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" isOnline: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsOnline)) + { + builder.Append(" isOnline: "); + var boolValue = IsOnline.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiRevisionDescription), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiRevisionDescription: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiRevisionDescription)) + { + builder.Append(" apiRevisionDescription: "); + if (ApiRevisionDescription.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ApiRevisionDescription}'''"); + } + else + { + builder.AppendLine($"'{ApiRevisionDescription}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiVersionDescription), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiVersionDescription: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiVersionDescription)) + { + builder.Append(" apiVersionDescription: "); + if (ApiVersionDescription.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ApiVersionDescription}'''"); + } + else + { + builder.AppendLine($"'{ApiVersionDescription}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiVersionSetId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiVersionSetId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiVersionSetId)) + { + builder.Append(" apiVersionSetId: "); + builder.AppendLine($"'{ApiVersionSetId.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsSubscriptionRequired), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" subscriptionRequired: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsSubscriptionRequired)) + { + builder.Append(" subscriptionRequired: "); + var boolValue = IsSubscriptionRequired.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TermsOfServiceLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" termsOfServiceUrl: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TermsOfServiceLink)) + { + builder.Append(" termsOfServiceUrl: "); + if (TermsOfServiceLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{TermsOfServiceLink}'''"); + } + else + { + builder.AppendLine($"'{TermsOfServiceLink}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Contact), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" contact: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Contact)) + { + builder.Append(" contact: "); + BicepSerializationHelpers.AppendChildObject(builder, Contact, options, 2, false, " contact: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(License), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" license: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(License)) + { + builder.Append(" license: "); + BicepSerializationHelpers.AppendChildObject(builder, License, options, 2, false, " license: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -380,6 +765,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOpt { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(AssociatedApiProperties)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AssociatedApiProperties.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AssociatedApiProperties.cs index 3181975efc88b..1122e925f6c6f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AssociatedApiProperties.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AssociatedApiProperties.cs @@ -52,14 +52,19 @@ internal AssociatedApiProperties(string description, AuthenticationSettingsContr } /// API identifier in the form /apis/{apiId}. + [WirePath("id")] public string Id { get; } /// API name. + [WirePath("name")] public string Name { get; } /// Absolute URL of the backend service implementing this API. + [WirePath("serviceUrl")] public Uri ServiceUri { get; } /// Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API. + [WirePath("path")] public string Path { get; } /// Describes on which protocols the operations in this API can be invoked. + [WirePath("protocols")] public IReadOnlyList Protocols { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AssociatedOperationProperties.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AssociatedOperationProperties.Serialization.cs index cd1fffe82e21f..464569ac29a21 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AssociatedOperationProperties.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AssociatedOperationProperties.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -174,6 +175,205 @@ internal static AssociatedOperationProperties DeserializeAssociatedOperationProp 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(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + if (Id.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Id}'''"); + } + else + { + builder.AppendLine($"'{Id}'"); + } + } + } + + 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(ApiName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiName)) + { + builder.Append(" apiName: "); + if (ApiName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ApiName}'''"); + } + else + { + builder.AppendLine($"'{ApiName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiRevision), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiRevision: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiRevision)) + { + builder.Append(" apiRevision: "); + if (ApiRevision.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ApiRevision}'''"); + } + else + { + builder.AppendLine($"'{ApiRevision}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiVersion), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiVersion: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiVersion)) + { + builder.Append(" apiVersion: "); + if (ApiVersion.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ApiVersion}'''"); + } + else + { + builder.AppendLine($"'{ApiVersion}'"); + } + } + } + + 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}'"); + } + } + } + + 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(UriTemplate), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" urlTemplate: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(UriTemplate)) + { + builder.Append(" urlTemplate: "); + if (UriTemplate.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{UriTemplate}'''"); + } + else + { + builder.AppendLine($"'{UriTemplate}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -182,6 +382,8 @@ BinaryData IPersistableModel.Write(ModelReaderWri { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(AssociatedOperationProperties)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AssociatedOperationProperties.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AssociatedOperationProperties.cs index bb5b28cf675aa..8428a39f878cb 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AssociatedOperationProperties.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AssociatedOperationProperties.cs @@ -74,20 +74,28 @@ internal AssociatedOperationProperties(string id, string name, string apiName, s } /// Identifier of the operation in form /operations/{operationId}. + [WirePath("id")] public string Id { get; } /// Operation name. + [WirePath("name")] public string Name { get; } /// API Name. + [WirePath("apiName")] public string ApiName { get; } /// API Revision. + [WirePath("apiRevision")] public string ApiRevision { get; } /// API Version. + [WirePath("apiVersion")] public string ApiVersion { get; } /// Operation Description. + [WirePath("description")] public string Description { get; } /// A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only them. + [WirePath("method")] public string Method { get; } /// Relative URL template identifying the target resource for this operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date}. + [WirePath("urlTemplate")] public string UriTemplate { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AssociatedProductProperties.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AssociatedProductProperties.Serialization.cs index b350f1e8e5c03..40410364789cb 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AssociatedProductProperties.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AssociatedProductProperties.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -187,6 +188,175 @@ internal static AssociatedProductProperties DeserializeAssociatedProductProperti name); } + 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(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + if (Id.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Id}'''"); + } + else + { + builder.AppendLine($"'{Id}'"); + } + } + } + + 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(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}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Terms), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" terms: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Terms)) + { + builder.Append(" terms: "); + if (Terms.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Terms}'''"); + } + else + { + builder.AppendLine($"'{Terms}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsSubscriptionRequired), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" subscriptionRequired: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsSubscriptionRequired)) + { + builder.Append(" subscriptionRequired: "); + var boolValue = IsSubscriptionRequired.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsApprovalRequired), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" approvalRequired: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsApprovalRequired)) + { + builder.Append(" approvalRequired: "); + var boolValue = IsApprovalRequired.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SubscriptionsLimit), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" subscriptionsLimit: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SubscriptionsLimit)) + { + builder.Append(" subscriptionsLimit: "); + builder.AppendLine($"{SubscriptionsLimit.Value}"); + } + } + + 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.ToSerialString()}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -195,6 +365,8 @@ BinaryData IPersistableModel.Write(ModelReaderWrite { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(AssociatedProductProperties)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AssociatedProductProperties.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AssociatedProductProperties.cs index ecb15595c5674..be88e4d68ef55 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AssociatedProductProperties.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AssociatedProductProperties.cs @@ -45,8 +45,10 @@ internal AssociatedProductProperties() } /// Identifier of the product in the form of /products/{productId}. + [WirePath("id")] public string Id { get; } /// Product name. + [WirePath("name")] public string Name { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AssociatedTagProperties.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AssociatedTagProperties.Serialization.cs index 122025afcf6e4..bca5305579b5f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AssociatedTagProperties.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AssociatedTagProperties.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -99,6 +100,67 @@ internal static AssociatedTagProperties DeserializeAssociatedTagProperties(JsonE return new AssociatedTagProperties(id, 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(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + if (Id.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Id}'''"); + } + else + { + builder.AppendLine($"'{Id}'"); + } + } + } + + 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; @@ -107,6 +169,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOpt { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(AssociatedTagProperties)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AssociatedTagProperties.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AssociatedTagProperties.cs index 6ea61d4726d07..08ef9d658e6ca 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AssociatedTagProperties.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AssociatedTagProperties.cs @@ -62,8 +62,10 @@ internal AssociatedTagProperties(string id, string name, IDictionary Tag identifier. + [WirePath("id")] public string Id { get; } /// Tag Name. + [WirePath("name")] public string Name { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AssociationContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AssociationContract.Serialization.cs index 553b210d57b97..09ea87e81f47a 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AssociationContract.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AssociationContract.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Models; @@ -162,6 +163,92 @@ internal static AssociationContract DeserializeAssociationContract(JsonElement e 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()}'"); + } + } + + 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; @@ -170,6 +257,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(AssociationContract)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AssociationContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AssociationContract.cs index f2a23b4ecb448..c07235288c4d2 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AssociationContract.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AssociationContract.cs @@ -66,6 +66,7 @@ internal AssociationContract(ResourceIdentifier id, string name, ResourceType re } /// Provisioning state. + [WirePath("properties.provisioningState")] public AssociationEntityProvisioningState? ProvisioningState { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthenticationSettingsContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthenticationSettingsContract.Serialization.cs index 7259449c5d220..49f9f8dcd5bde 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthenticationSettingsContract.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthenticationSettingsContract.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -36,6 +38,26 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod writer.WritePropertyName("openid"u8); writer.WriteObjectValue(OpenId, options); } + if (Optional.IsCollectionDefined(OAuth2AuthenticationSettings)) + { + writer.WritePropertyName("oAuth2AuthenticationSettings"u8); + writer.WriteStartArray(); + foreach (var item in OAuth2AuthenticationSettings) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(OpenidAuthenticationSettings)) + { + writer.WritePropertyName("openidAuthenticationSettings"u8); + writer.WriteStartArray(); + foreach (var item in OpenidAuthenticationSettings) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -76,6 +98,8 @@ internal static AuthenticationSettingsContract DeserializeAuthenticationSettings } OAuth2AuthenticationSettingsContract oAuth2 = default; OpenIdAuthenticationSettingsContract openid = default; + IList oAuth2AuthenticationSettings = default; + IList openidAuthenticationSettings = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -98,13 +122,132 @@ internal static AuthenticationSettingsContract DeserializeAuthenticationSettings openid = OpenIdAuthenticationSettingsContract.DeserializeOpenIdAuthenticationSettingsContract(property.Value, options); continue; } + if (property.NameEquals("oAuth2AuthenticationSettings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(OAuth2AuthenticationSettingsContract.DeserializeOAuth2AuthenticationSettingsContract(item, options)); + } + oAuth2AuthenticationSettings = array; + continue; + } + if (property.NameEquals("openidAuthenticationSettings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(OpenIdAuthenticationSettingsContract.DeserializeOpenIdAuthenticationSettingsContract(item, options)); + } + openidAuthenticationSettings = array; + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new AuthenticationSettingsContract(oAuth2, openid, serializedAdditionalRawData); + return new AuthenticationSettingsContract(oAuth2, openid, oAuth2AuthenticationSettings ?? new ChangeTrackingList(), openidAuthenticationSettings ?? 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(OAuth2), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" oAuth2: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(OAuth2)) + { + builder.Append(" oAuth2: "); + BicepSerializationHelpers.AppendChildObject(builder, OAuth2, options, 2, false, " oAuth2: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(OpenId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" openid: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(OpenId)) + { + builder.Append(" openid: "); + BicepSerializationHelpers.AppendChildObject(builder, OpenId, options, 2, false, " openid: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(OAuth2AuthenticationSettings), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" oAuth2AuthenticationSettings: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(OAuth2AuthenticationSettings)) + { + if (OAuth2AuthenticationSettings.Any()) + { + builder.Append(" oAuth2AuthenticationSettings: "); + builder.AppendLine("["); + foreach (var item in OAuth2AuthenticationSettings) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " oAuth2AuthenticationSettings: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(OpenidAuthenticationSettings), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" openidAuthenticationSettings: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(OpenidAuthenticationSettings)) + { + if (OpenidAuthenticationSettings.Any()) + { + builder.Append(" openidAuthenticationSettings: "); + builder.AppendLine("["); + foreach (var item in OpenidAuthenticationSettings) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " openidAuthenticationSettings: "); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) @@ -115,6 +258,8 @@ BinaryData IPersistableModel.Write(ModelReaderWr { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(AuthenticationSettingsContract)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthenticationSettingsContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthenticationSettingsContract.cs index e934f944f652e..7227ab1d2bfae 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthenticationSettingsContract.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthenticationSettingsContract.cs @@ -48,22 +48,36 @@ public partial class AuthenticationSettingsContract /// Initializes a new instance of . public AuthenticationSettingsContract() { + OAuth2AuthenticationSettings = new ChangeTrackingList(); + OpenidAuthenticationSettings = new ChangeTrackingList(); } /// Initializes a new instance of . /// OAuth2 Authentication settings. /// OpenID Connect Authentication Settings. + /// Collection of OAuth2 authentication settings included into this API. + /// Collection of Open ID Connect authentication settings included into this API. /// Keeps track of any properties unknown to the library. - internal AuthenticationSettingsContract(OAuth2AuthenticationSettingsContract oAuth2, OpenIdAuthenticationSettingsContract openId, IDictionary serializedAdditionalRawData) + internal AuthenticationSettingsContract(OAuth2AuthenticationSettingsContract oAuth2, OpenIdAuthenticationSettingsContract openId, IList oAuth2AuthenticationSettings, IList openidAuthenticationSettings, IDictionary serializedAdditionalRawData) { OAuth2 = oAuth2; OpenId = openId; + OAuth2AuthenticationSettings = oAuth2AuthenticationSettings; + OpenidAuthenticationSettings = openidAuthenticationSettings; _serializedAdditionalRawData = serializedAdditionalRawData; } /// OAuth2 Authentication settings. + [WirePath("oAuth2")] public OAuth2AuthenticationSettingsContract OAuth2 { get; set; } /// OpenID Connect Authentication Settings. + [WirePath("openid")] public OpenIdAuthenticationSettingsContract OpenId { get; set; } + /// Collection of OAuth2 authentication settings included into this API. + [WirePath("oAuth2AuthenticationSettings")] + public IList OAuth2AuthenticationSettings { get; } + /// Collection of Open ID Connect authentication settings included into this API. + [WirePath("openidAuthenticationSettings")] + public IList OpenidAuthenticationSettings { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationAccessPolicyListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationAccessPolicyListResult.Serialization.cs new file mode 100644 index 0000000000000..b733d3af4e7f4 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationAccessPolicyListResult.Serialization.cs @@ -0,0 +1,242 @@ +// 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.ApiManagement.Models +{ + internal partial class AuthorizationAccessPolicyListResult : 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(AuthorizationAccessPolicyListResult)} 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(Count)) + { + writer.WritePropertyName("count"u8); + writer.WriteNumberValue(Count.Value); + } + 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(); + } + + AuthorizationAccessPolicyListResult 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(AuthorizationAccessPolicyListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAuthorizationAccessPolicyListResult(document.RootElement, options); + } + + internal static AuthorizationAccessPolicyListResult DeserializeAuthorizationAccessPolicyListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + long? count = 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(AuthorizationAccessPolicyContractData.DeserializeAuthorizationAccessPolicyContractData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("count"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + count = property.Value.GetInt64(); + 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 AuthorizationAccessPolicyListResult(value ?? new ChangeTrackingList(), count, 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(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + 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(AuthorizationAccessPolicyListResult)} does not support writing '{options.Format}' format."); + } + } + + AuthorizationAccessPolicyListResult 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 DeserializeAuthorizationAccessPolicyListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AuthorizationAccessPolicyListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationAccessPolicyListResult.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationAccessPolicyListResult.cs new file mode 100644 index 0000000000000..eca87f8bba291 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationAccessPolicyListResult.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + /// Paged Authorization Access Policy list representation. + internal partial class AuthorizationAccessPolicyListResult + { + /// + /// 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 AuthorizationAccessPolicyListResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Page values. + /// Total record count number across all pages. + /// Next page link if any. + /// Keeps track of any properties unknown to the library. + internal AuthorizationAccessPolicyListResult(IReadOnlyList value, long? count, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + Count = count; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Page values. + public IReadOnlyList Value { get; } + /// Total record count number across all pages. + public long? Count { get; } + /// Next page link if any. + public string NextLink { get; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationConfirmConsentCodeContent.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationConfirmConsentCodeContent.Serialization.cs new file mode 100644 index 0000000000000..41089856f460e --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationConfirmConsentCodeContent.Serialization.cs @@ -0,0 +1,122 @@ +// 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.ApiManagement.Models +{ + public partial class AuthorizationConfirmConsentCodeContent : 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(AuthorizationConfirmConsentCodeContent)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(ConsentCode)) + { + writer.WritePropertyName("consentCode"u8); + writer.WriteStringValue(ConsentCode); + } + 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(); + } + + AuthorizationConfirmConsentCodeContent 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(AuthorizationConfirmConsentCodeContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAuthorizationConfirmConsentCodeContent(document.RootElement, options); + } + + internal static AuthorizationConfirmConsentCodeContent DeserializeAuthorizationConfirmConsentCodeContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string consentCode = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("consentCode"u8)) + { + consentCode = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AuthorizationConfirmConsentCodeContent(consentCode, 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(AuthorizationConfirmConsentCodeContent)} does not support writing '{options.Format}' format."); + } + } + + AuthorizationConfirmConsentCodeContent 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 DeserializeAuthorizationConfirmConsentCodeContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AuthorizationConfirmConsentCodeContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationConfirmConsentCodeContent.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationConfirmConsentCodeContent.cs new file mode 100644 index 0000000000000..5c4fab2ae4c22 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationConfirmConsentCodeContent.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.ApiManagement.Models +{ + /// Authorization confirm consent code request contract. + public partial class AuthorizationConfirmConsentCodeContent + { + /// + /// 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 AuthorizationConfirmConsentCodeContent() + { + } + + /// Initializes a new instance of . + /// The consent code from the authorization server after authorizing and consenting. + /// Keeps track of any properties unknown to the library. + internal AuthorizationConfirmConsentCodeContent(string consentCode, IDictionary serializedAdditionalRawData) + { + ConsentCode = consentCode; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The consent code from the authorization server after authorizing and consenting. + [WirePath("consentCode")] + public string ConsentCode { get; set; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationListResult.Serialization.cs new file mode 100644 index 0000000000000..6092db845b29b --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationListResult.Serialization.cs @@ -0,0 +1,242 @@ +// 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.ApiManagement.Models +{ + internal partial class AuthorizationListResult : 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(AuthorizationListResult)} 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(Count)) + { + writer.WritePropertyName("count"u8); + writer.WriteNumberValue(Count.Value); + } + 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(); + } + + AuthorizationListResult 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(AuthorizationListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAuthorizationListResult(document.RootElement, options); + } + + internal static AuthorizationListResult DeserializeAuthorizationListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + long? count = 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(AuthorizationContractData.DeserializeAuthorizationContractData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("count"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + count = property.Value.GetInt64(); + 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 AuthorizationListResult(value ?? new ChangeTrackingList(), count, 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(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + 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(AuthorizationListResult)} does not support writing '{options.Format}' format."); + } + } + + AuthorizationListResult 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 DeserializeAuthorizationListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AuthorizationListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationListResult.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationListResult.cs new file mode 100644 index 0000000000000..4e4108f1b06e2 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationListResult.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + /// Paged Authorization list representation. + internal partial class AuthorizationListResult + { + /// + /// 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 AuthorizationListResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Page values. + /// Total record count number across all pages. + /// Next page link if any. + /// Keeps track of any properties unknown to the library. + internal AuthorizationListResult(IReadOnlyList value, long? count, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + Count = count; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Page values. + public IReadOnlyList Value { get; } + /// Total record count number across all pages. + public long? Count { get; } + /// Next page link if any. + public string NextLink { get; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationLoginContent.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationLoginContent.Serialization.cs new file mode 100644 index 0000000000000..3cc80192584bd --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationLoginContent.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.ApiManagement.Models +{ + public partial class AuthorizationLoginContent : 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(AuthorizationLoginContent)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(PostLoginRedirectUri)) + { + writer.WritePropertyName("postLoginRedirectUrl"u8); + writer.WriteStringValue(PostLoginRedirectUri.AbsoluteUri); + } + 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(); + } + + AuthorizationLoginContent 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(AuthorizationLoginContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAuthorizationLoginContent(document.RootElement, options); + } + + internal static AuthorizationLoginContent DeserializeAuthorizationLoginContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Uri postLoginRedirectUri = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("postLoginRedirectUrl"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + postLoginRedirectUri = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AuthorizationLoginContent(postLoginRedirectUri, 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(AuthorizationLoginContent)} does not support writing '{options.Format}' format."); + } + } + + AuthorizationLoginContent 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 DeserializeAuthorizationLoginContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AuthorizationLoginContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationLoginContent.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationLoginContent.cs new file mode 100644 index 0000000000000..5aa6b170f30f3 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationLoginContent.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.ApiManagement.Models +{ + /// Authorization login request contract. + public partial class AuthorizationLoginContent + { + /// + /// 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 AuthorizationLoginContent() + { + } + + /// Initializes a new instance of . + /// The redirect URL after login has completed. + /// Keeps track of any properties unknown to the library. + internal AuthorizationLoginContent(Uri postLoginRedirectUri, IDictionary serializedAdditionalRawData) + { + PostLoginRedirectUri = postLoginRedirectUri; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The redirect URL after login has completed. + [WirePath("postLoginRedirectUrl")] + public Uri PostLoginRedirectUri { get; set; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationLoginResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationLoginResult.Serialization.cs new file mode 100644 index 0000000000000..16c92082da11e --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationLoginResult.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.ApiManagement.Models +{ + public partial class AuthorizationLoginResult : 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(AuthorizationLoginResult)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(LoginLink)) + { + writer.WritePropertyName("loginLink"u8); + writer.WriteStringValue(LoginLink); + } + 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(); + } + + AuthorizationLoginResult 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(AuthorizationLoginResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAuthorizationLoginResult(document.RootElement, options); + } + + internal static AuthorizationLoginResult DeserializeAuthorizationLoginResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string loginLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("loginLink"u8)) + { + loginLink = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AuthorizationLoginResult(loginLink, 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(LoginLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" loginLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(LoginLink)) + { + builder.Append(" loginLink: "); + if (LoginLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{LoginLink}'''"); + } + else + { + builder.AppendLine($"'{LoginLink}'"); + } + } + } + + 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(AuthorizationLoginResult)} does not support writing '{options.Format}' format."); + } + } + + AuthorizationLoginResult 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 DeserializeAuthorizationLoginResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AuthorizationLoginResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationLoginResult.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationLoginResult.cs new file mode 100644 index 0000000000000..1981a92d423b3 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationLoginResult.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.ApiManagement.Models +{ + /// Authorization login response contract. + public partial class AuthorizationLoginResult + { + /// + /// 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 AuthorizationLoginResult() + { + } + + /// Initializes a new instance of . + /// The login link. + /// Keeps track of any properties unknown to the library. + internal AuthorizationLoginResult(string loginLink, IDictionary serializedAdditionalRawData) + { + LoginLink = loginLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The login link. + [WirePath("loginLink")] + public string LoginLink { get; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationProviderListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationProviderListResult.Serialization.cs new file mode 100644 index 0000000000000..6db030d5f28bf --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationProviderListResult.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.ApiManagement.Models +{ + internal partial class AuthorizationProviderListResult : 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(AuthorizationProviderListResult)} 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(); + } + + AuthorizationProviderListResult 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(AuthorizationProviderListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAuthorizationProviderListResult(document.RootElement, options); + } + + internal static AuthorizationProviderListResult DeserializeAuthorizationProviderListResult(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(AuthorizationProviderContractData.DeserializeAuthorizationProviderContractData(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 AuthorizationProviderListResult(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(AuthorizationProviderListResult)} does not support writing '{options.Format}' format."); + } + } + + AuthorizationProviderListResult 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 DeserializeAuthorizationProviderListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AuthorizationProviderListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationProviderListResult.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationProviderListResult.cs new file mode 100644 index 0000000000000..05e2c2e79df8d --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationProviderListResult.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.ApiManagement.Models +{ + /// Paged Authorization Provider list representation. + internal partial class AuthorizationProviderListResult + { + /// + /// 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 AuthorizationProviderListResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Page values. + /// Next page link if any. + /// Keeps track of any properties unknown to the library. + internal AuthorizationProviderListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Page values. + public IReadOnlyList Value { get; } + /// Next page link if any. + public string NextLink { get; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationProviderOAuth2GrantTypes.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationProviderOAuth2GrantTypes.Serialization.cs new file mode 100644 index 0000000000000..c61ecb87328ab --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationProviderOAuth2GrantTypes.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.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + public partial class AuthorizationProviderOAuth2GrantTypes : 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(AuthorizationProviderOAuth2GrantTypes)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(AuthorizationCode)) + { + writer.WritePropertyName("authorizationCode"u8); + writer.WriteStartObject(); + foreach (var item in AuthorizationCode) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsCollectionDefined(ClientCredentials)) + { + writer.WritePropertyName("clientCredentials"u8); + writer.WriteStartObject(); + foreach (var item in ClientCredentials) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + 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(); + } + + AuthorizationProviderOAuth2GrantTypes 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(AuthorizationProviderOAuth2GrantTypes)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAuthorizationProviderOAuth2GrantTypes(document.RootElement, options); + } + + internal static AuthorizationProviderOAuth2GrantTypes DeserializeAuthorizationProviderOAuth2GrantTypes(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary authorizationCode = default; + IDictionary clientCredentials = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("authorizationCode"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()); + } + authorizationCode = dictionary; + continue; + } + if (property.NameEquals("clientCredentials"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()); + } + clientCredentials = dictionary; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AuthorizationProviderOAuth2GrantTypes(authorizationCode ?? new ChangeTrackingDictionary(), clientCredentials ?? 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(AuthorizationCode), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" authorizationCode: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(AuthorizationCode)) + { + if (AuthorizationCode.Any()) + { + builder.Append(" authorizationCode: "); + builder.AppendLine("{"); + foreach (var item in AuthorizationCode) + { + 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(ClientCredentials), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" clientCredentials: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(ClientCredentials)) + { + if (ClientCredentials.Any()) + { + builder.Append(" clientCredentials: "); + builder.AppendLine("{"); + foreach (var item in ClientCredentials) + { + 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(" }"); + } + } + } + + 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(AuthorizationProviderOAuth2GrantTypes)} does not support writing '{options.Format}' format."); + } + } + + AuthorizationProviderOAuth2GrantTypes 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 DeserializeAuthorizationProviderOAuth2GrantTypes(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AuthorizationProviderOAuth2GrantTypes)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationProviderOAuth2GrantTypes.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationProviderOAuth2GrantTypes.cs new file mode 100644 index 0000000000000..01f630402d64e --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationProviderOAuth2GrantTypes.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.ApiManagement.Models +{ + /// Authorization Provider oauth2 grant types settings. + public partial class AuthorizationProviderOAuth2GrantTypes + { + /// + /// 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 AuthorizationProviderOAuth2GrantTypes() + { + AuthorizationCode = new ChangeTrackingDictionary(); + ClientCredentials = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// OAuth2 authorization code grant parameters. + /// OAuth2 client credential grant parameters. + /// Keeps track of any properties unknown to the library. + internal AuthorizationProviderOAuth2GrantTypes(IDictionary authorizationCode, IDictionary clientCredentials, IDictionary serializedAdditionalRawData) + { + AuthorizationCode = authorizationCode; + ClientCredentials = clientCredentials; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// OAuth2 authorization code grant parameters. + [WirePath("authorizationCode")] + public IDictionary AuthorizationCode { get; } + /// OAuth2 client credential grant parameters. + [WirePath("clientCredentials")] + public IDictionary ClientCredentials { get; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationProviderOAuth2Settings.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationProviderOAuth2Settings.Serialization.cs new file mode 100644 index 0000000000000..f985395a595d5 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationProviderOAuth2Settings.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.ApiManagement.Models +{ + public partial class AuthorizationProviderOAuth2Settings : 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(AuthorizationProviderOAuth2Settings)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(RedirectUri)) + { + writer.WritePropertyName("redirectUrl"u8); + writer.WriteStringValue(RedirectUri.AbsoluteUri); + } + if (Optional.IsDefined(GrantTypes)) + { + writer.WritePropertyName("grantTypes"u8); + writer.WriteObjectValue(GrantTypes, 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(); + } + + AuthorizationProviderOAuth2Settings 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(AuthorizationProviderOAuth2Settings)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAuthorizationProviderOAuth2Settings(document.RootElement, options); + } + + internal static AuthorizationProviderOAuth2Settings DeserializeAuthorizationProviderOAuth2Settings(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Uri redirectUri = default; + AuthorizationProviderOAuth2GrantTypes grantTypes = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("redirectUrl"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + redirectUri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("grantTypes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + grantTypes = AuthorizationProviderOAuth2GrantTypes.DeserializeAuthorizationProviderOAuth2GrantTypes(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AuthorizationProviderOAuth2Settings(redirectUri, grantTypes, 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(RedirectUri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" redirectUrl: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(RedirectUri)) + { + builder.Append(" redirectUrl: "); + builder.AppendLine($"'{RedirectUri.AbsoluteUri}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(GrantTypes), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" grantTypes: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(GrantTypes)) + { + builder.Append(" grantTypes: "); + BicepSerializationHelpers.AppendChildObject(builder, GrantTypes, options, 2, false, " grantTypes: "); + } + } + + 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(AuthorizationProviderOAuth2Settings)} does not support writing '{options.Format}' format."); + } + } + + AuthorizationProviderOAuth2Settings 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 DeserializeAuthorizationProviderOAuth2Settings(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AuthorizationProviderOAuth2Settings)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationProviderOAuth2Settings.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationProviderOAuth2Settings.cs new file mode 100644 index 0000000000000..032bb935e78d6 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationProviderOAuth2Settings.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.ApiManagement.Models +{ + /// OAuth2 settings details. + public partial class AuthorizationProviderOAuth2Settings + { + /// + /// 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 AuthorizationProviderOAuth2Settings() + { + } + + /// Initializes a new instance of . + /// Redirect URL to be set in the OAuth application. + /// OAuth2 settings. + /// Keeps track of any properties unknown to the library. + internal AuthorizationProviderOAuth2Settings(Uri redirectUri, AuthorizationProviderOAuth2GrantTypes grantTypes, IDictionary serializedAdditionalRawData) + { + RedirectUri = redirectUri; + GrantTypes = grantTypes; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Redirect URL to be set in the OAuth application. + [WirePath("redirectUrl")] + public Uri RedirectUri { get; set; } + /// OAuth2 settings. + [WirePath("grantTypes")] + public AuthorizationProviderOAuth2GrantTypes GrantTypes { get; set; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationServerListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationServerListResult.Serialization.cs index 65e1c0bc686cd..b9c6ba5e3767f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationServerListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationServerListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static AuthorizationServerListResult DeserializeAuthorizationServerList return new AuthorizationServerListResult(value ?? new ChangeTrackingList(), count, 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(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + 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; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReaderWri { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(AuthorizationServerListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationServerSecretsContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationServerSecretsContract.Serialization.cs index f9eba6db40d63..ce6c4a3a4ec8d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationServerSecretsContract.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationServerSecretsContract.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -110,6 +111,90 @@ internal static AuthorizationServerSecretsContract DeserializeAuthorizationServe return new AuthorizationServerSecretsContract(clientSecret, resourceOwnerUsername, resourceOwnerPassword, 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(ClientSecret), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" clientSecret: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ClientSecret)) + { + builder.Append(" clientSecret: "); + if (ClientSecret.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ClientSecret}'''"); + } + else + { + builder.AppendLine($"'{ClientSecret}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ResourceOwnerUsername), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" resourceOwnerUsername: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ResourceOwnerUsername)) + { + builder.Append(" resourceOwnerUsername: "); + if (ResourceOwnerUsername.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ResourceOwnerUsername}'''"); + } + else + { + builder.AppendLine($"'{ResourceOwnerUsername}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ResourceOwnerPassword), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" resourceOwnerPassword: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ResourceOwnerPassword)) + { + builder.Append(" resourceOwnerPassword: "); + if (ResourceOwnerPassword.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ResourceOwnerPassword}'''"); + } + else + { + builder.AppendLine($"'{ResourceOwnerPassword}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -118,6 +203,8 @@ BinaryData IPersistableModel.Write(ModelRead { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(AuthorizationServerSecretsContract)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationServerSecretsContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationServerSecretsContract.cs index e2918b4a6248a..3a9febde3b07e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationServerSecretsContract.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationServerSecretsContract.cs @@ -64,10 +64,13 @@ internal AuthorizationServerSecretsContract(string clientSecret, string resource } /// oAuth Authorization Server Secrets. + [WirePath("clientSecret")] public string ClientSecret { get; } /// Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username. + [WirePath("resourceOwnerUsername")] public string ResourceOwnerUsername { get; } /// Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password. + [WirePath("resourceOwnerPassword")] public string ResourceOwnerPassword { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AvailableApiManagementServiceSkuResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AvailableApiManagementServiceSkuResult.Serialization.cs index d2c81a88b3b32..75d308d949cf0 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AvailableApiManagementServiceSkuResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AvailableApiManagementServiceSkuResult.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -122,6 +123,69 @@ internal static AvailableApiManagementServiceSkuResult DeserializeAvailableApiMa return new AvailableApiManagementServiceSkuResult(resourceType, sku, capacity, 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(ResourceType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" resourceType: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ResourceType)) + { + builder.Append(" resourceType: "); + builder.AppendLine($"'{ResourceType.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("SkuName", out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" sku: "); + builder.AppendLine("{"); + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); + } + else + { + if (Optional.IsDefined(Sku)) + { + builder.Append(" sku: "); + BicepSerializationHelpers.AppendChildObject(builder, Sku, options, 2, false, " sku: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Capacity), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" capacity: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Capacity)) + { + builder.Append(" capacity: "); + BicepSerializationHelpers.AppendChildObject(builder, Capacity, options, 2, false, " capacity: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -130,6 +194,8 @@ BinaryData IPersistableModel.Write(Model { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(AvailableApiManagementServiceSkuResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AvailableApiManagementServiceSkuResult.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AvailableApiManagementServiceSkuResult.cs index 47f5dd6909009..4cc2ee68ccc29 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AvailableApiManagementServiceSkuResult.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AvailableApiManagementServiceSkuResult.cs @@ -65,16 +65,19 @@ internal AvailableApiManagementServiceSkuResult(ResourceType? resourceType, Reso } /// The type of resource the SKU applies to. + [WirePath("resourceType")] public ResourceType? ResourceType { get; } /// Specifies API Management SKU. internal ResourceSku Sku { get; } /// Name of the Sku. + [WirePath("sku.name")] public ApiManagementServiceSkuType? SkuName { get => Sku?.Name; } /// Specifies the number of API Management units. + [WirePath("capacity")] public ApiManagementResourceSkuCapacity Capacity { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendAuthorizationHeaderCredentials.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendAuthorizationHeaderCredentials.Serialization.cs index 7d95e6f858150..6bd0acce92c29 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendAuthorizationHeaderCredentials.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendAuthorizationHeaderCredentials.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -93,6 +94,67 @@ internal static BackendAuthorizationHeaderCredentials DeserializeBackendAuthoriz return new BackendAuthorizationHeaderCredentials(scheme, parameter, 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(Scheme), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" scheme: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Scheme)) + { + builder.Append(" scheme: "); + if (Scheme.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Scheme}'''"); + } + else + { + builder.AppendLine($"'{Scheme}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Parameter), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" parameter: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Parameter)) + { + builder.Append(" parameter: "); + if (Parameter.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Parameter}'''"); + } + else + { + builder.AppendLine($"'{Parameter}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -101,6 +163,8 @@ BinaryData IPersistableModel.Write(ModelR { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(BackendAuthorizationHeaderCredentials)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendAuthorizationHeaderCredentials.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendAuthorizationHeaderCredentials.cs index 1f441f1c09672..108b93ba72857 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendAuthorizationHeaderCredentials.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendAuthorizationHeaderCredentials.cs @@ -75,8 +75,10 @@ internal BackendAuthorizationHeaderCredentials() } /// Authentication Scheme name. + [WirePath("scheme")] public string Scheme { get; set; } /// Authentication Parameter value. + [WirePath("parameter")] public string Parameter { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendCredentialsContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendCredentialsContract.Serialization.cs index dae27d0582580..8d1c8a581a52c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendCredentialsContract.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendCredentialsContract.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -244,6 +246,202 @@ internal static BackendCredentialsContract DeserializeBackendCredentialsContract 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(CertificateIds), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" certificateIds: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(CertificateIds)) + { + if (CertificateIds.Any()) + { + builder.Append(" certificateIds: "); + builder.AppendLine("["); + foreach (var item in CertificateIds) + { + 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(Certificate), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" certificate: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Certificate)) + { + if (Certificate.Any()) + { + builder.Append(" certificate: "); + builder.AppendLine("["); + foreach (var item in Certificate) + { + 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(Query), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" query: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Query)) + { + if (Query.Any()) + { + builder.Append(" query: "); + builder.AppendLine("{"); + foreach (var item in Query) + { + builder.Append($" '{item.Key}': "); + if (item.Value == null) + { + builder.Append("null"); + continue; + } + builder.AppendLine("["); + foreach (var item0 in item.Value) + { + if (item0 == null) + { + builder.Append("null"); + continue; + } + if (item0.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item0}'''"); + } + else + { + builder.AppendLine($" '{item0}'"); + } + } + builder.AppendLine(" ]"); + } + builder.AppendLine(" }"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Header), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" header: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Header)) + { + if (Header.Any()) + { + builder.Append(" header: "); + builder.AppendLine("{"); + foreach (var item in Header) + { + builder.Append($" '{item.Key}': "); + if (item.Value == null) + { + builder.Append("null"); + continue; + } + builder.AppendLine("["); + foreach (var item0 in item.Value) + { + if (item0 == null) + { + builder.Append("null"); + continue; + } + if (item0.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item0}'''"); + } + else + { + builder.AppendLine($" '{item0}'"); + } + } + builder.AppendLine(" ]"); + } + builder.AppendLine(" }"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Authorization), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" authorization: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Authorization)) + { + builder.Append(" authorization: "); + BicepSerializationHelpers.AppendChildObject(builder, Authorization, options, 2, false, " authorization: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -252,6 +450,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriter { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(BackendCredentialsContract)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendCredentialsContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendCredentialsContract.cs index 5d5335fb815eb..590e935add314 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendCredentialsContract.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendCredentialsContract.cs @@ -72,14 +72,19 @@ internal BackendCredentialsContract(IList certificateIds, IList } /// List of Client Certificate Ids. + [WirePath("certificateIds")] public IList CertificateIds { get; } /// List of Client Certificate Thumbprints. Will be ignored if certificatesIds are provided. + [WirePath("certificate")] public IList Certificate { get; } /// Query Parameter description. + [WirePath("query")] public IDictionary> Query { get; } /// Header Parameter description. + [WirePath("header")] public IDictionary> Header { get; } /// Authorization header authentication. + [WirePath("authorization")] public BackendAuthorizationHeaderCredentials Authorization { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendListResult.Serialization.cs index e86d908d7ce80..f54203d15e46e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static BackendListResult DeserializeBackendListResult(JsonElement eleme return new BackendListResult(value ?? new ChangeTrackingList(), count, 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(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + 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; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions o { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(BackendListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendProperties.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendProperties.Serialization.cs index 661667ceabf67..6f925f9ca3c77 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendProperties.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendProperties.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -92,6 +93,36 @@ internal static BackendProperties DeserializeBackendProperties(JsonElement eleme return new BackendProperties(serviceFabricCluster, 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(ServiceFabricCluster), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" serviceFabricCluster: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ServiceFabricCluster)) + { + builder.Append(" serviceFabricCluster: "); + BicepSerializationHelpers.AppendChildObject(builder, ServiceFabricCluster, options, 2, false, " serviceFabricCluster: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -100,6 +131,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions o { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(BackendProperties)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendProperties.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendProperties.cs index 553add4f51e3b..b6f3add82f85d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendProperties.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendProperties.cs @@ -60,6 +60,7 @@ internal BackendProperties(BackendServiceFabricClusterProperties serviceFabricCl } /// Backend Service Fabric Cluster Properties. + [WirePath("serviceFabricCluster")] public BackendServiceFabricClusterProperties ServiceFabricCluster { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendProxyContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendProxyContract.Serialization.cs index 171ccfed616e9..a7d11e734a053 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendProxyContract.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendProxyContract.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -107,6 +108,82 @@ internal static BackendProxyContract DeserializeBackendProxyContract(JsonElement return new BackendProxyContract(uri, username, password, 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(" url: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Uri)) + { + builder.Append(" url: "); + builder.AppendLine($"'{Uri.AbsoluteUri}'"); + } + } + + 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(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}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -115,6 +192,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOption { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(BackendProxyContract)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendProxyContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendProxyContract.cs index 5582162ebd89f..f9134360298e3 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendProxyContract.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendProxyContract.cs @@ -74,10 +74,13 @@ internal BackendProxyContract() } /// WebProxy Server AbsoluteUri property which includes the entire URI stored in the Uri instance, including all fragments and query strings. + [WirePath("url")] public Uri Uri { get; set; } /// Username to connect to the WebProxy server. + [WirePath("username")] public string Username { get; set; } /// Password to connect to the WebProxy Server. + [WirePath("password")] public string Password { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendReconnectContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendReconnectContract.Serialization.cs index 8b469c4e6f8ab..f46509918797c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendReconnectContract.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendReconnectContract.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Models; @@ -162,6 +163,93 @@ internal static BackendReconnectContract DeserializeBackendReconnectContract(Jso 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(After), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" after: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(After)) + { + builder.Append(" after: "); + var formattedTimeSpan = TypeFormatters.ToString(After.Value, "P"); + builder.AppendLine($"'{formattedTimeSpan}'"); + } + } + + 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; @@ -170,6 +258,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOp { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(BackendReconnectContract)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendReconnectContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendReconnectContract.cs index b1d3a62f054ab..31d2c4b01d66f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendReconnectContract.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendReconnectContract.cs @@ -66,6 +66,7 @@ internal BackendReconnectContract(ResourceIdentifier id, string name, ResourceTy } /// Duration in ISO8601 format after which reconnect will be initiated. Minimum duration of the Reconnect is PT2M. + [WirePath("properties.after")] public TimeSpan? After { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendServiceFabricClusterProperties.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendServiceFabricClusterProperties.Serialization.cs index 27e58786fc731..4b0747ab2a955 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendServiceFabricClusterProperties.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendServiceFabricClusterProperties.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -189,6 +191,177 @@ internal static BackendServiceFabricClusterProperties DeserializeBackendServiceF 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(ClientCertificateId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" clientCertificateId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ClientCertificateId)) + { + builder.Append(" clientCertificateId: "); + if (ClientCertificateId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ClientCertificateId}'''"); + } + else + { + builder.AppendLine($"'{ClientCertificateId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ClientCertificatethumbprint), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" clientCertificatethumbprint: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ClientCertificatethumbprint)) + { + builder.Append(" clientCertificatethumbprint: "); + if (ClientCertificatethumbprint.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ClientCertificatethumbprint}'''"); + } + else + { + builder.AppendLine($"'{ClientCertificatethumbprint}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(MaxPartitionResolutionRetries), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" maxPartitionResolutionRetries: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(MaxPartitionResolutionRetries)) + { + builder.Append(" maxPartitionResolutionRetries: "); + builder.AppendLine($"{MaxPartitionResolutionRetries.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ManagementEndpoints), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" managementEndpoints: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(ManagementEndpoints)) + { + if (ManagementEndpoints.Any()) + { + builder.Append(" managementEndpoints: "); + builder.AppendLine("["); + foreach (var item in ManagementEndpoints) + { + 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(ServerCertificateThumbprints), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" serverCertificateThumbprints: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(ServerCertificateThumbprints)) + { + if (ServerCertificateThumbprints.Any()) + { + builder.Append(" serverCertificateThumbprints: "); + builder.AppendLine("["); + foreach (var item in ServerCertificateThumbprints) + { + 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(ServerX509Names), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" serverX509Names: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(ServerX509Names)) + { + if (ServerX509Names.Any()) + { + builder.Append(" serverX509Names: "); + builder.AppendLine("["); + foreach (var item in ServerX509Names) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " serverX509Names: "); + } + 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; @@ -197,6 +370,8 @@ BinaryData IPersistableModel.Write(ModelR { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(BackendServiceFabricClusterProperties)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendServiceFabricClusterProperties.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendServiceFabricClusterProperties.cs index 2857a92cf3e2f..127c63715c065 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendServiceFabricClusterProperties.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendServiceFabricClusterProperties.cs @@ -83,16 +83,22 @@ internal BackendServiceFabricClusterProperties() } /// The client certificate id for the management endpoint. + [WirePath("clientCertificateId")] public string ClientCertificateId { get; set; } /// The client certificate thumbprint for the management endpoint. Will be ignored if certificatesIds are provided. + [WirePath("clientCertificatethumbprint")] public string ClientCertificatethumbprint { get; set; } /// Maximum number of retries while attempting resolve the partition. + [WirePath("maxPartitionResolutionRetries")] public int? MaxPartitionResolutionRetries { get; set; } /// The cluster management endpoint. + [WirePath("managementEndpoints")] public IList ManagementEndpoints { get; } /// Thumbprints of certificates cluster management service uses for tls communication. + [WirePath("serverCertificateThumbprints")] public IList ServerCertificateThumbprints { get; } /// Server X509 Certificate Names Collection. + [WirePath("serverX509Names")] public IList ServerX509Names { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendTlsProperties.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendTlsProperties.Serialization.cs index 6ae0a55786343..91dfe8d1849cb 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendTlsProperties.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendTlsProperties.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -107,6 +108,53 @@ internal static BackendTlsProperties DeserializeBackendTlsProperties(JsonElement return new BackendTlsProperties(validateCertificateChain, validateCertificateName, 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(ShouldValidateCertificateChain), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" validateCertificateChain: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ShouldValidateCertificateChain)) + { + builder.Append(" validateCertificateChain: "); + var boolValue = ShouldValidateCertificateChain.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ShouldValidateCertificateName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" validateCertificateName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ShouldValidateCertificateName)) + { + builder.Append(" validateCertificateName: "); + var boolValue = ShouldValidateCertificateName.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; @@ -115,6 +163,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOption { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(BackendTlsProperties)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendTlsProperties.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendTlsProperties.cs index c12f9a483df2c..0208b90855f5e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendTlsProperties.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendTlsProperties.cs @@ -62,8 +62,10 @@ internal BackendTlsProperties(bool? shouldValidateCertificateChain, bool? should } /// Flag indicating whether SSL certificate chain validation should be done when using self-signed certificates for this backend host. + [WirePath("validateCertificateChain")] public bool? ShouldValidateCertificateChain { get; set; } /// Flag indicating whether SSL certificate name validation should be done when using self-signed certificates for this backend host. + [WirePath("validateCertificateName")] public bool? ShouldValidateCertificateName { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BodyDiagnosticSettings.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BodyDiagnosticSettings.Serialization.cs index 92908b23eea82..716314cc37ce1 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BodyDiagnosticSettings.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BodyDiagnosticSettings.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -92,6 +93,36 @@ internal static BodyDiagnosticSettings DeserializeBodyDiagnosticSettings(JsonEle return new BodyDiagnosticSettings(bytes, 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(Bytes), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" bytes: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Bytes)) + { + builder.Append(" bytes: "); + builder.AppendLine($"{Bytes.Value}"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -100,6 +131,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOpti { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(BodyDiagnosticSettings)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BodyDiagnosticSettings.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BodyDiagnosticSettings.cs index 3641e041ea45d..dce83f9520144 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BodyDiagnosticSettings.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BodyDiagnosticSettings.cs @@ -60,6 +60,7 @@ internal BodyDiagnosticSettings(int? bytes, IDictionary seri } /// Number of request body bytes to log. + [WirePath("bytes")] public int? Bytes { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/CacheListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/CacheListResult.Serialization.cs index 86ff4af847fdc..4016d89ebfe30 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/CacheListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/CacheListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static CacheListResult DeserializeCacheListResult(JsonElement element, return new CacheListResult(value ?? new ChangeTrackingList(), count, 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(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + 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; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions opt { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(CacheListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/CertificateConfiguration.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/CertificateConfiguration.Serialization.cs index c777d1ef3f3f9..67fcab2a67b1e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/CertificateConfiguration.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/CertificateConfiguration.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -122,6 +123,94 @@ internal static CertificateConfiguration DeserializeCertificateConfiguration(Jso return new CertificateConfiguration(encodedCertificate, certificatePassword, storeName, certificate, 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(EncodedCertificate), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" encodedCertificate: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(EncodedCertificate)) + { + builder.Append(" encodedCertificate: "); + if (EncodedCertificate.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{EncodedCertificate}'''"); + } + else + { + builder.AppendLine($"'{EncodedCertificate}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CertificatePassword), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" certificatePassword: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CertificatePassword)) + { + builder.Append(" certificatePassword: "); + if (CertificatePassword.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{CertificatePassword}'''"); + } + else + { + builder.AppendLine($"'{CertificatePassword}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(StoreName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" storeName: "); + builder.AppendLine(propertyOverride); + } + else + { + builder.Append(" storeName: "); + builder.AppendLine($"'{StoreName.ToString()}'"); + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Certificate), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" certificate: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Certificate)) + { + builder.Append(" certificate: "); + BicepSerializationHelpers.AppendChildObject(builder, Certificate, options, 2, false, " certificate: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -130,6 +219,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOp { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(CertificateConfiguration)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/CertificateConfiguration.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/CertificateConfiguration.cs index 7299e9529ea3c..6b6c09a0c3739 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/CertificateConfiguration.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/CertificateConfiguration.cs @@ -73,12 +73,16 @@ internal CertificateConfiguration() } /// Base64 Encoded certificate. + [WirePath("encodedCertificate")] public string EncodedCertificate { get; set; } /// Certificate Password. + [WirePath("certificatePassword")] public string CertificatePassword { get; set; } /// The System.Security.Cryptography.x509certificates.StoreName certificate store location. Only Root and CertificateAuthority are valid locations. + [WirePath("storeName")] public CertificateConfigurationStoreName StoreName { get; set; } /// Certificate information. + [WirePath("certificate")] public CertificateInformation Certificate { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/CertificateInformation.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/CertificateInformation.Serialization.cs index 8a424f4caff5c..f17aa8699ae4a 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/CertificateInformation.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/CertificateInformation.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -101,6 +102,80 @@ internal static CertificateInformation DeserializeCertificateInformation(JsonEle return new CertificateInformation(expiry, thumbprint, subject, 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(ExpireOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" expiry: "); + builder.AppendLine(propertyOverride); + } + else + { + builder.Append(" expiry: "); + var formattedDateTimeString = TypeFormatters.ToString(ExpireOn, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Thumbprint), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" thumbprint: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Thumbprint)) + { + builder.Append(" thumbprint: "); + if (Thumbprint.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Thumbprint}'''"); + } + else + { + builder.AppendLine($"'{Thumbprint}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Subject), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" subject: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Subject)) + { + builder.Append(" subject: "); + if (Subject.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Subject}'''"); + } + else + { + builder.AppendLine($"'{Subject}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -109,6 +184,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOpti { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(CertificateInformation)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/CertificateInformation.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/CertificateInformation.cs index e9338e440c4eb..12d5d983bc59c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/CertificateInformation.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/CertificateInformation.cs @@ -79,10 +79,13 @@ internal CertificateInformation() } /// Expiration date of the certificate. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + [WirePath("expiry")] public DateTimeOffset ExpireOn { get; set; } /// Thumbprint of the certificate. + [WirePath("thumbprint")] public string Thumbprint { get; set; } /// Subject of the certificate. + [WirePath("subject")] public string Subject { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/CertificateListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/CertificateListResult.Serialization.cs index 1de3d88d92964..9f12085599b2b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/CertificateListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/CertificateListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static CertificateListResult DeserializeCertificateListResult(JsonEleme return new CertificateListResult(value ?? new ChangeTrackingList(), count, 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(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + 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; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptio { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(CertificateListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ClientSecretContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ClientSecretContract.Serialization.cs index cbb39fd889c08..fef034be3786d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ClientSecretContract.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ClientSecretContract.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -88,6 +89,44 @@ internal static ClientSecretContract DeserializeClientSecretContract(JsonElement return new ClientSecretContract(clientSecret, 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(ClientSecret), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" clientSecret: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ClientSecret)) + { + builder.Append(" clientSecret: "); + if (ClientSecret.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ClientSecret}'''"); + } + else + { + builder.AppendLine($"'{ClientSecret}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -96,6 +135,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOption { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ClientSecretContract)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ClientSecretContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ClientSecretContract.cs index 4c59e488670a9..86ca8dce558ab 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ClientSecretContract.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ClientSecretContract.cs @@ -60,6 +60,7 @@ internal ClientSecretContract(string clientSecret, IDictionary Client or app secret used in IdentityProviders, Aad, OpenID or OAuth. + [WirePath("clientSecret")] public string ClientSecret { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConfigurationDeployContent.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConfigurationDeployContent.cs index b406e1eee5851..a4aa2e5654cc6 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConfigurationDeployContent.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConfigurationDeployContent.cs @@ -62,8 +62,10 @@ internal ConfigurationDeployContent(string branch, bool? forceDelete, IDictionar } /// The name of the Git branch from which the configuration is to be deployed to the configuration database. + [WirePath("properties.branch")] public string Branch { get; set; } /// The value enforcing deleting subscriptions to products that are deleted in this update. + [WirePath("properties.force")] public bool? ForceDelete { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConfigurationSaveContent.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConfigurationSaveContent.cs index 243154d2cb12f..b60a59fc680c6 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConfigurationSaveContent.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConfigurationSaveContent.cs @@ -62,8 +62,10 @@ internal ConfigurationSaveContent(string branch, bool? forceUpdate, IDictionary< } /// The name of the Git branch in which to commit the current configuration snapshot. + [WirePath("properties.branch")] public string Branch { get; set; } /// The value if true, the current configuration database is committed to the Git repository, even if the Git repository has newer changes that would be overwritten. + [WirePath("properties.force")] public bool? ForceUpdate { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityCheckContent.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityCheckContent.cs index d3524dbceac27..26364367df127 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityCheckContent.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityCheckContent.cs @@ -81,16 +81,21 @@ internal ConnectivityCheckContent() } /// Definitions about the connectivity check origin. + [WirePath("source")] public ConnectivityCheckRequestSource Source { get; } /// The connectivity check operation destination. + [WirePath("destination")] public ConnectivityCheckRequestDestination Destination { get; } /// The IP version to be used. Only IPv4 is supported for now. + [WirePath("preferredIPVersion")] public PreferredIPVersion? PreferredIPVersion { get; set; } /// The request's protocol. Specific protocol configuration can be available based on this selection. The specified destination address must be coherent with this value. + [WirePath("protocol")] public ConnectivityCheckProtocol? Protocol { get; set; } /// Protocol-specific configuration. internal ConnectivityCheckRequestProtocolConfiguration ProtocolConfiguration { get; set; } /// Configuration for HTTP or HTTPS requests. + [WirePath("protocolConfiguration.HTTPConfiguration")] public ConnectivityCheckRequestHttpConfiguration ProtocolHttpConfiguration { get => ProtocolConfiguration is null ? default : ProtocolConfiguration.HttpConfiguration; diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityCheckRequestDestination.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityCheckRequestDestination.cs index 0cb593714e629..18146a8cefd9b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityCheckRequestDestination.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityCheckRequestDestination.cs @@ -74,8 +74,10 @@ internal ConnectivityCheckRequestDestination() } /// Destination address. Can either be an IP address or a FQDN. + [WirePath("address")] public string Address { get; } /// Destination port. + [WirePath("port")] public long Port { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityCheckRequestHttpConfiguration.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityCheckRequestHttpConfiguration.cs index 65f3e71e06a41..3a46247af167e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityCheckRequestHttpConfiguration.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityCheckRequestHttpConfiguration.cs @@ -66,10 +66,13 @@ internal ConnectivityCheckRequestHttpConfiguration(HttpMethodConfiguration? meth } /// The HTTP method to be used. + [WirePath("method")] public HttpMethodConfiguration? Method { get; set; } /// List of HTTP status codes considered valid for the request response. + [WirePath("validStatusCodes")] public IList ValidStatusCodes { get; } /// List of headers to be included in the request. + [WirePath("headers")] public IList Headers { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityCheckRequestProtocolConfiguration.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityCheckRequestProtocolConfiguration.cs index fa10c4d137e43..4f275e950a794 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityCheckRequestProtocolConfiguration.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityCheckRequestProtocolConfiguration.cs @@ -60,6 +60,7 @@ internal ConnectivityCheckRequestProtocolConfiguration(ConnectivityCheckRequestH } /// Configuration for HTTP or HTTPS requests. + [WirePath("HTTPConfiguration")] public ConnectivityCheckRequestHttpConfiguration HttpConfiguration { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityCheckRequestSource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityCheckRequestSource.cs index 1eaa8877a2554..b9b317ab1eebb 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityCheckRequestSource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityCheckRequestSource.cs @@ -72,8 +72,10 @@ internal ConnectivityCheckRequestSource() } /// The API Management service region from where to start the connectivity check operation. + [WirePath("region")] public string Region { get; } /// The particular VMSS instance from which to fire the request. + [WirePath("instance")] public long? Instance { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityCheckResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityCheckResult.Serialization.cs index 3c26504e2b5cc..53316846e63d8 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityCheckResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityCheckResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -200,6 +202,134 @@ internal static ConnectivityCheckResult DeserializeConnectivityCheckResult(JsonE 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(Hops), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" hops: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Hops)) + { + if (Hops.Any()) + { + builder.Append(" hops: "); + builder.AppendLine("["); + foreach (var item in Hops) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " hops: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ConnectionStatus), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" connectionStatus: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ConnectionStatus)) + { + builder.Append(" connectionStatus: "); + builder.AppendLine($"'{ConnectionStatus.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AvgLatencyInMs), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" avgLatencyInMs: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AvgLatencyInMs)) + { + builder.Append(" avgLatencyInMs: "); + builder.AppendLine($"'{AvgLatencyInMs.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(MinLatencyInMs), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" minLatencyInMs: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(MinLatencyInMs)) + { + builder.Append(" minLatencyInMs: "); + builder.AppendLine($"'{MinLatencyInMs.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(MaxLatencyInMs), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" maxLatencyInMs: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(MaxLatencyInMs)) + { + builder.Append(" maxLatencyInMs: "); + builder.AppendLine($"'{MaxLatencyInMs.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProbesSent), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" probesSent: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ProbesSent)) + { + builder.Append(" probesSent: "); + builder.AppendLine($"'{ProbesSent.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProbesFailed), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" probesFailed: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ProbesFailed)) + { + builder.Append(" probesFailed: "); + builder.AppendLine($"'{ProbesFailed.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; @@ -208,6 +338,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOpt { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ConnectivityCheckResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityCheckResult.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityCheckResult.cs index 29ed0b2f8d721..16e7418eb9af9 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityCheckResult.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityCheckResult.cs @@ -73,18 +73,25 @@ internal ConnectivityCheckResult(IReadOnlyList hops, Connection } /// List of hops between the source and the destination. + [WirePath("hops")] public IReadOnlyList Hops { get; } /// The connection status. + [WirePath("connectionStatus")] public ConnectionStatus? ConnectionStatus { get; } /// Average latency in milliseconds. + [WirePath("avgLatencyInMs")] public long? AvgLatencyInMs { get; } /// Minimum latency in milliseconds. + [WirePath("minLatencyInMs")] public long? MinLatencyInMs { get; } /// Maximum latency in milliseconds. + [WirePath("maxLatencyInMs")] public long? MaxLatencyInMs { get; } /// Total number of probes sent. + [WirePath("probesSent")] public long? ProbesSent { get; } /// Number of failed probes. + [WirePath("probesFailed")] public long? ProbesFailed { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityHop.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityHop.Serialization.cs index 3076271c75807..8e4ce3dd6e06b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityHop.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityHop.Serialization.cs @@ -8,7 +8,9 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; using System.Net; +using System.Text; using System.Text.Json; using Azure.Core; @@ -187,6 +189,156 @@ internal static ConnectivityHop DeserializeConnectivityHop(JsonElement element, 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(ConnectivityHopType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" type: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ConnectivityHopType)) + { + builder.Append(" type: "); + if (ConnectivityHopType.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ConnectivityHopType}'''"); + } + else + { + builder.AppendLine($"'{ConnectivityHopType}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + if (Id.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Id}'''"); + } + else + { + builder.AppendLine($"'{Id}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Address), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" address: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Address)) + { + builder.Append(" address: "); + builder.AppendLine($"'{Address.ToString()}'"); + } + } + + 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(NextHopIds), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextHopIds: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(NextHopIds)) + { + if (NextHopIds.Any()) + { + builder.Append(" nextHopIds: "); + builder.AppendLine("["); + foreach (var item in NextHopIds) + { + 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(Issues), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" issues: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Issues)) + { + if (Issues.Any()) + { + builder.Append(" issues: "); + builder.AppendLine("["); + foreach (var item in Issues) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " issues: "); + } + 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; @@ -195,6 +347,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions opt { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ConnectivityHop)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityHop.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityHop.cs index 39c512bbd1163..94db26e3085e4 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityHop.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityHop.cs @@ -74,16 +74,22 @@ internal ConnectivityHop(string connectivityHopType, string id, IPAddress addres } /// The type of the hop. + [WirePath("type")] public string ConnectivityHopType { get; } /// The ID of the hop. + [WirePath("id")] public string Id { get; } /// The IP address of the hop. + [WirePath("address")] public IPAddress Address { get; } /// The ID of the resource corresponding to this hop. + [WirePath("resourceId")] public ResourceIdentifier ResourceId { get; } /// List of next hop identifiers. + [WirePath("nextHopIds")] public IReadOnlyList NextHopIds { get; } /// List of issues. + [WirePath("issues")] public IReadOnlyList Issues { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityIssue.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityIssue.Serialization.cs index 11f125245a470..23dbf803b9823 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityIssue.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityIssue.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -170,6 +172,113 @@ internal static ConnectivityIssue DeserializeConnectivityIssue(JsonElement eleme return new ConnectivityIssue(origin, severity, type, context ?? 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(Origin), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" origin: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Origin)) + { + builder.Append(" origin: "); + builder.AppendLine($"'{Origin.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Severity), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" severity: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Severity)) + { + builder.Append(" severity: "); + builder.AppendLine($"'{Severity.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IssueType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" type: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IssueType)) + { + builder.Append(" type: "); + builder.AppendLine($"'{IssueType.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Context), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" context: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Context)) + { + if (Context.Any()) + { + builder.Append(" context: "); + builder.AppendLine("["); + foreach (var item in Context) + { + if (item == null) + { + builder.Append("null"); + continue; + } + builder.AppendLine("{"); + foreach (var item0 in item) + { + builder.Append($" '{item0.Key}': "); + if (item0.Value == null) + { + builder.Append("null"); + continue; + } + if (item0.Value.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{item0.Value}'''"); + } + else + { + builder.AppendLine($"'{item0.Value}'"); + } + } + 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; @@ -178,6 +287,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions o { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ConnectivityIssue)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityIssue.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityIssue.cs index b8ca76f1b5479..f30b8745b440c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityIssue.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityIssue.cs @@ -67,12 +67,16 @@ internal ConnectivityIssue(IssueOrigin? origin, IssueSeverity? severity, IssueTy } /// The origin of the issue. + [WirePath("origin")] public IssueOrigin? Origin { get; } /// The severity of the issue. + [WirePath("severity")] public IssueSeverity? Severity { get; } /// The type of issue. + [WirePath("type")] public IssueType? IssueType { get; } /// Provides additional context on the issue. + [WirePath("context")] public IReadOnlyList> Context { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityStatusContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityStatusContract.Serialization.cs index fca2c260ddca3..4133f0a7fe873 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityStatusContract.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityStatusContract.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -144,6 +145,141 @@ internal static ConnectivityStatusContract DeserializeConnectivityStatusContract 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(Status), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" status: "); + builder.AppendLine(propertyOverride); + } + else + { + builder.Append(" status: "); + builder.AppendLine($"'{Status.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: "); + if (Error.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Error}'''"); + } + else + { + builder.AppendLine($"'{Error}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(LastUpdatedOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" lastUpdated: "); + builder.AppendLine(propertyOverride); + } + else + { + builder.Append(" lastUpdated: "); + var formattedDateTimeString = TypeFormatters.ToString(LastUpdatedOn, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(LastStatusChangedOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" lastStatusChange: "); + builder.AppendLine(propertyOverride); + } + else + { + builder.Append(" lastStatusChange: "); + var formattedDateTimeString = TypeFormatters.ToString(LastStatusChangedOn, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ResourceType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" resourceType: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ResourceType)) + { + builder.Append(" resourceType: "); + if (ResourceType.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ResourceType}'''"); + } + else + { + builder.AppendLine($"'{ResourceType}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsOptional), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" isOptional: "); + builder.AppendLine(propertyOverride); + } + else + { + builder.Append(" isOptional: "); + var boolValue = IsOptional == 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; @@ -152,6 +288,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriter { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ConnectivityStatusContract)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityStatusContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityStatusContract.cs index c3ec6483acb81..8072e5f577892 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityStatusContract.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityStatusContract.cs @@ -105,24 +105,31 @@ internal ConnectivityStatusContract() } /// The hostname of the resource which the service depends on. This can be the database, storage or any other azure resource on which the service depends upon. + [WirePath("name")] public string Name { get; } /// Resource Connectivity Status Type identifier. + [WirePath("status")] public ConnectivityStatusType Status { get; } /// Error details of the connectivity to the resource. + [WirePath("error")] public string Error { get; } /// /// The date when the resource connectivity status was last updated. This status should be updated every 15 minutes. If this status has not been updated, then it means that the service has lost network connectivity to the resource, from inside the Virtual Network.The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. /// /// + [WirePath("lastUpdated")] public DateTimeOffset LastUpdatedOn { get; } /// /// The date when the resource connectivity status last Changed from success to failure or vice-versa. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. /// /// + [WirePath("lastStatusChange")] public DateTimeOffset LastStatusChangedOn { get; } /// Resource Type. + [WirePath("resourceType")] public string ResourceType { get; } /// Whether this is optional. + [WirePath("isOptional")] public bool IsOptional { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ContentItemListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ContentItemListResult.Serialization.cs index 2b1f526bdffee..49df88cb84a87 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ContentItemListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ContentItemListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -113,6 +115,67 @@ internal static ContentItemListResult DeserializeContentItemListResult(JsonEleme return new ContentItemListResult(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; @@ -121,6 +184,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptio { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ContentItemListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ContentTypeListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ContentTypeListResult.Serialization.cs index 6499056cd9ae9..81d854ab62787 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ContentTypeListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ContentTypeListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -113,6 +115,67 @@ internal static ContentTypeListResult DeserializeContentTypeListResult(JsonEleme return new ContentTypeListResult(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; @@ -121,6 +184,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptio { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ContentTypeListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DataMasking.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DataMasking.Serialization.cs index 60bd6e87474cc..02f15c4dad7c0 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DataMasking.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DataMasking.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -127,6 +129,67 @@ internal static DataMasking DeserializeDataMasking(JsonElement element, ModelRea return new DataMasking(queryParams ?? new ChangeTrackingList(), headers ?? 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(QueryParams), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" queryParams: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(QueryParams)) + { + if (QueryParams.Any()) + { + builder.Append(" queryParams: "); + builder.AppendLine("["); + foreach (var item in QueryParams) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " queryParams: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Headers), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" headers: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Headers)) + { + if (Headers.Any()) + { + builder.Append(" headers: "); + builder.AppendLine("["); + foreach (var item in Headers) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " headers: "); + } + 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; @@ -135,6 +198,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(DataMasking)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DataMasking.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DataMasking.cs index 2f27b49b6883b..7d32767a114fc 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DataMasking.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DataMasking.cs @@ -64,8 +64,10 @@ internal DataMasking(IList queryParams, IList Masking settings for Url query parameters. + [WirePath("queryParams")] public IList QueryParams { get; } /// Masking settings for headers. + [WirePath("headers")] public IList Headers { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DataMaskingEntity.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DataMaskingEntity.Serialization.cs index c73cd7d668a66..ae5e80952ba9e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DataMaskingEntity.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DataMaskingEntity.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -103,6 +104,59 @@ internal static DataMaskingEntity DeserializeDataMaskingEntity(JsonElement eleme return new DataMaskingEntity(value, mode, 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(Mode), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" mode: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Mode)) + { + builder.Append(" mode: "); + builder.AppendLine($"'{Mode.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; @@ -111,6 +165,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions o { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(DataMaskingEntity)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DataMaskingEntity.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DataMaskingEntity.cs index 3eb26d100da5d..cbd96e68289cc 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DataMaskingEntity.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DataMaskingEntity.cs @@ -62,8 +62,10 @@ internal DataMaskingEntity(string value, DataMaskingMode? mode, IDictionary The name of an entity to mask (e.g. a name of a header or a query parameter). + [WirePath("value")] public string Value { get; set; } /// Data masking mode. + [WirePath("mode")] public DataMaskingMode? Mode { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DeletedServicesListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DeletedServicesListResult.Serialization.cs index 4bd5d91dc857c..ac71ae27a88b5 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DeletedServicesListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DeletedServicesListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -113,6 +115,67 @@ internal static DeletedServicesListResult DeserializeDeletedServicesListResult(J return new DeletedServicesListResult(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; @@ -121,6 +184,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterO { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(DeletedServicesListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DiagnosticListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DiagnosticListResult.Serialization.cs index 60752fc7c6e1d..391834cdf4091 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DiagnosticListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DiagnosticListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static DiagnosticListResult DeserializeDiagnosticListResult(JsonElement return new DiagnosticListResult(value ?? new ChangeTrackingList(), count, 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(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + 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; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOption { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(DiagnosticListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DocumentationContractPatch.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DocumentationContractPatch.Serialization.cs new file mode 100644 index 0000000000000..a2fd27620367f --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DocumentationContractPatch.Serialization.cs @@ -0,0 +1,148 @@ +// 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.ApiManagement.Models +{ + public partial class DocumentationContractPatch : 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(DocumentationContractPatch)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(Title)) + { + writer.WritePropertyName("title"u8); + writer.WriteStringValue(Title); + } + if (Optional.IsDefined(Content)) + { + writer.WritePropertyName("content"u8); + writer.WriteStringValue(Content); + } + 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(); + } + + DocumentationContractPatch 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(DocumentationContractPatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDocumentationContractPatch(document.RootElement, options); + } + + internal static DocumentationContractPatch DeserializeDocumentationContractPatch(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("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("title"u8)) + { + title = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("content"u8)) + { + content = property0.Value.GetString(); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DocumentationContractPatch(title, content, 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(DocumentationContractPatch)} does not support writing '{options.Format}' format."); + } + } + + DocumentationContractPatch 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 DeserializeDocumentationContractPatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DocumentationContractPatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DocumentationContractPatch.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DocumentationContractPatch.cs new file mode 100644 index 0000000000000..6f7cf0bea8cac --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DocumentationContractPatch.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.ApiManagement.Models +{ + /// Documentation update contract details. + public partial class DocumentationContractPatch + { + /// + /// 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 DocumentationContractPatch() + { + } + + /// Initializes a new instance of . + /// documentation title. + /// Markdown documentation content. + /// Keeps track of any properties unknown to the library. + internal DocumentationContractPatch(string title, string content, IDictionary serializedAdditionalRawData) + { + Title = title; + Content = content; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// documentation title. + [WirePath("properties.title")] + public string Title { get; set; } + /// Markdown documentation content. + [WirePath("properties.content")] + public string Content { get; set; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DocumentationListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DocumentationListResult.Serialization.cs new file mode 100644 index 0000000000000..d56f6b1c7fdc1 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DocumentationListResult.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.ApiManagement.Models +{ + internal partial class DocumentationListResult : 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(DocumentationListResult)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsCollectionDefined(Value)) + { + 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(); + } + + DocumentationListResult 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(DocumentationListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDocumentationListResult(document.RootElement, options); + } + + internal static DocumentationListResult DeserializeDocumentationListResult(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(DocumentationContractData.DeserializeDocumentationContractData(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 DocumentationListResult(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(DocumentationListResult)} does not support writing '{options.Format}' format."); + } + } + + DocumentationListResult 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 DeserializeDocumentationListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DocumentationListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DocumentationListResult.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DocumentationListResult.cs new file mode 100644 index 0000000000000..3daee4497be8d --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DocumentationListResult.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.ApiManagement.Models +{ + /// Paged Documentation list representation. + internal partial class DocumentationListResult + { + /// + /// 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 DocumentationListResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Page values. + /// Next page link if any. + /// Keeps track of any properties unknown to the library. + internal DocumentationListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Page values. + public IReadOnlyList Value { get; } + /// Next page link if any. + public string NextLink { get; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/EmailTemplateListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/EmailTemplateListResult.Serialization.cs index 262193e8b2f4a..131389345c1d6 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/EmailTemplateListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/EmailTemplateListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static EmailTemplateListResult DeserializeEmailTemplateListResult(JsonE return new EmailTemplateListResult(value ?? new ChangeTrackingList(), count, 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(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + 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; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOpt { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(EmailTemplateListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/EmailTemplateParametersContractProperties.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/EmailTemplateParametersContractProperties.Serialization.cs index d71579b17915a..0ebe548a47ae2 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/EmailTemplateParametersContractProperties.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/EmailTemplateParametersContractProperties.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -110,6 +111,90 @@ internal static EmailTemplateParametersContractProperties DeserializeEmailTempla return new EmailTemplateParametersContractProperties(name, title, 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(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(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(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; @@ -118,6 +203,8 @@ BinaryData IPersistableModel.Write(Mo { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(EmailTemplateParametersContractProperties)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/EmailTemplateParametersContractProperties.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/EmailTemplateParametersContractProperties.cs index bb1ea4b447674..cb15fddfa3d55 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/EmailTemplateParametersContractProperties.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/EmailTemplateParametersContractProperties.cs @@ -64,10 +64,13 @@ internal EmailTemplateParametersContractProperties(string name, string title, st } /// Template parameter name. + [WirePath("name")] public string Name { get; set; } /// Template parameter title. + [WirePath("title")] public string Title { get; set; } /// Template parameter description. + [WirePath("description")] public string Description { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/EndpointDependency.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/EndpointDependency.Serialization.cs index c68d892a1570d..38f09ea75789e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/EndpointDependency.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/EndpointDependency.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -113,6 +115,67 @@ internal static EndpointDependency DeserializeEndpointDependency(JsonElement ele return new EndpointDependency(domainName, endpointDetails ?? 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(DomainName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" domainName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DomainName)) + { + builder.Append(" domainName: "); + if (DomainName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{DomainName}'''"); + } + else + { + builder.AppendLine($"'{DomainName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EndpointDetails), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" endpointDetails: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(EndpointDetails)) + { + if (EndpointDetails.Any()) + { + builder.Append(" endpointDetails: "); + builder.AppendLine("["); + foreach (var item in EndpointDetails) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " endpointDetails: "); + } + 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; @@ -121,6 +184,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(EndpointDependency)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/EndpointDependency.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/EndpointDependency.cs index 833f86bdcf11a..45573fd411f96 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/EndpointDependency.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/EndpointDependency.cs @@ -63,8 +63,10 @@ internal EndpointDependency(string domainName, IReadOnlyList end } /// The domain name of the dependency. + [WirePath("domainName")] public string DomainName { get; } /// The Ports used when connecting to DomainName. + [WirePath("endpointDetails")] public IReadOnlyList EndpointDetails { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/EndpointDetail.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/EndpointDetail.Serialization.cs index 15cfea6bb661e..074f481025913 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/EndpointDetail.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/EndpointDetail.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -103,6 +104,59 @@ internal static EndpointDetail DeserializeEndpointDetail(JsonElement element, Mo return new EndpointDetail(port, region, 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(Port), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" port: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Port)) + { + builder.Append(" port: "); + builder.AppendLine($"{Port.Value}"); + } + } + + 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}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -111,6 +165,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions opti { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(EndpointDetail)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/EndpointDetail.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/EndpointDetail.cs index 064503efd78df..49f2c8e195da5 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/EndpointDetail.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/EndpointDetail.cs @@ -62,8 +62,10 @@ internal EndpointDetail(int? port, string region, IDictionary The port an endpoint is connected to. + [WirePath("port")] public int? Port { get; } /// The region of the dependency. + [WirePath("region")] public string Region { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ErrorFieldContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ErrorFieldContract.Serialization.cs index 2bd388d8c5ab8..359f78d338464 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ErrorFieldContract.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ErrorFieldContract.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -110,6 +111,90 @@ internal static ErrorFieldContract DeserializeErrorFieldContract(JsonElement ele return new ErrorFieldContract(code, message, target, 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}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Target), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" target: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Target)) + { + builder.Append(" target: "); + if (Target.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Target}'''"); + } + else + { + builder.AppendLine($"'{Target}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -118,6 +203,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ErrorFieldContract)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ErrorFieldContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ErrorFieldContract.cs index 5163f42f7c5a0..9f887f6548715 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ErrorFieldContract.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ErrorFieldContract.cs @@ -64,10 +64,13 @@ internal ErrorFieldContract(string code, string message, string target, IDiction } /// Property level error code. + [WirePath("code")] public string Code { get; set; } /// Human-readable representation of property-level error. + [WirePath("message")] public string Message { get; set; } /// Property name. + [WirePath("target")] public string Target { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ErrorResponseBody.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ErrorResponseBody.Serialization.cs index 047df58979880..8e58f673c6b4b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ErrorResponseBody.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ErrorResponseBody.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -124,6 +126,90 @@ internal static ErrorResponseBody DeserializeErrorResponseBody(JsonElement eleme return new ErrorResponseBody(code, message, details ?? 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(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}'"); + } + } + } + + 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(" ]"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -132,6 +218,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions o { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ErrorResponseBody)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ErrorResponseBody.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ErrorResponseBody.cs index a2e84f3ba2d89..b9b01b0a1d6b4 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ErrorResponseBody.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ErrorResponseBody.cs @@ -65,10 +65,13 @@ internal ErrorResponseBody(string code, string message, IList Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response. + [WirePath("code")] public string Code { get; set; } /// Human-readable representation of the error. + [WirePath("message")] public string Message { get; set; } /// The list of invalid fields send in request, in case of validation error. + [WirePath("details")] public IList Details { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayApiData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayApiData.Serialization.cs index b0fc2a28d69fa..1ee2ef1a8ba0b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayApiData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayApiData.Serialization.cs @@ -8,6 +8,8 @@ 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; @@ -456,6 +458,475 @@ internal static GatewayApiData DeserializeGatewayApiData(JsonElement element, Mo 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(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}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AuthenticationSettings), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" authenticationSettings: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AuthenticationSettings)) + { + builder.Append(" authenticationSettings: "); + BicepSerializationHelpers.AppendChildObject(builder, AuthenticationSettings, options, 4, false, " authenticationSettings: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SubscriptionKeyParameterNames), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" subscriptionKeyParameterNames: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SubscriptionKeyParameterNames)) + { + builder.Append(" subscriptionKeyParameterNames: "); + BicepSerializationHelpers.AppendChildObject(builder, SubscriptionKeyParameterNames, options, 4, false, " subscriptionKeyParameterNames: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" type: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiType)) + { + builder.Append(" type: "); + builder.AppendLine($"'{ApiType.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiRevision), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiRevision: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiRevision)) + { + builder.Append(" apiRevision: "); + if (ApiRevision.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ApiRevision}'''"); + } + else + { + builder.AppendLine($"'{ApiRevision}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiVersion), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiVersion: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiVersion)) + { + builder.Append(" apiVersion: "); + if (ApiVersion.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ApiVersion}'''"); + } + else + { + builder.AppendLine($"'{ApiVersion}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsCurrent), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" isCurrent: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsCurrent)) + { + builder.Append(" isCurrent: "); + var boolValue = IsCurrent.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsOnline), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" isOnline: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsOnline)) + { + builder.Append(" isOnline: "); + var boolValue = IsOnline.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiRevisionDescription), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiRevisionDescription: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiRevisionDescription)) + { + builder.Append(" apiRevisionDescription: "); + if (ApiRevisionDescription.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ApiRevisionDescription}'''"); + } + else + { + builder.AppendLine($"'{ApiRevisionDescription}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiVersionDescription), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiVersionDescription: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiVersionDescription)) + { + builder.Append(" apiVersionDescription: "); + if (ApiVersionDescription.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ApiVersionDescription}'''"); + } + else + { + builder.AppendLine($"'{ApiVersionDescription}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiVersionSetId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiVersionSetId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiVersionSetId)) + { + builder.Append(" apiVersionSetId: "); + builder.AppendLine($"'{ApiVersionSetId.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsSubscriptionRequired), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" subscriptionRequired: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsSubscriptionRequired)) + { + builder.Append(" subscriptionRequired: "); + var boolValue = IsSubscriptionRequired.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TermsOfServiceLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" termsOfServiceUrl: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TermsOfServiceLink)) + { + builder.Append(" termsOfServiceUrl: "); + if (TermsOfServiceLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{TermsOfServiceLink}'''"); + } + else + { + builder.AppendLine($"'{TermsOfServiceLink}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Contact), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" contact: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Contact)) + { + builder.Append(" contact: "); + BicepSerializationHelpers.AppendChildObject(builder, Contact, options, 4, false, " contact: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(License), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" license: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(License)) + { + builder.Append(" license: "); + BicepSerializationHelpers.AppendChildObject(builder, License, options, 4, false, " license: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SourceApiId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" sourceApiId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SourceApiId)) + { + builder.Append(" sourceApiId: "); + builder.AppendLine($"'{SourceApiId.ToString()}'"); + } + } + + 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(ServiceLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" serviceUrl: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ServiceLink)) + { + builder.Append(" serviceUrl: "); + if (ServiceLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ServiceLink}'''"); + } + else + { + builder.AppendLine($"'{ServiceLink}'"); + } + } + } + + 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(Protocols), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" protocols: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Protocols)) + { + if (Protocols.Any()) + { + builder.Append(" protocols: "); + builder.AppendLine("["); + foreach (var item in Protocols) + { + builder.AppendLine($" '{item.ToString()}'"); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiVersionSet), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiVersionSet: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiVersionSet)) + { + builder.Append(" apiVersionSet: "); + BicepSerializationHelpers.AppendChildObject(builder, ApiVersionSet, options, 4, false, " apiVersionSet: "); + } + } + + 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; @@ -464,6 +935,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions opti { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(GatewayApiData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayApiData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayApiData.cs index a0097d18d91b8..42bb9873b5b6b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayApiData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayApiData.cs @@ -107,46 +107,67 @@ internal GatewayApiData(ResourceIdentifier id, string name, ResourceType resourc } /// Description of the API. May include HTML formatting tags. + [WirePath("properties.description")] public string Description { get; set; } /// Collection of authentication settings included into this API. + [WirePath("properties.authenticationSettings")] public AuthenticationSettingsContract AuthenticationSettings { get; set; } /// Protocols over which API is made available. + [WirePath("properties.subscriptionKeyParameterNames")] public SubscriptionKeyParameterNamesContract SubscriptionKeyParameterNames { get; set; } /// Type of API. + [WirePath("properties.type")] public ApiType? ApiType { get; set; } /// Describes the revision of the API. If no value is provided, default revision 1 is created. + [WirePath("properties.apiRevision")] public string ApiRevision { get; set; } /// Indicates the version identifier of the API if the API is versioned. + [WirePath("properties.apiVersion")] public string ApiVersion { get; set; } /// Indicates if API revision is current api revision. + [WirePath("properties.isCurrent")] public bool? IsCurrent { get; set; } /// Indicates if API revision is accessible via the gateway. + [WirePath("properties.isOnline")] public bool? IsOnline { get; } /// Description of the API Revision. + [WirePath("properties.apiRevisionDescription")] public string ApiRevisionDescription { get; set; } /// Description of the API Version. + [WirePath("properties.apiVersionDescription")] public string ApiVersionDescription { get; set; } /// A resource identifier for the related ApiVersionSet. + [WirePath("properties.apiVersionSetId")] public ResourceIdentifier ApiVersionSetId { get; set; } /// Specifies whether an API or Product subscription is required for accessing the API. + [WirePath("properties.subscriptionRequired")] public bool? IsSubscriptionRequired { get; set; } /// A URL to the Terms of Service for the API. MUST be in the format of a URL. + [WirePath("properties.termsOfServiceUrl")] public string TermsOfServiceLink { get; set; } /// Contact information for the API. + [WirePath("properties.contact")] public ApiContactInformation Contact { get; set; } /// License information for the API. + [WirePath("properties.license")] public ApiLicenseInformation License { get; set; } /// API identifier of the source API. + [WirePath("properties.sourceApiId")] public ResourceIdentifier SourceApiId { get; set; } /// API name. Must be 1 to 300 characters long. + [WirePath("properties.displayName")] public string DisplayName { get; set; } /// Absolute URL of the backend service implementing this API. Cannot be more than 2000 characters long. + [WirePath("properties.serviceUrl")] public string ServiceLink { get; set; } /// Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API. + [WirePath("properties.path")] public string Path { get; set; } /// Describes on which protocols the operations in this API can be invoked. + [WirePath("properties.protocols")] public IList Protocols { get; } /// Version set details. + [WirePath("properties.apiVersionSet")] public ApiVersionSetContractDetails ApiVersionSet { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayCertificateAuthorityListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayCertificateAuthorityListResult.Serialization.cs index df2fae5ff2d50..4cbf0204d2e77 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayCertificateAuthorityListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayCertificateAuthorityListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -113,6 +115,67 @@ internal static GatewayCertificateAuthorityListResult DeserializeGatewayCertific return new GatewayCertificateAuthorityListResult(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; @@ -121,6 +184,8 @@ BinaryData IPersistableModel.Write(ModelR { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(GatewayCertificateAuthorityListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayHostnameConfigurationListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayHostnameConfigurationListResult.Serialization.cs index 649718c5c0a0a..863fb62852d66 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayHostnameConfigurationListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayHostnameConfigurationListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -113,6 +115,67 @@ internal static GatewayHostnameConfigurationListResult DeserializeGatewayHostnam return new GatewayHostnameConfigurationListResult(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; @@ -121,6 +184,8 @@ BinaryData IPersistableModel.Write(Model { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(GatewayHostnameConfigurationListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayKeyRegenerateContent.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayKeyRegenerateContent.cs index f4c8f41cb977a..41c8b6f9d4e93 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayKeyRegenerateContent.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayKeyRegenerateContent.cs @@ -67,6 +67,7 @@ internal GatewayKeyRegenerateContent() } /// The Key being regenerated. + [WirePath("keyType")] public GatewayRegenerateKeyType KeyType { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayKeysContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayKeysContract.Serialization.cs index 88cffac0adbdd..924d7a8e7f81e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayKeysContract.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayKeysContract.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -99,6 +100,67 @@ internal static GatewayKeysContract DeserializeGatewayKeysContract(JsonElement e return new GatewayKeysContract(primary, secondary, 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(Primary), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" primary: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Primary)) + { + builder.Append(" primary: "); + if (Primary.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Primary}'''"); + } + else + { + builder.AppendLine($"'{Primary}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Secondary), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" secondary: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Secondary)) + { + builder.Append(" secondary: "); + if (Secondary.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Secondary}'''"); + } + else + { + builder.AppendLine($"'{Secondary}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -107,6 +169,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(GatewayKeysContract)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayKeysContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayKeysContract.cs index 25e33b53c779f..52495eb1ed78e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayKeysContract.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayKeysContract.cs @@ -62,8 +62,10 @@ internal GatewayKeysContract(string primary, string secondary, IDictionary Primary gateway key. + [WirePath("primary")] public string Primary { get; } /// Secondary gateway key. + [WirePath("secondary")] public string Secondary { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayListResult.Serialization.cs index 074018f3ee02a..a68903b865d03 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static GatewayListResult DeserializeGatewayListResult(JsonElement eleme return new GatewayListResult(value ?? new ChangeTrackingList(), count, 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(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + 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; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions o { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(GatewayListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayTokenContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayTokenContract.Serialization.cs index d1bdf99204e49..94342c7f256e4 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayTokenContract.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayTokenContract.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -88,6 +89,44 @@ internal static GatewayTokenContract DeserializeGatewayTokenContract(JsonElement return new GatewayTokenContract(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(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; @@ -96,6 +135,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOption { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(GatewayTokenContract)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayTokenContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayTokenContract.cs index 25c4303d7aa49..cdec1ef0aa5e1 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayTokenContract.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayTokenContract.cs @@ -60,6 +60,7 @@ internal GatewayTokenContract(string value, IDictionary seri } /// Shared Access Authentication token value for the Gateway. + [WirePath("value")] public string Value { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayTokenRequestContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayTokenRequestContract.cs index 9d9221a56860f..83c5bcccfbc7e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayTokenRequestContract.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayTokenRequestContract.cs @@ -77,11 +77,13 @@ internal GatewayTokenRequestContract() } /// The Key to be used to generate gateway token. + [WirePath("keyType")] public TokenGenerationUsedKeyType KeyType { get; } /// /// The Expiry time of the Token. Maximum token expiry time is set to 30 days. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. /// /// + [WirePath("expiry")] public DateTimeOffset Expiry { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GenerateSsoUriResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GenerateSsoUriResult.Serialization.cs index 4344e40f37a3f..511fca42211e5 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GenerateSsoUriResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GenerateSsoUriResult.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -88,6 +89,44 @@ internal static GenerateSsoUriResult DeserializeGenerateSsoUriResult(JsonElement return new GenerateSsoUriResult(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(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; @@ -96,6 +135,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOption { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(GenerateSsoUriResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GenerateSsoUriResult.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GenerateSsoUriResult.cs index 2f02a4a089404..43c3d21dad07b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GenerateSsoUriResult.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GenerateSsoUriResult.cs @@ -60,6 +60,7 @@ internal GenerateSsoUriResult(string value, IDictionary seri } /// Redirect Url containing the SSO URL value. + [WirePath("value")] public string Value { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GitOperationResultContractData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GitOperationResultContractData.Serialization.cs index 2814e72ee22a5..645a168da733b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GitOperationResultContractData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GitOperationResultContractData.Serialization.cs @@ -8,6 +8,8 @@ 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; @@ -260,6 +262,208 @@ internal static GitOperationResultContractData DeserializeGitOperationResultCont 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(OperationResultIdentifier), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(OperationResultIdentifier)) + { + builder.Append(" id: "); + if (OperationResultIdentifier.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{OperationResultIdentifier}'''"); + } + else + { + builder.AppendLine($"'{OperationResultIdentifier}'"); + } + } + } + + 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.ToSerialString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(StartedOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" started: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(StartedOn)) + { + builder.Append(" started: "); + var formattedDateTimeString = TypeFormatters.ToString(StartedOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(UpdatedOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" updated: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(UpdatedOn)) + { + builder.Append(" updated: "); + var formattedDateTimeString = TypeFormatters.ToString(UpdatedOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ResultInfo), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" resultInfo: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ResultInfo)) + { + builder.Append(" resultInfo: "); + if (ResultInfo.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ResultInfo}'''"); + } + else + { + builder.AppendLine($"'{ResultInfo}'"); + } + } + } + + 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, 4, false, " error: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ActionLog), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" actionLog: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(ActionLog)) + { + if (ActionLog.Any()) + { + builder.Append(" actionLog: "); + builder.AppendLine("["); + foreach (var item in ActionLog) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " actionLog: "); + } + 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; @@ -268,6 +472,8 @@ BinaryData IPersistableModel.Write(ModelReaderWr { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(GitOperationResultContractData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GitOperationResultContractData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GitOperationResultContractData.cs index cb917e7f6198a..ae94e5402c078 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GitOperationResultContractData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GitOperationResultContractData.cs @@ -85,24 +85,31 @@ internal GitOperationResultContractData(ResourceIdentifier id, string name, Reso } /// Operation result identifier. + [WirePath("properties.id")] public string OperationResultIdentifier { get; set; } /// Status of an async operation. + [WirePath("properties.status")] public AsyncOperationStatus? Status { get; set; } /// /// Start time of an async operation. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. /// /// + [WirePath("properties.started")] public DateTimeOffset? StartedOn { get; set; } /// /// Last update time of an async operation. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. /// /// + [WirePath("properties.updated")] public DateTimeOffset? UpdatedOn { get; set; } /// Optional result info. + [WirePath("properties.resultInfo")] public string ResultInfo { get; set; } /// Error Body Contract. + [WirePath("properties.error")] public ErrorResponseBody Error { get; set; } /// This property if only provided as part of the TenantConfiguration_Validate operation. It contains the log the entities which will be updated/created/deleted as part of the TenantConfiguration_Deploy operation. + [WirePath("properties.actionLog")] public IReadOnlyList ActionLog { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GlobalSchemaListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GlobalSchemaListResult.Serialization.cs index 313598d287631..7494b809be9db 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GlobalSchemaListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GlobalSchemaListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static GlobalSchemaListResult DeserializeGlobalSchemaListResult(JsonEle return new GlobalSchemaListResult(value ?? new ChangeTrackingList(), count, 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(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + 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; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOpti { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(GlobalSchemaListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GroupContractProperties.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GroupContractProperties.Serialization.cs index 1448f675d3021..7012f707b9e15 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GroupContractProperties.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GroupContractProperties.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -143,6 +144,121 @@ internal static GroupContractProperties DeserializeGroupContractProperties(JsonE 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(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(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}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsBuiltIn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" builtIn: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsBuiltIn)) + { + builder.Append(" builtIn: "); + var boolValue = IsBuiltIn.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiManagementGroupType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" type: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiManagementGroupType)) + { + builder.Append(" type: "); + builder.AppendLine($"'{ApiManagementGroupType.Value.ToSerialString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ExternalId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" externalId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ExternalId)) + { + builder.Append(" externalId: "); + if (ExternalId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ExternalId}'''"); + } + else + { + builder.AppendLine($"'{ExternalId}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -151,6 +267,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOpt { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(GroupContractProperties)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GroupContractProperties.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GroupContractProperties.cs index e6a0f12f06083..b0ef0fb832766 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GroupContractProperties.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GroupContractProperties.cs @@ -78,14 +78,19 @@ internal GroupContractProperties() } /// Group name. + [WirePath("displayName")] public string DisplayName { get; } /// Group description. Can contain HTML formatting tags. + [WirePath("description")] public string Description { get; } /// true if the group is one of the three system groups (Administrators, Developers, or Guests); otherwise false. + [WirePath("builtIn")] public bool? IsBuiltIn { get; } /// Group type. + [WirePath("type")] public ApiManagementGroupType? ApiManagementGroupType { get; } /// For external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory `aad://<tenant>.onmicrosoft.com/groups/<group object id>`; otherwise the value is null. + [WirePath("externalId")] public string ExternalId { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GroupListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GroupListResult.Serialization.cs index a8119302fb042..a3f242d77aa41 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GroupListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GroupListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static GroupListResult DeserializeGroupListResult(JsonElement element, return new GroupListResult(value ?? new ChangeTrackingList(), count, 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(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + 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; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions opt { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(GroupListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/HostnameConfiguration.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/HostnameConfiguration.Serialization.cs index 67de90f1127f3..d3e231216cc5c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/HostnameConfiguration.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/HostnameConfiguration.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -228,6 +229,217 @@ internal static HostnameConfiguration DeserializeHostnameConfiguration(JsonEleme 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(HostnameType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" type: "); + builder.AppendLine(propertyOverride); + } + else + { + builder.Append(" type: "); + builder.AppendLine($"'{HostnameType.ToString()}'"); + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(HostName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" hostName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(HostName)) + { + builder.Append(" hostName: "); + if (HostName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{HostName}'''"); + } + else + { + builder.AppendLine($"'{HostName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(KeyVaultSecretUri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" keyVaultId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(KeyVaultSecretUri)) + { + builder.Append(" keyVaultId: "); + builder.AppendLine($"'{KeyVaultSecretUri.AbsoluteUri}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IdentityClientId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" identityClientId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IdentityClientId)) + { + builder.Append(" identityClientId: "); + if (IdentityClientId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{IdentityClientId}'''"); + } + else + { + builder.AppendLine($"'{IdentityClientId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EncodedCertificate), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" encodedCertificate: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(EncodedCertificate)) + { + builder.Append(" encodedCertificate: "); + if (EncodedCertificate.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{EncodedCertificate}'''"); + } + else + { + builder.AppendLine($"'{EncodedCertificate}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CertificatePassword), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" certificatePassword: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CertificatePassword)) + { + builder.Append(" certificatePassword: "); + if (CertificatePassword.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{CertificatePassword}'''"); + } + else + { + builder.AppendLine($"'{CertificatePassword}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsDefaultSslBindingEnabled), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" defaultSslBinding: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsDefaultSslBindingEnabled)) + { + builder.Append(" defaultSslBinding: "); + var boolValue = IsDefaultSslBindingEnabled.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsClientCertificateNegotiationEnabled), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" negotiateClientCertificate: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsClientCertificateNegotiationEnabled)) + { + builder.Append(" negotiateClientCertificate: "); + var boolValue = IsClientCertificateNegotiationEnabled.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Certificate), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" certificate: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Certificate)) + { + builder.Append(" certificate: "); + BicepSerializationHelpers.AppendChildObject(builder, Certificate, options, 2, false, " certificate: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CertificateSource), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" certificateSource: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CertificateSource)) + { + builder.Append(" certificateSource: "); + builder.AppendLine($"'{CertificateSource.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CertificateStatus), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" certificateStatus: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CertificateStatus)) + { + builder.Append(" certificateStatus: "); + builder.AppendLine($"'{CertificateStatus.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; @@ -236,6 +448,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptio { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(HostnameConfiguration)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/HostnameConfiguration.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/HostnameConfiguration.cs index 39d7d57980fe8..0f006e1ece4a1 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/HostnameConfiguration.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/HostnameConfiguration.cs @@ -64,7 +64,7 @@ public HostnameConfiguration(HostnameType hostnameType, string hostName) /// System or User Assigned Managed identity clientId as generated by Azure AD, which has GET access to the keyVault containing the SSL certificate. /// Base64 Encoded certificate. /// Certificate Password. - /// Specify true to setup the certificate associated with this Hostname as the Default SSL Certificate. If a client does not send the SNI header, then this will be the certificate that will be challenged. The property is useful if a service has multiple custom hostname enabled and it needs to decide on the default ssl certificate. The setting only applied to Proxy Hostname Type. + /// Specify true to setup the certificate associated with this Hostname as the Default SSL Certificate. If a client does not send the SNI header, then this will be the certificate that will be challenged. The property is useful if a service has multiple custom hostname enabled and it needs to decide on the default ssl certificate. The setting only applied to gateway Hostname Type. /// Specify true to always negotiate client certificate on the hostname. Default Value is false. /// Certificate information. /// Certificate Source. @@ -92,26 +92,37 @@ internal HostnameConfiguration() } /// Hostname type. + [WirePath("type")] public HostnameType HostnameType { get; set; } /// Hostname to configure on the Api Management service. + [WirePath("hostName")] public string HostName { get; set; } /// Url to the KeyVault Secret containing the Ssl Certificate. If absolute Url containing version is provided, auto-update of ssl certificate will not work. This requires Api Management service to be configured with aka.ms/apimmsi. The secret should be of type *application/x-pkcs12*. + [WirePath("keyVaultId")] public Uri KeyVaultSecretUri { get; set; } /// System or User Assigned Managed identity clientId as generated by Azure AD, which has GET access to the keyVault containing the SSL certificate. + [WirePath("identityClientId")] public string IdentityClientId { get; set; } /// Base64 Encoded certificate. + [WirePath("encodedCertificate")] public string EncodedCertificate { get; set; } /// Certificate Password. + [WirePath("certificatePassword")] public string CertificatePassword { get; set; } - /// Specify true to setup the certificate associated with this Hostname as the Default SSL Certificate. If a client does not send the SNI header, then this will be the certificate that will be challenged. The property is useful if a service has multiple custom hostname enabled and it needs to decide on the default ssl certificate. The setting only applied to Proxy Hostname Type. + /// Specify true to setup the certificate associated with this Hostname as the Default SSL Certificate. If a client does not send the SNI header, then this will be the certificate that will be challenged. The property is useful if a service has multiple custom hostname enabled and it needs to decide on the default ssl certificate. The setting only applied to gateway Hostname Type. + [WirePath("defaultSslBinding")] public bool? IsDefaultSslBindingEnabled { get; set; } /// Specify true to always negotiate client certificate on the hostname. Default Value is false. + [WirePath("negotiateClientCertificate")] public bool? IsClientCertificateNegotiationEnabled { get; set; } /// Certificate information. + [WirePath("certificate")] public CertificateInformation Certificate { get; set; } /// Certificate Source. + [WirePath("certificateSource")] public CertificateSource? CertificateSource { get; set; } /// Certificate Status. + [WirePath("certificateStatus")] public CertificateStatus? CertificateStatus { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/HttpHeaderConfiguration.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/HttpHeaderConfiguration.cs index 5a6e85a51feec..2a6268af1f8e4 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/HttpHeaderConfiguration.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/HttpHeaderConfiguration.cs @@ -75,8 +75,10 @@ internal HttpHeaderConfiguration() } /// Header name. + [WirePath("name")] public string Name { get; } /// Header value. + [WirePath("value")] public string Value { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/HttpMessageDiagnostic.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/HttpMessageDiagnostic.Serialization.cs index 826c941c5775f..923061dcf2b36 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/HttpMessageDiagnostic.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/HttpMessageDiagnostic.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -132,6 +134,90 @@ internal static HttpMessageDiagnostic DeserializeHttpMessageDiagnostic(JsonEleme return new HttpMessageDiagnostic(headers ?? new ChangeTrackingList(), body, dataMasking, 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.IsCollectionDefined(Headers)) + { + if (Headers.Any()) + { + builder.Append(" headers: "); + builder.AppendLine("["); + foreach (var item in Headers) + { + 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("BodyBytes", out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" body: "); + builder.AppendLine("{"); + builder.Append(" bytes: "); + builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); + } + else + { + if (Optional.IsDefined(Body)) + { + builder.Append(" body: "); + BicepSerializationHelpers.AppendChildObject(builder, Body, options, 2, false, " body: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DataMasking), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" dataMasking: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DataMasking)) + { + builder.Append(" dataMasking: "); + BicepSerializationHelpers.AppendChildObject(builder, DataMasking, options, 2, false, " dataMasking: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -140,6 +226,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptio { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(HttpMessageDiagnostic)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/HttpMessageDiagnostic.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/HttpMessageDiagnostic.cs index d4b7df1b9b5dd..9c2695faacf4a 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/HttpMessageDiagnostic.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/HttpMessageDiagnostic.cs @@ -65,10 +65,12 @@ internal HttpMessageDiagnostic(IList headers, BodyDiagnosticSettings bod } /// Array of HTTP Headers to log. + [WirePath("headers")] public IList Headers { get; } /// Body logging settings. internal BodyDiagnosticSettings Body { get; set; } /// Number of request body bytes to log. + [WirePath("body.bytes")] public int? BodyBytes { get => Body is null ? default : Body.Bytes; @@ -81,6 +83,7 @@ public int? BodyBytes } /// Data masking settings. + [WirePath("dataMasking")] public DataMasking DataMasking { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/IdentityProviderList.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/IdentityProviderList.Serialization.cs index b02e49435c8e2..6c17860e714be 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/IdentityProviderList.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/IdentityProviderList.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static IdentityProviderList DeserializeIdentityProviderList(JsonElement return new IdentityProviderList(value ?? new ChangeTrackingList(), count, 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(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + 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; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOption { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(IdentityProviderList)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/IssueAttachmentListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/IssueAttachmentListResult.Serialization.cs index d05728508430e..1d79e2a2097b3 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/IssueAttachmentListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/IssueAttachmentListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static IssueAttachmentListResult DeserializeIssueAttachmentListResult(J return new IssueAttachmentListResult(value ?? new ChangeTrackingList(), count, 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(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + 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; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterO { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(IssueAttachmentListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/IssueCommentListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/IssueCommentListResult.Serialization.cs index f3d15a449ad32..78822aacf37f7 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/IssueCommentListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/IssueCommentListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static IssueCommentListResult DeserializeIssueCommentListResult(JsonEle return new IssueCommentListResult(value ?? new ChangeTrackingList(), count, 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(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + 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; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOpti { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(IssueCommentListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/IssueListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/IssueListResult.Serialization.cs index 33ad5b543b86b..1361eea709e0c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/IssueListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/IssueListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static IssueListResult DeserializeIssueListResult(JsonElement element, return new IssueListResult(value ?? new ChangeTrackingList(), count, 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(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + 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; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions opt { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(IssueListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/KeyVaultContractCreateProperties.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/KeyVaultContractCreateProperties.Serialization.cs index 20fe66ceee8cc..2d41417715feb 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/KeyVaultContractCreateProperties.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/KeyVaultContractCreateProperties.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -99,6 +100,67 @@ internal static KeyVaultContractCreateProperties DeserializeKeyVaultContractCrea return new KeyVaultContractCreateProperties(secretIdentifier, identityClientId, 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(SecretIdentifier), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" secretIdentifier: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SecretIdentifier)) + { + builder.Append(" secretIdentifier: "); + if (SecretIdentifier.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{SecretIdentifier}'''"); + } + else + { + builder.AppendLine($"'{SecretIdentifier}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IdentityClientId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" identityClientId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IdentityClientId)) + { + builder.Append(" identityClientId: "); + if (IdentityClientId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{IdentityClientId}'''"); + } + else + { + builder.AppendLine($"'{IdentityClientId}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -107,6 +169,8 @@ BinaryData IPersistableModel.Write(ModelReader { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(KeyVaultContractCreateProperties)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/KeyVaultContractCreateProperties.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/KeyVaultContractCreateProperties.cs index bd15ee0c1cd6b..b19af684d2e28 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/KeyVaultContractCreateProperties.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/KeyVaultContractCreateProperties.cs @@ -62,8 +62,10 @@ internal KeyVaultContractCreateProperties(string secretIdentifier, string identi } /// Key vault secret identifier for fetching secret. Providing a versioned secret will prevent auto-refresh. This requires API Management service to be configured with aka.ms/apimmsi. + [WirePath("secretIdentifier")] public string SecretIdentifier { get; set; } /// Null for SystemAssignedIdentity or Client Id for UserAssignedIdentity , which will be used to access key vault secret. + [WirePath("identityClientId")] public string IdentityClientId { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/KeyVaultContractProperties.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/KeyVaultContractProperties.Serialization.cs index e9a811f6ad36d..3c66b6ccfdea6 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/KeyVaultContractProperties.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/KeyVaultContractProperties.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -114,6 +115,82 @@ internal static KeyVaultContractProperties DeserializeKeyVaultContractProperties return new KeyVaultContractProperties(secretIdentifier, identityClientId, serializedAdditionalRawData, lastStatus); } + 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(LastStatus), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" lastStatus: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(LastStatus)) + { + builder.Append(" lastStatus: "); + BicepSerializationHelpers.AppendChildObject(builder, LastStatus, options, 2, false, " lastStatus: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SecretIdentifier), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" secretIdentifier: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SecretIdentifier)) + { + builder.Append(" secretIdentifier: "); + if (SecretIdentifier.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{SecretIdentifier}'''"); + } + else + { + builder.AppendLine($"'{SecretIdentifier}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IdentityClientId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" identityClientId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IdentityClientId)) + { + builder.Append(" identityClientId: "); + if (IdentityClientId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{IdentityClientId}'''"); + } + else + { + builder.AppendLine($"'{IdentityClientId}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -122,6 +199,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriter { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(KeyVaultContractProperties)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/KeyVaultContractProperties.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/KeyVaultContractProperties.cs index e4a14b1e19381..faaa90c43a01c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/KeyVaultContractProperties.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/KeyVaultContractProperties.cs @@ -29,6 +29,7 @@ internal KeyVaultContractProperties(string secretIdentifier, string identityClie } /// Last time sync and refresh status of secret from key vault. + [WirePath("lastStatus")] public KeyVaultLastAccessStatusContractProperties LastStatus { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/KeyVaultLastAccessStatusContractProperties.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/KeyVaultLastAccessStatusContractProperties.Serialization.cs index 3c75b434f6220..e4d45c6d88a8b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/KeyVaultLastAccessStatusContractProperties.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/KeyVaultLastAccessStatusContractProperties.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -114,6 +115,83 @@ internal static KeyVaultLastAccessStatusContractProperties DeserializeKeyVaultLa return new KeyVaultLastAccessStatusContractProperties(code, message, timeStampUtc, 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}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TimeStampUtc), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" timeStampUtc: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TimeStampUtc)) + { + builder.Append(" timeStampUtc: "); + var formattedDateTimeString = TypeFormatters.ToString(TimeStampUtc.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -122,6 +200,8 @@ BinaryData IPersistableModel.Write(M { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(KeyVaultLastAccessStatusContractProperties)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/KeyVaultLastAccessStatusContractProperties.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/KeyVaultLastAccessStatusContractProperties.cs index 8daec5ad14961..2161e3245a805 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/KeyVaultLastAccessStatusContractProperties.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/KeyVaultLastAccessStatusContractProperties.cs @@ -67,13 +67,16 @@ internal KeyVaultLastAccessStatusContractProperties(string code, string message, } /// Last status code for sync and refresh of secret from key vault. + [WirePath("code")] public string Code { get; set; } /// Details of the error else empty. + [WirePath("message")] public string Message { get; set; } /// /// Last time secret was accessed. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. /// /// + [WirePath("timeStampUtc")] public DateTimeOffset? TimeStampUtc { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/LoggerListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/LoggerListResult.Serialization.cs index 7b4d58c4afe3c..f8ee8e3558d96 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/LoggerListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/LoggerListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static LoggerListResult DeserializeLoggerListResult(JsonElement element return new LoggerListResult(value ?? new ChangeTrackingList(), count, 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(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + 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; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions op { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(LoggerListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/NamedValueListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/NamedValueListResult.Serialization.cs index 1328fd375eb55..a2d9cefc57736 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/NamedValueListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/NamedValueListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static NamedValueListResult DeserializeNamedValueListResult(JsonElement return new NamedValueListResult(value ?? new ChangeTrackingList(), count, 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(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + 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; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOption { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(NamedValueListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/NamedValueSecretContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/NamedValueSecretContract.Serialization.cs index 7a3e0945148ca..ffea031e69721 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/NamedValueSecretContract.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/NamedValueSecretContract.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -88,6 +89,44 @@ internal static NamedValueSecretContract DeserializeNamedValueSecretContract(Jso return new NamedValueSecretContract(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(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; @@ -96,6 +135,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOp { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(NamedValueSecretContract)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/NamedValueSecretContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/NamedValueSecretContract.cs index ebdbb12f07aec..695f367a00b97 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/NamedValueSecretContract.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/NamedValueSecretContract.cs @@ -60,6 +60,7 @@ internal NamedValueSecretContract(string value, IDictionary } /// This is secret value of the NamedValue entity. + [WirePath("value")] public string Value { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/NetworkStatusContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/NetworkStatusContract.Serialization.cs index 8d9f1bd44fcd0..0c8679d35f4c0 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/NetworkStatusContract.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/NetworkStatusContract.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -113,6 +115,80 @@ internal static NetworkStatusContract DeserializeNetworkStatusContract(JsonEleme return new NetworkStatusContract(dnsServers, connectivityStatus, 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(ConnectivityStatus), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" connectivityStatus: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(ConnectivityStatus)) + { + if (ConnectivityStatus.Any()) + { + builder.Append(" connectivityStatus: "); + builder.AppendLine("["); + foreach (var item in ConnectivityStatus) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " connectivityStatus: "); + } + 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; @@ -121,6 +197,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptio { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(NetworkStatusContract)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/NetworkStatusContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/NetworkStatusContract.cs index 29581d8243ef6..d76c31b444f25 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/NetworkStatusContract.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/NetworkStatusContract.cs @@ -76,8 +76,10 @@ internal NetworkStatusContract() } /// Gets the list of DNS servers IPV4 addresses. + [WirePath("dnsServers")] public IReadOnlyList DnsServers { get; } /// Gets the list of Connectivity Status to the Resources on which the service depends upon. + [WirePath("connectivityStatus")] public IReadOnlyList ConnectivityStatus { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/NetworkStatusContractWithLocation.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/NetworkStatusContractWithLocation.Serialization.cs index f33c450a8bc5c..4e0a402dd2e22 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/NetworkStatusContractWithLocation.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/NetworkStatusContractWithLocation.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -107,6 +108,51 @@ internal static NetworkStatusContractWithLocation DeserializeNetworkStatusContra return new NetworkStatusContractWithLocation(location, networkStatus, 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(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(NetworkStatus), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" networkStatus: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NetworkStatus)) + { + builder.Append(" networkStatus: "); + BicepSerializationHelpers.AppendChildObject(builder, NetworkStatus, options, 2, false, " networkStatus: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -115,6 +161,8 @@ BinaryData IPersistableModel.Write(ModelReade { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(NetworkStatusContractWithLocation)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/NetworkStatusContractWithLocation.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/NetworkStatusContractWithLocation.cs index 9b4eaef09241f..a24835a0f2a31 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/NetworkStatusContractWithLocation.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/NetworkStatusContractWithLocation.cs @@ -63,8 +63,10 @@ internal NetworkStatusContractWithLocation(AzureLocation? location, NetworkStatu } /// Location of service. + [WirePath("location")] public AzureLocation? Location { get; } /// Network status in Location. + [WirePath("networkStatus")] public NetworkStatusContract NetworkStatus { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/NotificationListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/NotificationListResult.Serialization.cs index ebd6b610d2b57..95bb49c8ca8b2 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/NotificationListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/NotificationListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static NotificationListResult DeserializeNotificationListResult(JsonEle return new NotificationListResult(value ?? new ChangeTrackingList(), count, 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(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + 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; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOpti { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(NotificationListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OAuth2AuthenticationSettingsContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OAuth2AuthenticationSettingsContract.Serialization.cs index 6802cbc03a521..4976ce33b62ee 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OAuth2AuthenticationSettingsContract.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OAuth2AuthenticationSettingsContract.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -99,6 +100,67 @@ internal static OAuth2AuthenticationSettingsContract DeserializeOAuth2Authentica return new OAuth2AuthenticationSettingsContract(authorizationServerId, scope, 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(AuthorizationServerId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" authorizationServerId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AuthorizationServerId)) + { + builder.Append(" authorizationServerId: "); + if (AuthorizationServerId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{AuthorizationServerId}'''"); + } + else + { + builder.AppendLine($"'{AuthorizationServerId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Scope), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" scope: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Scope)) + { + builder.Append(" scope: "); + if (Scope.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Scope}'''"); + } + else + { + builder.AppendLine($"'{Scope}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -107,6 +169,8 @@ BinaryData IPersistableModel.Write(ModelRe { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(OAuth2AuthenticationSettingsContract)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OAuth2AuthenticationSettingsContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OAuth2AuthenticationSettingsContract.cs index 0b118f6886c26..7f176dc7ac090 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OAuth2AuthenticationSettingsContract.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OAuth2AuthenticationSettingsContract.cs @@ -62,8 +62,10 @@ internal OAuth2AuthenticationSettingsContract(string authorizationServerId, stri } /// OAuth authorization server identifier. + [WirePath("authorizationServerId")] public string AuthorizationServerId { get; set; } /// operations scope. + [WirePath("scope")] public string Scope { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OAuth2GrantType.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OAuth2GrantType.cs new file mode 100644 index 0000000000000..6dcc4e9c50f58 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OAuth2GrantType.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.ApiManagement.Models +{ + /// OAuth2 grant type options. + public readonly partial struct OAuth2GrantType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public OAuth2GrantType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AuthorizationCodeValue = "AuthorizationCode"; + private const string ClientCredentialsValue = "ClientCredentials"; + + /// Authorization Code grant. + public static OAuth2GrantType AuthorizationCode { get; } = new OAuth2GrantType(AuthorizationCodeValue); + /// Client Credential grant. + public static OAuth2GrantType ClientCredentials { get; } = new OAuth2GrantType(ClientCredentialsValue); + /// Determines if two values are the same. + public static bool operator ==(OAuth2GrantType left, OAuth2GrantType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(OAuth2GrantType left, OAuth2GrantType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator OAuth2GrantType(string value) => new OAuth2GrantType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is OAuth2GrantType other && Equals(other); + /// + public bool Equals(OAuth2GrantType 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/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OpenIdAuthenticationSettingsContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OpenIdAuthenticationSettingsContract.Serialization.cs index 12e3efcf32103..6bf14fb3e7696 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OpenIdAuthenticationSettingsContract.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OpenIdAuthenticationSettingsContract.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -113,6 +115,67 @@ internal static OpenIdAuthenticationSettingsContract DeserializeOpenIdAuthentica return new OpenIdAuthenticationSettingsContract(openidProviderId, bearerTokenSendingMethods ?? 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(OpenIdProviderId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" openidProviderId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(OpenIdProviderId)) + { + builder.Append(" openidProviderId: "); + if (OpenIdProviderId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{OpenIdProviderId}'''"); + } + else + { + builder.AppendLine($"'{OpenIdProviderId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(BearerTokenSendingMethods), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" bearerTokenSendingMethods: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(BearerTokenSendingMethods)) + { + if (BearerTokenSendingMethods.Any()) + { + builder.Append(" bearerTokenSendingMethods: "); + builder.AppendLine("["); + foreach (var item in BearerTokenSendingMethods) + { + builder.AppendLine($" '{item.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; @@ -121,6 +184,8 @@ BinaryData IPersistableModel.Write(ModelRe { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(OpenIdAuthenticationSettingsContract)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OpenIdAuthenticationSettingsContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OpenIdAuthenticationSettingsContract.cs index 563a826171164..2d03e0289d1a5 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OpenIdAuthenticationSettingsContract.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OpenIdAuthenticationSettingsContract.cs @@ -63,8 +63,10 @@ internal OpenIdAuthenticationSettingsContract(string openIdProviderId, IList OAuth authorization server identifier. + [WirePath("openidProviderId")] public string OpenIdProviderId { get; set; } /// How to send token to the server. + [WirePath("bearerTokenSendingMethods")] public IList BearerTokenSendingMethods { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OpenIdConnectProviderListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OpenIdConnectProviderListResult.Serialization.cs index 56234355c5fa2..c2ba475cb2076 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OpenIdConnectProviderListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OpenIdConnectProviderListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static OpenIdConnectProviderListResult DeserializeOpenIdConnectProvider return new OpenIdConnectProviderListResult(value ?? new ChangeTrackingList(), count, 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(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + 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; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReaderW { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(OpenIdConnectProviderListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OperationListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OperationListResult.Serialization.cs index e07174428d420..1d40f54d63f8a 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OperationListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OperationListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static OperationListResult DeserializeOperationListResult(JsonElement e return new OperationListResult(value ?? new ChangeTrackingList(), count, 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(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + 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; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(OperationListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OperationResultLogItemContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OperationResultLogItemContract.Serialization.cs index f75c2ccb5ee05..1737b1dc3c6f5 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OperationResultLogItemContract.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OperationResultLogItemContract.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -110,6 +111,90 @@ internal static OperationResultLogItemContract DeserializeOperationResultLogItem return new OperationResultLogItemContract(objectType, action, objectKey, 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(ObjectType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" objectType: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ObjectType)) + { + builder.Append(" objectType: "); + if (ObjectType.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ObjectType}'''"); + } + else + { + builder.AppendLine($"'{ObjectType}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Action), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" action: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Action)) + { + builder.Append(" action: "); + if (Action.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Action}'''"); + } + else + { + builder.AppendLine($"'{Action}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ObjectKey), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" objectKey: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ObjectKey)) + { + builder.Append(" objectKey: "); + if (ObjectKey.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ObjectKey}'''"); + } + else + { + builder.AppendLine($"'{ObjectKey}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -118,6 +203,8 @@ BinaryData IPersistableModel.Write(ModelReaderWr { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(OperationResultLogItemContract)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OperationResultLogItemContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OperationResultLogItemContract.cs index 11788e514b027..7b8ed74bd07d6 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OperationResultLogItemContract.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OperationResultLogItemContract.cs @@ -64,10 +64,13 @@ internal OperationResultLogItemContract(string objectType, string action, string } /// The type of entity contract. + [WirePath("objectType")] public string ObjectType { get; } /// Action like create/update/delete. + [WirePath("action")] public string Action { get; } /// Identifier of the entity being created/updated/deleted. + [WirePath("objectKey")] public string ObjectKey { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OutboundEnvironmentEndpoint.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OutboundEnvironmentEndpoint.Serialization.cs index f6e7925eae4a7..a932a2938783b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OutboundEnvironmentEndpoint.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OutboundEnvironmentEndpoint.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -113,6 +115,67 @@ internal static OutboundEnvironmentEndpoint DeserializeOutboundEnvironmentEndpoi return new OutboundEnvironmentEndpoint(category, endpoints ?? 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(Category), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" category: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Category)) + { + builder.Append(" category: "); + if (Category.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Category}'''"); + } + else + { + builder.AppendLine($"'{Category}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Endpoints), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" endpoints: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Endpoints)) + { + if (Endpoints.Any()) + { + builder.Append(" endpoints: "); + builder.AppendLine("["); + foreach (var item in Endpoints) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " endpoints: "); + } + 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; @@ -121,6 +184,8 @@ BinaryData IPersistableModel.Write(ModelReaderWrite { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(OutboundEnvironmentEndpoint)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OutboundEnvironmentEndpoint.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OutboundEnvironmentEndpoint.cs index a059001382d85..fd513b755de55 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OutboundEnvironmentEndpoint.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OutboundEnvironmentEndpoint.cs @@ -63,8 +63,10 @@ internal OutboundEnvironmentEndpoint(string category, IReadOnlyList The type of service accessed by the Api Management Service, e.g., Azure Storage, Azure SQL Database, and Azure Active Directory. + [WirePath("category")] public string Category { get; } /// The endpoints that the Api Management Service reaches the service at. + [WirePath("endpoints")] public IReadOnlyList Endpoints { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OutboundEnvironmentEndpointList.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OutboundEnvironmentEndpointList.Serialization.cs index 281e1c6159b21..fffa8e0b94d7b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OutboundEnvironmentEndpointList.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OutboundEnvironmentEndpointList.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -106,6 +108,67 @@ internal static OutboundEnvironmentEndpointList DeserializeOutboundEnvironmentEn return new OutboundEnvironmentEndpointList(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; @@ -114,6 +177,8 @@ BinaryData IPersistableModel.Write(ModelReaderW { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(OutboundEnvironmentEndpointList)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OutboundEnvironmentEndpointList.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OutboundEnvironmentEndpointList.cs index 6077e3bb9a689..a59a549df328d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OutboundEnvironmentEndpointList.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OutboundEnvironmentEndpointList.cs @@ -73,8 +73,10 @@ internal OutboundEnvironmentEndpointList() } /// Collection of resources. + [WirePath("value")] public IReadOnlyList Value { get; } /// Link to next page of resources. + [WirePath("nextLink")] public string NextLink { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ParameterContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ParameterContract.Serialization.cs index 75ad448261c39..742157797113a 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ParameterContract.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ParameterContract.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -213,6 +215,235 @@ internal static ParameterContract DeserializeParameterContract(JsonElement eleme 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(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}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ParameterContractType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" type: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ParameterContractType)) + { + builder.Append(" type: "); + if (ParameterContractType.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ParameterContractType}'''"); + } + else + { + builder.AppendLine($"'{ParameterContractType}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DefaultValue), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" defaultValue: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DefaultValue)) + { + builder.Append(" defaultValue: "); + if (DefaultValue.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{DefaultValue}'''"); + } + else + { + builder.AppendLine($"'{DefaultValue}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsRequired), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" required: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsRequired)) + { + builder.Append(" required: "); + var boolValue = IsRequired.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Values), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" values: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Values)) + { + if (Values.Any()) + { + builder.Append(" values: "); + builder.AppendLine("["); + foreach (var item in Values) + { + 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(SchemaId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" schemaId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SchemaId)) + { + builder.Append(" schemaId: "); + if (SchemaId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{SchemaId}'''"); + } + else + { + builder.AppendLine($"'{SchemaId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TypeName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" typeName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TypeName)) + { + builder.Append(" typeName: "); + if (TypeName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{TypeName}'''"); + } + else + { + builder.AppendLine($"'{TypeName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Examples), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" examples: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Examples)) + { + if (Examples.Any()) + { + builder.Append(" examples: "); + builder.AppendLine("{"); + foreach (var item in Examples) + { + builder.Append($" '{item.Key}': "); + BicepSerializationHelpers.AppendChildObject(builder, item.Value, options, 4, false, " examples: "); + } + 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; @@ -221,6 +452,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions o { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ParameterContract)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ParameterContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ParameterContract.cs index 2cae424bd96e5..2fc3772bcbd93 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ParameterContract.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ParameterContract.cs @@ -91,22 +91,31 @@ internal ParameterContract() } /// Parameter name. + [WirePath("name")] public string Name { get; set; } /// Parameter description. + [WirePath("description")] public string Description { get; set; } /// Parameter type. + [WirePath("type")] public string ParameterContractType { get; set; } /// Default parameter value. + [WirePath("defaultValue")] public string DefaultValue { get; set; } /// Specifies whether parameter is required or not. + [WirePath("required")] public bool? IsRequired { get; set; } /// Parameter values. + [WirePath("values")] public IList Values { get; } /// Schema identifier. + [WirePath("schemaId")] public string SchemaId { get; set; } /// Type name defined by the schema. + [WirePath("typeName")] public string TypeName { get; set; } /// Exampled defined for the parameter. + [WirePath("examples")] public IDictionary Examples { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ParameterExampleContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ParameterExampleContract.Serialization.cs index 2a460a5f8baf6..b202ede10b486 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ParameterExampleContract.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ParameterExampleContract.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -132,6 +133,105 @@ internal static ParameterExampleContract DeserializeParameterExampleContract(Jso return new ParameterExampleContract(summary, description, value, externalValue, 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(Summary), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" summary: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Summary)) + { + builder.Append(" summary: "); + if (Summary.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Summary}'''"); + } + else + { + builder.AppendLine($"'{Summary}'"); + } + } + } + + 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}'"); + } + } + } + + 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(ExternalValue), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" externalValue: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ExternalValue)) + { + builder.Append(" externalValue: "); + if (ExternalValue.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ExternalValue}'''"); + } + else + { + builder.AppendLine($"'{ExternalValue}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -140,6 +240,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOp { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ParameterExampleContract)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ParameterExampleContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ParameterExampleContract.cs index 4b78aaea0b875..c7313c0bf1b3d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ParameterExampleContract.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ParameterExampleContract.cs @@ -66,8 +66,10 @@ internal ParameterExampleContract(string summary, string description, BinaryData } /// Short description for the example. + [WirePath("summary")] public string Summary { get; set; } /// Long description for the example. + [WirePath("description")] public string Description { get; set; } /// /// Example value. May be a primitive value, or an object. @@ -99,8 +101,10 @@ internal ParameterExampleContract(string summary, string description, BinaryData /// /// /// + [WirePath("value")] public BinaryData Value { get; set; } /// A URL that points to the literal example. + [WirePath("externalValue")] public string ExternalValue { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PipelineDiagnosticSettings.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PipelineDiagnosticSettings.Serialization.cs index 24fc1ee24ea30..8707332af6178 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PipelineDiagnosticSettings.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PipelineDiagnosticSettings.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -107,6 +108,51 @@ internal static PipelineDiagnosticSettings DeserializePipelineDiagnosticSettings return new PipelineDiagnosticSettings(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(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; @@ -115,6 +161,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriter { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(PipelineDiagnosticSettings)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PipelineDiagnosticSettings.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PipelineDiagnosticSettings.cs index 71a2937d15422..4e7fbcfa3581f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PipelineDiagnosticSettings.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PipelineDiagnosticSettings.cs @@ -62,8 +62,10 @@ internal PipelineDiagnosticSettings(HttpMessageDiagnostic request, HttpMessageDi } /// Diagnostic settings for request. + [WirePath("request")] public HttpMessageDiagnostic Request { get; set; } /// Diagnostic settings for response. + [WirePath("response")] public HttpMessageDiagnostic Response { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyContentFormat.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyContentFormat.cs index 1daa753704143..900d91aaba95d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyContentFormat.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyContentFormat.cs @@ -29,11 +29,11 @@ public PolicyContentFormat(string value) /// The contents are inline and Content type is an XML document. public static PolicyContentFormat Xml { get; } = new PolicyContentFormat(XmlValue); - /// The policy XML document is hosted on a http endpoint accessible from the API Management service. + /// The policy XML document is hosted on a HTTP endpoint accessible from the API Management service. public static PolicyContentFormat XmlLink { get; } = new PolicyContentFormat(XmlLinkValue); /// The contents are inline and Content type is a non XML encoded policy document. public static PolicyContentFormat RawXml { get; } = new PolicyContentFormat(RawXmlValue); - /// The policy document is not Xml encoded and is hosted on a http endpoint accessible from the API Management service. + /// The policy document is not XML encoded and is hosted on a HTTP endpoint accessible from the API Management service. public static PolicyContentFormat RawXmlLink { get; } = new PolicyContentFormat(RawXmlLinkValue); /// Determines if two values are the same. public static bool operator ==(PolicyContentFormat left, PolicyContentFormat right) => left.Equals(right); diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyDescriptionContractData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyDescriptionContractData.Serialization.cs index fe176a169803b..047d8fd447c73 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyDescriptionContractData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyDescriptionContractData.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Models; @@ -174,6 +175,115 @@ internal static PolicyDescriptionContractData DeserializePolicyDescriptionContra 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(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}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Scope), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" scope: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Scope)) + { + builder.Append(" scope: "); + builder.AppendLine($"'{Scope.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; @@ -182,6 +292,8 @@ BinaryData IPersistableModel.Write(ModelReaderWri { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(PolicyDescriptionContractData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyDescriptionContractData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyDescriptionContractData.cs index c6ad653b173af..cc186c392f6dd 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyDescriptionContractData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyDescriptionContractData.cs @@ -68,8 +68,10 @@ internal PolicyDescriptionContractData(ResourceIdentifier id, string name, Resou } /// Policy description. + [WirePath("properties.description")] public string Description { get; } /// Binary OR value of the Snippet scope. + [WirePath("properties.scope")] public long? Scope { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyDescriptionListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyDescriptionListResult.Serialization.cs index 28c4ebd1b3173..55630ec24994c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyDescriptionListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyDescriptionListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -117,6 +119,59 @@ internal static PolicyDescriptionListResult DeserializePolicyDescriptionListResu return new PolicyDescriptionListResult(value ?? new ChangeTrackingList(), count, 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(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.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; @@ -125,6 +180,8 @@ BinaryData IPersistableModel.Write(ModelReaderWrite { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(PolicyDescriptionListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyDescriptionListResult.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyDescriptionListResult.cs index d9035ad523503..6ff96e0fe9eff 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyDescriptionListResult.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyDescriptionListResult.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.ApiManagement.Models { - /// Descriptions of APIM policies. + /// Descriptions of API Management policies. internal partial class PolicyDescriptionListResult { /// @@ -52,7 +52,7 @@ internal PolicyDescriptionListResult() } /// Initializes a new instance of . - /// Descriptions of APIM policies. + /// Descriptions of API Management policies. /// Total record count number. /// Keeps track of any properties unknown to the library. internal PolicyDescriptionListResult(IReadOnlyList value, long? count, IDictionary serializedAdditionalRawData) @@ -62,9 +62,11 @@ internal PolicyDescriptionListResult(IReadOnlyList Descriptions of APIM policies. + /// Descriptions of API Management policies. + [WirePath("value")] public IReadOnlyList Value { get; } /// Total record count number. + [WirePath("count")] public long? Count { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyFragmentContentFormat.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyFragmentContentFormat.cs new file mode 100644 index 0000000000000..a28f8c390488e --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyFragmentContentFormat.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.ApiManagement.Models +{ + /// The PolicyFragmentContentFormat. + public readonly partial struct PolicyFragmentContentFormat : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public PolicyFragmentContentFormat(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string XmlValue = "xml"; + private const string RawxmlValue = "rawxml"; + + /// The contents are inline and Content type is an XML document. + public static PolicyFragmentContentFormat Xml { get; } = new PolicyFragmentContentFormat(XmlValue); + /// The contents are inline and Content type is a non XML encoded policy document. + public static PolicyFragmentContentFormat Rawxml { get; } = new PolicyFragmentContentFormat(RawxmlValue); + /// Determines if two values are the same. + public static bool operator ==(PolicyFragmentContentFormat left, PolicyFragmentContentFormat right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(PolicyFragmentContentFormat left, PolicyFragmentContentFormat right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator PolicyFragmentContentFormat(string value) => new PolicyFragmentContentFormat(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is PolicyFragmentContentFormat other && Equals(other); + /// + public bool Equals(PolicyFragmentContentFormat 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/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyFragmentListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyFragmentListResult.Serialization.cs new file mode 100644 index 0000000000000..440715eb55d2e --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyFragmentListResult.Serialization.cs @@ -0,0 +1,242 @@ +// 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.ApiManagement.Models +{ + internal partial class PolicyFragmentListResult : 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(PolicyFragmentListResult)} 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(Count)) + { + writer.WritePropertyName("count"u8); + writer.WriteNumberValue(Count.Value); + } + 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(); + } + + PolicyFragmentListResult 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(PolicyFragmentListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePolicyFragmentListResult(document.RootElement, options); + } + + internal static PolicyFragmentListResult DeserializePolicyFragmentListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + long? count = 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(PolicyFragmentContractData.DeserializePolicyFragmentContractData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("count"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + count = property.Value.GetInt64(); + 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 PolicyFragmentListResult(value ?? new ChangeTrackingList(), count, 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(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + 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(PolicyFragmentListResult)} does not support writing '{options.Format}' format."); + } + } + + PolicyFragmentListResult 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 DeserializePolicyFragmentListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PolicyFragmentListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyFragmentListResult.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyFragmentListResult.cs new file mode 100644 index 0000000000000..1b618ab2d994b --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyFragmentListResult.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.ApiManagement.Models +{ + /// The response of the get policy fragments operation. + internal partial class PolicyFragmentListResult + { + /// + /// 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 PolicyFragmentListResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Policy fragment contract value. + /// Total record count number. + /// Next page link if any. + /// Keeps track of any properties unknown to the library. + internal PolicyFragmentListResult(IReadOnlyList value, long? count, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + Count = count; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Policy fragment contract value. + [WirePath("value")] + public IReadOnlyList Value { get; } + /// Total record count number. + [WirePath("count")] + public long? Count { get; } + /// Next page link if any. + [WirePath("nextLink")] + public string NextLink { get; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyListResult.Serialization.cs index 630ec212f4e2f..6b0b8d9c2069a 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static PolicyListResult DeserializePolicyListResult(JsonElement element return new PolicyListResult(value ?? new ChangeTrackingList(), count, 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(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + 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; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions op { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(PolicyListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyListResult.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyListResult.cs index 577317433cb96..01d698f8dbf9e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyListResult.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyListResult.cs @@ -65,10 +65,13 @@ internal PolicyListResult(IReadOnlyList value, long? count, } /// Policy Contract value. + [WirePath("value")] public IReadOnlyList Value { get; } /// Total record count number. + [WirePath("count")] public long? Count { get; } /// Next page link if any. + [WirePath("nextLink")] public string NextLink { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigCorsProperties.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigCorsProperties.Serialization.cs new file mode 100644 index 0000000000000..25b55f34af37f --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigCorsProperties.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.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + internal partial class PortalConfigCorsProperties : 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(PortalConfigCorsProperties)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(AllowedOrigins)) + { + writer.WritePropertyName("allowedOrigins"u8); + writer.WriteStartArray(); + foreach (var item in AllowedOrigins) + { + 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(); + } + + PortalConfigCorsProperties 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(PortalConfigCorsProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePortalConfigCorsProperties(document.RootElement, options); + } + + internal static PortalConfigCorsProperties DeserializePortalConfigCorsProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList allowedOrigins = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("allowedOrigins"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + allowedOrigins = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PortalConfigCorsProperties(allowedOrigins ?? 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(AllowedOrigins), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" allowedOrigins: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(AllowedOrigins)) + { + if (AllowedOrigins.Any()) + { + builder.Append(" allowedOrigins: "); + builder.AppendLine("["); + foreach (var item in AllowedOrigins) + { + 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(PortalConfigCorsProperties)} does not support writing '{options.Format}' format."); + } + } + + PortalConfigCorsProperties 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 DeserializePortalConfigCorsProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PortalConfigCorsProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigCorsProperties.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigCorsProperties.cs new file mode 100644 index 0000000000000..197e65ae89a53 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigCorsProperties.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.ApiManagement.Models +{ + /// The developer portal Cross-Origin Resource Sharing (CORS) settings. + internal partial class PortalConfigCorsProperties + { + /// + /// 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 PortalConfigCorsProperties() + { + AllowedOrigins = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Allowed origins, e.g. `https://trusted.com`. + /// Keeps track of any properties unknown to the library. + internal PortalConfigCorsProperties(IList allowedOrigins, IDictionary serializedAdditionalRawData) + { + AllowedOrigins = allowedOrigins; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Allowed origins, e.g. `https://trusted.com`. + [WirePath("allowedOrigins")] + public IList AllowedOrigins { get; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigCspProperties.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigCspProperties.Serialization.cs new file mode 100644 index 0000000000000..2893259120783 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigCspProperties.Serialization.cs @@ -0,0 +1,286 @@ +// 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.ApiManagement.Models +{ + public partial class PortalConfigCspProperties : 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(PortalConfigCspProperties)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Mode)) + { + writer.WritePropertyName("mode"u8); + writer.WriteStringValue(Mode.Value.ToString()); + } + if (Optional.IsCollectionDefined(ReportUri)) + { + writer.WritePropertyName("reportUri"u8); + writer.WriteStartArray(); + foreach (var item in ReportUri) + { + if (item == null) + { + writer.WriteNullValue(); + continue; + } + writer.WriteStringValue(item.AbsoluteUri); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(AllowedSources)) + { + writer.WritePropertyName("allowedSources"u8); + writer.WriteStartArray(); + foreach (var item in AllowedSources) + { + 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(); + } + + PortalConfigCspProperties 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(PortalConfigCspProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePortalConfigCspProperties(document.RootElement, options); + } + + internal static PortalConfigCspProperties DeserializePortalConfigCspProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + PortalSettingsCspMode? mode = default; + IList reportUri = default; + IList allowedSources = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("mode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + mode = new PortalSettingsCspMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("reportUri"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(new Uri(item.GetString())); + } + } + reportUri = array; + continue; + } + if (property.NameEquals("allowedSources"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + allowedSources = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PortalConfigCspProperties(mode, reportUri ?? new ChangeTrackingList(), allowedSources ?? 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(Mode), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" mode: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Mode)) + { + builder.Append(" mode: "); + builder.AppendLine($"'{Mode.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ReportUri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" reportUri: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(ReportUri)) + { + if (ReportUri.Any()) + { + builder.Append(" reportUri: "); + builder.AppendLine("["); + foreach (var item in ReportUri) + { + if (item == null) + { + builder.Append("null"); + continue; + } + builder.AppendLine($" '{item.AbsoluteUri}'"); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AllowedSources), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" allowedSources: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(AllowedSources)) + { + if (AllowedSources.Any()) + { + builder.Append(" allowedSources: "); + builder.AppendLine("["); + foreach (var item in AllowedSources) + { + 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(PortalConfigCspProperties)} does not support writing '{options.Format}' format."); + } + } + + PortalConfigCspProperties 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 DeserializePortalConfigCspProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PortalConfigCspProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigCspProperties.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigCspProperties.cs new file mode 100644 index 0000000000000..7f3e1f26237f6 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigCspProperties.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.ApiManagement.Models +{ + /// The developer portal Content Security Policy (CSP) settings. + public partial class PortalConfigCspProperties + { + /// + /// 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 PortalConfigCspProperties() + { + ReportUri = new ChangeTrackingList(); + AllowedSources = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The mode of the developer portal Content Security Policy (CSP). + /// The URLs used by the browser to report CSP violations. + /// Allowed sources, e.g. `*.trusted.com`, `trusted.com`, `https://`. + /// Keeps track of any properties unknown to the library. + internal PortalConfigCspProperties(PortalSettingsCspMode? mode, IList reportUri, IList allowedSources, IDictionary serializedAdditionalRawData) + { + Mode = mode; + ReportUri = reportUri; + AllowedSources = allowedSources; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The mode of the developer portal Content Security Policy (CSP). + [WirePath("mode")] + public PortalSettingsCspMode? Mode { get; set; } + /// The URLs used by the browser to report CSP violations. + [WirePath("reportUri")] + public IList ReportUri { get; } + /// Allowed sources, e.g. `*.trusted.com`, `trusted.com`, `https://`. + [WirePath("allowedSources")] + public IList AllowedSources { get; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigDelegationProperties.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigDelegationProperties.Serialization.cs new file mode 100644 index 0000000000000..2a4b09f551d57 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigDelegationProperties.Serialization.cs @@ -0,0 +1,255 @@ +// 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.ApiManagement.Models +{ + public partial class PortalConfigDelegationProperties : 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(PortalConfigDelegationProperties)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(DelegateRegistration)) + { + writer.WritePropertyName("delegateRegistration"u8); + writer.WriteBooleanValue(DelegateRegistration.Value); + } + if (Optional.IsDefined(DelegateSubscription)) + { + writer.WritePropertyName("delegateSubscription"u8); + writer.WriteBooleanValue(DelegateSubscription.Value); + } + if (Optional.IsDefined(DelegationUri)) + { + writer.WritePropertyName("delegationUrl"u8); + writer.WriteStringValue(DelegationUri.AbsoluteUri); + } + if (Optional.IsDefined(ValidationKey)) + { + writer.WritePropertyName("validationKey"u8); + writer.WriteStringValue(ValidationKey); + } + 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(); + } + + PortalConfigDelegationProperties 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(PortalConfigDelegationProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePortalConfigDelegationProperties(document.RootElement, options); + } + + internal static PortalConfigDelegationProperties DeserializePortalConfigDelegationProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool? delegateRegistration = default; + bool? delegateSubscription = default; + Uri delegationUri = default; + string validationKey = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("delegateRegistration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + delegateRegistration = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("delegateSubscription"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + delegateSubscription = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("delegationUrl"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + delegationUri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("validationKey"u8)) + { + validationKey = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PortalConfigDelegationProperties(delegateRegistration, delegateSubscription, delegationUri, validationKey, 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(DelegateRegistration), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" delegateRegistration: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DelegateRegistration)) + { + builder.Append(" delegateRegistration: "); + var boolValue = DelegateRegistration.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DelegateSubscription), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" delegateSubscription: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DelegateSubscription)) + { + builder.Append(" delegateSubscription: "); + var boolValue = DelegateSubscription.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DelegationUri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" delegationUrl: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DelegationUri)) + { + builder.Append(" delegationUrl: "); + builder.AppendLine($"'{DelegationUri.AbsoluteUri}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ValidationKey), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" validationKey: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ValidationKey)) + { + builder.Append(" validationKey: "); + if (ValidationKey.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ValidationKey}'''"); + } + else + { + builder.AppendLine($"'{ValidationKey}'"); + } + } + } + + 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(PortalConfigDelegationProperties)} does not support writing '{options.Format}' format."); + } + } + + PortalConfigDelegationProperties 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 DeserializePortalConfigDelegationProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PortalConfigDelegationProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigDelegationProperties.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigDelegationProperties.cs new file mode 100644 index 0000000000000..bbdb4f02702fd --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigDelegationProperties.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.ApiManagement.Models +{ + /// The PortalConfigDelegationProperties. + public partial class PortalConfigDelegationProperties + { + /// + /// 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 PortalConfigDelegationProperties() + { + } + + /// Initializes a new instance of . + /// Enable or disable delegation for user registration. + /// Enable or disable delegation for product subscriptions. + /// A delegation endpoint URL. + /// A base64-encoded validation key to ensure requests originate from Azure API Management service. + /// Keeps track of any properties unknown to the library. + internal PortalConfigDelegationProperties(bool? delegateRegistration, bool? delegateSubscription, Uri delegationUri, string validationKey, IDictionary serializedAdditionalRawData) + { + DelegateRegistration = delegateRegistration; + DelegateSubscription = delegateSubscription; + DelegationUri = delegationUri; + ValidationKey = validationKey; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Enable or disable delegation for user registration. + [WirePath("delegateRegistration")] + public bool? DelegateRegistration { get; set; } + /// Enable or disable delegation for product subscriptions. + [WirePath("delegateSubscription")] + public bool? DelegateSubscription { get; set; } + /// A delegation endpoint URL. + [WirePath("delegationUrl")] + public Uri DelegationUri { get; set; } + /// A base64-encoded validation key to ensure requests originate from Azure API Management service. + [WirePath("validationKey")] + public string ValidationKey { get; set; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigListResult.Serialization.cs new file mode 100644 index 0000000000000..2911a49abe37a --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigListResult.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.ApiManagement.Models +{ + internal partial class PortalConfigListResult : 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(PortalConfigListResult)} 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 (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(); + } + + PortalConfigListResult 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(PortalConfigListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePortalConfigListResult(document.RootElement, options); + } + + internal static PortalConfigListResult DeserializePortalConfigListResult(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(PortalConfigContractData.DeserializePortalConfigContractData(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 PortalConfigListResult(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(PortalConfigListResult)} does not support writing '{options.Format}' format."); + } + } + + PortalConfigListResult 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 DeserializePortalConfigListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PortalConfigListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigListResult.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigListResult.cs new file mode 100644 index 0000000000000..abaec4ba091ea --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigListResult.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.ApiManagement.Models +{ + /// The collection of the developer portal configurations. + internal partial class PortalConfigListResult + { + /// + /// 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 PortalConfigListResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The developer portal configurations. + /// Next page link if any. + /// Keeps track of any properties unknown to the library. + internal PortalConfigListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The developer portal configurations. + [WirePath("value")] + public IReadOnlyList Value { get; } + /// Next page link if any. + [WirePath("nextLink")] + public string NextLink { get; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigPropertiesSignin.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigPropertiesSignin.Serialization.cs new file mode 100644 index 0000000000000..e27a9e927e73f --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigPropertiesSignin.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.ApiManagement.Models +{ + internal partial class PortalConfigPropertiesSignin : 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(PortalConfigPropertiesSignin)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Require)) + { + writer.WritePropertyName("require"u8); + writer.WriteBooleanValue(Require.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(); + } + + PortalConfigPropertiesSignin 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(PortalConfigPropertiesSignin)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePortalConfigPropertiesSignin(document.RootElement, options); + } + + internal static PortalConfigPropertiesSignin DeserializePortalConfigPropertiesSignin(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool? require = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("require"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + require = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PortalConfigPropertiesSignin(require, 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(Require), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" require: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Require)) + { + builder.Append(" require: "); + var boolValue = Require.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(PortalConfigPropertiesSignin)} does not support writing '{options.Format}' format."); + } + } + + PortalConfigPropertiesSignin 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 DeserializePortalConfigPropertiesSignin(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PortalConfigPropertiesSignin)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigPropertiesSignin.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigPropertiesSignin.cs new file mode 100644 index 0000000000000..6d662d62f1f08 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigPropertiesSignin.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.ApiManagement.Models +{ + /// The PortalConfigPropertiesSignin. + internal partial class PortalConfigPropertiesSignin + { + /// + /// 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 PortalConfigPropertiesSignin() + { + } + + /// Initializes a new instance of . + /// Redirect anonymous users to the sign-in page. + /// Keeps track of any properties unknown to the library. + internal PortalConfigPropertiesSignin(bool? require, IDictionary serializedAdditionalRawData) + { + Require = require; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Redirect anonymous users to the sign-in page. + [WirePath("require")] + public bool? Require { get; set; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigPropertiesSignup.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigPropertiesSignup.Serialization.cs new file mode 100644 index 0000000000000..5e46a19d28c5f --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigPropertiesSignup.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.ApiManagement.Models +{ + internal partial class PortalConfigPropertiesSignup : 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(PortalConfigPropertiesSignup)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(TermsOfService)) + { + writer.WritePropertyName("termsOfService"u8); + writer.WriteObjectValue(TermsOfService, 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(); + } + + PortalConfigPropertiesSignup 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(PortalConfigPropertiesSignup)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePortalConfigPropertiesSignup(document.RootElement, options); + } + + internal static PortalConfigPropertiesSignup DeserializePortalConfigPropertiesSignup(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + PortalConfigTermsOfServiceProperties termsOfService = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("termsOfService"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + termsOfService = PortalConfigTermsOfServiceProperties.DeserializePortalConfigTermsOfServiceProperties(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PortalConfigPropertiesSignup(termsOfService, 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(TermsOfService), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" termsOfService: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TermsOfService)) + { + builder.Append(" termsOfService: "); + BicepSerializationHelpers.AppendChildObject(builder, TermsOfService, options, 2, false, " termsOfService: "); + } + } + + 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(PortalConfigPropertiesSignup)} does not support writing '{options.Format}' format."); + } + } + + PortalConfigPropertiesSignup 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 DeserializePortalConfigPropertiesSignup(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PortalConfigPropertiesSignup)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigPropertiesSignup.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigPropertiesSignup.cs new file mode 100644 index 0000000000000..4436e55561bc6 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigPropertiesSignup.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.ApiManagement.Models +{ + /// The PortalConfigPropertiesSignup. + internal partial class PortalConfigPropertiesSignup + { + /// + /// 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 PortalConfigPropertiesSignup() + { + } + + /// Initializes a new instance of . + /// Terms of service settings. + /// Keeps track of any properties unknown to the library. + internal PortalConfigPropertiesSignup(PortalConfigTermsOfServiceProperties termsOfService, IDictionary serializedAdditionalRawData) + { + TermsOfService = termsOfService; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Terms of service settings. + [WirePath("termsOfService")] + public PortalConfigTermsOfServiceProperties TermsOfService { get; set; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigTermsOfServiceProperties.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigTermsOfServiceProperties.Serialization.cs new file mode 100644 index 0000000000000..31a445bdaa4bd --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigTermsOfServiceProperties.Serialization.cs @@ -0,0 +1,194 @@ +// 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.ApiManagement.Models +{ + public partial class PortalConfigTermsOfServiceProperties : 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(PortalConfigTermsOfServiceProperties)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Text)) + { + writer.WritePropertyName("text"u8); + writer.WriteStringValue(Text); + } + if (Optional.IsDefined(RequireConsent)) + { + writer.WritePropertyName("requireConsent"u8); + writer.WriteBooleanValue(RequireConsent.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(); + } + + PortalConfigTermsOfServiceProperties 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(PortalConfigTermsOfServiceProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePortalConfigTermsOfServiceProperties(document.RootElement, options); + } + + internal static PortalConfigTermsOfServiceProperties DeserializePortalConfigTermsOfServiceProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string text = default; + bool? requireConsent = 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("requireConsent"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + requireConsent = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PortalConfigTermsOfServiceProperties(text, requireConsent, 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(RequireConsent), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" requireConsent: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(RequireConsent)) + { + builder.Append(" requireConsent: "); + var boolValue = RequireConsent.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(PortalConfigTermsOfServiceProperties)} does not support writing '{options.Format}' format."); + } + } + + PortalConfigTermsOfServiceProperties 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 DeserializePortalConfigTermsOfServiceProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PortalConfigTermsOfServiceProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigTermsOfServiceProperties.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigTermsOfServiceProperties.cs new file mode 100644 index 0000000000000..be26a06476b9f --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigTermsOfServiceProperties.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.ApiManagement.Models +{ + /// Terms of service contract properties. + public partial class PortalConfigTermsOfServiceProperties + { + /// + /// 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 PortalConfigTermsOfServiceProperties() + { + } + + /// Initializes a new instance of . + /// A terms of service text. + /// Ask user for consent to the terms of service. + /// Keeps track of any properties unknown to the library. + internal PortalConfigTermsOfServiceProperties(string text, bool? requireConsent, IDictionary serializedAdditionalRawData) + { + Text = text; + RequireConsent = requireConsent; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// A terms of service text. + [WirePath("text")] + public string Text { get; set; } + /// Ask user for consent to the terms of service. + [WirePath("requireConsent")] + public bool? RequireConsent { get; set; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalRevisionListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalRevisionListResult.Serialization.cs index 0f86532292845..50d833ca7b751 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalRevisionListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalRevisionListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -113,6 +115,67 @@ internal static PortalRevisionListResult DeserializePortalRevisionListResult(Jso return new PortalRevisionListResult(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; @@ -121,6 +184,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOp { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(PortalRevisionListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalSettingValidationKeyContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalSettingValidationKeyContract.Serialization.cs index 54a5fef49d2d6..f13db85480e86 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalSettingValidationKeyContract.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalSettingValidationKeyContract.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -88,6 +89,44 @@ internal static PortalSettingValidationKeyContract DeserializePortalSettingValid return new PortalSettingValidationKeyContract(validationKey, 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(ValidationKey), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" validationKey: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ValidationKey)) + { + builder.Append(" validationKey: "); + if (ValidationKey.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ValidationKey}'''"); + } + else + { + builder.AppendLine($"'{ValidationKey}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -96,6 +135,8 @@ BinaryData IPersistableModel.Write(ModelRead { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(PortalSettingValidationKeyContract)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalSettingValidationKeyContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalSettingValidationKeyContract.cs index 0000a797eae87..473246b9a03c9 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalSettingValidationKeyContract.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalSettingValidationKeyContract.cs @@ -60,6 +60,7 @@ internal PortalSettingValidationKeyContract(string validationKey, IDictionary This is secret value of the validation key in portal settings. + [WirePath("validationKey")] public string ValidationKey { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalSettingsContractData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalSettingsContractData.Serialization.cs index afbbe686f8d95..83b23787667d8 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalSettingsContractData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalSettingsContractData.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Models; @@ -238,6 +239,186 @@ internal static PortalSettingsContractData DeserializePortalSettingsContractData 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(Uri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" url: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Uri)) + { + builder.Append(" url: "); + builder.AppendLine($"'{Uri.AbsoluteUri}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ValidationKey), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" validationKey: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ValidationKey)) + { + builder.Append(" validationKey: "); + if (ValidationKey.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ValidationKey}'''"); + } + else + { + builder.AppendLine($"'{ValidationKey}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("IsSubscriptionDelegationEnabled", out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" subscriptions: "); + builder.AppendLine("{"); + builder.AppendLine(" subscriptions: {"); + builder.Append(" enabled: "); + builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); + builder.AppendLine(" }"); + } + else + { + if (Optional.IsDefined(IsSubscriptions)) + { + builder.Append(" subscriptions: "); + BicepSerializationHelpers.AppendChildObject(builder, IsSubscriptions, options, 4, false, " subscriptions: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("IsUserRegistrationDelegationEnabled", out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" userRegistration: "); + builder.AppendLine("{"); + builder.AppendLine(" userRegistration: {"); + builder.Append(" enabled: "); + builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); + builder.AppendLine(" }"); + } + else + { + if (Optional.IsDefined(IsUserRegistration)) + { + builder.Append(" userRegistration: "); + BicepSerializationHelpers.AppendChildObject(builder, IsUserRegistration, options, 4, false, " userRegistration: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsRedirectEnabled), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" enabled: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsRedirectEnabled)) + { + builder.Append(" enabled: "); + var boolValue = IsRedirectEnabled.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TermsOfService), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" termsOfService: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TermsOfService)) + { + builder.Append(" termsOfService: "); + BicepSerializationHelpers.AppendChildObject(builder, TermsOfService, options, 4, false, " termsOfService: "); + } + } + + 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; @@ -246,6 +427,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriter { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(PortalSettingsContractData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalSettingsContractData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalSettingsContractData.cs index 2b13cd0166efc..016f69789858b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalSettingsContractData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalSettingsContractData.cs @@ -76,12 +76,15 @@ internal PortalSettingsContractData(ResourceIdentifier id, string name, Resource } /// A delegation Url. + [WirePath("properties.url")] public Uri Uri { get; set; } /// A base64-encoded validation key to validate, that a request is coming from Azure API Management. + [WirePath("properties.validationKey")] public string ValidationKey { get; set; } /// Subscriptions delegation settings. internal SubscriptionDelegationSettingProperties IsSubscriptions { get; set; } /// Enable or disable delegation for subscriptions. + [WirePath("properties.subscriptions.enabled")] public bool? IsSubscriptionDelegationEnabled { get => IsSubscriptions is null ? default : IsSubscriptions.IsSubscriptionDelegationEnabled; @@ -96,6 +99,7 @@ public bool? IsSubscriptionDelegationEnabled /// User registration delegation settings. internal RegistrationDelegationSettingProperties IsUserRegistration { get; set; } /// Enable or disable delegation for user registration. + [WirePath("properties.userRegistration.enabled")] public bool? IsUserRegistrationDelegationEnabled { get => IsUserRegistration is null ? default : IsUserRegistration.IsUserRegistrationDelegationEnabled; @@ -108,8 +112,10 @@ public bool? IsUserRegistrationDelegationEnabled } /// Redirect Anonymous users to the Sign-In page. + [WirePath("properties.enabled")] public bool? IsRedirectEnabled { get; set; } /// Terms of service contract properties. + [WirePath("properties.termsOfService")] public TermsOfServiceProperties TermsOfService { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalSettingsCspMode.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalSettingsCspMode.cs new file mode 100644 index 0000000000000..1001ca81aae24 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalSettingsCspMode.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.ApiManagement.Models +{ + /// The mode of the developer portal Content Security Policy (CSP). + public readonly partial struct PortalSettingsCspMode : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public PortalSettingsCspMode(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EnabledValue = "enabled"; + private const string DisabledValue = "disabled"; + private const string ReportOnlyValue = "reportOnly"; + + /// The browser will block requests not matching allowed origins. + public static PortalSettingsCspMode Enabled { get; } = new PortalSettingsCspMode(EnabledValue); + /// The browser will not apply the origin restrictions. + public static PortalSettingsCspMode Disabled { get; } = new PortalSettingsCspMode(DisabledValue); + /// The browser will report requests not matching allowed origins without blocking them. + public static PortalSettingsCspMode ReportOnly { get; } = new PortalSettingsCspMode(ReportOnlyValue); + /// Determines if two values are the same. + public static bool operator ==(PortalSettingsCspMode left, PortalSettingsCspMode right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(PortalSettingsCspMode left, PortalSettingsCspMode right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator PortalSettingsCspMode(string value) => new PortalSettingsCspMode(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is PortalSettingsCspMode other && Equals(other); + /// + public bool Equals(PortalSettingsCspMode 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/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalSettingsListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalSettingsListResult.Serialization.cs index e64bb2f09b637..4055510c964ed 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalSettingsListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalSettingsListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -117,6 +119,59 @@ internal static PortalSettingsListResult DeserializePortalSettingsListResult(Jso return new PortalSettingsListResult(value ?? new ChangeTrackingList(), count, 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(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.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; @@ -125,6 +180,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOp { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(PortalSettingsListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalSettingsListResult.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalSettingsListResult.cs index 060558de479e8..46df388864562 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalSettingsListResult.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalSettingsListResult.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.ApiManagement.Models { - /// Descriptions of APIM policies. + /// Descriptions of API Management policies. internal partial class PortalSettingsListResult { /// @@ -52,7 +52,7 @@ internal PortalSettingsListResult() } /// Initializes a new instance of . - /// Descriptions of APIM policies. + /// Descriptions of API Management policies. /// Total record count number. /// Keeps track of any properties unknown to the library. internal PortalSettingsListResult(IReadOnlyList value, long? count, IDictionary serializedAdditionalRawData) @@ -62,9 +62,11 @@ internal PortalSettingsListResult(IReadOnlyList valu _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Descriptions of APIM policies. + /// Descriptions of API Management policies. + [WirePath("value")] public IReadOnlyList Value { get; } /// Total record count number. + [WirePath("count")] public long? Count { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PrivateEndpointConnectionRequestProperties.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PrivateEndpointConnectionRequestProperties.cs index 413263675cf36..a8c7768a32584 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PrivateEndpointConnectionRequestProperties.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PrivateEndpointConnectionRequestProperties.cs @@ -60,6 +60,7 @@ internal PrivateEndpointConnectionRequestProperties(ApiManagementPrivateLinkServ } /// A collection of information about the state of the connection between service consumer and provider. + [WirePath("privateLinkServiceConnectionState")] public ApiManagementPrivateLinkServiceConnectionState PrivateLinkServiceConnectionState { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ProductApiData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ProductApiData.Serialization.cs index 9852f01a4c919..cffd0b8b94877 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ProductApiData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ProductApiData.Serialization.cs @@ -8,6 +8,8 @@ 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; @@ -456,6 +458,475 @@ internal static ProductApiData DeserializeProductApiData(JsonElement element, Mo 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(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}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AuthenticationSettings), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" authenticationSettings: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AuthenticationSettings)) + { + builder.Append(" authenticationSettings: "); + BicepSerializationHelpers.AppendChildObject(builder, AuthenticationSettings, options, 4, false, " authenticationSettings: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SubscriptionKeyParameterNames), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" subscriptionKeyParameterNames: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SubscriptionKeyParameterNames)) + { + builder.Append(" subscriptionKeyParameterNames: "); + BicepSerializationHelpers.AppendChildObject(builder, SubscriptionKeyParameterNames, options, 4, false, " subscriptionKeyParameterNames: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" type: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiType)) + { + builder.Append(" type: "); + builder.AppendLine($"'{ApiType.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiRevision), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiRevision: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiRevision)) + { + builder.Append(" apiRevision: "); + if (ApiRevision.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ApiRevision}'''"); + } + else + { + builder.AppendLine($"'{ApiRevision}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiVersion), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiVersion: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiVersion)) + { + builder.Append(" apiVersion: "); + if (ApiVersion.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ApiVersion}'''"); + } + else + { + builder.AppendLine($"'{ApiVersion}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsCurrent), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" isCurrent: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsCurrent)) + { + builder.Append(" isCurrent: "); + var boolValue = IsCurrent.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsOnline), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" isOnline: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsOnline)) + { + builder.Append(" isOnline: "); + var boolValue = IsOnline.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiRevisionDescription), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiRevisionDescription: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiRevisionDescription)) + { + builder.Append(" apiRevisionDescription: "); + if (ApiRevisionDescription.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ApiRevisionDescription}'''"); + } + else + { + builder.AppendLine($"'{ApiRevisionDescription}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiVersionDescription), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiVersionDescription: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiVersionDescription)) + { + builder.Append(" apiVersionDescription: "); + if (ApiVersionDescription.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ApiVersionDescription}'''"); + } + else + { + builder.AppendLine($"'{ApiVersionDescription}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiVersionSetId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiVersionSetId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiVersionSetId)) + { + builder.Append(" apiVersionSetId: "); + builder.AppendLine($"'{ApiVersionSetId.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsSubscriptionRequired), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" subscriptionRequired: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsSubscriptionRequired)) + { + builder.Append(" subscriptionRequired: "); + var boolValue = IsSubscriptionRequired.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TermsOfServiceLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" termsOfServiceUrl: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TermsOfServiceLink)) + { + builder.Append(" termsOfServiceUrl: "); + if (TermsOfServiceLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{TermsOfServiceLink}'''"); + } + else + { + builder.AppendLine($"'{TermsOfServiceLink}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Contact), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" contact: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Contact)) + { + builder.Append(" contact: "); + BicepSerializationHelpers.AppendChildObject(builder, Contact, options, 4, false, " contact: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(License), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" license: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(License)) + { + builder.Append(" license: "); + BicepSerializationHelpers.AppendChildObject(builder, License, options, 4, false, " license: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SourceApiId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" sourceApiId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SourceApiId)) + { + builder.Append(" sourceApiId: "); + builder.AppendLine($"'{SourceApiId.ToString()}'"); + } + } + + 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(ServiceLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" serviceUrl: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ServiceLink)) + { + builder.Append(" serviceUrl: "); + if (ServiceLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ServiceLink}'''"); + } + else + { + builder.AppendLine($"'{ServiceLink}'"); + } + } + } + + 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(Protocols), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" protocols: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Protocols)) + { + if (Protocols.Any()) + { + builder.Append(" protocols: "); + builder.AppendLine("["); + foreach (var item in Protocols) + { + builder.AppendLine($" '{item.ToString()}'"); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiVersionSet), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiVersionSet: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiVersionSet)) + { + builder.Append(" apiVersionSet: "); + BicepSerializationHelpers.AppendChildObject(builder, ApiVersionSet, options, 4, false, " apiVersionSet: "); + } + } + + 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; @@ -464,6 +935,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions opti { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ProductApiData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ProductApiData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ProductApiData.cs index e33b1a341a31f..54b66e6ee0a8e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ProductApiData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ProductApiData.cs @@ -107,46 +107,67 @@ internal ProductApiData(ResourceIdentifier id, string name, ResourceType resourc } /// Description of the API. May include HTML formatting tags. + [WirePath("properties.description")] public string Description { get; set; } /// Collection of authentication settings included into this API. + [WirePath("properties.authenticationSettings")] public AuthenticationSettingsContract AuthenticationSettings { get; set; } /// Protocols over which API is made available. + [WirePath("properties.subscriptionKeyParameterNames")] public SubscriptionKeyParameterNamesContract SubscriptionKeyParameterNames { get; set; } /// Type of API. + [WirePath("properties.type")] public ApiType? ApiType { get; set; } /// Describes the revision of the API. If no value is provided, default revision 1 is created. + [WirePath("properties.apiRevision")] public string ApiRevision { get; set; } /// Indicates the version identifier of the API if the API is versioned. + [WirePath("properties.apiVersion")] public string ApiVersion { get; set; } /// Indicates if API revision is current api revision. + [WirePath("properties.isCurrent")] public bool? IsCurrent { get; set; } /// Indicates if API revision is accessible via the gateway. + [WirePath("properties.isOnline")] public bool? IsOnline { get; } /// Description of the API Revision. + [WirePath("properties.apiRevisionDescription")] public string ApiRevisionDescription { get; set; } /// Description of the API Version. + [WirePath("properties.apiVersionDescription")] public string ApiVersionDescription { get; set; } /// A resource identifier for the related ApiVersionSet. + [WirePath("properties.apiVersionSetId")] public ResourceIdentifier ApiVersionSetId { get; set; } /// Specifies whether an API or Product subscription is required for accessing the API. + [WirePath("properties.subscriptionRequired")] public bool? IsSubscriptionRequired { get; set; } /// A URL to the Terms of Service for the API. MUST be in the format of a URL. + [WirePath("properties.termsOfServiceUrl")] public string TermsOfServiceLink { get; set; } /// Contact information for the API. + [WirePath("properties.contact")] public ApiContactInformation Contact { get; set; } /// License information for the API. + [WirePath("properties.license")] public ApiLicenseInformation License { get; set; } /// API identifier of the source API. + [WirePath("properties.sourceApiId")] public ResourceIdentifier SourceApiId { get; set; } /// API name. Must be 1 to 300 characters long. + [WirePath("properties.displayName")] public string DisplayName { get; set; } /// Absolute URL of the backend service implementing this API. Cannot be more than 2000 characters long. + [WirePath("properties.serviceUrl")] public string ServiceLink { get; set; } /// Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API. + [WirePath("properties.path")] public string Path { get; set; } /// Describes on which protocols the operations in this API can be invoked. + [WirePath("properties.protocols")] public IList Protocols { get; } /// Version set details. + [WirePath("properties.apiVersionSet")] public ApiVersionSetContractDetails ApiVersionSet { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ProductEntityBaseProperties.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ProductEntityBaseProperties.Serialization.cs index 359aeb347639e..a7b14c475b742 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ProductEntityBaseProperties.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ProductEntityBaseProperties.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -166,6 +167,129 @@ internal static ProductEntityBaseProperties DeserializeProductEntityBaseProperti 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(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}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Terms), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" terms: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Terms)) + { + builder.Append(" terms: "); + if (Terms.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Terms}'''"); + } + else + { + builder.AppendLine($"'{Terms}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsSubscriptionRequired), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" subscriptionRequired: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsSubscriptionRequired)) + { + builder.Append(" subscriptionRequired: "); + var boolValue = IsSubscriptionRequired.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsApprovalRequired), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" approvalRequired: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsApprovalRequired)) + { + builder.Append(" approvalRequired: "); + var boolValue = IsApprovalRequired.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SubscriptionsLimit), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" subscriptionsLimit: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SubscriptionsLimit)) + { + builder.Append(" subscriptionsLimit: "); + builder.AppendLine($"{SubscriptionsLimit.Value}"); + } + } + + 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.ToSerialString()}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -174,6 +298,8 @@ BinaryData IPersistableModel.Write(ModelReaderWrite { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ProductEntityBaseProperties)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ProductEntityBaseProperties.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ProductEntityBaseProperties.cs index 11c5ed42d100f..55496cf8f109a 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ProductEntityBaseProperties.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ProductEntityBaseProperties.cs @@ -70,16 +70,22 @@ internal ProductEntityBaseProperties(string description, string terms, bool? isS } /// Product description. May include HTML formatting tags. + [WirePath("description")] public string Description { get; } /// Product terms of use. Developers trying to subscribe to the product will be presented and required to accept these terms before they can complete the subscription process. + [WirePath("terms")] public string Terms { get; } /// Whether a product subscription is required for accessing APIs included in this product. If true, the product is referred to as "protected" and a valid subscription key is required for a request to an API included in the product to succeed. If false, the product is referred to as "open" and requests to an API included in the product can be made without a subscription key. If property is omitted when creating a new product it's value is assumed to be true. + [WirePath("subscriptionRequired")] public bool? IsSubscriptionRequired { get; } /// whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the product’s APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present only if subscriptionRequired property is present and has a value of false. + [WirePath("approvalRequired")] public bool? IsApprovalRequired { get; } /// Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false. + [WirePath("subscriptionsLimit")] public int? SubscriptionsLimit { get; } /// whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished. + [WirePath("state")] public ApiManagementProductState? State { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ProductGroupData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ProductGroupData.Serialization.cs index 447fce6a4a9f6..e06a79d8bcd26 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ProductGroupData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ProductGroupData.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Models; @@ -214,6 +215,177 @@ internal static ProductGroupData DeserializeProductGroupData(JsonElement element 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(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(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}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsBuiltIn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" builtIn: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsBuiltIn)) + { + builder.Append(" builtIn: "); + var boolValue = IsBuiltIn.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(GroupType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" type: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(GroupType)) + { + builder.Append(" type: "); + builder.AppendLine($"'{GroupType.Value.ToSerialString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ExternalId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" externalId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ExternalId)) + { + builder.Append(" externalId: "); + if (ExternalId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ExternalId}'''"); + } + else + { + builder.AppendLine($"'{ExternalId}'"); + } + } + } + + 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; @@ -222,6 +394,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions op { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ProductGroupData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ProductGroupData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ProductGroupData.cs index 9c0181099881a..5f2eb58ac806d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ProductGroupData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ProductGroupData.cs @@ -74,14 +74,19 @@ internal ProductGroupData(ResourceIdentifier id, string name, ResourceType resou } /// Group name. + [WirePath("properties.displayName")] public string DisplayName { get; set; } /// Group description. Can contain HTML formatting tags. + [WirePath("properties.description")] public string Description { get; set; } /// true if the group is one of the three system groups (Administrators, Developers, or Guests); otherwise false. + [WirePath("properties.builtIn")] public bool? IsBuiltIn { get; } /// Group type. + [WirePath("properties.type")] public ApiManagementGroupType? GroupType { get; set; } /// For external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory `aad://<tenant>.onmicrosoft.com/groups/<group object id>`; otherwise the value is null. + [WirePath("properties.externalId")] public string ExternalId { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ProductListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ProductListResult.Serialization.cs index 711bbd1424a96..53c7a70e8535b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ProductListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ProductListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static ProductListResult DeserializeProductListResult(JsonElement eleme return new ProductListResult(value ?? new ChangeTrackingList(), count, 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(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + 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; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions o { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ProductListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/QuotaCounterContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/QuotaCounterContract.Serialization.cs index 33b132c69709f..534271aa65994 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/QuotaCounterContract.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/QuotaCounterContract.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -130,6 +131,108 @@ internal static QuotaCounterContract DeserializeQuotaCounterContract(JsonElement 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(CounterKey), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" counterKey: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CounterKey)) + { + builder.Append(" counterKey: "); + if (CounterKey.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{CounterKey}'''"); + } + else + { + builder.AppendLine($"'{CounterKey}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PeriodKey), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" periodKey: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PeriodKey)) + { + builder.Append(" periodKey: "); + if (PeriodKey.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{PeriodKey}'''"); + } + else + { + builder.AppendLine($"'{PeriodKey}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PeriodStartOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" periodStartTime: "); + builder.AppendLine(propertyOverride); + } + else + { + builder.Append(" periodStartTime: "); + var formattedDateTimeString = TypeFormatters.ToString(PeriodStartOn, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PeriodEndOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" periodEndTime: "); + builder.AppendLine(propertyOverride); + } + else + { + builder.Append(" periodEndTime: "); + var formattedDateTimeString = TypeFormatters.ToString(PeriodEndOn, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Value)) + { + builder.Append(" value: "); + BicepSerializationHelpers.AppendChildObject(builder, Value, options, 2, false, " value: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -138,6 +241,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOption { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(QuotaCounterContract)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/QuotaCounterContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/QuotaCounterContract.cs index d440b373b00bc..ca316ae06cb03 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/QuotaCounterContract.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/QuotaCounterContract.cs @@ -97,20 +97,25 @@ internal QuotaCounterContract() } /// The Key value of the Counter. Must not be empty. + [WirePath("counterKey")] public string CounterKey { get; } /// Identifier of the Period for which the counter was collected. Must not be empty. + [WirePath("periodKey")] public string PeriodKey { get; } /// /// The date of the start of Counter Period. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. /// /// + [WirePath("periodStartTime")] public DateTimeOffset PeriodStartOn { get; } /// /// The date of the end of Counter Period. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. /// /// + [WirePath("periodEndTime")] public DateTimeOffset PeriodEndOn { get; } /// Quota Value Properties. + [WirePath("value")] public QuotaCounterValueContractProperties Value { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/QuotaCounterListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/QuotaCounterListResult.Serialization.cs index 9f75acb3fa6cd..a1a6ff58d7467 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/QuotaCounterListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/QuotaCounterListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static QuotaCounterListResult DeserializeQuotaCounterListResult(JsonEle return new QuotaCounterListResult(value ?? new ChangeTrackingList(), count, 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(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + 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; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOpti { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(QuotaCounterListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/QuotaCounterListResult.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/QuotaCounterListResult.cs index 78f64ccbc21d5..f84186dd154dd 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/QuotaCounterListResult.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/QuotaCounterListResult.cs @@ -65,10 +65,13 @@ internal QuotaCounterListResult(IReadOnlyList value, long? } /// Quota counter values. + [WirePath("value")] public IReadOnlyList Value { get; } /// Total record count number across all pages. + [WirePath("count")] public long? Count { get; } /// Next page link if any. + [WirePath("nextLink")] public string NextLink { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/QuotaCounterValueContractProperties.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/QuotaCounterValueContractProperties.Serialization.cs index 0ad731834298c..74d10253de67d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/QuotaCounterValueContractProperties.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/QuotaCounterValueContractProperties.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -107,6 +108,51 @@ internal static QuotaCounterValueContractProperties DeserializeQuotaCounterValue return new QuotaCounterValueContractProperties(callsCount, kbTransferred, 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(CallsCount), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" callsCount: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CallsCount)) + { + builder.Append(" callsCount: "); + builder.AppendLine($"{CallsCount.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(KbTransferred), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" kbTransferred: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(KbTransferred)) + { + builder.Append(" kbTransferred: "); + builder.AppendLine($"'{KbTransferred.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; @@ -115,6 +161,8 @@ BinaryData IPersistableModel.Write(ModelRea { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(QuotaCounterValueContractProperties)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/QuotaCounterValueContractProperties.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/QuotaCounterValueContractProperties.cs index 98f516e5ecd74..e42ed7782f230 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/QuotaCounterValueContractProperties.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/QuotaCounterValueContractProperties.cs @@ -62,8 +62,10 @@ internal QuotaCounterValueContractProperties(int? callsCount, double? kbTransfer } /// Number of times Counter was called. + [WirePath("callsCount")] public int? CallsCount { get; } /// Data Transferred in KiloBytes. + [WirePath("kbTransferred")] public double? KbTransferred { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/QuotaCounterValueUpdateContent.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/QuotaCounterValueUpdateContent.cs index 9f0b8e708eb79..bc4d5defff578 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/QuotaCounterValueUpdateContent.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/QuotaCounterValueUpdateContent.cs @@ -62,8 +62,10 @@ internal QuotaCounterValueUpdateContent(int? callsCount, double? kbTransferred, } /// Number of times Counter was called. + [WirePath("properties.callsCount")] public int? CallsCount { get; set; } /// Data Transferred in KiloBytes. + [WirePath("properties.kbTransferred")] public double? KbTransferred { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RecipientEmailContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RecipientEmailContract.Serialization.cs index c7f9b604f0699..8a791703a30db 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RecipientEmailContract.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RecipientEmailContract.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Models; @@ -158,6 +159,100 @@ internal static RecipientEmailContract DeserializeRecipientEmailContract(JsonEle 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(Email), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" email: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Email)) + { + builder.Append(" email: "); + if (Email.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Email}'''"); + } + else + { + builder.AppendLine($"'{Email}'"); + } + } + } + + 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; @@ -166,6 +261,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOpti { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(RecipientEmailContract)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RecipientEmailContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RecipientEmailContract.cs index 6705465b25b64..9d62619412ffc 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RecipientEmailContract.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RecipientEmailContract.cs @@ -66,6 +66,7 @@ internal RecipientEmailContract(ResourceIdentifier id, string name, ResourceType } /// User Email subscribed to notification. + [WirePath("properties.email")] public string Email { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RecipientEmailListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RecipientEmailListResult.Serialization.cs index 871fe88bf29a8..cf8a63a23faf4 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RecipientEmailListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RecipientEmailListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static RecipientEmailListResult DeserializeRecipientEmailListResult(Jso return new RecipientEmailListResult(value ?? new ChangeTrackingList(), count, 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(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + 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; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOp { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(RecipientEmailListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RecipientEmailListResult.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RecipientEmailListResult.cs index b8aecccaaa62a..edeeb9b486013 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RecipientEmailListResult.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RecipientEmailListResult.cs @@ -65,10 +65,13 @@ internal RecipientEmailListResult(IReadOnlyList value, l } /// Page values. + [WirePath("value")] public IReadOnlyList Value { get; } /// Total record count number across all pages. + [WirePath("count")] public long? Count { get; } /// Next page link if any. + [WirePath("nextLink")] public string NextLink { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RecipientUserContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RecipientUserContract.Serialization.cs index 9a0abf37de8d1..2108b3a893f21 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RecipientUserContract.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RecipientUserContract.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Models; @@ -158,6 +159,100 @@ internal static RecipientUserContract DeserializeRecipientUserContract(JsonEleme 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(UserId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" userId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(UserId)) + { + builder.Append(" userId: "); + if (UserId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{UserId}'''"); + } + else + { + builder.AppendLine($"'{UserId}'"); + } + } + } + + 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; @@ -166,6 +261,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptio { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(RecipientUserContract)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RecipientUserContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RecipientUserContract.cs index 22b11f8dd480a..7db89ba033b7f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RecipientUserContract.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RecipientUserContract.cs @@ -66,6 +66,7 @@ internal RecipientUserContract(ResourceIdentifier id, string name, ResourceType } /// API Management UserId subscribed to notification. + [WirePath("properties.userId")] public string UserId { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RecipientUserListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RecipientUserListResult.Serialization.cs index d4cd5929831f1..ca03be7d05274 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RecipientUserListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RecipientUserListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static RecipientUserListResult DeserializeRecipientUserListResult(JsonE return new RecipientUserListResult(value ?? new ChangeTrackingList(), count, 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(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + 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; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOpt { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(RecipientUserListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RecipientUserListResult.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RecipientUserListResult.cs index b5a4cde98a0c5..b9d61a847a64f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RecipientUserListResult.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RecipientUserListResult.cs @@ -65,10 +65,13 @@ internal RecipientUserListResult(IReadOnlyList value, lon } /// Page values. + [WirePath("value")] public IReadOnlyList Value { get; } /// Total record count number across all pages. + [WirePath("count")] public long? Count { get; } /// Next page link if any. + [WirePath("nextLink")] public string NextLink { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RecipientsContractProperties.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RecipientsContractProperties.Serialization.cs index 4c67a1660783d..89887f72503a1 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RecipientsContractProperties.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RecipientsContractProperties.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -127,6 +129,93 @@ internal static RecipientsContractProperties DeserializeRecipientsContractProper return new RecipientsContractProperties(emails ?? new ChangeTrackingList(), users ?? 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(Emails), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" emails: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Emails)) + { + if (Emails.Any()) + { + builder.Append(" emails: "); + builder.AppendLine("["); + foreach (var item in Emails) + { + 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(Users), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" users: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Users)) + { + if (Users.Any()) + { + builder.Append(" users: "); + builder.AppendLine("["); + foreach (var item in Users) + { + 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; @@ -135,6 +224,8 @@ BinaryData IPersistableModel.Write(ModelReaderWrit { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(RecipientsContractProperties)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RecipientsContractProperties.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RecipientsContractProperties.cs index e0664e8a1ad55..6534876299aeb 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RecipientsContractProperties.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RecipientsContractProperties.cs @@ -64,8 +64,10 @@ internal RecipientsContractProperties(IList emails, IList users, } /// List of Emails subscribed for the notification. + [WirePath("emails")] public IList Emails { get; } /// List of Users subscribed for the notification. + [WirePath("users")] public IList Users { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RegionContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RegionContract.Serialization.cs index 636183a74929b..02a8d288a275f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RegionContract.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RegionContract.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -118,6 +119,76 @@ internal static RegionContract DeserializeRegionContract(JsonElement element, Mo return new RegionContract(name, isMasterRegion, isDeleted, 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(IsMasterRegion), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" isMasterRegion: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsMasterRegion)) + { + builder.Append(" isMasterRegion: "); + var boolValue = IsMasterRegion.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsDeleted), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" isDeleted: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsDeleted)) + { + builder.Append(" isDeleted: "); + var boolValue = IsDeleted.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; @@ -126,6 +197,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions opti { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(RegionContract)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RegionContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RegionContract.cs index cd03733ff8a24..d7bd82c2c78a0 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RegionContract.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RegionContract.cs @@ -64,10 +64,13 @@ internal RegionContract(string name, bool? isMasterRegion, bool? isDeleted, IDic } /// Region name. + [WirePath("name")] public string Name { get; } /// whether Region is the master region. + [WirePath("isMasterRegion")] public bool? IsMasterRegion { get; } /// whether Region is deleted. + [WirePath("isDeleted")] public bool? IsDeleted { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RegionListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RegionListResult.Serialization.cs index dc7655b147712..3b37580778f93 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RegionListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RegionListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static RegionListResult DeserializeRegionListResult(JsonElement element return new RegionListResult(value ?? new ChangeTrackingList(), count, 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(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + 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; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions op { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(RegionListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RegistrationDelegationSettingProperties.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RegistrationDelegationSettingProperties.Serialization.cs index 4e3aa8232d15a..e9b4bca30e52c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RegistrationDelegationSettingProperties.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RegistrationDelegationSettingProperties.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -92,6 +93,37 @@ internal static RegistrationDelegationSettingProperties DeserializeRegistrationD return new RegistrationDelegationSettingProperties(enabled, 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(IsUserRegistrationDelegationEnabled), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" enabled: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsUserRegistrationDelegationEnabled)) + { + builder.Append(" enabled: "); + var boolValue = IsUserRegistrationDelegationEnabled.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; @@ -100,6 +132,8 @@ BinaryData IPersistableModel.Write(Mode { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(RegistrationDelegationSettingProperties)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RegistrationDelegationSettingProperties.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RegistrationDelegationSettingProperties.cs index 2bd6e737ab667..f09886c67589e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RegistrationDelegationSettingProperties.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RegistrationDelegationSettingProperties.cs @@ -60,6 +60,7 @@ internal RegistrationDelegationSettingProperties(bool? isUserRegistrationDelegat } /// Enable or disable delegation for user registration. + [WirePath("enabled")] public bool? IsUserRegistrationDelegationEnabled { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RemotePrivateEndpointConnectionWrapper.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RemotePrivateEndpointConnectionWrapper.Serialization.cs index 260650e873598..b8c66fc7ad3c5 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RemotePrivateEndpointConnectionWrapper.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RemotePrivateEndpointConnectionWrapper.Serialization.cs @@ -8,6 +8,8 @@ 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.Resources.Models; @@ -208,6 +210,156 @@ internal static RemotePrivateEndpointConnectionWrapper DeserializeRemotePrivateE 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.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("PrivateEndpointId", out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" privateEndpoint: "); + builder.AppendLine("{"); + builder.AppendLine(" privateEndpoint: {"); + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); + builder.AppendLine(" }"); + } + else + { + if (Optional.IsDefined(PrivateEndpoint)) + { + builder.Append(" privateEndpoint: "); + BicepSerializationHelpers.AppendChildObject(builder, PrivateEndpoint, options, 4, false, " privateEndpoint: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PrivateLinkServiceConnectionState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" privateLinkServiceConnectionState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PrivateLinkServiceConnectionState)) + { + builder.Append(" privateLinkServiceConnectionState: "); + BicepSerializationHelpers.AppendChildObject(builder, PrivateLinkServiceConnectionState, options, 4, false, " privateLinkServiceConnectionState: "); + } + } + + 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}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(GroupIds), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" groupIds: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(GroupIds)) + { + if (GroupIds.Any()) + { + builder.Append(" groupIds: "); + builder.AppendLine("["); + foreach (var item in GroupIds) + { + 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; @@ -216,6 +368,8 @@ BinaryData IPersistableModel.Write(Model { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(RemotePrivateEndpointConnectionWrapper)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RemotePrivateEndpointConnectionWrapper.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RemotePrivateEndpointConnectionWrapper.cs index 0e3942efc0256..5cbd870118e51 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RemotePrivateEndpointConnectionWrapper.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RemotePrivateEndpointConnectionWrapper.cs @@ -75,24 +75,31 @@ internal RemotePrivateEndpointConnectionWrapper(ResourceIdentifier id, string na } /// Private Endpoint connection resource id. + [WirePath("id")] public ResourceIdentifier Id { get; set; } /// Private Endpoint Connection Name. + [WirePath("name")] public string Name { get; set; } /// Private Endpoint Connection Resource Type. + [WirePath("type")] public ResourceType? ResourceType { get; set; } /// The resource of private end point. internal SubResource PrivateEndpoint { get; set; } /// Gets Id. + [WirePath("properties.privateEndpoint.id")] public ResourceIdentifier PrivateEndpointId { get => PrivateEndpoint is null ? default : PrivateEndpoint.Id; } /// A collection of information about the state of the connection between service consumer and provider. + [WirePath("properties.privateLinkServiceConnectionState")] public ApiManagementPrivateLinkServiceConnectionState PrivateLinkServiceConnectionState { get; set; } /// The provisioning state of the private endpoint connection resource. + [WirePath("properties.provisioningState")] public string ProvisioningState { get; } /// All the Group ids. + [WirePath("properties.groupIds")] public IReadOnlyList GroupIds { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ReportListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ReportListResult.Serialization.cs index 89df119eb0503..57ac7b1c42dea 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ReportListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ReportListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static ReportListResult DeserializeReportListResult(JsonElement element return new ReportListResult(value ?? new ChangeTrackingList(), count, 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(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + 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; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions op { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ReportListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ReportRecordContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ReportRecordContract.Serialization.cs index 3dc498472d5fe..f3997d2e10f21 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ReportRecordContract.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ReportRecordContract.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -454,6 +455,492 @@ internal static ReportRecordContract DeserializeReportRecordContract(JsonElement 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(Timestamp), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" timestamp: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Timestamp)) + { + builder.Append(" timestamp: "); + var formattedDateTimeString = TypeFormatters.ToString(Timestamp.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Interval), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" interval: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Interval)) + { + builder.Append(" interval: "); + if (Interval.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Interval}'''"); + } + else + { + builder.AppendLine($"'{Interval}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Country), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" country: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Country)) + { + builder.Append(" country: "); + if (Country.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Country}'''"); + } + else + { + builder.AppendLine($"'{Country}'"); + } + } + } + + 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(Zip), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" zip: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Zip)) + { + builder.Append(" zip: "); + if (Zip.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Zip}'''"); + } + else + { + builder.AppendLine($"'{Zip}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(UserId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" userId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(UserId)) + { + builder.Append(" userId: "); + if (UserId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{UserId}'''"); + } + else + { + builder.AppendLine($"'{UserId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProductId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" productId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ProductId)) + { + builder.Append(" productId: "); + if (ProductId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ProductId}'''"); + } + else + { + builder.AppendLine($"'{ProductId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiId)) + { + builder.Append(" apiId: "); + if (ApiId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ApiId}'''"); + } + else + { + builder.AppendLine($"'{ApiId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(OperationId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" operationId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(OperationId)) + { + builder.Append(" operationId: "); + if (OperationId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{OperationId}'''"); + } + else + { + builder.AppendLine($"'{OperationId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiRegion), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiRegion: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiRegion)) + { + builder.Append(" apiRegion: "); + if (ApiRegion.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ApiRegion}'''"); + } + else + { + builder.AppendLine($"'{ApiRegion}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SubscriptionResourceId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" subscriptionId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SubscriptionResourceId)) + { + builder.Append(" subscriptionId: "); + builder.AppendLine($"'{SubscriptionResourceId.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CallCountSuccess), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" callCountSuccess: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CallCountSuccess)) + { + builder.Append(" callCountSuccess: "); + builder.AppendLine($"{CallCountSuccess.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CallCountBlocked), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" callCountBlocked: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CallCountBlocked)) + { + builder.Append(" callCountBlocked: "); + builder.AppendLine($"{CallCountBlocked.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CallCountFailed), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" callCountFailed: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CallCountFailed)) + { + builder.Append(" callCountFailed: "); + builder.AppendLine($"{CallCountFailed.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CallCountOther), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" callCountOther: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CallCountOther)) + { + builder.Append(" callCountOther: "); + builder.AppendLine($"{CallCountOther.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CallCountTotal), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" callCountTotal: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CallCountTotal)) + { + builder.Append(" callCountTotal: "); + builder.AppendLine($"{CallCountTotal.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Bandwidth), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" bandwidth: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Bandwidth)) + { + builder.Append(" bandwidth: "); + builder.AppendLine($"'{Bandwidth.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CacheHitCount), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" cacheHitCount: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CacheHitCount)) + { + builder.Append(" cacheHitCount: "); + builder.AppendLine($"{CacheHitCount.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CacheMissCount), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" cacheMissCount: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CacheMissCount)) + { + builder.Append(" cacheMissCount: "); + builder.AppendLine($"{CacheMissCount.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiTimeAvg), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiTimeAvg: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiTimeAvg)) + { + builder.Append(" apiTimeAvg: "); + builder.AppendLine($"'{ApiTimeAvg.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiTimeMin), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiTimeMin: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiTimeMin)) + { + builder.Append(" apiTimeMin: "); + builder.AppendLine($"'{ApiTimeMin.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiTimeMax), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiTimeMax: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiTimeMax)) + { + builder.Append(" apiTimeMax: "); + builder.AppendLine($"'{ApiTimeMax.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ServiceTimeAvg), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" serviceTimeAvg: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ServiceTimeAvg)) + { + builder.Append(" serviceTimeAvg: "); + builder.AppendLine($"'{ServiceTimeAvg.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ServiceTimeMin), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" serviceTimeMin: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ServiceTimeMin)) + { + builder.Append(" serviceTimeMin: "); + builder.AppendLine($"'{ServiceTimeMin.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ServiceTimeMax), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" serviceTimeMax: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ServiceTimeMax)) + { + builder.Append(" serviceTimeMax: "); + builder.AppendLine($"'{ServiceTimeMax.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; @@ -462,6 +949,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOption { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ReportRecordContract)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ReportRecordContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ReportRecordContract.cs index 3ee26a8c1c16b..77b846d6dd15c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ReportRecordContract.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ReportRecordContract.cs @@ -69,7 +69,7 @@ internal ReportRecordContract() /// Subscription identifier path. /subscriptions/{subscriptionId}. /// Number of successful calls. This includes calls returning HttpStatusCode <= 301 and HttpStatusCode.NotModified and HttpStatusCode.TemporaryRedirect. /// Number of calls blocked due to invalid credentials. This includes calls returning HttpStatusCode.Unauthorized and HttpStatusCode.Forbidden and HttpStatusCode.TooManyRequests. - /// Number of calls failed due to proxy or backend errors. This includes calls returning HttpStatusCode.BadRequest(400) and any Code between HttpStatusCode.InternalServerError (500) and 600. + /// Number of calls failed due to gateway or backend errors. This includes calls returning HttpStatusCode.BadRequest(400) and any Code between HttpStatusCode.InternalServerError (500) and 600. /// Number of other calls. /// Total number of calls. /// Bandwidth consumed. @@ -114,59 +114,85 @@ internal ReportRecordContract(string name, DateTimeOffset? timestamp, string int } /// Name depending on report endpoint specifies product, API, operation or developer name. + [WirePath("name")] public string Name { get; } /// /// Start of aggregation period. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. /// /// + [WirePath("timestamp")] public DateTimeOffset? Timestamp { get; } /// Length of aggregation period. Interval must be multiple of 15 minutes and may not be zero. The value should be in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations). + [WirePath("interval")] public string Interval { get; } /// Country to which this record data is related. + [WirePath("country")] public string Country { get; } /// Country region to which this record data is related. + [WirePath("region")] public string Region { get; } /// Zip code to which this record data is related. + [WirePath("zip")] public string Zip { get; } /// User identifier path. /users/{userId}. + [WirePath("userId")] public string UserId { get; } /// Product identifier path. /products/{productId}. + [WirePath("productId")] public string ProductId { get; } /// API identifier path. /apis/{apiId}. + [WirePath("apiId")] public string ApiId { get; } /// Operation identifier path. /apis/{apiId}/operations/{operationId}. + [WirePath("operationId")] public string OperationId { get; } /// API region identifier. + [WirePath("apiRegion")] public string ApiRegion { get; } /// Subscription identifier path. /subscriptions/{subscriptionId}. + [WirePath("subscriptionId")] public ResourceIdentifier SubscriptionResourceId { get; } /// Number of successful calls. This includes calls returning HttpStatusCode <= 301 and HttpStatusCode.NotModified and HttpStatusCode.TemporaryRedirect. + [WirePath("callCountSuccess")] public int? CallCountSuccess { get; } /// Number of calls blocked due to invalid credentials. This includes calls returning HttpStatusCode.Unauthorized and HttpStatusCode.Forbidden and HttpStatusCode.TooManyRequests. + [WirePath("callCountBlocked")] public int? CallCountBlocked { get; } - /// Number of calls failed due to proxy or backend errors. This includes calls returning HttpStatusCode.BadRequest(400) and any Code between HttpStatusCode.InternalServerError (500) and 600. + /// Number of calls failed due to gateway or backend errors. This includes calls returning HttpStatusCode.BadRequest(400) and any Code between HttpStatusCode.InternalServerError (500) and 600. + [WirePath("callCountFailed")] public int? CallCountFailed { get; } /// Number of other calls. + [WirePath("callCountOther")] public int? CallCountOther { get; } /// Total number of calls. + [WirePath("callCountTotal")] public int? CallCountTotal { get; } /// Bandwidth consumed. + [WirePath("bandwidth")] public long? Bandwidth { get; } /// Number of times when content was served from cache policy. + [WirePath("cacheHitCount")] public int? CacheHitCount { get; } /// Number of times content was fetched from backend. + [WirePath("cacheMissCount")] public int? CacheMissCount { get; } /// Average time it took to process request. + [WirePath("apiTimeAvg")] public double? ApiTimeAvg { get; } /// Minimum time it took to process request. + [WirePath("apiTimeMin")] public double? ApiTimeMin { get; } /// Maximum time it took to process request. + [WirePath("apiTimeMax")] public double? ApiTimeMax { get; } /// Average time it took to process request on backend. + [WirePath("serviceTimeAvg")] public double? ServiceTimeAvg { get; } /// Minimum time it took to process request on backend. + [WirePath("serviceTimeMin")] public double? ServiceTimeMin { get; } /// Maximum time it took to process request on backend. + [WirePath("serviceTimeMax")] public double? ServiceTimeMax { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RepresentationContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RepresentationContract.Serialization.cs index c99534e14be94..92b6eb2e7f3f4 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RepresentationContract.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RepresentationContract.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -164,6 +166,137 @@ internal static RepresentationContract DeserializeRepresentationContract(JsonEle 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(ContentType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" contentType: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ContentType)) + { + builder.Append(" contentType: "); + if (ContentType.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ContentType}'''"); + } + else + { + builder.AppendLine($"'{ContentType}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SchemaId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" schemaId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SchemaId)) + { + builder.Append(" schemaId: "); + if (SchemaId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{SchemaId}'''"); + } + else + { + builder.AppendLine($"'{SchemaId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TypeName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" typeName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TypeName)) + { + builder.Append(" typeName: "); + if (TypeName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{TypeName}'''"); + } + else + { + builder.AppendLine($"'{TypeName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(FormParameters), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" formParameters: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(FormParameters)) + { + if (FormParameters.Any()) + { + builder.Append(" formParameters: "); + builder.AppendLine("["); + foreach (var item in FormParameters) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " formParameters: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Examples), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" examples: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Examples)) + { + if (Examples.Any()) + { + builder.Append(" examples: "); + builder.AppendLine("{"); + foreach (var item in Examples) + { + builder.Append($" '{item.Key}': "); + BicepSerializationHelpers.AppendChildObject(builder, item.Value, options, 4, false, " examples: "); + } + 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; @@ -172,6 +305,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOpti { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(RepresentationContract)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RepresentationContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RepresentationContract.cs index ab3b6c076d722..c7693a6e57b64 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RepresentationContract.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RepresentationContract.cs @@ -80,14 +80,19 @@ internal RepresentationContract() } /// Specifies a registered or custom content type for this representation, e.g. application/xml. + [WirePath("contentType")] public string ContentType { get; set; } /// Schema identifier. Applicable only if 'contentType' value is neither 'application/x-www-form-urlencoded' nor 'multipart/form-data'. + [WirePath("schemaId")] public string SchemaId { get; set; } /// Type name defined by the schema. Applicable only if 'contentType' value is neither 'application/x-www-form-urlencoded' nor 'multipart/form-data'. + [WirePath("typeName")] public string TypeName { get; set; } /// Collection of form parameters. Required if 'contentType' value is either 'application/x-www-form-urlencoded' or 'multipart/form-data'.. + [WirePath("formParameters")] public IList FormParameters { get; } /// Exampled defined for the representation. + [WirePath("examples")] public IDictionary Examples { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RequestContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RequestContract.Serialization.cs index 60977e76f3320..3f30438a73765 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RequestContract.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RequestContract.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -163,6 +165,113 @@ internal static RequestContract DeserializeRequestContract(JsonElement element, return new RequestContract(description, queryParameters ?? new ChangeTrackingList(), headers ?? new ChangeTrackingList(), representations ?? 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(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}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(QueryParameters), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" queryParameters: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(QueryParameters)) + { + if (QueryParameters.Any()) + { + builder.Append(" queryParameters: "); + builder.AppendLine("["); + foreach (var item in QueryParameters) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " queryParameters: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Headers), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" headers: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Headers)) + { + if (Headers.Any()) + { + builder.Append(" headers: "); + builder.AppendLine("["); + foreach (var item in Headers) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " headers: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Representations), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" representations: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Representations)) + { + if (Representations.Any()) + { + builder.Append(" representations: "); + builder.AppendLine("["); + foreach (var item in Representations) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " representations: "); + } + 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; @@ -171,6 +280,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions opt { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(RequestContract)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RequestContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RequestContract.cs index 624692c1d23f0..d8174eaeb08db 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RequestContract.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RequestContract.cs @@ -69,12 +69,16 @@ internal RequestContract(string description, IList queryParam } /// Operation request description. + [WirePath("description")] public string Description { get; set; } /// Collection of operation request query parameters. + [WirePath("queryParameters")] public IList QueryParameters { get; } /// Collection of operation request headers. + [WirePath("headers")] public IList Headers { get; } /// Collection of operation request representations. + [WirePath("representations")] public IList Representations { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RequestReportListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RequestReportListResult.Serialization.cs index 02a546f6b4c0a..3e1cbf1062ad4 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RequestReportListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RequestReportListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -117,6 +119,59 @@ internal static RequestReportListResult DeserializeRequestReportListResult(JsonE return new RequestReportListResult(value ?? new ChangeTrackingList(), count, 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(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.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; @@ -125,6 +180,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOpt { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(RequestReportListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RequestReportRecordContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RequestReportRecordContract.Serialization.cs index b9e2a4bb302d2..9cc84fb98cd9b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RequestReportRecordContract.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RequestReportRecordContract.Serialization.cs @@ -9,6 +9,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Net; +using System.Text; using System.Text.Json; using Azure.Core; @@ -335,6 +336,356 @@ internal static RequestReportRecordContract DeserializeRequestReportRecordContra 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(ApiId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiId)) + { + builder.Append(" apiId: "); + if (ApiId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ApiId}'''"); + } + else + { + builder.AppendLine($"'{ApiId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(OperationId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" operationId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(OperationId)) + { + builder.Append(" operationId: "); + if (OperationId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{OperationId}'''"); + } + else + { + builder.AppendLine($"'{OperationId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProductId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" productId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ProductId)) + { + builder.Append(" productId: "); + if (ProductId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ProductId}'''"); + } + else + { + builder.AppendLine($"'{ProductId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(UserId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" userId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(UserId)) + { + builder.Append(" userId: "); + if (UserId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{UserId}'''"); + } + else + { + builder.AppendLine($"'{UserId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Method), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" method: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Method)) + { + builder.Append(" method: "); + builder.AppendLine($"'{Method.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Uri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" url: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Uri)) + { + builder.Append(" url: "); + builder.AppendLine($"'{Uri.AbsoluteUri}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IPAddress), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" ipAddress: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IPAddress)) + { + builder.Append(" ipAddress: "); + builder.AppendLine($"'{IPAddress.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(BackendResponseCode), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" backendResponseCode: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(BackendResponseCode)) + { + builder.Append(" backendResponseCode: "); + if (BackendResponseCode.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{BackendResponseCode}'''"); + } + else + { + builder.AppendLine($"'{BackendResponseCode}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ResponseCode), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" responseCode: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ResponseCode)) + { + builder.Append(" responseCode: "); + builder.AppendLine($"{ResponseCode.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ResponseSize), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" responseSize: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ResponseSize)) + { + builder.Append(" responseSize: "); + builder.AppendLine($"{ResponseSize.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Timestamp), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" timestamp: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Timestamp)) + { + builder.Append(" timestamp: "); + var formattedDateTimeString = TypeFormatters.ToString(Timestamp.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Cache), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" cache: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Cache)) + { + builder.Append(" cache: "); + if (Cache.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Cache}'''"); + } + else + { + builder.AppendLine($"'{Cache}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiTime), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiTime)) + { + builder.Append(" apiTime: "); + builder.AppendLine($"'{ApiTime.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ServiceTime), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" serviceTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ServiceTime)) + { + builder.Append(" serviceTime: "); + builder.AppendLine($"'{ServiceTime.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiRegion), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiRegion: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiRegion)) + { + builder.Append(" apiRegion: "); + if (ApiRegion.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ApiRegion}'''"); + } + else + { + builder.AppendLine($"'{ApiRegion}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SubscriptionResourceId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" subscriptionId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SubscriptionResourceId)) + { + builder.Append(" subscriptionId: "); + builder.AppendLine($"'{SubscriptionResourceId.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(RequestId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" requestId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(RequestId)) + { + builder.Append(" requestId: "); + if (RequestId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{RequestId}'''"); + } + else + { + builder.AppendLine($"'{RequestId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(RequestSize), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" requestSize: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(RequestSize)) + { + builder.Append(" requestSize: "); + builder.AppendLine($"{RequestSize.Value}"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -343,6 +694,8 @@ BinaryData IPersistableModel.Write(ModelReaderWrite { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(RequestReportRecordContract)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RequestReportRecordContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RequestReportRecordContract.cs index e89ab171f645e..994462d209a5f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RequestReportRecordContract.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RequestReportRecordContract.cs @@ -96,40 +96,58 @@ internal RequestReportRecordContract(string apiId, string operationId, string pr } /// API identifier path. /apis/{apiId}. + [WirePath("apiId")] public string ApiId { get; } /// Operation identifier path. /apis/{apiId}/operations/{operationId}. + [WirePath("operationId")] public string OperationId { get; } /// Product identifier path. /products/{productId}. + [WirePath("productId")] public string ProductId { get; } /// User identifier path. /users/{userId}. + [WirePath("userId")] public string UserId { get; } /// The HTTP method associated with this request.. + [WirePath("method")] public RequestMethod? Method { get; } /// The full URL associated with this request. + [WirePath("url")] public Uri Uri { get; } /// The client IP address associated with this request. + [WirePath("ipAddress")] public IPAddress IPAddress { get; } /// The HTTP status code received by the gateway as a result of forwarding this request to the backend. + [WirePath("backendResponseCode")] public string BackendResponseCode { get; } /// The HTTP status code returned by the gateway. + [WirePath("responseCode")] public int? ResponseCode { get; } /// The size of the response returned by the gateway. + [WirePath("responseSize")] public int? ResponseSize { get; } /// The date and time when this request was received by the gateway in ISO 8601 format. + [WirePath("timestamp")] public DateTimeOffset? Timestamp { get; } /// Specifies if response cache was involved in generating the response. If the value is none, the cache was not used. If the value is hit, cached response was returned. If the value is miss, the cache was used but lookup resulted in a miss and request was fulfilled by the backend. + [WirePath("cache")] public string Cache { get; } /// The total time it took to process this request. + [WirePath("apiTime")] public double? ApiTime { get; } /// he time it took to forward this request to the backend and get the response back. + [WirePath("serviceTime")] public double? ServiceTime { get; } /// Azure region where the gateway that processed this request is located. + [WirePath("apiRegion")] public string ApiRegion { get; } /// Subscription identifier path. /subscriptions/{subscriptionId}. + [WirePath("subscriptionId")] public ResourceIdentifier SubscriptionResourceId { get; } /// Request Identifier. + [WirePath("requestId")] public string RequestId { get; } /// The size of this request.. + [WirePath("requestSize")] public int? RequestSize { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResolverContractPatch.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResolverContractPatch.Serialization.cs new file mode 100644 index 0000000000000..79e276afb96e8 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResolverContractPatch.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.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + public partial class ResolverContractPatch : 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(ResolverContractPatch)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(DisplayName)) + { + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + } + if (Optional.IsDefined(Path)) + { + writer.WritePropertyName("path"u8); + writer.WriteStringValue(Path); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + 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(); + } + + ResolverContractPatch 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(ResolverContractPatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeResolverContractPatch(document.RootElement, options); + } + + internal static ResolverContractPatch DeserializeResolverContractPatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string displayName = default; + string path = default; + string description = 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("displayName"u8)) + { + displayName = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("path"u8)) + { + path = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("description"u8)) + { + description = property0.Value.GetString(); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ResolverContractPatch(displayName, path, description, 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(ResolverContractPatch)} does not support writing '{options.Format}' format."); + } + } + + ResolverContractPatch 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 DeserializeResolverContractPatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ResolverContractPatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResolverContractPatch.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResolverContractPatch.cs new file mode 100644 index 0000000000000..1943565a3cb39 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResolverContractPatch.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.ApiManagement.Models +{ + /// GraphQL API Resolver Update Contract details. + public partial class ResolverContractPatch + { + /// + /// 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 ResolverContractPatch() + { + } + + /// Initializes a new instance of . + /// Resolver Name. + /// Path is type/field being resolved. + /// Description of the resolver. May include HTML formatting tags. + /// Keeps track of any properties unknown to the library. + internal ResolverContractPatch(string displayName, string path, string description, IDictionary serializedAdditionalRawData) + { + DisplayName = displayName; + Path = path; + Description = description; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Resolver Name. + [WirePath("properties.displayName")] + public string DisplayName { get; set; } + /// Path is type/field being resolved. + [WirePath("properties.path")] + public string Path { get; set; } + /// Description of the resolver. May include HTML formatting tags. + [WirePath("properties.description")] + public string Description { get; set; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResolverListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResolverListResult.Serialization.cs new file mode 100644 index 0000000000000..cd7899cc1a2c5 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResolverListResult.Serialization.cs @@ -0,0 +1,242 @@ +// 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.ApiManagement.Models +{ + internal partial class ResolverListResult : 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(ResolverListResult)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsCollectionDefined(Value)) + { + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Count)) + { + writer.WritePropertyName("count"u8); + writer.WriteNumberValue(Count.Value); + } + 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(); + } + + ResolverListResult 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(ResolverListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeResolverListResult(document.RootElement, options); + } + + internal static ResolverListResult DeserializeResolverListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + long? count = 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(ResolverContractData.DeserializeResolverContractData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("count"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + count = property.Value.GetInt64(); + 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 ResolverListResult(value ?? new ChangeTrackingList(), count, 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(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + 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(ResolverListResult)} does not support writing '{options.Format}' format."); + } + } + + ResolverListResult 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 DeserializeResolverListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ResolverListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResolverListResult.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResolverListResult.cs new file mode 100644 index 0000000000000..a4e3714b83c0a --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResolverListResult.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + /// Paged Resolver list representation. + internal partial class ResolverListResult + { + /// + /// 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 ResolverListResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Page values. + /// Total record count number across all pages. + /// Next page link if any. + /// Keeps track of any properties unknown to the library. + internal ResolverListResult(IReadOnlyList value, long? count, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + Count = count; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Page values. + public IReadOnlyList Value { get; } + /// Total record count number across all pages. + public long? Count { get; } + /// Next page link if any. + public string NextLink { get; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceCollectionValueItem.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceCollectionValueItem.Serialization.cs new file mode 100644 index 0000000000000..c1b1a682814c8 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceCollectionValueItem.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; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + public partial class ResourceCollectionValueItem : 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(ResourceCollectionValueItem)} 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); + } + 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(); + } + + ResourceCollectionValueItem 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(ResourceCollectionValueItem)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeResourceCollectionValueItem(document.RootElement, options); + } + + internal static ResourceCollectionValueItem DeserializeResourceCollectionValueItem(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; + 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 (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ResourceCollectionValueItem(id, name, type, systemData, 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.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(ResourceCollectionValueItem)} does not support writing '{options.Format}' format."); + } + } + + ResourceCollectionValueItem 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 DeserializeResourceCollectionValueItem(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ResourceCollectionValueItem)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceCollectionValueItem.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceCollectionValueItem.cs new file mode 100644 index 0000000000000..c255000f44919 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceCollectionValueItem.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; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + /// The ResourceCollectionValueItem. + public partial class ResourceCollectionValueItem : 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 ResourceCollectionValueItem() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Keeps track of any properties unknown to the library. + internal ResourceCollectionValueItem(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + _serializedAdditionalRawData = serializedAdditionalRawData; + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceListResult.Serialization.cs new file mode 100644 index 0000000000000..dbf243cdd5703 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceListResult.Serialization.cs @@ -0,0 +1,242 @@ +// 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.ApiManagement.Models +{ + internal partial class ResourceListResult : 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(ResourceListResult)} 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(Count)) + { + writer.WritePropertyName("count"u8); + writer.WriteNumberValue(Count.Value); + } + 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(); + } + + ResourceListResult 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(ResourceListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeResourceListResult(document.RootElement, options); + } + + internal static ResourceListResult DeserializeResourceListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + long? count = 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(ResourceCollectionValueItem.DeserializeResourceCollectionValueItem(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("count"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + count = property.Value.GetInt64(); + 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 ResourceListResult(value ?? new ChangeTrackingList(), count, 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(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + 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(ResourceListResult)} does not support writing '{options.Format}' format."); + } + } + + ResourceListResult 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 DeserializeResourceListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ResourceListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceListResult.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceListResult.cs new file mode 100644 index 0000000000000..e3d7944322e2e --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceListResult.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.ApiManagement.Models +{ + /// A collection of resources. + internal partial class ResourceListResult + { + /// + /// 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 ResourceListResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// A collection of resources. + /// Total record count number. + /// Next page link if any. + /// Keeps track of any properties unknown to the library. + internal ResourceListResult(IReadOnlyList value, long? count, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + Count = count; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// A collection of resources. + [WirePath("value")] + public IReadOnlyList Value { get; } + /// Total record count number. + [WirePath("count")] + public long? Count { get; } + /// Next page link if any. + [WirePath("nextLink")] + public string NextLink { get; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceLocationDataContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceLocationDataContract.Serialization.cs index 66f7ac631ac0a..3bcdf7f3d633f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceLocationDataContract.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceLocationDataContract.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -118,6 +119,113 @@ internal static ResourceLocationDataContract DeserializeResourceLocationDataCont return new ResourceLocationDataContract(name, city, district, countryOrRegion, 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(City), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" city: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(City)) + { + builder.Append(" city: "); + if (City.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{City}'''"); + } + else + { + builder.AppendLine($"'{City}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(District), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" district: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(District)) + { + builder.Append(" district: "); + if (District.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{District}'''"); + } + else + { + builder.AppendLine($"'{District}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CountryOrRegion), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" countryOrRegion: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CountryOrRegion)) + { + builder.Append(" countryOrRegion: "); + if (CountryOrRegion.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{CountryOrRegion}'''"); + } + else + { + builder.AppendLine($"'{CountryOrRegion}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -126,6 +234,8 @@ BinaryData IPersistableModel.Write(ModelReaderWrit { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ResourceLocationDataContract)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceLocationDataContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceLocationDataContract.cs index 88e63642dc90a..3fba8dbc5ba41 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceLocationDataContract.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceLocationDataContract.cs @@ -76,12 +76,16 @@ internal ResourceLocationDataContract() } /// A canonical name for the geographic or physical location. + [WirePath("name")] public string Name { get; set; } /// The city or locality where the resource is located. + [WirePath("city")] public string City { get; set; } /// The district, state, or province where the resource is located. + [WirePath("district")] public string District { get; set; } /// The country or region where the resource is located. + [WirePath("countryOrRegion")] public string CountryOrRegion { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceSku.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceSku.Serialization.cs index d3deb0a63cd32..0543c66f27a82 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceSku.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceSku.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -92,6 +93,36 @@ internal static ResourceSku DeserializeResourceSku(JsonElement element, ModelRea return new ResourceSku(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(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + builder.AppendLine($"'{Name.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; @@ -100,6 +131,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ResourceSku)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceSku.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceSku.cs index 5b02889f442d8..db59a8e5d1c7d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceSku.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceSku.cs @@ -60,6 +60,7 @@ internal ResourceSku(ApiManagementServiceSkuType? name, IDictionary Name of the Sku. + [WirePath("name")] public ApiManagementServiceSkuType? Name { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceSkuResults.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceSkuResults.Serialization.cs index 44759f52cc1c6..31452f3b3b43b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceSkuResults.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceSkuResults.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -106,6 +108,67 @@ internal static ResourceSkuResults DeserializeResourceSkuResults(JsonElement ele return new ResourceSkuResults(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; @@ -114,6 +177,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ResourceSkuResults)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResponseContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResponseContract.Serialization.cs index 68c0a97c8b35d..e50a034995df4 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResponseContract.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResponseContract.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -146,6 +148,102 @@ internal static ResponseContract DeserializeResponseContract(JsonElement element return new ResponseContract(statusCode, description, representations ?? new ChangeTrackingList(), headers ?? 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(StatusCode), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" statusCode: "); + builder.AppendLine(propertyOverride); + } + else + { + builder.Append(" statusCode: "); + builder.AppendLine($"{StatusCode}"); + } + + 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}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Representations), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" representations: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Representations)) + { + if (Representations.Any()) + { + builder.Append(" representations: "); + builder.AppendLine("["); + foreach (var item in Representations) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " representations: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Headers), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" headers: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Headers)) + { + if (Headers.Any()) + { + builder.Append(" headers: "); + builder.AppendLine("["); + foreach (var item in Headers) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " headers: "); + } + 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; @@ -154,6 +252,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions op { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ResponseContract)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResponseContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResponseContract.cs index adf68ccc50c1c..220dbca8061d6 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResponseContract.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResponseContract.cs @@ -75,12 +75,16 @@ internal ResponseContract() } /// Operation response HTTP status code. + [WirePath("statusCode")] public int StatusCode { get; set; } /// Operation response description. + [WirePath("description")] public string Description { get; set; } /// Collection of operation response representations. + [WirePath("representations")] public IList Representations { get; } /// Collection of operation response headers. + [WirePath("headers")] public IList Headers { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SamplingSettings.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SamplingSettings.Serialization.cs index ced96cb62c058..38481494e8664 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SamplingSettings.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SamplingSettings.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -107,6 +108,51 @@ internal static SamplingSettings DeserializeSamplingSettings(JsonElement element return new SamplingSettings(samplingType, percentage, 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(SamplingType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" samplingType: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SamplingType)) + { + builder.Append(" samplingType: "); + builder.AppendLine($"'{SamplingType.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Percentage), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" percentage: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Percentage)) + { + builder.Append(" percentage: "); + builder.AppendLine($"'{Percentage.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; @@ -115,6 +161,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions op { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(SamplingSettings)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SamplingSettings.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SamplingSettings.cs index c329a72b6e15a..dbc2d57e504cb 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SamplingSettings.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SamplingSettings.cs @@ -62,8 +62,10 @@ internal SamplingSettings(SamplingType? samplingType, double? percentage, IDicti } /// Sampling type. + [WirePath("samplingType")] public SamplingType? SamplingType { get; set; } /// Rate of sampling for fixed-rate sampling. + [WirePath("percentage")] public double? Percentage { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SchemaListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SchemaListResult.Serialization.cs index 8ab18c0ee6f64..11445f70f1cf1 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SchemaListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SchemaListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static SchemaListResult DeserializeSchemaListResult(JsonElement element return new SchemaListResult(value ?? new ChangeTrackingList(), count, 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(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + 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; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions op { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(SchemaListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SubscriptionDelegationSettingProperties.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SubscriptionDelegationSettingProperties.Serialization.cs index d71710c4cc4b3..d486b687e6c1b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SubscriptionDelegationSettingProperties.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SubscriptionDelegationSettingProperties.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -92,6 +93,37 @@ internal static SubscriptionDelegationSettingProperties DeserializeSubscriptionD return new SubscriptionDelegationSettingProperties(enabled, 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(IsSubscriptionDelegationEnabled), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" enabled: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsSubscriptionDelegationEnabled)) + { + builder.Append(" enabled: "); + var boolValue = IsSubscriptionDelegationEnabled.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; @@ -100,6 +132,8 @@ BinaryData IPersistableModel.Write(Mode { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(SubscriptionDelegationSettingProperties)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SubscriptionDelegationSettingProperties.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SubscriptionDelegationSettingProperties.cs index 14acf807cb84f..697f6ba9bc793 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SubscriptionDelegationSettingProperties.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SubscriptionDelegationSettingProperties.cs @@ -60,6 +60,7 @@ internal SubscriptionDelegationSettingProperties(bool? isSubscriptionDelegationE } /// Enable or disable delegation for subscriptions. + [WirePath("enabled")] public bool? IsSubscriptionDelegationEnabled { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SubscriptionKeyParameterNamesContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SubscriptionKeyParameterNamesContract.Serialization.cs index 434006c8a4cf8..78a0eaab2a5cf 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SubscriptionKeyParameterNamesContract.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SubscriptionKeyParameterNamesContract.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -99,6 +100,67 @@ internal static SubscriptionKeyParameterNamesContract DeserializeSubscriptionKey return new SubscriptionKeyParameterNamesContract(header, query, 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(Header), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" header: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Header)) + { + builder.Append(" header: "); + if (Header.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Header}'''"); + } + else + { + builder.AppendLine($"'{Header}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Query), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" query: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Query)) + { + builder.Append(" query: "); + if (Query.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Query}'''"); + } + else + { + builder.AppendLine($"'{Query}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -107,6 +169,8 @@ BinaryData IPersistableModel.Write(ModelR { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(SubscriptionKeyParameterNamesContract)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SubscriptionKeyParameterNamesContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SubscriptionKeyParameterNamesContract.cs index c8d8da2fe9add..7810a2401dafa 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SubscriptionKeyParameterNamesContract.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SubscriptionKeyParameterNamesContract.cs @@ -62,8 +62,10 @@ internal SubscriptionKeyParameterNamesContract(string header, string query, IDic } /// Subscription key header name. + [WirePath("header")] public string Header { get; set; } /// Subscription key query string parameter name. + [WirePath("query")] public string Query { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SubscriptionKeysContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SubscriptionKeysContract.Serialization.cs index 239afc57da4d5..e1930f5988ef0 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SubscriptionKeysContract.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SubscriptionKeysContract.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -99,6 +100,67 @@ internal static SubscriptionKeysContract DeserializeSubscriptionKeysContract(Jso return new SubscriptionKeysContract(primaryKey, secondaryKey, 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(PrimaryKey), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" primaryKey: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PrimaryKey)) + { + builder.Append(" primaryKey: "); + if (PrimaryKey.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{PrimaryKey}'''"); + } + else + { + builder.AppendLine($"'{PrimaryKey}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SecondaryKey), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" secondaryKey: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SecondaryKey)) + { + builder.Append(" secondaryKey: "); + if (SecondaryKey.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{SecondaryKey}'''"); + } + else + { + builder.AppendLine($"'{SecondaryKey}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -107,6 +169,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOp { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(SubscriptionKeysContract)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SubscriptionKeysContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SubscriptionKeysContract.cs index b8539bdd963c5..417e47d3423bc 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SubscriptionKeysContract.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SubscriptionKeysContract.cs @@ -62,8 +62,10 @@ internal SubscriptionKeysContract(string primaryKey, string secondaryKey, IDicti } /// Subscription primary key. + [WirePath("primaryKey")] public string PrimaryKey { get; } /// Subscription secondary key. + [WirePath("secondaryKey")] public string SecondaryKey { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SubscriptionListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SubscriptionListResult.Serialization.cs index b6f444d060ebc..9568c735878df 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SubscriptionListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SubscriptionListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static SubscriptionListResult DeserializeSubscriptionListResult(JsonEle return new SubscriptionListResult(value ?? new ChangeTrackingList(), count, 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(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + 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; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOpti { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(SubscriptionListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TagDescriptionListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TagDescriptionListResult.Serialization.cs index abcdf5535fe09..978ae868e199a 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TagDescriptionListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TagDescriptionListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static TagDescriptionListResult DeserializeTagDescriptionListResult(Jso return new TagDescriptionListResult(value ?? new ChangeTrackingList(), count, 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(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + 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; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOp { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(TagDescriptionListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TagListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TagListResult.Serialization.cs index 2abec7675fe05..f768c03124607 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TagListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TagListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static TagListResult DeserializeTagListResult(JsonElement element, Mode return new TagListResult(value ?? new ChangeTrackingList(), count, 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(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + 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; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions optio { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(TagListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TagResourceContractDetails.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TagResourceContractDetails.Serialization.cs index e6f8184748448..34a87d79f681e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TagResourceContractDetails.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TagResourceContractDetails.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -130,6 +131,81 @@ internal static TagResourceContractDetails DeserializeTagResourceContractDetails return new TagResourceContractDetails(tag, api, operation, product, 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(Tag), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" tag: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Tag)) + { + builder.Append(" tag: "); + BicepSerializationHelpers.AppendChildObject(builder, Tag, options, 2, false, " tag: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Api), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" api: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Api)) + { + builder.Append(" api: "); + BicepSerializationHelpers.AppendChildObject(builder, Api, options, 2, false, " api: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Operation), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" operation: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Operation)) + { + builder.Append(" operation: "); + BicepSerializationHelpers.AppendChildObject(builder, Operation, options, 2, false, " operation: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Product), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" product: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Product)) + { + builder.Append(" product: "); + BicepSerializationHelpers.AppendChildObject(builder, Product, options, 2, false, " product: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -138,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriter { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(TagResourceContractDetails)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TagResourceContractDetails.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TagResourceContractDetails.cs index 14653a70919c2..d981128ea2dea 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TagResourceContractDetails.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TagResourceContractDetails.cs @@ -76,12 +76,16 @@ internal TagResourceContractDetails() } /// Tag associated with the resource. + [WirePath("tag")] public AssociatedTagProperties Tag { get; } /// API associated with the tag. + [WirePath("api")] public AssociatedApiProperties Api { get; } /// Operation associated with the tag. + [WirePath("operation")] public AssociatedOperationProperties Operation { get; } /// Product associated with the tag. + [WirePath("product")] public AssociatedProductProperties Product { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TagResourceListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TagResourceListResult.Serialization.cs index 6917543c238c4..12bfbfea8cfb1 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TagResourceListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TagResourceListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static TagResourceListResult DeserializeTagResourceListResult(JsonEleme return new TagResourceListResult(value ?? new ChangeTrackingList(), count, 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(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + 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; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptio { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(TagResourceListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TenantAccessInfoCreateOrUpdateContent.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TenantAccessInfoCreateOrUpdateContent.cs index 89d5e3c14fa0b..f5f63de403716 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TenantAccessInfoCreateOrUpdateContent.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TenantAccessInfoCreateOrUpdateContent.cs @@ -66,12 +66,16 @@ internal TenantAccessInfoCreateOrUpdateContent(string principalId, string primar } /// Principal (User) Identifier. + [WirePath("properties.principalId")] public string PrincipalId { get; set; } /// Primary access key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. + [WirePath("properties.primaryKey")] public string PrimaryKey { get; set; } /// Secondary access key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. + [WirePath("properties.secondaryKey")] public string SecondaryKey { get; set; } /// Determines whether direct access is enabled. + [WirePath("properties.enabled")] public bool? IsDirectAccessEnabled { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TenantAccessInfoPatch.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TenantAccessInfoPatch.cs index 176e5b1c8b660..71d5a145c0d65 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TenantAccessInfoPatch.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TenantAccessInfoPatch.cs @@ -60,6 +60,7 @@ internal TenantAccessInfoPatch(bool? isDirectAccessEnabled, IDictionary Determines whether direct access is enabled. + [WirePath("properties.enabled")] public bool? IsDirectAccessEnabled { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TenantAccessInfoSecretsDetails.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TenantAccessInfoSecretsDetails.Serialization.cs index e1195e03ce249..71883eb792309 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TenantAccessInfoSecretsDetails.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TenantAccessInfoSecretsDetails.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -142,6 +143,129 @@ internal static TenantAccessInfoSecretsDetails DeserializeTenantAccessInfoSecret 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(AccessInfoType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AccessInfoType)) + { + builder.Append(" id: "); + if (AccessInfoType.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{AccessInfoType}'''"); + } + else + { + builder.AppendLine($"'{AccessInfoType}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PrincipalId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" principalId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PrincipalId)) + { + builder.Append(" principalId: "); + if (PrincipalId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{PrincipalId}'''"); + } + else + { + builder.AppendLine($"'{PrincipalId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PrimaryKey), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" primaryKey: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PrimaryKey)) + { + builder.Append(" primaryKey: "); + if (PrimaryKey.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{PrimaryKey}'''"); + } + else + { + builder.AppendLine($"'{PrimaryKey}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SecondaryKey), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" secondaryKey: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SecondaryKey)) + { + builder.Append(" secondaryKey: "); + if (SecondaryKey.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{SecondaryKey}'''"); + } + else + { + builder.AppendLine($"'{SecondaryKey}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsDirectAccessEnabled), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" enabled: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsDirectAccessEnabled)) + { + builder.Append(" enabled: "); + var boolValue = IsDirectAccessEnabled.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; @@ -150,6 +274,8 @@ BinaryData IPersistableModel.Write(ModelReaderWr { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(TenantAccessInfoSecretsDetails)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TenantAccessInfoSecretsDetails.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TenantAccessInfoSecretsDetails.cs index 0e9c2ba98223b..7f072a3ffeecb 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TenantAccessInfoSecretsDetails.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TenantAccessInfoSecretsDetails.cs @@ -68,14 +68,19 @@ internal TenantAccessInfoSecretsDetails(string accessInfoType, string principalI } /// Access Information type ('access' or 'gitAccess'). + [WirePath("id")] public string AccessInfoType { get; } /// Principal (User) Identifier. + [WirePath("principalId")] public string PrincipalId { get; } /// Primary access key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. + [WirePath("primaryKey")] public string PrimaryKey { get; } /// Secondary access key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. + [WirePath("secondaryKey")] public string SecondaryKey { get; } /// Determines whether direct access is enabled. + [WirePath("enabled")] public bool? IsDirectAccessEnabled { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TenantConfigurationSyncStateContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TenantConfigurationSyncStateContract.Serialization.cs index d96d797498782..fd6036a40c91b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TenantConfigurationSyncStateContract.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TenantConfigurationSyncStateContract.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Models; @@ -262,6 +263,226 @@ internal static TenantConfigurationSyncStateContract DeserializeTenantConfigurat 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(Branch), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" branch: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Branch)) + { + builder.Append(" branch: "); + if (Branch.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Branch}'''"); + } + else + { + builder.AppendLine($"'{Branch}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CommitId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" commitId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CommitId)) + { + builder.Append(" commitId: "); + if (CommitId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{CommitId}'''"); + } + else + { + builder.AppendLine($"'{CommitId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsExported), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" isExport: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsExported)) + { + builder.Append(" isExport: "); + var boolValue = IsExported.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsSynced), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" isSynced: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsSynced)) + { + builder.Append(" isSynced: "); + var boolValue = IsSynced.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsGitEnabled), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" isGitEnabled: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsGitEnabled)) + { + builder.Append(" isGitEnabled: "); + var boolValue = IsGitEnabled.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SyncOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" syncDate: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SyncOn)) + { + builder.Append(" syncDate: "); + var formattedDateTimeString = TypeFormatters.ToString(SyncOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ConfigurationChangeOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" configurationChangeDate: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ConfigurationChangeOn)) + { + builder.Append(" configurationChangeDate: "); + var formattedDateTimeString = TypeFormatters.ToString(ConfigurationChangeOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(LastOperationId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" lastOperationId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(LastOperationId)) + { + builder.Append(" lastOperationId: "); + if (LastOperationId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{LastOperationId}'''"); + } + else + { + builder.AppendLine($"'{LastOperationId}'"); + } + } + } + + 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; @@ -270,6 +491,8 @@ BinaryData IPersistableModel.Write(ModelRe { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(TenantConfigurationSyncStateContract)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TenantConfigurationSyncStateContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TenantConfigurationSyncStateContract.cs index c79532fd30cea..f28104be6e886 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TenantConfigurationSyncStateContract.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TenantConfigurationSyncStateContract.cs @@ -86,26 +86,34 @@ internal TenantConfigurationSyncStateContract(ResourceIdentifier id, string name } /// The name of Git branch. + [WirePath("properties.branch")] public string Branch { get; set; } /// The latest commit Id. + [WirePath("properties.commitId")] public string CommitId { get; set; } /// value indicating if last sync was save (true) or deploy (false) operation. + [WirePath("properties.isExport")] public bool? IsExported { get; set; } /// value indicating if last synchronization was later than the configuration change. + [WirePath("properties.isSynced")] public bool? IsSynced { get; set; } /// value indicating whether Git configuration access is enabled. + [WirePath("properties.isGitEnabled")] public bool? IsGitEnabled { get; set; } /// /// The date of the latest synchronization. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. /// /// + [WirePath("properties.syncDate")] public DateTimeOffset? SyncOn { get; set; } /// /// The date of the latest configuration change. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. /// /// + [WirePath("properties.configurationChangeDate")] public DateTimeOffset? ConfigurationChangeOn { get; set; } /// Most recent tenant configuration operation identifier. + [WirePath("properties.lastOperationId")] public string LastOperationId { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TenantSettingsListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TenantSettingsListResult.Serialization.cs index e14409a101472..a071090151eab 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TenantSettingsListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TenantSettingsListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -113,6 +115,67 @@ internal static TenantSettingsListResult DeserializeTenantSettingsListResult(Jso return new TenantSettingsListResult(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; @@ -121,6 +184,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOp { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(TenantSettingsListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TermsOfServiceProperties.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TermsOfServiceProperties.Serialization.cs index eead8f7310049..23f22dea8eec5 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TermsOfServiceProperties.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TermsOfServiceProperties.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -118,6 +119,76 @@ internal static TermsOfServiceProperties DeserializeTermsOfServiceProperties(Jso return new TermsOfServiceProperties(text, enabled, consentRequired, 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(IsDisplayEnabled), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" enabled: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsDisplayEnabled)) + { + builder.Append(" enabled: "); + var boolValue = IsDisplayEnabled.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsConsentRequired), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" consentRequired: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsConsentRequired)) + { + builder.Append(" consentRequired: "); + var boolValue = IsConsentRequired.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; @@ -126,6 +197,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOp { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(TermsOfServiceProperties)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TermsOfServiceProperties.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TermsOfServiceProperties.cs index 4e6a3650361e0..31878f8bb8f4f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TermsOfServiceProperties.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TermsOfServiceProperties.cs @@ -64,10 +64,13 @@ internal TermsOfServiceProperties(string text, bool? isDisplayEnabled, bool? isC } /// A terms of service text. + [WirePath("text")] public string Text { get; set; } /// Display terms of service during a sign-up process. + [WirePath("enabled")] public bool? IsDisplayEnabled { get; set; } /// Ask user for consent to the terms of service. + [WirePath("consentRequired")] public bool? IsConsentRequired { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TokenBodyParameterContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TokenBodyParameterContract.Serialization.cs index 3653ff3587079..fdef6fa389a85 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TokenBodyParameterContract.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TokenBodyParameterContract.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -93,6 +94,67 @@ internal static TokenBodyParameterContract DeserializeTokenBodyParameterContract return new TokenBodyParameterContract(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; @@ -101,6 +163,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriter { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(TokenBodyParameterContract)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TokenBodyParameterContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TokenBodyParameterContract.cs index 334c8c904fcd0..395665600546d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TokenBodyParameterContract.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TokenBodyParameterContract.cs @@ -75,8 +75,10 @@ internal TokenBodyParameterContract() } /// body parameter name. + [WirePath("name")] public string Name { get; set; } /// body parameter value. + [WirePath("value")] public string Value { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TranslateRequiredQueryParametersConduct.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TranslateRequiredQueryParametersConduct.cs new file mode 100644 index 0000000000000..f258007515867 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TranslateRequiredQueryParametersConduct.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.ApiManagement.Models +{ + /// Strategy of translating required query parameters to template ones. By default has value 'template'. Possible values: 'template', 'query'. + public readonly partial struct TranslateRequiredQueryParametersConduct : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public TranslateRequiredQueryParametersConduct(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string TemplateValue = "template"; + private const string QueryValue = "query"; + + /// Translates required query parameters to template ones. Is a default value. + public static TranslateRequiredQueryParametersConduct Template { get; } = new TranslateRequiredQueryParametersConduct(TemplateValue); + /// Leaves required query parameters as they are (no translation done). + public static TranslateRequiredQueryParametersConduct Query { get; } = new TranslateRequiredQueryParametersConduct(QueryValue); + /// Determines if two values are the same. + public static bool operator ==(TranslateRequiredQueryParametersConduct left, TranslateRequiredQueryParametersConduct right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(TranslateRequiredQueryParametersConduct left, TranslateRequiredQueryParametersConduct right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator TranslateRequiredQueryParametersConduct(string value) => new TranslateRequiredQueryParametersConduct(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is TranslateRequiredQueryParametersConduct other && Equals(other); + /// + public bool Equals(TranslateRequiredQueryParametersConduct 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/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/UserIdentityContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/UserIdentityContract.Serialization.cs index aa66da236e679..1c604c59eda05 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/UserIdentityContract.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/UserIdentityContract.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -99,6 +100,67 @@ internal static UserIdentityContract DeserializeUserIdentityContract(JsonElement return new UserIdentityContract(provider, id, 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(Provider), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" provider: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Provider)) + { + builder.Append(" provider: "); + if (Provider.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Provider}'''"); + } + else + { + builder.AppendLine($"'{Provider}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + if (Id.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Id}'''"); + } + else + { + builder.AppendLine($"'{Id}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -107,6 +169,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOption { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(UserIdentityContract)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/UserIdentityContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/UserIdentityContract.cs index 8faffbd1ba649..0354d45d1fa5a 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/UserIdentityContract.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/UserIdentityContract.cs @@ -62,8 +62,10 @@ internal UserIdentityContract(string provider, string id, IDictionary Identity provider name. + [WirePath("provider")] public string Provider { get; set; } /// Identifier value within provider. + [WirePath("id")] public string Id { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/UserIdentityListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/UserIdentityListResult.Serialization.cs index 2fab613574f55..57b20deb4e6b0 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/UserIdentityListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/UserIdentityListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static UserIdentityListResult DeserializeUserIdentityListResult(JsonEle return new UserIdentityListResult(value ?? new ChangeTrackingList(), count, 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(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + 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; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOpti { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(UserIdentityListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/UserListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/UserListResult.Serialization.cs index 9db855305335a..3d6f787e9092d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/UserListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/UserListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static UserListResult DeserializeUserListResult(JsonElement element, Mo return new UserListResult(value ?? new ChangeTrackingList(), count, 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(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + 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; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions opti { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(UserListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/UserTokenContent.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/UserTokenContent.cs index 27e046450cff9..9437c713361bd 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/UserTokenContent.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/UserTokenContent.cs @@ -65,11 +65,13 @@ internal UserTokenContent(TokenGenerationUsedKeyType? keyType, DateTimeOffset? e } /// The Key to be used to generate token for user. + [WirePath("properties.keyType")] public TokenGenerationUsedKeyType? KeyType { get; set; } /// /// The Expiry time of the Token. Maximum token expiry time is set to 30 days. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. /// /// + [WirePath("properties.expiry")] public DateTimeOffset? ExpireOn { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/UserTokenResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/UserTokenResult.Serialization.cs index 8458efeffef75..8231a1de702c6 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/UserTokenResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/UserTokenResult.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -88,6 +89,44 @@ internal static UserTokenResult DeserializeUserTokenResult(JsonElement element, return new UserTokenResult(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(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; @@ -96,6 +135,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions opt { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(UserTokenResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/UserTokenResult.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/UserTokenResult.cs index c3bd3c177fe86..85718bdd2c977 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/UserTokenResult.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/UserTokenResult.cs @@ -60,6 +60,7 @@ internal UserTokenResult(string value, IDictionary serialize } /// Shared Access Authorization token for the User. + [WirePath("value")] public string Value { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/VirtualNetworkConfiguration.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/VirtualNetworkConfiguration.Serialization.cs index cdd29c67cb497..13f61b9d760d1 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/VirtualNetworkConfiguration.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/VirtualNetworkConfiguration.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -118,6 +119,74 @@ internal static VirtualNetworkConfiguration DeserializeVirtualNetworkConfigurati return new VirtualNetworkConfiguration(vnetid, subnetname, subnetResourceId, 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(VnetId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" vnetid: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(VnetId)) + { + builder.Append(" vnetid: "); + builder.AppendLine($"'{VnetId.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Subnetname), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" subnetname: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Subnetname)) + { + builder.Append(" subnetname: "); + if (Subnetname.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Subnetname}'''"); + } + else + { + builder.AppendLine($"'{Subnetname}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SubnetResourceId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" subnetResourceId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SubnetResourceId)) + { + builder.Append(" subnetResourceId: "); + builder.AppendLine($"'{SubnetResourceId.ToString()}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -126,6 +195,8 @@ BinaryData IPersistableModel.Write(ModelReaderWrite { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(VirtualNetworkConfiguration)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/VirtualNetworkConfiguration.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/VirtualNetworkConfiguration.cs index 4701cd7f152a2..22479ff0efd4d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/VirtualNetworkConfiguration.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/VirtualNetworkConfiguration.cs @@ -65,10 +65,13 @@ internal VirtualNetworkConfiguration(Guid? vnetId, string subnetname, ResourceId } /// The virtual network ID. This is typically a GUID. Expect a null GUID by default. + [WirePath("vnetid")] public Guid? VnetId { get; } /// The name of the subnet. + [WirePath("subnetname")] public string Subnetname { get; } /// The full resource ID of a subnet in a virtual network to deploy the API Management service in. + [WirePath("subnetResourceId")] public ResourceIdentifier SubnetResourceId { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/WikiDocumentationContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/WikiDocumentationContract.Serialization.cs new file mode 100644 index 0000000000000..03a24c1ba2baa --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/WikiDocumentationContract.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.ApiManagement.Models +{ + public partial class WikiDocumentationContract : 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(WikiDocumentationContract)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(DocumentationId)) + { + writer.WritePropertyName("documentationId"u8); + writer.WriteStringValue(DocumentationId); + } + 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(); + } + + WikiDocumentationContract 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(WikiDocumentationContract)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWikiDocumentationContract(document.RootElement, options); + } + + internal static WikiDocumentationContract DeserializeWikiDocumentationContract(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string documentationId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("documentationId"u8)) + { + documentationId = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WikiDocumentationContract(documentationId, 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(DocumentationId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" documentationId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DocumentationId)) + { + builder.Append(" documentationId: "); + if (DocumentationId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{DocumentationId}'''"); + } + else + { + builder.AppendLine($"'{DocumentationId}'"); + } + } + } + + 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(WikiDocumentationContract)} does not support writing '{options.Format}' format."); + } + } + + WikiDocumentationContract 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 DeserializeWikiDocumentationContract(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WikiDocumentationContract)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/WikiDocumentationContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/WikiDocumentationContract.cs new file mode 100644 index 0000000000000..b3acd93214836 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/WikiDocumentationContract.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.ApiManagement.Models +{ + /// Wiki documentation details. + public partial class WikiDocumentationContract + { + /// + /// 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 WikiDocumentationContract() + { + } + + /// Initializes a new instance of . + /// Documentation Identifier. + /// Keeps track of any properties unknown to the library. + internal WikiDocumentationContract(string documentationId, IDictionary serializedAdditionalRawData) + { + DocumentationId = documentationId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Documentation Identifier. + [WirePath("documentationId")] + public string DocumentationId { get; set; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/WikiUpdateContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/WikiUpdateContract.Serialization.cs new file mode 100644 index 0000000000000..b7fee2f98a9cb --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/WikiUpdateContract.Serialization.cs @@ -0,0 +1,151 @@ +// 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.ApiManagement.Models +{ + public partial class WikiUpdateContract : 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(WikiUpdateContract)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Documents)) + { + writer.WritePropertyName("documents"u8); + writer.WriteStartArray(); + foreach (var item in Documents) + { + 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(); + } + + WikiUpdateContract 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(WikiUpdateContract)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWikiUpdateContract(document.RootElement, options); + } + + internal static WikiUpdateContract DeserializeWikiUpdateContract(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList documents = 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("documents"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(WikiDocumentationContract.DeserializeWikiDocumentationContract(item, options)); + } + documents = array; + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WikiUpdateContract(documents ?? 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(WikiUpdateContract)} does not support writing '{options.Format}' format."); + } + } + + WikiUpdateContract 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 DeserializeWikiUpdateContract(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WikiUpdateContract)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/WikiUpdateContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/WikiUpdateContract.cs new file mode 100644 index 0000000000000..4b315e98e0ee0 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/WikiUpdateContract.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.ApiManagement.Models +{ + /// Wiki update contract details. + public partial class WikiUpdateContract + { + /// + /// 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 WikiUpdateContract() + { + Documents = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Collection wiki documents included into this wiki. + /// Keeps track of any properties unknown to the library. + internal WikiUpdateContract(IList documents, IDictionary serializedAdditionalRawData) + { + Documents = documents; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Collection wiki documents included into this wiki. + [WirePath("properties.documents")] + public IList Documents { get; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/X509CertificateName.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/X509CertificateName.Serialization.cs index 86549b87f877f..e97b5c1ca66bd 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/X509CertificateName.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/X509CertificateName.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -99,6 +100,67 @@ internal static X509CertificateName DeserializeX509CertificateName(JsonElement e return new X509CertificateName(name, issuerCertificateThumbprint, 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(IssuerCertificateThumbprint), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" issuerCertificateThumbprint: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IssuerCertificateThumbprint)) + { + builder.Append(" issuerCertificateThumbprint: "); + if (IssuerCertificateThumbprint.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{IssuerCertificateThumbprint}'''"); + } + else + { + builder.AppendLine($"'{IssuerCertificateThumbprint}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -107,6 +169,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(X509CertificateName)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/X509CertificateName.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/X509CertificateName.cs index 04f363ab5558d..c9f65a055f8d4 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/X509CertificateName.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/X509CertificateName.cs @@ -62,8 +62,10 @@ internal X509CertificateName(string name, string issuerCertificateThumbprint, ID } /// Common Name of the Certificate. + [WirePath("name")] public string Name { get; set; } /// Thumbprint for the Issuer of the Certificate. + [WirePath("issuerCertificateThumbprint")] public string IssuerCertificateThumbprint { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyContractData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyContractData.Serialization.cs index e538e07b4c8b3..f06ff96806283 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyContractData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyContractData.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.ApiManagement.Models; @@ -175,6 +176,115 @@ internal static PolicyContractData DeserializePolicyContractData(JsonElement ele 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(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(Format), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" format: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Format)) + { + builder.Append(" format: "); + builder.AppendLine($"'{Format.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; @@ -183,6 +293,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(PolicyContractData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyContractData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyContractData.cs index e19bbf17fbc50..42661afba59ee 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyContractData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyContractData.cs @@ -72,8 +72,10 @@ internal PolicyContractData(ResourceIdentifier id, string name, ResourceType res } /// Contents of the Policy as defined by the format. + [WirePath("properties.value")] public string Value { get; set; } /// Format of the policyContent. + [WirePath("properties.format")] public PolicyContentFormat? Format { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyFragmentContractCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyFragmentContractCollection.cs new file mode 100644 index 0000000000000..04a394479e41f --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyFragmentContractCollection.cs @@ -0,0 +1,508 @@ +// 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.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + /// + /// 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 GetPolicyFragmentContracts method from an instance of . + /// + public partial class PolicyFragmentContractCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _policyFragmentContractPolicyFragmentClientDiagnostics; + private readonly PolicyFragmentRestOperations _policyFragmentContractPolicyFragmentRestClient; + + /// Initializes a new instance of the class for mocking. + protected PolicyFragmentContractCollection() + { + } + + /// 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 PolicyFragmentContractCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _policyFragmentContractPolicyFragmentClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", PolicyFragmentContractResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(PolicyFragmentContractResource.ResourceType, out string policyFragmentContractPolicyFragmentApiVersion); + _policyFragmentContractPolicyFragmentRestClient = new PolicyFragmentRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, policyFragmentContractPolicyFragmentApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ApiManagementServiceResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ApiManagementServiceResource.ResourceType), nameof(id)); + } + + /// + /// Creates or updates a policy fragment. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id} + /// + /// + /// Operation Id + /// PolicyFragment_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2022-08-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 resource identifier. + /// The policy fragment contents to apply. + /// ETag of the Entity. Not required when creating an entity, but required when updating an 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 id, PolicyFragmentContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(id, nameof(id)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _policyFragmentContractPolicyFragmentClientDiagnostics.CreateScope("PolicyFragmentContractCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _policyFragmentContractPolicyFragmentRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, id, data, ifMatch, cancellationToken).ConfigureAwait(false); + var operation = new ApiManagementArmOperation(new PolicyFragmentContractOperationSource(Client), _policyFragmentContractPolicyFragmentClientDiagnostics, Pipeline, _policyFragmentContractPolicyFragmentRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, id, data, ifMatch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates a policy fragment. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id} + /// + /// + /// Operation Id + /// PolicyFragment_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2022-08-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 resource identifier. + /// The policy fragment contents to apply. + /// ETag of the Entity. Not required when creating an entity, but required when updating an 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 id, PolicyFragmentContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(id, nameof(id)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _policyFragmentContractPolicyFragmentClientDiagnostics.CreateScope("PolicyFragmentContractCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _policyFragmentContractPolicyFragmentRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, id, data, ifMatch, cancellationToken); + var operation = new ApiManagementArmOperation(new PolicyFragmentContractOperationSource(Client), _policyFragmentContractPolicyFragmentClientDiagnostics, Pipeline, _policyFragmentContractPolicyFragmentRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, id, data, ifMatch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a policy fragment. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id} + /// + /// + /// Operation Id + /// PolicyFragment_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// A resource identifier. + /// Policy fragment content format. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string id, PolicyFragmentContentFormat? format = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(id, nameof(id)); + + using var scope = _policyFragmentContractPolicyFragmentClientDiagnostics.CreateScope("PolicyFragmentContractCollection.Get"); + scope.Start(); + try + { + var response = await _policyFragmentContractPolicyFragmentRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, id, format, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new PolicyFragmentContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a policy fragment. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id} + /// + /// + /// Operation Id + /// PolicyFragment_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// A resource identifier. + /// Policy fragment content format. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string id, PolicyFragmentContentFormat? format = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(id, nameof(id)); + + using var scope = _policyFragmentContractPolicyFragmentClientDiagnostics.CreateScope("PolicyFragmentContractCollection.Get"); + scope.Start(); + try + { + var response = _policyFragmentContractPolicyFragmentRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, id, format, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new PolicyFragmentContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets all policy fragments. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments + /// + /// + /// Operation Id + /// PolicyFragment_ListByService + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter, orderBy | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| value | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// OData order by query option. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(string filter = null, string orderBy = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _policyFragmentContractPolicyFragmentRestClient.CreateListByServiceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, orderBy, top, skip); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => new PolicyFragmentContractResource(Client, PolicyFragmentContractData.DeserializePolicyFragmentContractData(e)), _policyFragmentContractPolicyFragmentClientDiagnostics, Pipeline, "PolicyFragmentContractCollection.GetAll", "value", null, cancellationToken); + } + + /// + /// Gets all policy fragments. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments + /// + /// + /// Operation Id + /// PolicyFragment_ListByService + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter, orderBy | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| value | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// OData order by query option. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(string filter = null, string orderBy = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _policyFragmentContractPolicyFragmentRestClient.CreateListByServiceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, orderBy, top, skip); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, e => new PolicyFragmentContractResource(Client, PolicyFragmentContractData.DeserializePolicyFragmentContractData(e)), _policyFragmentContractPolicyFragmentClientDiagnostics, Pipeline, "PolicyFragmentContractCollection.GetAll", "value", null, cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id} + /// + /// + /// Operation Id + /// PolicyFragment_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// A resource identifier. + /// Policy fragment content format. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string id, PolicyFragmentContentFormat? format = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(id, nameof(id)); + + using var scope = _policyFragmentContractPolicyFragmentClientDiagnostics.CreateScope("PolicyFragmentContractCollection.Exists"); + scope.Start(); + try + { + var response = await _policyFragmentContractPolicyFragmentRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, id, format, 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.ApiManagement/service/{serviceName}/policyFragments/{id} + /// + /// + /// Operation Id + /// PolicyFragment_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// A resource identifier. + /// Policy fragment content format. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string id, PolicyFragmentContentFormat? format = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(id, nameof(id)); + + using var scope = _policyFragmentContractPolicyFragmentClientDiagnostics.CreateScope("PolicyFragmentContractCollection.Exists"); + scope.Start(); + try + { + var response = _policyFragmentContractPolicyFragmentRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, id, format, 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.ApiManagement/service/{serviceName}/policyFragments/{id} + /// + /// + /// Operation Id + /// PolicyFragment_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// A resource identifier. + /// Policy fragment content format. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string id, PolicyFragmentContentFormat? format = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(id, nameof(id)); + + using var scope = _policyFragmentContractPolicyFragmentClientDiagnostics.CreateScope("PolicyFragmentContractCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _policyFragmentContractPolicyFragmentRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, id, format, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new PolicyFragmentContractResource(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.ApiManagement/service/{serviceName}/policyFragments/{id} + /// + /// + /// Operation Id + /// PolicyFragment_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// A resource identifier. + /// Policy fragment content format. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string id, PolicyFragmentContentFormat? format = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(id, nameof(id)); + + using var scope = _policyFragmentContractPolicyFragmentClientDiagnostics.CreateScope("PolicyFragmentContractCollection.GetIfExists"); + scope.Start(); + try + { + var response = _policyFragmentContractPolicyFragmentRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, id, format, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new PolicyFragmentContractResource(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/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyFragmentContractData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyFragmentContractData.Serialization.cs new file mode 100644 index 0000000000000..ffec2b055f287 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyFragmentContractData.Serialization.cs @@ -0,0 +1,356 @@ +// 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.ApiManagement.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + public partial class PolicyFragmentContractData : 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(PolicyFragmentContractData)} 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 (Optional.IsDefined(Value)) + { + writer.WritePropertyName("value"u8); + writer.WriteStringValue(Value); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + if (Optional.IsDefined(Format)) + { + writer.WritePropertyName("format"u8); + writer.WriteStringValue(Format.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(); + } + + PolicyFragmentContractData 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(PolicyFragmentContractData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePolicyFragmentContractData(document.RootElement, options); + } + + internal static PolicyFragmentContractData DeserializePolicyFragmentContractData(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; + string value = default; + string description = default; + PolicyFragmentContentFormat? format = 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("value"u8)) + { + value = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("description"u8)) + { + description = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("format"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + format = new PolicyFragmentContentFormat(property0.Value.GetString()); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PolicyFragmentContractData( + id, + name, + type, + systemData, + value, + description, + format, + 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(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(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}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Format), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" format: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Format)) + { + builder.Append(" format: "); + builder.AppendLine($"'{Format.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(PolicyFragmentContractData)} does not support writing '{options.Format}' format."); + } + } + + PolicyFragmentContractData 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 DeserializePolicyFragmentContractData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PolicyFragmentContractData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyFragmentContractData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyFragmentContractData.cs new file mode 100644 index 0000000000000..e426417cddfcb --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyFragmentContractData.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.ApiManagement.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + /// + /// A class representing the PolicyFragmentContract data model. + /// Policy fragment contract details. + /// + public partial class PolicyFragmentContractData : 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 PolicyFragmentContractData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Contents of the policy fragment. + /// Policy fragment description. + /// Format of the policy fragment content. + /// Keeps track of any properties unknown to the library. + internal PolicyFragmentContractData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string value, string description, PolicyFragmentContentFormat? format, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Value = value; + Description = description; + Format = format; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Contents of the policy fragment. + [WirePath("properties.value")] + public string Value { get; set; } + /// Policy fragment description. + [WirePath("properties.description")] + public string Description { get; set; } + /// Format of the policy fragment content. + [WirePath("properties.format")] + public PolicyFragmentContentFormat? Format { get; set; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyFragmentContractResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyFragmentContractResource.Serialization.cs new file mode 100644 index 0000000000000..7bd69c6df7b88 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyFragmentContractResource.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.ApiManagement +{ + public partial class PolicyFragmentContractResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + PolicyFragmentContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + PolicyFragmentContractData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyFragmentContractResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyFragmentContractResource.cs new file mode 100644 index 0000000000000..23faf63b47dc6 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyFragmentContractResource.cs @@ -0,0 +1,497 @@ +// 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.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + /// + /// A Class representing a PolicyFragmentContract 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 GetPolicyFragmentContractResource method. + /// Otherwise you can get one from its parent resource using the GetPolicyFragmentContract method. + /// + public partial class PolicyFragmentContractResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The serviceName. + /// The id. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string id) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _policyFragmentContractPolicyFragmentClientDiagnostics; + private readonly PolicyFragmentRestOperations _policyFragmentContractPolicyFragmentRestClient; + private readonly PolicyFragmentContractData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.ApiManagement/service/policyFragments"; + + /// Initializes a new instance of the class for mocking. + protected PolicyFragmentContractResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal PolicyFragmentContractResource(ArmClient client, PolicyFragmentContractData 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 PolicyFragmentContractResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _policyFragmentContractPolicyFragmentClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string policyFragmentContractPolicyFragmentApiVersion); + _policyFragmentContractPolicyFragmentRestClient = new PolicyFragmentRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, policyFragmentContractPolicyFragmentApiVersion); +#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 PolicyFragmentContractData 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 policy fragment. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id} + /// + /// + /// Operation Id + /// PolicyFragment_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Policy fragment content format. + /// The cancellation token to use. + public virtual async Task> GetAsync(PolicyFragmentContentFormat? format = null, CancellationToken cancellationToken = default) + { + using var scope = _policyFragmentContractPolicyFragmentClientDiagnostics.CreateScope("PolicyFragmentContractResource.Get"); + scope.Start(); + try + { + var response = await _policyFragmentContractPolicyFragmentRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, format, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new PolicyFragmentContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a policy fragment. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id} + /// + /// + /// Operation Id + /// PolicyFragment_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Policy fragment content format. + /// The cancellation token to use. + public virtual Response Get(PolicyFragmentContentFormat? format = null, CancellationToken cancellationToken = default) + { + using var scope = _policyFragmentContractPolicyFragmentClientDiagnostics.CreateScope("PolicyFragmentContractResource.Get"); + scope.Start(); + try + { + var response = _policyFragmentContractPolicyFragmentRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, format, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new PolicyFragmentContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes a policy fragment. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id} + /// + /// + /// Operation Id + /// PolicyFragment_Delete + /// + /// + /// Default Api Version + /// 2022-08-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. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag ifMatch, CancellationToken cancellationToken = default) + { + using var scope = _policyFragmentContractPolicyFragmentClientDiagnostics.CreateScope("PolicyFragmentContractResource.Delete"); + scope.Start(); + try + { + var response = await _policyFragmentContractPolicyFragmentRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken).ConfigureAwait(false); + var uri = _policyFragmentContractPolicyFragmentRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes a policy fragment. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id} + /// + /// + /// Operation Id + /// PolicyFragment_Delete + /// + /// + /// Default Api Version + /// 2022-08-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. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, CancellationToken cancellationToken = default) + { + using var scope = _policyFragmentContractPolicyFragmentClientDiagnostics.CreateScope("PolicyFragmentContractResource.Delete"); + scope.Start(); + try + { + var response = _policyFragmentContractPolicyFragmentRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken); + var uri = _policyFragmentContractPolicyFragmentRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates a policy fragment. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id} + /// + /// + /// Operation Id + /// PolicyFragment_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2022-08-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 policy fragment contents to apply. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, PolicyFragmentContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _policyFragmentContractPolicyFragmentClientDiagnostics.CreateScope("PolicyFragmentContractResource.Update"); + scope.Start(); + try + { + var response = await _policyFragmentContractPolicyFragmentRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch, cancellationToken).ConfigureAwait(false); + var operation = new ApiManagementArmOperation(new PolicyFragmentContractOperationSource(Client), _policyFragmentContractPolicyFragmentClientDiagnostics, Pipeline, _policyFragmentContractPolicyFragmentRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates a policy fragment. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id} + /// + /// + /// Operation Id + /// PolicyFragment_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2022-08-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 policy fragment contents to apply. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, PolicyFragmentContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _policyFragmentContractPolicyFragmentClientDiagnostics.CreateScope("PolicyFragmentContractResource.Update"); + scope.Start(); + try + { + var response = _policyFragmentContractPolicyFragmentRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch, cancellationToken); + var operation = new ApiManagementArmOperation(new PolicyFragmentContractOperationSource(Client), _policyFragmentContractPolicyFragmentClientDiagnostics, Pipeline, _policyFragmentContractPolicyFragmentRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists policy resources that reference the policy fragment. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id}/listReferences + /// + /// + /// Operation Id + /// PolicyFragment_ListReferences + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetReferencesAsync(int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _policyFragmentContractPolicyFragmentRestClient.CreateListReferencesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, top, skip); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => ResourceCollectionValueItem.DeserializeResourceCollectionValueItem(e), _policyFragmentContractPolicyFragmentClientDiagnostics, Pipeline, "PolicyFragmentContractResource.GetReferences", "value", null, cancellationToken); + } + + /// + /// Lists policy resources that reference the policy fragment. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id}/listReferences + /// + /// + /// Operation Id + /// PolicyFragment_ListReferences + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetReferences(int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _policyFragmentContractPolicyFragmentRestClient.CreateListReferencesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, top, skip); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, e => ResourceCollectionValueItem.DeserializeResourceCollectionValueItem(e), _policyFragmentContractPolicyFragmentClientDiagnostics, Pipeline, "PolicyFragmentContractResource.GetReferences", "value", null, cancellationToken); + } + + /// + /// Gets the entity state (Etag) version of a policy fragment. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id} + /// + /// + /// Operation Id + /// PolicyFragment_GetEntityTag + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetEntityTagAsync(CancellationToken cancellationToken = default) + { + using var scope = _policyFragmentContractPolicyFragmentClientDiagnostics.CreateScope("PolicyFragmentContractResource.GetEntityTag"); + scope.Start(); + try + { + var response = await _policyFragmentContractPolicyFragmentRestClient.GetEntityTagAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the entity state (Etag) version of a policy fragment. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id} + /// + /// + /// Operation Id + /// PolicyFragment_GetEntityTag + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response GetEntityTag(CancellationToken cancellationToken = default) + { + using var scope = _policyFragmentContractPolicyFragmentClientDiagnostics.CreateScope("PolicyFragmentContractResource.GetEntityTag"); + scope.Start(); + try + { + var response = _policyFragmentContractPolicyFragmentRestClient.GetEntityTag(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PortalConfigContractCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PortalConfigContractCollection.cs new file mode 100644 index 0000000000000..a116ae23d4426 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PortalConfigContractCollection.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.ApiManagement +{ + /// + /// 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 GetPortalConfigContracts method from an instance of . + /// + public partial class PortalConfigContractCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _portalConfigContractPortalConfigClientDiagnostics; + private readonly PortalConfigRestOperations _portalConfigContractPortalConfigRestClient; + + /// Initializes a new instance of the class for mocking. + protected PortalConfigContractCollection() + { + } + + /// 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 PortalConfigContractCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _portalConfigContractPortalConfigClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", PortalConfigContractResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(PortalConfigContractResource.ResourceType, out string portalConfigContractPortalConfigApiVersion); + _portalConfigContractPortalConfigRestClient = new PortalConfigRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, portalConfigContractPortalConfigApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ApiManagementServiceResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ApiManagementServiceResource.ResourceType), nameof(id)); + } + + /// + /// Create or update the developer portal configuration. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId} + /// + /// + /// Operation Id + /// PortalConfig_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2022-08-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. + /// Portal configuration identifier. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// Update the developer portal configuration. + /// 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 portalConfigId, ETag ifMatch, PortalConfigContractData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(portalConfigId, nameof(portalConfigId)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _portalConfigContractPortalConfigClientDiagnostics.CreateScope("PortalConfigContractCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _portalConfigContractPortalConfigRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, portalConfigId, ifMatch, data, cancellationToken).ConfigureAwait(false); + var uri = _portalConfigContractPortalConfigRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, portalConfigId, ifMatch, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(Response.FromValue(new PortalConfigContractResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update the developer portal configuration. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId} + /// + /// + /// Operation Id + /// PortalConfig_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2022-08-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. + /// Portal configuration identifier. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// Update the developer portal configuration. + /// 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 portalConfigId, ETag ifMatch, PortalConfigContractData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(portalConfigId, nameof(portalConfigId)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _portalConfigContractPortalConfigClientDiagnostics.CreateScope("PortalConfigContractCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _portalConfigContractPortalConfigRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, portalConfigId, ifMatch, data, cancellationToken); + var uri = _portalConfigContractPortalConfigRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, portalConfigId, ifMatch, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(Response.FromValue(new PortalConfigContractResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the developer portal configuration. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId} + /// + /// + /// Operation Id + /// PortalConfig_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Portal configuration identifier. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string portalConfigId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(portalConfigId, nameof(portalConfigId)); + + using var scope = _portalConfigContractPortalConfigClientDiagnostics.CreateScope("PortalConfigContractCollection.Get"); + scope.Start(); + try + { + var response = await _portalConfigContractPortalConfigRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, portalConfigId, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new PortalConfigContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the developer portal configuration. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId} + /// + /// + /// Operation Id + /// PortalConfig_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Portal configuration identifier. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string portalConfigId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(portalConfigId, nameof(portalConfigId)); + + using var scope = _portalConfigContractPortalConfigClientDiagnostics.CreateScope("PortalConfigContractCollection.Get"); + scope.Start(); + try + { + var response = _portalConfigContractPortalConfigRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, portalConfigId, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new PortalConfigContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists the developer portal configurations. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs + /// + /// + /// Operation Id + /// PortalConfig_ListByService + /// + /// + /// Default Api Version + /// 2022-08-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) => _portalConfigContractPortalConfigRestClient.CreateListByServiceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => new PortalConfigContractResource(Client, PortalConfigContractData.DeserializePortalConfigContractData(e)), _portalConfigContractPortalConfigClientDiagnostics, Pipeline, "PortalConfigContractCollection.GetAll", "value", null, cancellationToken); + } + + /// + /// Lists the developer portal configurations. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs + /// + /// + /// Operation Id + /// PortalConfig_ListByService + /// + /// + /// Default Api Version + /// 2022-08-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) => _portalConfigContractPortalConfigRestClient.CreateListByServiceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, e => new PortalConfigContractResource(Client, PortalConfigContractData.DeserializePortalConfigContractData(e)), _portalConfigContractPortalConfigClientDiagnostics, Pipeline, "PortalConfigContractCollection.GetAll", "value", null, cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId} + /// + /// + /// Operation Id + /// PortalConfig_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Portal configuration identifier. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string portalConfigId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(portalConfigId, nameof(portalConfigId)); + + using var scope = _portalConfigContractPortalConfigClientDiagnostics.CreateScope("PortalConfigContractCollection.Exists"); + scope.Start(); + try + { + var response = await _portalConfigContractPortalConfigRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, portalConfigId, 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.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId} + /// + /// + /// Operation Id + /// PortalConfig_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Portal configuration identifier. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string portalConfigId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(portalConfigId, nameof(portalConfigId)); + + using var scope = _portalConfigContractPortalConfigClientDiagnostics.CreateScope("PortalConfigContractCollection.Exists"); + scope.Start(); + try + { + var response = _portalConfigContractPortalConfigRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, portalConfigId, 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.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId} + /// + /// + /// Operation Id + /// PortalConfig_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Portal configuration identifier. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string portalConfigId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(portalConfigId, nameof(portalConfigId)); + + using var scope = _portalConfigContractPortalConfigClientDiagnostics.CreateScope("PortalConfigContractCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _portalConfigContractPortalConfigRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, portalConfigId, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new PortalConfigContractResource(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.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId} + /// + /// + /// Operation Id + /// PortalConfig_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Portal configuration identifier. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string portalConfigId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(portalConfigId, nameof(portalConfigId)); + + using var scope = _portalConfigContractPortalConfigClientDiagnostics.CreateScope("PortalConfigContractCollection.GetIfExists"); + scope.Start(); + try + { + var response = _portalConfigContractPortalConfigRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, portalConfigId, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new PortalConfigContractResource(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/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PortalConfigContractData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PortalConfigContractData.Serialization.cs new file mode 100644 index 0000000000000..6dd6c0acb432c --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PortalConfigContractData.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.ApiManagement.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + public partial class PortalConfigContractData : 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(PortalConfigContractData)} 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 (Optional.IsDefined(EnableBasicAuth)) + { + writer.WritePropertyName("enableBasicAuth"u8); + writer.WriteBooleanValue(EnableBasicAuth.Value); + } + if (Optional.IsDefined(Signin)) + { + writer.WritePropertyName("signin"u8); + writer.WriteObjectValue(Signin, options); + } + if (Optional.IsDefined(Signup)) + { + writer.WritePropertyName("signup"u8); + writer.WriteObjectValue(Signup, options); + } + if (Optional.IsDefined(Delegation)) + { + writer.WritePropertyName("delegation"u8); + writer.WriteObjectValue(Delegation, options); + } + if (Optional.IsDefined(Cors)) + { + writer.WritePropertyName("cors"u8); + writer.WriteObjectValue(Cors, options); + } + if (Optional.IsDefined(Csp)) + { + writer.WritePropertyName("csp"u8); + writer.WriteObjectValue(Csp, 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(); + } + + PortalConfigContractData 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(PortalConfigContractData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePortalConfigContractData(document.RootElement, options); + } + + internal static PortalConfigContractData DeserializePortalConfigContractData(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; + bool? enableBasicAuth = default; + PortalConfigPropertiesSignin signin = default; + PortalConfigPropertiesSignup signup = default; + PortalConfigDelegationProperties delegation = default; + PortalConfigCorsProperties cors = default; + PortalConfigCspProperties csp = 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("enableBasicAuth"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enableBasicAuth = property0.Value.GetBoolean(); + continue; + } + if (property0.NameEquals("signin"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + signin = PortalConfigPropertiesSignin.DeserializePortalConfigPropertiesSignin(property0.Value, options); + continue; + } + if (property0.NameEquals("signup"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + signup = PortalConfigPropertiesSignup.DeserializePortalConfigPropertiesSignup(property0.Value, options); + continue; + } + if (property0.NameEquals("delegation"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + delegation = PortalConfigDelegationProperties.DeserializePortalConfigDelegationProperties(property0.Value, options); + continue; + } + if (property0.NameEquals("cors"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + cors = PortalConfigCorsProperties.DeserializePortalConfigCorsProperties(property0.Value, options); + continue; + } + if (property0.NameEquals("csp"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + csp = PortalConfigCspProperties.DeserializePortalConfigCspProperties(property0.Value, options); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PortalConfigContractData( + id, + name, + type, + systemData, + enableBasicAuth, + signin, + signup, + delegation, + cors, + csp, + 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(EnableBasicAuth), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" enableBasicAuth: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(EnableBasicAuth)) + { + builder.Append(" enableBasicAuth: "); + var boolValue = EnableBasicAuth.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("Require", out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" signin: "); + builder.AppendLine("{"); + builder.AppendLine(" signin: {"); + builder.Append(" require: "); + builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); + builder.AppendLine(" }"); + } + else + { + if (Optional.IsDefined(Signin)) + { + builder.Append(" signin: "); + BicepSerializationHelpers.AppendChildObject(builder, Signin, options, 4, false, " signin: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("SignupTermsOfService", out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" signup: "); + builder.AppendLine("{"); + builder.AppendLine(" signup: {"); + builder.Append(" termsOfService: "); + builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); + builder.AppendLine(" }"); + } + else + { + if (Optional.IsDefined(Signup)) + { + builder.Append(" signup: "); + BicepSerializationHelpers.AppendChildObject(builder, Signup, options, 4, false, " signup: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Delegation), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" delegation: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Delegation)) + { + builder.Append(" delegation: "); + BicepSerializationHelpers.AppendChildObject(builder, Delegation, options, 4, false, " delegation: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("CorsAllowedOrigins", out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" cors: "); + builder.AppendLine("{"); + builder.AppendLine(" cors: {"); + builder.Append(" allowedOrigins: "); + builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); + builder.AppendLine(" }"); + } + else + { + if (Optional.IsDefined(Cors)) + { + builder.Append(" cors: "); + BicepSerializationHelpers.AppendChildObject(builder, Cors, options, 4, false, " cors: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Csp), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" csp: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Csp)) + { + builder.Append(" csp: "); + BicepSerializationHelpers.AppendChildObject(builder, Csp, options, 4, false, " csp: "); + } + } + + 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(PortalConfigContractData)} does not support writing '{options.Format}' format."); + } + } + + PortalConfigContractData 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 DeserializePortalConfigContractData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PortalConfigContractData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PortalConfigContractData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PortalConfigContractData.cs new file mode 100644 index 0000000000000..422d13d046558 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PortalConfigContractData.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; +using Azure.Core; +using Azure.ResourceManager.ApiManagement.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + /// + /// A class representing the PortalConfigContract data model. + /// The developer portal configuration contract. + /// + public partial class PortalConfigContractData : 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 PortalConfigContractData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Enable or disable Basic authentication method. + /// + /// + /// The developer portal delegation settings. + /// The developer portal Cross-Origin Resource Sharing (CORS) settings. + /// The developer portal Content Security Policy (CSP) settings. + /// Keeps track of any properties unknown to the library. + internal PortalConfigContractData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, bool? enableBasicAuth, PortalConfigPropertiesSignin signin, PortalConfigPropertiesSignup signup, PortalConfigDelegationProperties delegation, PortalConfigCorsProperties cors, PortalConfigCspProperties csp, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + EnableBasicAuth = enableBasicAuth; + Signin = signin; + Signup = signup; + Delegation = delegation; + Cors = cors; + Csp = csp; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Enable or disable Basic authentication method. + [WirePath("properties.enableBasicAuth")] + public bool? EnableBasicAuth { get; set; } + /// Gets or sets the signin. + internal PortalConfigPropertiesSignin Signin { get; set; } + /// Redirect anonymous users to the sign-in page. + [WirePath("properties.signin.require")] + public bool? Require + { + get => Signin is null ? default : Signin.Require; + set + { + if (Signin is null) + Signin = new PortalConfigPropertiesSignin(); + Signin.Require = value; + } + } + + /// Gets or sets the signup. + internal PortalConfigPropertiesSignup Signup { get; set; } + /// Terms of service settings. + [WirePath("properties.signup.termsOfService")] + public PortalConfigTermsOfServiceProperties SignupTermsOfService + { + get => Signup is null ? default : Signup.TermsOfService; + set + { + if (Signup is null) + Signup = new PortalConfigPropertiesSignup(); + Signup.TermsOfService = value; + } + } + + /// The developer portal delegation settings. + [WirePath("properties.delegation")] + public PortalConfigDelegationProperties Delegation { get; set; } + /// The developer portal Cross-Origin Resource Sharing (CORS) settings. + internal PortalConfigCorsProperties Cors { get; set; } + /// Allowed origins, e.g. `https://trusted.com`. + [WirePath("properties.cors.allowedOrigins")] + public IList CorsAllowedOrigins + { + get + { + if (Cors is null) + Cors = new PortalConfigCorsProperties(); + return Cors.AllowedOrigins; + } + } + + /// The developer portal Content Security Policy (CSP) settings. + [WirePath("properties.csp")] + public PortalConfigCspProperties Csp { get; set; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PortalConfigContractResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PortalConfigContractResource.Serialization.cs new file mode 100644 index 0000000000000..c36db81869ca0 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PortalConfigContractResource.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.ApiManagement +{ + public partial class PortalConfigContractResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + PortalConfigContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + PortalConfigContractData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PortalConfigContractResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PortalConfigContractResource.cs new file mode 100644 index 0000000000000..8589f01eea070 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PortalConfigContractResource.cs @@ -0,0 +1,333 @@ +// 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.ApiManagement +{ + /// + /// A Class representing a PortalConfigContract 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 GetPortalConfigContractResource method. + /// Otherwise you can get one from its parent resource using the GetPortalConfigContract method. + /// + public partial class PortalConfigContractResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The serviceName. + /// The portalConfigId. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string portalConfigId) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _portalConfigContractPortalConfigClientDiagnostics; + private readonly PortalConfigRestOperations _portalConfigContractPortalConfigRestClient; + private readonly PortalConfigContractData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.ApiManagement/service/portalconfigs"; + + /// Initializes a new instance of the class for mocking. + protected PortalConfigContractResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal PortalConfigContractResource(ArmClient client, PortalConfigContractData 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 PortalConfigContractResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _portalConfigContractPortalConfigClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string portalConfigContractPortalConfigApiVersion); + _portalConfigContractPortalConfigRestClient = new PortalConfigRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, portalConfigContractPortalConfigApiVersion); +#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 PortalConfigContractData 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 the developer portal configuration. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId} + /// + /// + /// Operation Id + /// PortalConfig_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _portalConfigContractPortalConfigClientDiagnostics.CreateScope("PortalConfigContractResource.Get"); + scope.Start(); + try + { + var response = await _portalConfigContractPortalConfigRestClient.GetAsync(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 PortalConfigContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the developer portal configuration. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId} + /// + /// + /// Operation Id + /// PortalConfig_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _portalConfigContractPortalConfigClientDiagnostics.CreateScope("PortalConfigContractResource.Get"); + scope.Start(); + try + { + var response = _portalConfigContractPortalConfigRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new PortalConfigContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update the developer portal configuration. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId} + /// + /// + /// Operation Id + /// PortalConfig_Update + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// Update the developer portal configuration. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(ETag ifMatch, PortalConfigContractData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _portalConfigContractPortalConfigClientDiagnostics.CreateScope("PortalConfigContractResource.Update"); + scope.Start(); + try + { + var response = await _portalConfigContractPortalConfigRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, data, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new PortalConfigContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update the developer portal configuration. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId} + /// + /// + /// Operation Id + /// PortalConfig_Update + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// Update the developer portal configuration. + /// The cancellation token to use. + /// is null. + public virtual Response Update(ETag ifMatch, PortalConfigContractData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _portalConfigContractPortalConfigClientDiagnostics.CreateScope("PortalConfigContractResource.Update"); + scope.Start(); + try + { + var response = _portalConfigContractPortalConfigRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, data, cancellationToken); + return Response.FromValue(new PortalConfigContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the entity state (Etag) version of the developer portal configuration. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId} + /// + /// + /// Operation Id + /// PortalConfig_GetEntityTag + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetEntityTagAsync(CancellationToken cancellationToken = default) + { + using var scope = _portalConfigContractPortalConfigClientDiagnostics.CreateScope("PortalConfigContractResource.GetEntityTag"); + scope.Start(); + try + { + var response = await _portalConfigContractPortalConfigRestClient.GetEntityTagAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the entity state (Etag) version of the developer portal configuration. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId} + /// + /// + /// Operation Id + /// PortalConfig_GetEntityTag + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response GetEntityTag(CancellationToken cancellationToken = default) + { + using var scope = _portalConfigContractPortalConfigClientDiagnostics.CreateScope("PortalConfigContractResource.GetEntityTag"); + scope.Start(); + try + { + var response = _portalConfigContractPortalConfigRestClient.GetEntityTag(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ResolverContractCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ResolverContractCollection.cs new file mode 100644 index 0000000000000..707c491cb42de --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ResolverContractCollection.cs @@ -0,0 +1,505 @@ +// 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.ApiManagement +{ + /// + /// 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 GetResolverContracts method from an instance of . + /// + public partial class ResolverContractCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _resolverContractGraphQLApiResolverClientDiagnostics; + private readonly GraphQLApiResolverRestOperations _resolverContractGraphQLApiResolverRestClient; + + /// Initializes a new instance of the class for mocking. + protected ResolverContractCollection() + { + } + + /// 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 ResolverContractCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _resolverContractGraphQLApiResolverClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", ResolverContractResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResolverContractResource.ResourceType, out string resolverContractGraphQLApiResolverApiVersion); + _resolverContractGraphQLApiResolverRestClient = new GraphQLApiResolverRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, resolverContractGraphQLApiResolverApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ApiResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ApiResource.ResourceType), nameof(id)); + } + + /// + /// Creates a new resolver in the GraphQL API or updates an existing one. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId} + /// + /// + /// Operation Id + /// GraphQLApiResolver_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2022-08-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. + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an 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 resolverId, ResolverContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _resolverContractGraphQLApiResolverClientDiagnostics.CreateScope("ResolverContractCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _resolverContractGraphQLApiResolverRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, resolverId, data, ifMatch, cancellationToken).ConfigureAwait(false); + var uri = _resolverContractGraphQLApiResolverRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, resolverId, data, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(Response.FromValue(new ResolverContractResource(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 a new resolver in the GraphQL API or updates an existing one. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId} + /// + /// + /// Operation Id + /// GraphQLApiResolver_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2022-08-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. + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an 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 resolverId, ResolverContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _resolverContractGraphQLApiResolverClientDiagnostics.CreateScope("ResolverContractCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _resolverContractGraphQLApiResolverRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, resolverId, data, ifMatch, cancellationToken); + var uri = _resolverContractGraphQLApiResolverRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, resolverId, data, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(Response.FromValue(new ResolverContractResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the GraphQL API Resolver specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId} + /// + /// + /// Operation Id + /// GraphQLApiResolver_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string resolverId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + + using var scope = _resolverContractGraphQLApiResolverClientDiagnostics.CreateScope("ResolverContractCollection.Get"); + scope.Start(); + try + { + var response = await _resolverContractGraphQLApiResolverRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, resolverId, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ResolverContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the GraphQL API Resolver specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId} + /// + /// + /// Operation Id + /// GraphQLApiResolver_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string resolverId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + + using var scope = _resolverContractGraphQLApiResolverClientDiagnostics.CreateScope("ResolverContractCollection.Get"); + scope.Start(); + try + { + var response = _resolverContractGraphQLApiResolverRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, resolverId, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ResolverContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists a collection of the resolvers for the specified GraphQL API. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers + /// + /// + /// Operation Id + /// GraphQLApiResolver_ListByApi + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _resolverContractGraphQLApiResolverRestClient.CreateListByApiRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, filter, top, skip); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _resolverContractGraphQLApiResolverRestClient.CreateListByApiNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, filter, top, skip); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ResolverContractResource(Client, ResolverContractData.DeserializeResolverContractData(e)), _resolverContractGraphQLApiResolverClientDiagnostics, Pipeline, "ResolverContractCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Lists a collection of the resolvers for the specified GraphQL API. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers + /// + /// + /// Operation Id + /// GraphQLApiResolver_ListByApi + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _resolverContractGraphQLApiResolverRestClient.CreateListByApiRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, filter, top, skip); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _resolverContractGraphQLApiResolverRestClient.CreateListByApiNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, filter, top, skip); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ResolverContractResource(Client, ResolverContractData.DeserializeResolverContractData(e)), _resolverContractGraphQLApiResolverClientDiagnostics, Pipeline, "ResolverContractCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId} + /// + /// + /// Operation Id + /// GraphQLApiResolver_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string resolverId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + + using var scope = _resolverContractGraphQLApiResolverClientDiagnostics.CreateScope("ResolverContractCollection.Exists"); + scope.Start(); + try + { + var response = await _resolverContractGraphQLApiResolverRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, resolverId, 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.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId} + /// + /// + /// Operation Id + /// GraphQLApiResolver_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string resolverId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + + using var scope = _resolverContractGraphQLApiResolverClientDiagnostics.CreateScope("ResolverContractCollection.Exists"); + scope.Start(); + try + { + var response = _resolverContractGraphQLApiResolverRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, resolverId, 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.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId} + /// + /// + /// Operation Id + /// GraphQLApiResolver_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string resolverId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + + using var scope = _resolverContractGraphQLApiResolverClientDiagnostics.CreateScope("ResolverContractCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _resolverContractGraphQLApiResolverRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, resolverId, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ResolverContractResource(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.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId} + /// + /// + /// Operation Id + /// GraphQLApiResolver_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string resolverId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + + using var scope = _resolverContractGraphQLApiResolverClientDiagnostics.CreateScope("ResolverContractCollection.GetIfExists"); + scope.Start(); + try + { + var response = _resolverContractGraphQLApiResolverRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, resolverId, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ResolverContractResource(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/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ResolverContractData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ResolverContractData.Serialization.cs new file mode 100644 index 0000000000000..553255bf299e1 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ResolverContractData.Serialization.cs @@ -0,0 +1,359 @@ +// 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.ApiManagement +{ + public partial class ResolverContractData : 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(ResolverContractData)} 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 (Optional.IsDefined(DisplayName)) + { + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + } + if (Optional.IsDefined(Path)) + { + writer.WritePropertyName("path"u8); + writer.WriteStringValue(Path); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + 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(); + } + + ResolverContractData 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(ResolverContractData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeResolverContractData(document.RootElement, options); + } + + internal static ResolverContractData DeserializeResolverContractData(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; + string displayName = default; + string path = default; + string description = 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("displayName"u8)) + { + displayName = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("path"u8)) + { + path = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("description"u8)) + { + description = property0.Value.GetString(); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ResolverContractData( + id, + name, + type, + systemData, + displayName, + path, + 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(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(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(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(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(" }"); + 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(ResolverContractData)} does not support writing '{options.Format}' format."); + } + } + + ResolverContractData 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 DeserializeResolverContractData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ResolverContractData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ResolverContractData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ResolverContractData.cs new file mode 100644 index 0000000000000..349251aacbc03 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ResolverContractData.cs @@ -0,0 +1,85 @@ +// 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.ApiManagement +{ + /// + /// A class representing the ResolverContract data model. + /// GraphQL API Resolver details. + /// + public partial class ResolverContractData : 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 ResolverContractData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Resolver Name. + /// Path is type/field being resolved. + /// Description of the resolver. May include HTML formatting tags. + /// Keeps track of any properties unknown to the library. + internal ResolverContractData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string displayName, string path, string description, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + DisplayName = displayName; + Path = path; + Description = description; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Resolver Name. + [WirePath("properties.displayName")] + public string DisplayName { get; set; } + /// Path is type/field being resolved. + [WirePath("properties.path")] + public string Path { get; set; } + /// Description of the resolver. May include HTML formatting tags. + [WirePath("properties.description")] + public string Description { get; set; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ResolverContractResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ResolverContractResource.Serialization.cs new file mode 100644 index 0000000000000..6a058777ec72a --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ResolverContractResource.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.ApiManagement +{ + public partial class ResolverContractResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + ResolverContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + ResolverContractData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ResolverContractResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ResolverContractResource.cs new file mode 100644 index 0000000000000..33fb55176023b --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ResolverContractResource.cs @@ -0,0 +1,492 @@ +// 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.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + /// + /// A Class representing a ResolverContract 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 GetResolverContractResource method. + /// Otherwise you can get one from its parent resource using the GetResolverContract method. + /// + public partial class ResolverContractResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The serviceName. + /// The apiId. + /// The resolverId. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _resolverContractGraphQLApiResolverClientDiagnostics; + private readonly GraphQLApiResolverRestOperations _resolverContractGraphQLApiResolverRestClient; + private readonly ResolverContractData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.ApiManagement/service/apis/resolvers"; + + /// Initializes a new instance of the class for mocking. + protected ResolverContractResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal ResolverContractResource(ArmClient client, ResolverContractData 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 ResolverContractResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _resolverContractGraphQLApiResolverClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string resolverContractGraphQLApiResolverApiVersion); + _resolverContractGraphQLApiResolverRestClient = new GraphQLApiResolverRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, resolverContractGraphQLApiResolverApiVersion); +#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 ResolverContractData 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 ServiceApiResolverPolicyResources in the ResolverContract. + /// An object representing collection of ServiceApiResolverPolicyResources and their operations over a ServiceApiResolverPolicyResource. + public virtual ServiceApiResolverPolicyCollection GetServiceApiResolverPolicies() + { + return GetCachedClient(client => new ServiceApiResolverPolicyCollection(client, Id)); + } + + /// + /// Get the policy configuration at the GraphQL API Resolver level. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId} + /// + /// + /// Operation Id + /// GraphQLApiResolverPolicy_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The identifier of the Policy. + /// Policy Export Format. + /// The cancellation token to use. + [ForwardsClientCalls] + public virtual async Task> GetServiceApiResolverPolicyAsync(PolicyName policyId, PolicyExportFormat? format = null, CancellationToken cancellationToken = default) + { + return await GetServiceApiResolverPolicies().GetAsync(policyId, format, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get the policy configuration at the GraphQL API Resolver level. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId} + /// + /// + /// Operation Id + /// GraphQLApiResolverPolicy_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The identifier of the Policy. + /// Policy Export Format. + /// The cancellation token to use. + [ForwardsClientCalls] + public virtual Response GetServiceApiResolverPolicy(PolicyName policyId, PolicyExportFormat? format = null, CancellationToken cancellationToken = default) + { + return GetServiceApiResolverPolicies().Get(policyId, format, cancellationToken); + } + + /// + /// Gets the details of the GraphQL API Resolver specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId} + /// + /// + /// Operation Id + /// GraphQLApiResolver_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _resolverContractGraphQLApiResolverClientDiagnostics.CreateScope("ResolverContractResource.Get"); + scope.Start(); + try + { + var response = await _resolverContractGraphQLApiResolverRestClient.GetAsync(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 ResolverContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the GraphQL API Resolver specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId} + /// + /// + /// Operation Id + /// GraphQLApiResolver_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _resolverContractGraphQLApiResolverClientDiagnostics.CreateScope("ResolverContractResource.Get"); + scope.Start(); + try + { + var response = _resolverContractGraphQLApiResolverRestClient.Get(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 ResolverContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes the specified resolver in the GraphQL API. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId} + /// + /// + /// Operation Id + /// GraphQLApiResolver_Delete + /// + /// + /// Default Api Version + /// 2022-08-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. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag ifMatch, CancellationToken cancellationToken = default) + { + using var scope = _resolverContractGraphQLApiResolverClientDiagnostics.CreateScope("ResolverContractResource.Delete"); + scope.Start(); + try + { + var response = await _resolverContractGraphQLApiResolverRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ifMatch, cancellationToken).ConfigureAwait(false); + var uri = _resolverContractGraphQLApiResolverRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes the specified resolver in the GraphQL API. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId} + /// + /// + /// Operation Id + /// GraphQLApiResolver_Delete + /// + /// + /// Default Api Version + /// 2022-08-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. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, CancellationToken cancellationToken = default) + { + using var scope = _resolverContractGraphQLApiResolverClientDiagnostics.CreateScope("ResolverContractResource.Delete"); + scope.Start(); + try + { + var response = _resolverContractGraphQLApiResolverRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ifMatch, cancellationToken); + var uri = _resolverContractGraphQLApiResolverRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates the details of the resolver in the GraphQL API specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId} + /// + /// + /// Operation Id + /// GraphQLApiResolver_Update + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// GraphQL API Resolver Update parameters. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(ETag ifMatch, ResolverContractPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _resolverContractGraphQLApiResolverClientDiagnostics.CreateScope("ResolverContractResource.Update"); + scope.Start(); + try + { + var response = await _resolverContractGraphQLApiResolverRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ifMatch, patch, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ResolverContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates the details of the resolver in the GraphQL API specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId} + /// + /// + /// Operation Id + /// GraphQLApiResolver_Update + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// GraphQL API Resolver Update parameters. + /// The cancellation token to use. + /// is null. + public virtual Response Update(ETag ifMatch, ResolverContractPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _resolverContractGraphQLApiResolverClientDiagnostics.CreateScope("ResolverContractResource.Update"); + scope.Start(); + try + { + var response = _resolverContractGraphQLApiResolverRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ifMatch, patch, cancellationToken); + return Response.FromValue(new ResolverContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the entity state (Etag) version of the GraphQL API resolver specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId} + /// + /// + /// Operation Id + /// GraphQLApiResolver_GetEntityTag + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetEntityTagAsync(CancellationToken cancellationToken = default) + { + using var scope = _resolverContractGraphQLApiResolverClientDiagnostics.CreateScope("ResolverContractResource.GetEntityTag"); + scope.Start(); + try + { + var response = await _resolverContractGraphQLApiResolverRestClient.GetEntityTagAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the entity state (Etag) version of the GraphQL API resolver specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId} + /// + /// + /// Operation Id + /// GraphQLApiResolver_GetEntityTag + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response GetEntityTag(CancellationToken cancellationToken = default) + { + using var scope = _resolverContractGraphQLApiResolverClientDiagnostics.CreateScope("ResolverContractResource.GetEntityTag"); + scope.Start(); + try + { + var response = _resolverContractGraphQLApiResolverRestClient.GetEntityTag(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiDiagnosticRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiDiagnosticRestOperations.cs index 60bf61cf7c846..cb93f163c6685 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiDiagnosticRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiDiagnosticRestOperations.cs @@ -32,7 +32,7 @@ public ApiDiagnosticRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -101,8 +101,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists all diagnostics of an API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -135,8 +135,8 @@ public async Task> ListByServiceAsync(string subs } /// Lists all diagnostics of an API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -211,8 +211,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Diagnostic identifier. Must be unique in the current API Management service instance. @@ -247,8 +247,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Diagnostic identifier. Must be unique in the current API Management service instance. @@ -325,8 +325,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the details of the Diagnostic for an API specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Diagnostic identifier. Must be unique in the current API Management service instance. @@ -360,8 +360,8 @@ public async Task> GetAsync(string subscription } /// Gets the details of the Diagnostic for an API specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Diagnostic identifier. Must be unique in the current API Management service instance. @@ -445,8 +445,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates a new Diagnostic for an API or updates an existing one. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Diagnostic identifier. Must be unique in the current API Management service instance. @@ -482,8 +482,8 @@ public async Task> CreateOrUpdateAsync(string s } /// Creates a new Diagnostic for an API or updates an existing one. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Diagnostic identifier. Must be unique in the current API Management service instance. @@ -566,8 +566,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates the details of the Diagnostic for an API specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Diagnostic identifier. Must be unique in the current API Management service instance. @@ -602,8 +602,8 @@ public async Task> UpdateAsync(string subscript } /// Updates the details of the Diagnostic for an API specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Diagnostic identifier. Must be unique in the current API Management service instance. @@ -681,8 +681,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes the specified Diagnostic from an API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Diagnostic identifier. Must be unique in the current API Management service instance. @@ -711,8 +711,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes the specified Diagnostic from an API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Diagnostic identifier. Must be unique in the current API Management service instance. @@ -764,8 +764,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists all diagnostics of an API. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -800,8 +800,8 @@ public async Task> ListByServiceNextPageAsync(str /// Lists all diagnostics of an API. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiIssueAttachmentRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiIssueAttachmentRestOperations.cs index 3a5d2e56cd6bf..2ea4e027d97bd 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiIssueAttachmentRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiIssueAttachmentRestOperations.cs @@ -32,7 +32,7 @@ public ApiIssueAttachmentRestOperations(HttpPipeline pipeline, string applicatio { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -105,8 +105,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists all attachments for the Issue associated with the specified API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -141,8 +141,8 @@ public async Task> ListByServiceAsync(string } /// Lists all attachments for the Issue associated with the specified API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -223,8 +223,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the issue Attachment for an API specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -261,8 +261,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the issue Attachment for an API specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -345,8 +345,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the details of the issue Attachment for an API specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -382,8 +382,8 @@ public async Task> GetAsync(string subscription } /// Gets the details of the issue Attachment for an API specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -473,8 +473,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates a new Attachment for the Issue in an API or updates an existing one. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -512,8 +512,8 @@ public async Task> CreateOrUpdateAsync(string s } /// Creates a new Attachment for the Issue in an API or updates an existing one. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -598,8 +598,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes the specified comment from an Issue. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -630,8 +630,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes the specified comment from an Issue. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -685,8 +685,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists all attachments for the Issue associated with the specified API. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -723,8 +723,8 @@ public async Task> ListByServiceNextPageAsyn /// Lists all attachments for the Issue associated with the specified API. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiIssueCommentRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiIssueCommentRestOperations.cs index b489f436a1690..de6013366fced 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiIssueCommentRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiIssueCommentRestOperations.cs @@ -32,7 +32,7 @@ public ApiIssueCommentRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -105,8 +105,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists all comments for the Issue associated with the specified API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -141,8 +141,8 @@ public async Task> ListByServiceAsync(string su } /// Lists all comments for the Issue associated with the specified API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -223,8 +223,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the issue Comment for an API specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -261,8 +261,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the issue Comment for an API specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -345,8 +345,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the details of the issue Comment for an API specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -382,8 +382,8 @@ public async Task> GetAsync(string subscriptionId, } /// Gets the details of the issue Comment for an API specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -473,8 +473,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates a new Comment for the Issue in an API or updates an existing one. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -512,8 +512,8 @@ public async Task> CreateOrUpdateAsync(string subs } /// Creates a new Comment for the Issue in an API or updates an existing one. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -598,8 +598,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes the specified comment from an Issue. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -630,8 +630,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes the specified comment from an Issue. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -685,8 +685,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists all comments for the Issue associated with the specified API. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -723,8 +723,8 @@ public async Task> ListByServiceNextPageAsync(s /// Lists all comments for the Issue associated with the specified API. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiIssueRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiIssueRestOperations.cs index 086a4c89d123a..20d4418f392e2 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiIssueRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiIssueRestOperations.cs @@ -32,7 +32,7 @@ public ApiIssueRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -109,8 +109,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists all issues associated with the specified API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>. @@ -144,8 +144,8 @@ public async Task> ListByServiceAsync(string subscript } /// Lists all issues associated with the specified API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>. @@ -221,8 +221,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the Issue for an API specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -257,8 +257,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the Issue for an API specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -343,8 +343,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the details of the Issue for an API specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -379,8 +379,8 @@ public async Task> GetAsync(string subscriptionId, s } /// Gets the details of the Issue for an API specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -465,8 +465,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates a new Issue for an API or updates an existing one. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -502,8 +502,8 @@ public async Task> CreateOrUpdateAsync(string subscr } /// Creates a new Issue for an API or updates an existing one. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -586,8 +586,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates an existing issue for an API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -622,8 +622,8 @@ public async Task> UpdateAsync(string subscriptionId } /// Updates an existing issue for an API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -701,8 +701,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes the specified Issue from an API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -731,8 +731,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes the specified Issue from an API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -784,8 +784,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists all issues associated with the specified API. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>. @@ -821,8 +821,8 @@ public async Task> ListByServiceNextPageAsync(string n /// Lists all issues associated with the specified API. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiManagementRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiManagementRestOperations.cs index cec45ee4361d1..ce4780c460ef7 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiManagementRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiManagementRestOperations.cs @@ -31,7 +31,7 @@ public ApiManagementRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -76,8 +76,8 @@ internal HttpMessage CreatePerformConnectivityCheckAsyncRequest(string subscript } /// Performs a connectivity check between the API Management service and a given destination, and returns metrics for the connection, as well as errors encountered while trying to establish it. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Connectivity Check request parameters. /// The cancellation token to use. @@ -103,8 +103,8 @@ public async Task PerformConnectivityCheckAsyncAsync(string subscripti } /// Performs a connectivity check between the API Management service and a given destination, and returns metrics for the connection, as well as errors encountered while trying to establish it. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Connectivity Check request parameters. /// The cancellation token to use. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiManagementServiceRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiManagementServiceRestOperations.cs index 898a3ca2a25c1..5121456a41a21 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiManagementServiceRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiManagementServiceRestOperations.cs @@ -32,7 +32,7 @@ public ApiManagementServiceRestOperations(HttpPipeline pipeline, string applicat { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -77,8 +77,8 @@ internal HttpMessage CreateRestoreRequest(string subscriptionId, string resource } /// Restores a backup of an API Management service created using the ApiManagementService_Backup operation on the current service. This is a long running operation and could take several minutes to complete. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Parameters supplied to the Restore API Management service from backup operation. /// The cancellation token to use. @@ -104,8 +104,8 @@ public async Task RestoreAsync(string subscriptionId, string resourceG } /// Restores a backup of an API Management service created using the ApiManagementService_Backup operation on the current service. This is a long running operation and could take several minutes to complete. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Parameters supplied to the Restore API Management service from backup operation. /// The cancellation token to use. @@ -171,8 +171,8 @@ internal HttpMessage CreateBackupRequest(string subscriptionId, string resourceG } /// Creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Parameters supplied to the ApiManagementService_Backup operation. /// The cancellation token to use. @@ -198,8 +198,8 @@ public async Task BackupAsync(string subscriptionId, string resourceGr } /// Creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Parameters supplied to the ApiManagementService_Backup operation. /// The cancellation token to use. @@ -263,8 +263,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or updates an API Management service. This is long running operation and could take several minutes to complete. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Parameters supplied to the CreateOrUpdate API Management service operation. /// The cancellation token to use. @@ -283,7 +283,6 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re { case 200: case 201: - case 202: return message.Response; default: throw new RequestFailedException(message.Response); @@ -291,8 +290,8 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re } /// Creates or updates an API Management service. This is long running operation and could take several minutes to complete. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Parameters supplied to the CreateOrUpdate API Management service operation. /// The cancellation token to use. @@ -311,7 +310,6 @@ public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, { case 200: case 201: - case 202: return message.Response; default: throw new RequestFailedException(message.Response); @@ -357,8 +355,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates an existing API Management service. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Parameters supplied to the CreateOrUpdate API Management service operation. /// The cancellation token to use. @@ -384,8 +382,8 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr } /// Updates an existing API Management service. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Parameters supplied to the CreateOrUpdate API Management service operation. /// The cancellation token to use. @@ -445,8 +443,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets an API Management service resource description. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -476,8 +474,8 @@ public async Task> GetAsync(string subscripti } /// Gets an API Management service resource description. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -541,8 +539,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes an existing API Management service. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -567,8 +565,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes an existing API Management service. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -592,6 +590,92 @@ public Response Delete(string subscriptionId, string resourceGroupName, string s } } + internal RequestUriBuilder CreateMigrateToStv2RequestUri(string subscriptionId, string resourceGroupName, string serviceName) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/migrateToStv2", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateMigrateToStv2Request(string subscriptionId, string resourceGroupName, string serviceName) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/migrateToStv2", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Upgrades an API Management service to the Stv2 platform. For details refer to https://aka.ms/apim-migrate-stv2. This change is not reversible. This is long running operation and could take several minutes to complete. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task MigrateToStv2Async(string subscriptionId, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateMigrateToStv2Request(subscriptionId, resourceGroupName, serviceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Upgrades an API Management service to the Stv2 platform. For details refer to https://aka.ms/apim-migrate-stv2. This change is not reversible. This is long running operation and could take several minutes to complete. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response MigrateToStv2(string subscriptionId, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateMigrateToStv2Request(subscriptionId, resourceGroupName, serviceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateListByResourceGroupRequestUri(string subscriptionId, string resourceGroupName) { var uri = new RawRequestUriBuilder(); @@ -625,8 +709,8 @@ internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, str } /// List all API Management services within a resource group. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// or is null. /// or is an empty string, and was expected to be non-empty. @@ -652,8 +736,8 @@ public async Task> ListByResourceGroupA } /// List all API Management services within a resource group. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// or is null. /// or is an empty string, and was expected to be non-empty. @@ -707,7 +791,7 @@ internal HttpMessage CreateListRequest(string subscriptionId) } /// Lists all API Management services within an Azure subscription. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The ID of the target subscription. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -732,7 +816,7 @@ public async Task> ListAsync(string sub } /// Lists all API Management services within an Azure subscription. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The ID of the target subscription. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -793,8 +877,8 @@ internal HttpMessage CreateGetSsoTokenRequest(string subscriptionId, string reso } /// Gets the Single-Sign-On token for the API Management Service which is valid for 5 Minutes. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -822,8 +906,8 @@ public async Task> GetSsoTokenAs } /// Gets the Single-Sign-On token for the API Management Service which is valid for 5 Minutes. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -883,7 +967,7 @@ internal HttpMessage CreateCheckNameAvailabilityRequest(string subscriptionId, A } /// Checks availability and correctness of a name for an API Management service. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The ID of the target subscription. /// Parameters supplied to the CheckNameAvailability operation. /// The cancellation token to use. /// or is null. @@ -910,7 +994,7 @@ public async Task> CheckNam } /// Checks availability and correctness of a name for an API Management service. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The ID of the target subscription. /// Parameters supplied to the CheckNameAvailability operation. /// The cancellation token to use. /// or is null. @@ -965,7 +1049,7 @@ internal HttpMessage CreateGetDomainOwnershipIdentifierRequest(string subscripti } /// Get the custom domain ownership identifier for an API Management service. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The ID of the target subscription. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -990,7 +1074,7 @@ public async Task Get the custom domain ownership identifier for an API Management service. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The ID of the target subscription. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -1058,8 +1142,8 @@ internal HttpMessage CreateApplyNetworkConfigurationUpdatesRequest(string subscr } /// Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated DNS changes. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Parameters supplied to the Apply Network Configuration operation. If the parameters are empty, all the regions in which the Api Management service is deployed will be updated sequentially without incurring downtime in the region. /// The cancellation token to use. @@ -1084,8 +1168,8 @@ public async Task ApplyNetworkConfigurationUpdatesAsync(string subscri } /// Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated DNS changes. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Parameters supplied to the Apply Network Configuration operation. If the parameters are empty, all the regions in which the Api Management service is deployed will be updated sequentially without incurring downtime in the region. /// The cancellation token to use. @@ -1133,8 +1217,8 @@ internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, s /// List all API Management services within a resource group. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// , or is null. /// or is an empty string, and was expected to be non-empty. @@ -1162,8 +1246,8 @@ public async Task> ListByResourceGroupN /// List all API Management services within a resource group. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// , or is null. /// or is an empty string, and was expected to be non-empty. @@ -1213,7 +1297,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// Lists all API Management services within an Azure subscription. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The ID of the target subscription. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. @@ -1240,7 +1324,7 @@ public async Task> ListNextPageAsync(st /// Lists all API Management services within an Azure subscription. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The ID of the target subscription. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiManagementServiceSkusRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiManagementServiceSkusRestOperations.cs index 1fffe92099b07..64c9e6d67e778 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiManagementServiceSkusRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiManagementServiceSkusRestOperations.cs @@ -32,7 +32,7 @@ public ApiManagementServiceSkusRestOperations(HttpPipeline pipeline, string appl { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -73,8 +73,8 @@ internal HttpMessage CreateListAvailableServiceSkusRequest(string subscriptionId } /// Gets all available SKU for a given API Management service. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -102,8 +102,8 @@ public async Task> ListAvailableServiceSkusAsync(st } /// Gets all available SKU for a given API Management service. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -154,8 +154,8 @@ internal HttpMessage CreateListAvailableServiceSkusNextPageRequest(string nextLi /// Gets all available SKU for a given API Management service. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , , or is null. @@ -185,8 +185,8 @@ public async Task> ListAvailableServiceSkusNextPage /// Gets all available SKU for a given API Management service. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , , or is null. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiManagementSkusRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiManagementSkusRestOperations.cs index c49e67fb208f0..8d7f02f71214d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiManagementSkusRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiManagementSkusRestOperations.cs @@ -32,7 +32,7 @@ public ApiManagementSkusRestOperations(HttpPipeline pipeline, string application { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -65,7 +65,7 @@ internal HttpMessage CreateListRequest(string subscriptionId) } /// Gets the list of Microsoft.ApiManagement SKUs available for your Subscription. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The ID of the target subscription. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -90,7 +90,7 @@ public async Task> ListAsync(string subscripti } /// Gets the list of Microsoft.ApiManagement SKUs available for your Subscription. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The ID of the target subscription. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -138,7 +138,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// Gets the list of Microsoft.ApiManagement SKUs available for your Subscription. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The ID of the target subscription. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. @@ -165,7 +165,7 @@ public async Task> ListNextPageAsync(string ne /// Gets the list of Microsoft.ApiManagement SKUs available for your Subscription. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The ID of the target subscription. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiOperationPolicyRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiOperationPolicyRestOperations.cs index c4d344e1eedfc..02ecde0b61119 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiOperationPolicyRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiOperationPolicyRestOperations.cs @@ -32,7 +32,7 @@ public ApiOperationPolicyRestOperations(HttpPipeline pipeline, string applicatio { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -81,8 +81,8 @@ internal HttpMessage CreateListByOperationRequest(string subscriptionId, string } /// Get the list of policy configuration at the API Operation level. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -114,8 +114,8 @@ public async Task> ListByOperationAsync(string subscr } /// Get the list of policy configuration at the API Operation level. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -193,8 +193,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the API operation policy specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -230,8 +230,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the API operation policy specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -321,8 +321,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Get the policy configuration at the API Operation level. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -358,8 +358,8 @@ public async Task> GetAsync(string subscriptionId, } /// Get the policy configuration at the API Operation level. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -449,8 +449,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or updates policy configuration for the API Operation level. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -487,8 +487,8 @@ public async Task> CreateOrUpdateAsync(string subsc } /// Creates or updates policy configuration for the API Operation level. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -572,8 +572,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes the policy configuration at the Api Operation. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -603,8 +603,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes the policy configuration at the Api Operation. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiOperationRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiOperationRestOperations.cs index e3c93e560f7e7..5eac2266ba8ea 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiOperationRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiOperationRestOperations.cs @@ -32,7 +32,7 @@ public ApiOperationRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -109,8 +109,8 @@ internal HttpMessage CreateListByApiRequest(string subscriptionId, string resour } /// Lists a collection of the operations for the specified API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -144,8 +144,8 @@ public async Task> ListByApiAsync(string subscript } /// Lists a collection of the operations for the specified API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -221,8 +221,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the API operation specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -257,8 +257,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the API operation specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -335,8 +335,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the details of the API Operation specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -370,8 +370,8 @@ public async Task> GetAsync(string subscriptionId, st } /// Gets the details of the API Operation specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -455,8 +455,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates a new operation in the API or updates an existing one. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -492,8 +492,8 @@ public async Task> CreateOrUpdateAsync(string subscri } /// Creates a new operation in the API or updates an existing one. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -576,8 +576,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates the details of the operation in the API specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -612,8 +612,8 @@ public async Task> UpdateAsync(string subscriptionId, } /// Updates the details of the operation in the API specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -691,8 +691,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes the specified operation in the API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -721,8 +721,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes the specified operation in the API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -774,8 +774,8 @@ internal HttpMessage CreateListByApiNextPageRequest(string nextLink, string subs /// Lists a collection of the operations for the specified API. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -811,8 +811,8 @@ public async Task> ListByApiNextPageAsync(string n /// Lists a collection of the operations for the specified API. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiPolicyRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiPolicyRestOperations.cs index 99a251a97cff2..effe0e1e716bb 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiPolicyRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiPolicyRestOperations.cs @@ -32,7 +32,7 @@ public ApiPolicyRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -77,8 +77,8 @@ internal HttpMessage CreateListByApiRequest(string subscriptionId, string resour } /// Get the policy configuration at the API level. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// The cancellation token to use. @@ -108,8 +108,8 @@ public async Task> ListByApiAsync(string subscription } /// Get the policy configuration at the API level. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// The cancellation token to use. @@ -181,8 +181,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the API policy specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// The identifier of the Policy. @@ -216,8 +216,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the API policy specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// The identifier of the Policy. @@ -301,8 +301,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Get the policy configuration at the API level. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// The identifier of the Policy. @@ -336,8 +336,8 @@ public async Task> GetAsync(string subscriptionId, } /// Get the policy configuration at the API level. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// The identifier of the Policy. @@ -421,8 +421,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or updates policy configuration for the API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// The identifier of the Policy. @@ -457,8 +457,8 @@ public async Task> CreateOrUpdateAsync(string subsc } /// Creates or updates policy configuration for the API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// The identifier of the Policy. @@ -536,8 +536,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes the policy configuration at the Api. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// The identifier of the Policy. @@ -565,8 +565,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes the policy configuration at the Api. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// The identifier of the Policy. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiProductRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiProductRestOperations.cs index d2ac49b773b06..60aa0557a4d1a 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiProductRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiProductRestOperations.cs @@ -32,7 +32,7 @@ public ApiProductRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -101,8 +101,8 @@ internal HttpMessage CreateListByApisRequest(string subscriptionId, string resou } /// Lists all Products, which the API is part of. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -135,8 +135,8 @@ public async Task> ListByApisAsync(string subscripti } /// Lists all Products, which the API is part of. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -192,8 +192,8 @@ internal HttpMessage CreateListByApisNextPageRequest(string nextLink, string sub /// Lists all Products, which the API is part of. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -228,8 +228,8 @@ public async Task> ListByApisNextPageAsync(string ne /// Lists all Products, which the API is part of. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiReleaseRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiReleaseRestOperations.cs index 318ce6ab906a8..e42105df4785e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiReleaseRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiReleaseRestOperations.cs @@ -32,7 +32,7 @@ public ApiReleaseRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -101,8 +101,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip parameters. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| notes | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -135,8 +135,8 @@ public async Task> ListByServiceAsync(string subs } /// Lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip parameters. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| notes | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -211,8 +211,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Returns the etag of an API release. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Release identifier within an API. Must be unique in the current API Management service instance. @@ -247,8 +247,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Returns the etag of an API release. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Release identifier within an API. Must be unique in the current API Management service instance. @@ -325,8 +325,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Returns the details of an API release. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Release identifier within an API. Must be unique in the current API Management service instance. @@ -360,8 +360,8 @@ public async Task> GetAsync(string subscriptionId, stri } /// Returns the details of an API release. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Release identifier within an API. Must be unique in the current API Management service instance. @@ -445,8 +445,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates a new Release for the API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Release identifier within an API. Must be unique in the current API Management service instance. @@ -482,8 +482,8 @@ public async Task> CreateOrUpdateAsync(string subscript } /// Creates a new Release for the API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Release identifier within an API. Must be unique in the current API Management service instance. @@ -566,8 +566,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates the details of the release of the API specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Release identifier within an API. Must be unique in the current API Management service instance. @@ -602,8 +602,8 @@ public async Task> UpdateAsync(string subscriptionId, s } /// Updates the details of the release of the API specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Release identifier within an API. Must be unique in the current API Management service instance. @@ -681,8 +681,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes the specified release in the API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Release identifier within an API. Must be unique in the current API Management service instance. @@ -711,8 +711,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes the specified release in the API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Release identifier within an API. Must be unique in the current API Management service instance. @@ -764,8 +764,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip parameters. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| notes | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -800,8 +800,8 @@ public async Task> ListByServiceNextPageAsync(str /// Lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip parameters. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| notes | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiRestOperations.cs index 2468a767f429b..660aa36a1a7a7 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiRestOperations.cs @@ -32,7 +32,7 @@ public ApiRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoi { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -113,8 +113,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists all APIs of the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| isCurrent | filter | eq, ne | |</br>. /// Number of records to return. @@ -147,8 +147,8 @@ public async Task> ListByServiceAsync(string subscriptio } /// Lists all APIs of the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| isCurrent | filter | eq, ne | |</br>. /// Number of records to return. @@ -219,8 +219,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the API specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// The cancellation token to use. @@ -253,8 +253,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the API specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// The cancellation token to use. @@ -325,8 +325,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the details of the API specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// The cancellation token to use. @@ -358,8 +358,8 @@ public async Task> GetAsync(string subscriptionId, string reso } /// Gets the details of the API specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// The cancellation token to use. @@ -437,8 +437,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates new or updates existing specified API of the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Create or update parameters. @@ -468,8 +468,8 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re } /// Creates new or updates existing specified API of the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Create or update parameters. @@ -542,8 +542,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates the specified API of the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -576,8 +576,8 @@ public async Task> UpdateAsync(string subscriptionId, string r } /// Updates the specified API of the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -657,8 +657,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes the specified API of the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -686,8 +686,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes the specified API of the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -783,8 +783,8 @@ internal HttpMessage CreateListByTagsRequest(string subscriptionId, string resou } /// Lists a collection of apis associated with tags. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| isCurrent | filter | eq | |</br>. /// Number of records to return. @@ -816,8 +816,8 @@ public async Task> ListByTagsAsync(string subscr } /// Lists a collection of apis associated with tags. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| isCurrent | filter | eq | |</br>. /// Number of records to return. @@ -872,8 +872,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists all APIs of the API Management service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| isCurrent | filter | eq, ne | |</br>. /// Number of records to return. @@ -908,8 +908,8 @@ public async Task> ListByServiceNextPageAsync(string nex /// Lists all APIs of the API Management service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| isCurrent | filter | eq, ne | |</br>. /// Number of records to return. @@ -966,8 +966,8 @@ internal HttpMessage CreateListByTagsNextPageRequest(string nextLink, string sub /// Lists a collection of apis associated with tags. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| isCurrent | filter | eq | |</br>. /// Number of records to return. @@ -1001,8 +1001,8 @@ public async Task> ListByTagsNextPageAsync(strin /// Lists a collection of apis associated with tags. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| isCurrent | filter | eq | |</br>. /// Number of records to return. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiRevisionRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiRevisionRestOperations.cs index d9465017dea76..af06d27cc425e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiRevisionRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiRevisionRestOperations.cs @@ -32,7 +32,7 @@ public ApiRevisionRestOperations(HttpPipeline pipeline, string applicationId, Ur { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -101,8 +101,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists all revisions of an API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -135,8 +135,8 @@ public async Task> ListByServiceAsync(string sub } /// Lists all revisions of an API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -192,8 +192,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists all revisions of an API. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -228,8 +228,8 @@ public async Task> ListByServiceNextPageAsync(st /// Lists all revisions of an API. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiSchemaRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiSchemaRestOperations.cs index 39e9291ec22cd..935304f1aa75b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiSchemaRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiSchemaRestOperations.cs @@ -32,7 +32,7 @@ public ApiSchemaRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -101,8 +101,8 @@ internal HttpMessage CreateListByApiRequest(string subscriptionId, string resour } /// Get the schema configuration at the API level. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| contentType | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -135,8 +135,8 @@ public async Task> ListByApiAsync(string subscription } /// Get the schema configuration at the API level. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| contentType | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -211,8 +211,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the schema specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Schema id identifier. Must be unique in the current API Management service instance. @@ -247,8 +247,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the schema specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Schema id identifier. Must be unique in the current API Management service instance. @@ -325,8 +325,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Get the schema configuration at the API level. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Schema id identifier. Must be unique in the current API Management service instance. @@ -360,8 +360,8 @@ public async Task> GetAsync(string subscriptionId, strin } /// Get the schema configuration at the API level. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Schema id identifier. Must be unique in the current API Management service instance. @@ -445,8 +445,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or updates schema configuration for the API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Schema id identifier. Must be unique in the current API Management service instance. @@ -478,8 +478,8 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re } /// Creates or updates schema configuration for the API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Schema id identifier. Must be unique in the current API Management service instance. @@ -562,8 +562,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes the schema configuration at the Api. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Schema id identifier. Must be unique in the current API Management service instance. @@ -593,8 +593,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes the schema configuration at the Api. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Schema id identifier. Must be unique in the current API Management service instance. @@ -647,8 +647,8 @@ internal HttpMessage CreateListByApiNextPageRequest(string nextLink, string subs /// Get the schema configuration at the API level. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| contentType | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -683,8 +683,8 @@ public async Task> ListByApiNextPageAsync(string next /// Get the schema configuration at the API level. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| contentType | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiTagDescriptionRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiTagDescriptionRestOperations.cs index 867235e58c5c1..37d0e31590ddd 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiTagDescriptionRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiTagDescriptionRestOperations.cs @@ -32,7 +32,7 @@ public ApiTagDescriptionRestOperations(HttpPipeline pipeline, string application { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -101,8 +101,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is defined on API level but tag may be assigned to the Operations. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -135,8 +135,8 @@ public async Task> ListByServiceAsync(string } /// Lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is defined on API level but tag may be assigned to the Operations. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -211,8 +211,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state version of the tag specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Tag description identifier. Used when creating tagDescription for API/Tag association. Based on API and Tag names. @@ -247,8 +247,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state version of the tag specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Tag description identifier. Used when creating tagDescription for API/Tag association. Based on API and Tag names. @@ -325,8 +325,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Get Tag description in scope of API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Tag description identifier. Used when creating tagDescription for API/Tag association. Based on API and Tag names. @@ -360,8 +360,8 @@ public async Task> GetAsync(string subscriptionI } /// Get Tag description in scope of API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Tag description identifier. Used when creating tagDescription for API/Tag association. Based on API and Tag names. @@ -445,8 +445,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Create/Update tag description in scope of the Api. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Tag description identifier. Used when creating tagDescription for API/Tag association. Based on API and Tag names. @@ -482,8 +482,8 @@ public async Task> CreateOrUpdateAsync(string su } /// Create/Update tag description in scope of the Api. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Tag description identifier. Used when creating tagDescription for API/Tag association. Based on API and Tag names. @@ -562,8 +562,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Delete tag description for the Api. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Tag description identifier. Used when creating tagDescription for API/Tag association. Based on API and Tag names. @@ -592,8 +592,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Delete tag description for the Api. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Tag description identifier. Used when creating tagDescription for API/Tag association. Based on API and Tag names. @@ -645,8 +645,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is defined on API level but tag may be assigned to the Operations. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -681,8 +681,8 @@ public async Task> ListByServiceNextPageAsync /// Lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is defined on API level but tag may be assigned to the Operations. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiVersionSetRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiVersionSetRestOperations.cs index 5f6844a06a025..2b9c3fbee7b00 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiVersionSetRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiVersionSetRestOperations.cs @@ -32,7 +32,7 @@ public ApiVersionSetRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -97,8 +97,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists a collection of API Version Sets in the specified service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>. /// Number of records to return. @@ -129,8 +129,8 @@ public async Task> ListByServiceAsync(string s } /// Lists a collection of API Version Sets in the specified service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>. /// Number of records to return. @@ -199,8 +199,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the Api Version Set specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Api Version Set identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -233,8 +233,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the Api Version Set specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Api Version Set identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -305,8 +305,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the details of the Api Version Set specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Api Version Set identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -338,8 +338,8 @@ public async Task> GetAsync(string subscriptionId, s } /// Gets the details of the Api Version Set specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Api Version Set identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -417,8 +417,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or Updates a Api Version Set. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Api Version Set identifier. Must be unique in the current API Management service instance. /// Create or update parameters. @@ -452,8 +452,8 @@ public async Task> CreateOrUpdateAsync(string subscr } /// Creates or Updates a Api Version Set. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Api Version Set identifier. Must be unique in the current API Management service instance. /// Create or update parameters. @@ -530,8 +530,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates the details of the Api VersionSet specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Api Version Set identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -564,8 +564,8 @@ public async Task> UpdateAsync(string subscriptionId } /// Updates the details of the Api VersionSet specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Api Version Set identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -637,8 +637,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes specific Api Version Set. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Api Version Set identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -665,8 +665,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes specific Api Version Set. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Api Version Set identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -716,8 +716,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists a collection of API Version Sets in the specified service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>. /// Number of records to return. @@ -750,8 +750,8 @@ public async Task> ListByServiceNextPageAsync( /// Lists a collection of API Version Sets in the specified service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>. /// Number of records to return. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiWikiRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiWikiRestOperations.cs new file mode 100644 index 0000000000000..0730a066226cf --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiWikiRestOperations.cs @@ -0,0 +1,581 @@ +// 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.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + internal partial class ApiWikiRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ApiWikiRestOperations. + /// 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 ApiWikiRestOperations(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 ?? "2022-08-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetEntityTagRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string apiId) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/wikis/default", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string resourceGroupName, string serviceName, string apiId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Head; + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/wikis/default", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the entity state (Etag) version of the Wiki for an API specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API identifier. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetEntityTagAsync(string subscriptionId, string resourceGroupName, string serviceName, string apiId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + + using var message = CreateGetEntityTagRequest(subscriptionId, resourceGroupName, serviceName, apiId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case int s when s >= 200 && s < 300: + { + bool value = true; + return Response.FromValue(value, message.Response); + } + case int s when s >= 400 && s < 500: + { + bool value = false; + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the entity state (Etag) version of the Wiki for an API specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API identifier. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetEntityTag(string subscriptionId, string resourceGroupName, string serviceName, string apiId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + + using var message = CreateGetEntityTagRequest(subscriptionId, resourceGroupName, serviceName, apiId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case int s when s >= 200 && s < 300: + { + bool value = true; + return Response.FromValue(value, message.Response); + } + case int s when s >= 400 && s < 500: + { + bool value = false; + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string apiId) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/wikis/default", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serviceName, string apiId) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/wikis/default", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the details of the Wiki for an API specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API identifier. Must be unique in the current API Management service instance. + /// 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 serviceName, string apiId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, apiId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WikiContractData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WikiContractData.DeserializeWikiContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((WikiContractData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the details of the Wiki for an API specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API identifier. Must be unique in the current API Management service instance. + /// 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 serviceName, string apiId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, apiId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WikiContractData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WikiContractData.DeserializeWikiContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((WikiContractData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string apiId, WikiContractData data, ETag? ifMatch) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/wikis/default", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string apiId, WikiContractData data, ETag? ifMatch) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/wikis/default", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + if (ifMatch != null) + { + request.Headers.Add("If-Match", ifMatch.Value); + } + 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 a new Wiki for an API or updates an existing one. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API identifier. Must be unique in the current API Management service instance. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string serviceName, string apiId, WikiContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, apiId, data, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + { + WikiContractData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WikiContractData.DeserializeWikiContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates a new Wiki for an API or updates an existing one. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API identifier. Must be unique in the current API Management service instance. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string serviceName, string apiId, WikiContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, apiId, data, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + { + WikiContractData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WikiContractData.DeserializeWikiContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string apiId, ETag ifMatch, WikiUpdateContract wikiUpdateContract) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/wikis/default", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string apiId, ETag ifMatch, WikiUpdateContract wikiUpdateContract) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/wikis/default", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("If-Match", ifMatch); + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(wikiUpdateContract, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Updates the details of the Wiki for an API specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API identifier. Must be unique in the current API Management service instance. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// Wiki Update parameters. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> UpdateAsync(string subscriptionId, string resourceGroupName, string serviceName, string apiId, ETag ifMatch, WikiUpdateContract wikiUpdateContract, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNull(wikiUpdateContract, nameof(wikiUpdateContract)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, serviceName, apiId, ifMatch, wikiUpdateContract); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WikiContractData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WikiContractData.DeserializeWikiContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Updates the details of the Wiki for an API specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API identifier. Must be unique in the current API Management service instance. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// Wiki Update parameters. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string serviceName, string apiId, ETag ifMatch, WikiUpdateContract wikiUpdateContract, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNull(wikiUpdateContract, nameof(wikiUpdateContract)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, serviceName, apiId, ifMatch, wikiUpdateContract); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WikiContractData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WikiContractData.DeserializeWikiContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string apiId, ETag ifMatch) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/wikis/default", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string serviceName, string apiId, ETag ifMatch) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/wikis/default", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("If-Match", ifMatch); + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Deletes the specified Wiki from an API. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API identifier. Must be unique in the current API Management service instance. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string serviceName, string apiId, ETag ifMatch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, apiId, ifMatch); + 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 the specified Wiki from an API. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API identifier. Must be unique in the current API Management service instance. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string serviceName, string apiId, ETag ifMatch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, apiId, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/AuthorizationAccessPolicyRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/AuthorizationAccessPolicyRestOperations.cs new file mode 100644 index 0000000000000..cf0dc36dbc14b --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/AuthorizationAccessPolicyRestOperations.cs @@ -0,0 +1,640 @@ +// 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.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + internal partial class AuthorizationAccessPolicyRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of AuthorizationAccessPolicyRestOperations. + /// 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 AuthorizationAccessPolicyRestOperations(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 ?? "2022-08-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListByAuthorizationRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, string filter, int? top, int? skip) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/authorizationProviders/", false); + uri.AppendPath(authorizationProviderId, true); + uri.AppendPath("/authorizations/", false); + uri.AppendPath(authorizationId, true); + uri.AppendPath("/accessPolicies", false); + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + if (skip != null) + { + uri.AppendQuery("$skip", skip.Value, true); + } + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByAuthorizationRequest(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, string filter, int? top, int? skip) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/authorizationProviders/", false); + uri.AppendPath(authorizationProviderId, true); + uri.AppendPath("/authorizations/", false); + uri.AppendPath(authorizationId, true); + uri.AppendPath("/accessPolicies", false); + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + if (skip != null) + { + uri.AppendQuery("$skip", skip.Value, true); + } + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists a collection of authorization access policy defined within a authorization. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// Identifier of the authorization. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> ListByAuthorizationAsync(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + + using var message = CreateListByAuthorizationRequest(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId, filter, top, skip); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AuthorizationAccessPolicyListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AuthorizationAccessPolicyListResult.DeserializeAuthorizationAccessPolicyListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists a collection of authorization access policy defined within a authorization. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// Identifier of the authorization. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response ListByAuthorization(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + + using var message = CreateListByAuthorizationRequest(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId, filter, top, skip); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AuthorizationAccessPolicyListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AuthorizationAccessPolicyListResult.DeserializeAuthorizationAccessPolicyListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, string authorizationAccessPolicyId) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/authorizationProviders/", false); + uri.AppendPath(authorizationProviderId, true); + uri.AppendPath("/authorizations/", false); + uri.AppendPath(authorizationId, true); + uri.AppendPath("/accessPolicies/", false); + uri.AppendPath(authorizationAccessPolicyId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, string authorizationAccessPolicyId) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/authorizationProviders/", false); + uri.AppendPath(authorizationProviderId, true); + uri.AppendPath("/authorizations/", false); + uri.AppendPath(authorizationId, true); + uri.AppendPath("/accessPolicies/", false); + uri.AppendPath(authorizationAccessPolicyId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the details of the authorization access policy specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// Identifier of the authorization. + /// Identifier of the authorization access policy. + /// 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 serviceName, string authorizationProviderId, string authorizationId, string authorizationAccessPolicyId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + Argument.AssertNotNullOrEmpty(authorizationAccessPolicyId, nameof(authorizationAccessPolicyId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId, authorizationAccessPolicyId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AuthorizationAccessPolicyContractData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AuthorizationAccessPolicyContractData.DeserializeAuthorizationAccessPolicyContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((AuthorizationAccessPolicyContractData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the details of the authorization access policy specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// Identifier of the authorization. + /// Identifier of the authorization access policy. + /// 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 serviceName, string authorizationProviderId, string authorizationId, string authorizationAccessPolicyId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + Argument.AssertNotNullOrEmpty(authorizationAccessPolicyId, nameof(authorizationAccessPolicyId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId, authorizationAccessPolicyId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AuthorizationAccessPolicyContractData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AuthorizationAccessPolicyContractData.DeserializeAuthorizationAccessPolicyContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((AuthorizationAccessPolicyContractData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, string authorizationAccessPolicyId, AuthorizationAccessPolicyContractData data, ETag? ifMatch) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/authorizationProviders/", false); + uri.AppendPath(authorizationProviderId, true); + uri.AppendPath("/authorizations/", false); + uri.AppendPath(authorizationId, true); + uri.AppendPath("/accessPolicies/", false); + uri.AppendPath(authorizationAccessPolicyId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, string authorizationAccessPolicyId, AuthorizationAccessPolicyContractData data, ETag? ifMatch) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/authorizationProviders/", false); + uri.AppendPath(authorizationProviderId, true); + uri.AppendPath("/authorizations/", false); + uri.AppendPath(authorizationId, true); + uri.AppendPath("/accessPolicies/", false); + uri.AppendPath(authorizationAccessPolicyId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + if (ifMatch != null) + { + request.Headers.Add("If-Match", ifMatch.Value); + } + 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 Authorization Access Policy. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// Identifier of the authorization. + /// Identifier of the authorization access policy. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, string authorizationAccessPolicyId, AuthorizationAccessPolicyContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + Argument.AssertNotNullOrEmpty(authorizationAccessPolicyId, nameof(authorizationAccessPolicyId)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId, authorizationAccessPolicyId, data, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + { + AuthorizationAccessPolicyContractData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AuthorizationAccessPolicyContractData.DeserializeAuthorizationAccessPolicyContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates or updates Authorization Access Policy. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// Identifier of the authorization. + /// Identifier of the authorization access policy. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, string authorizationAccessPolicyId, AuthorizationAccessPolicyContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + Argument.AssertNotNullOrEmpty(authorizationAccessPolicyId, nameof(authorizationAccessPolicyId)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId, authorizationAccessPolicyId, data, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + { + AuthorizationAccessPolicyContractData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AuthorizationAccessPolicyContractData.DeserializeAuthorizationAccessPolicyContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, string authorizationAccessPolicyId, ETag ifMatch) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/authorizationProviders/", false); + uri.AppendPath(authorizationProviderId, true); + uri.AppendPath("/authorizations/", false); + uri.AppendPath(authorizationId, true); + uri.AppendPath("/accessPolicies/", false); + uri.AppendPath(authorizationAccessPolicyId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, string authorizationAccessPolicyId, ETag ifMatch) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/authorizationProviders/", false); + uri.AppendPath(authorizationProviderId, true); + uri.AppendPath("/authorizations/", false); + uri.AppendPath(authorizationId, true); + uri.AppendPath("/accessPolicies/", false); + uri.AppendPath(authorizationAccessPolicyId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("If-Match", ifMatch); + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Deletes specific access policy from the Authorization. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// Identifier of the authorization. + /// Identifier of the authorization access policy. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, string authorizationAccessPolicyId, ETag ifMatch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + Argument.AssertNotNullOrEmpty(authorizationAccessPolicyId, nameof(authorizationAccessPolicyId)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId, authorizationAccessPolicyId, ifMatch); + 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 specific access policy from the Authorization. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// Identifier of the authorization. + /// Identifier of the authorization access policy. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, string authorizationAccessPolicyId, ETag ifMatch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + Argument.AssertNotNullOrEmpty(authorizationAccessPolicyId, nameof(authorizationAccessPolicyId)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId, authorizationAccessPolicyId, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByAuthorizationNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, string filter, int? top, int? skip) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByAuthorizationNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, string filter, int? top, int? skip) + { + 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 collection of authorization access policy defined within a authorization. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// Identifier of the authorization. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> ListByAuthorizationNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + + using var message = CreateListByAuthorizationNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId, filter, top, skip); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AuthorizationAccessPolicyListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AuthorizationAccessPolicyListResult.DeserializeAuthorizationAccessPolicyListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists a collection of authorization access policy defined within a authorization. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// Identifier of the authorization. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response ListByAuthorizationNextPage(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + + using var message = CreateListByAuthorizationNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId, filter, top, skip); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AuthorizationAccessPolicyListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AuthorizationAccessPolicyListResult.DeserializeAuthorizationAccessPolicyListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/AuthorizationLoginLinksRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/AuthorizationLoginLinksRestOperations.cs new file mode 100644 index 0000000000000..bbb4b352742ef --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/AuthorizationLoginLinksRestOperations.cs @@ -0,0 +1,157 @@ +// 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.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + internal partial class AuthorizationLoginLinksRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of AuthorizationLoginLinksRestOperations. + /// 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 AuthorizationLoginLinksRestOperations(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 ?? "2022-08-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreatePostRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, AuthorizationLoginContent 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/authorizationProviders/", false); + uri.AppendPath(authorizationProviderId, true); + uri.AppendPath("/authorizations/", false); + uri.AppendPath(authorizationId, true); + uri.AppendPath("/getLoginLinks", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreatePostRequest(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, AuthorizationLoginContent 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/authorizationProviders/", false); + uri.AppendPath(authorizationProviderId, true); + uri.AppendPath("/authorizations/", false); + uri.AppendPath(authorizationId, true); + uri.AppendPath("/getLoginLinks", 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; + } + + /// Gets authorization login links. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// Identifier of the authorization. + /// Create parameters. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> PostAsync(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, AuthorizationLoginContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreatePostRequest(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AuthorizationLoginResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AuthorizationLoginResult.DeserializeAuthorizationLoginResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets authorization login links. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// Identifier of the authorization. + /// Create parameters. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Post(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, AuthorizationLoginContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreatePostRequest(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AuthorizationLoginResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AuthorizationLoginResult.DeserializeAuthorizationLoginResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/AuthorizationProviderRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/AuthorizationProviderRestOperations.cs new file mode 100644 index 0000000000000..ce1c7b7f1f2d0 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/AuthorizationProviderRestOperations.cs @@ -0,0 +1,568 @@ +// 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.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + internal partial class AuthorizationProviderRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of AuthorizationProviderRestOperations. + /// 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 AuthorizationProviderRestOperations(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 ?? "2022-08-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListByServiceRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string filter, int? top, int? skip) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/authorizationProviders", false); + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + if (skip != null) + { + uri.AppendQuery("$skip", skip.Value, true); + } + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByServiceRequest(string subscriptionId, string resourceGroupName, string serviceName, string filter, int? top, int? skip) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/authorizationProviders", false); + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + if (skip != null) + { + uri.AppendQuery("$skip", skip.Value, true); + } + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists a collection of authorization providers defined within a service instance. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByServiceAsync(string subscriptionId, string resourceGroupName, string serviceName, string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateListByServiceRequest(subscriptionId, resourceGroupName, serviceName, filter, top, skip); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AuthorizationProviderListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AuthorizationProviderListResult.DeserializeAuthorizationProviderListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists a collection of authorization providers defined within a service instance. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByService(string subscriptionId, string resourceGroupName, string serviceName, string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateListByServiceRequest(subscriptionId, resourceGroupName, serviceName, filter, top, skip); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AuthorizationProviderListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AuthorizationProviderListResult.DeserializeAuthorizationProviderListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/authorizationProviders/", false); + uri.AppendPath(authorizationProviderId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/authorizationProviders/", false); + uri.AppendPath(authorizationProviderId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the details of the authorization provider specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// 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 serviceName, string authorizationProviderId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, authorizationProviderId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AuthorizationProviderContractData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AuthorizationProviderContractData.DeserializeAuthorizationProviderContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((AuthorizationProviderContractData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the details of the authorization provider specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// 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 serviceName, string authorizationProviderId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, authorizationProviderId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AuthorizationProviderContractData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AuthorizationProviderContractData.DeserializeAuthorizationProviderContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((AuthorizationProviderContractData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, AuthorizationProviderContractData data, ETag? ifMatch) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/authorizationProviders/", false); + uri.AppendPath(authorizationProviderId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, AuthorizationProviderContractData data, ETag? ifMatch) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/authorizationProviders/", false); + uri.AppendPath(authorizationProviderId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + if (ifMatch != null) + { + request.Headers.Add("If-Match", ifMatch.Value); + } + 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 authorization provider. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, AuthorizationProviderContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, data, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + { + AuthorizationProviderContractData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AuthorizationProviderContractData.DeserializeAuthorizationProviderContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates or updates authorization provider. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, AuthorizationProviderContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, data, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + { + AuthorizationProviderContractData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AuthorizationProviderContractData.DeserializeAuthorizationProviderContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, ETag ifMatch) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/authorizationProviders/", false); + uri.AppendPath(authorizationProviderId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, ETag ifMatch) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/authorizationProviders/", false); + uri.AppendPath(authorizationProviderId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("If-Match", ifMatch); + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Deletes specific authorization provider from the API Management service instance. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, ETag ifMatch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, ifMatch); + 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 specific authorization provider from the API Management service instance. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, ETag ifMatch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByServiceNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string filter, int? top, int? skip) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string filter, int? top, int? skip) + { + 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 collection of authorization providers defined within a service instance. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByServiceNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateListByServiceNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName, filter, top, skip); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AuthorizationProviderListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AuthorizationProviderListResult.DeserializeAuthorizationProviderListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists a collection of authorization providers defined within a service instance. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByServiceNextPage(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateListByServiceNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName, filter, top, skip); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AuthorizationProviderListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AuthorizationProviderListResult.DeserializeAuthorizationProviderListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/AuthorizationRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/AuthorizationRestOperations.cs new file mode 100644 index 0000000000000..112abd0c0689f --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/AuthorizationRestOperations.cs @@ -0,0 +1,712 @@ +// 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.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + internal partial class AuthorizationRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of AuthorizationRestOperations. + /// 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 AuthorizationRestOperations(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 ?? "2022-08-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListByAuthorizationProviderRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string filter, int? top, int? skip) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/authorizationProviders/", false); + uri.AppendPath(authorizationProviderId, true); + uri.AppendPath("/authorizations", false); + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + if (skip != null) + { + uri.AppendQuery("$skip", skip.Value, true); + } + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByAuthorizationProviderRequest(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string filter, int? top, int? skip) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/authorizationProviders/", false); + uri.AppendPath(authorizationProviderId, true); + uri.AppendPath("/authorizations", false); + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + if (skip != null) + { + uri.AppendQuery("$skip", skip.Value, true); + } + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists a collection of authorization providers defined within a authorization provider. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListByAuthorizationProviderAsync(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + + using var message = CreateListByAuthorizationProviderRequest(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, filter, top, skip); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AuthorizationListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AuthorizationListResult.DeserializeAuthorizationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists a collection of authorization providers defined within a authorization provider. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListByAuthorizationProvider(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + + using var message = CreateListByAuthorizationProviderRequest(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, filter, top, skip); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AuthorizationListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AuthorizationListResult.DeserializeAuthorizationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/authorizationProviders/", false); + uri.AppendPath(authorizationProviderId, true); + uri.AppendPath("/authorizations/", false); + uri.AppendPath(authorizationId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/authorizationProviders/", false); + uri.AppendPath(authorizationProviderId, true); + uri.AppendPath("/authorizations/", false); + uri.AppendPath(authorizationId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the details of the authorization specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// Identifier of the authorization. + /// 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 serviceName, string authorizationProviderId, string authorizationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AuthorizationContractData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AuthorizationContractData.DeserializeAuthorizationContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((AuthorizationContractData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the details of the authorization specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// Identifier of the authorization. + /// 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 serviceName, string authorizationProviderId, string authorizationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AuthorizationContractData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AuthorizationContractData.DeserializeAuthorizationContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((AuthorizationContractData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, AuthorizationContractData data, ETag? ifMatch) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/authorizationProviders/", false); + uri.AppendPath(authorizationProviderId, true); + uri.AppendPath("/authorizations/", false); + uri.AppendPath(authorizationId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, AuthorizationContractData data, ETag? ifMatch) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/authorizationProviders/", false); + uri.AppendPath(authorizationProviderId, true); + uri.AppendPath("/authorizations/", false); + uri.AppendPath(authorizationId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + if (ifMatch != null) + { + request.Headers.Add("If-Match", ifMatch.Value); + } + 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 authorization. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// Identifier of the authorization. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, AuthorizationContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId, data, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + { + AuthorizationContractData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AuthorizationContractData.DeserializeAuthorizationContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates or updates authorization. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// Identifier of the authorization. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, AuthorizationContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId, data, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + { + AuthorizationContractData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AuthorizationContractData.DeserializeAuthorizationContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, ETag ifMatch) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/authorizationProviders/", false); + uri.AppendPath(authorizationProviderId, true); + uri.AppendPath("/authorizations/", false); + uri.AppendPath(authorizationId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, ETag ifMatch) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/authorizationProviders/", false); + uri.AppendPath(authorizationProviderId, true); + uri.AppendPath("/authorizations/", false); + uri.AppendPath(authorizationId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("If-Match", ifMatch); + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Deletes specific Authorization from the Authorization provider. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// Identifier of the authorization. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, ETag ifMatch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId, ifMatch); + 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 specific Authorization from the Authorization provider. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// Identifier of the authorization. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, ETag ifMatch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateConfirmConsentCodeRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, AuthorizationConfirmConsentCodeContent 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/authorizationProviders/", false); + uri.AppendPath(authorizationProviderId, true); + uri.AppendPath("/authorizations/", false); + uri.AppendPath(authorizationId, true); + uri.AppendPath("/confirmConsentCode", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateConfirmConsentCodeRequest(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, AuthorizationConfirmConsentCodeContent 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/authorizationProviders/", false); + uri.AppendPath(authorizationProviderId, true); + uri.AppendPath("/authorizations/", false); + uri.AppendPath(authorizationId, true); + uri.AppendPath("/confirmConsentCode", 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; + } + + /// Confirm valid consent code to suppress Authorizations anti-phishing page. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// Identifier of the authorization. + /// Create parameters. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task ConfirmConsentCodeAsync(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, AuthorizationConfirmConsentCodeContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateConfirmConsentCodeRequest(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Confirm valid consent code to suppress Authorizations anti-phishing page. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// Identifier of the authorization. + /// Create parameters. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response ConfirmConsentCode(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, AuthorizationConfirmConsentCodeContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateConfirmConsentCodeRequest(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByAuthorizationProviderNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string filter, int? top, int? skip) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByAuthorizationProviderNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string filter, int? top, int? skip) + { + 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 collection of authorization providers defined within a authorization provider. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListByAuthorizationProviderNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + + using var message = CreateListByAuthorizationProviderNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName, authorizationProviderId, filter, top, skip); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AuthorizationListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AuthorizationListResult.DeserializeAuthorizationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists a collection of authorization providers defined within a authorization provider. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListByAuthorizationProviderNextPage(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + + using var message = CreateListByAuthorizationProviderNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName, authorizationProviderId, filter, top, skip); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AuthorizationListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AuthorizationListResult.DeserializeAuthorizationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/AuthorizationServerRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/AuthorizationServerRestOperations.cs index f9f65450263bb..ae48b609950d2 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/AuthorizationServerRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/AuthorizationServerRestOperations.cs @@ -32,7 +32,7 @@ public AuthorizationServerRestOperations(HttpPipeline pipeline, string applicati { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -97,8 +97,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists a collection of authorization servers defined within a service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -129,8 +129,8 @@ public async Task> ListByServiceAsync(st } /// Lists a collection of authorization servers defined within a service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -199,8 +199,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the authorizationServer specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the authorization server. /// The cancellation token to use. @@ -233,8 +233,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the authorizationServer specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the authorization server. /// The cancellation token to use. @@ -305,8 +305,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the details of the authorization server specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the authorization server. /// The cancellation token to use. @@ -338,8 +338,8 @@ public async Task> GetAsync(strin } /// Gets the details of the authorization server specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the authorization server. /// The cancellation token to use. @@ -417,8 +417,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates new authorization server or updates an existing authorization server. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the authorization server. /// Create or update parameters. @@ -452,8 +452,8 @@ public async Task> CreateOrUpdate } /// Creates new authorization server or updates an existing authorization server. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the authorization server. /// Create or update parameters. @@ -530,8 +530,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates the details of the authorization server specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the authorization server. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -564,8 +564,8 @@ public async Task> UpdateAsync(st } /// Updates the details of the authorization server specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the authorization server. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -637,8 +637,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes specific authorization server instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the authorization server. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -665,8 +665,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes specific authorization server instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the authorization server. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -733,8 +733,8 @@ internal HttpMessage CreateListSecretsRequest(string subscriptionId, string reso } /// Gets the client secret details of the authorization server. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the authorization server. /// The cancellation token to use. @@ -764,8 +764,8 @@ public async Task> ListSecretsAsync } /// Gets the client secret details of the authorization server. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the authorization server. /// The cancellation token to use. @@ -818,8 +818,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists a collection of authorization servers defined within a service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -852,8 +852,8 @@ public async Task> ListByServiceNextPage /// Lists a collection of authorization servers defined within a service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/BackendRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/BackendRestOperations.cs index 76fbe1a9db179..8a4d92627882a 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/BackendRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/BackendRestOperations.cs @@ -32,7 +32,7 @@ public BackendRestOperations(HttpPipeline pipeline, string applicationId, Uri en { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -97,8 +97,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists a collection of backends in the specified service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| title | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| url | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -129,8 +129,8 @@ public async Task> ListByServiceAsync(string subscri } /// Lists a collection of backends in the specified service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| title | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| url | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -199,8 +199,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the backend specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the Backend entity. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -233,8 +233,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the backend specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the Backend entity. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -305,8 +305,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the details of the backend specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the Backend entity. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -338,8 +338,8 @@ public async Task> GetAsync(string subscripti } /// Gets the details of the backend specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the Backend entity. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -417,8 +417,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or Updates a backend. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the Backend entity. Must be unique in the current API Management service instance. /// Create parameters. @@ -452,8 +452,8 @@ public async Task> CreateOrUpdateAsync(string } /// Creates or Updates a backend. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the Backend entity. Must be unique in the current API Management service instance. /// Create parameters. @@ -530,8 +530,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates an existing backend. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the Backend entity. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -564,8 +564,8 @@ public async Task> UpdateAsync(string subscri } /// Updates an existing backend. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the Backend entity. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -637,8 +637,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes the specified backend. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the Backend entity. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -665,8 +665,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes the specified backend. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the Backend entity. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -739,9 +739,9 @@ internal HttpMessage CreateReconnectRequest(string subscriptionId, string resour return message; } - /// Notifies the APIM proxy to create a new connection to the backend after the specified timeout. If no timeout was specified, timeout of 2 minutes is used. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// Notifies the API Management gateway to create a new connection to the backend after the specified timeout. If no timeout was specified, timeout of 2 minutes is used. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the Backend entity. Must be unique in the current API Management service instance. /// Reconnect request parameters. @@ -766,9 +766,9 @@ public async Task ReconnectAsync(string subscriptionId, string resourc } } - /// Notifies the APIM proxy to create a new connection to the backend after the specified timeout. If no timeout was specified, timeout of 2 minutes is used. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// Notifies the API Management gateway to create a new connection to the backend after the specified timeout. If no timeout was specified, timeout of 2 minutes is used. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the Backend entity. Must be unique in the current API Management service instance. /// Reconnect request parameters. @@ -817,8 +817,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists a collection of backends in the specified service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| title | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| url | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -851,8 +851,8 @@ public async Task> ListByServiceNextPageAsync(string /// Lists a collection of backends in the specified service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| title | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| url | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/CacheRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/CacheRestOperations.cs index af3d578ff2128..edfd7f27e65da 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/CacheRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/CacheRestOperations.cs @@ -32,7 +32,7 @@ public CacheRestOperations(HttpPipeline pipeline, string applicationId, Uri endp { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -89,8 +89,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists a collection of all external Caches in the specified service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Number of records to return. /// Number of records to skip. @@ -120,8 +120,8 @@ public async Task> ListByServiceAsync(string subscript } /// Lists a collection of all external Caches in the specified service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Number of records to return. /// Number of records to skip. @@ -189,8 +189,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the Cache specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the Cache entity. Cache identifier (should be either 'default' or valid Azure region identifier). /// The cancellation token to use. @@ -223,8 +223,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the Cache specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the Cache entity. Cache identifier (should be either 'default' or valid Azure region identifier). /// The cancellation token to use. @@ -295,8 +295,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the details of the Cache specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the Cache entity. Cache identifier (should be either 'default' or valid Azure region identifier). /// The cancellation token to use. @@ -328,8 +328,8 @@ public async Task> GetAsync(string subscription } /// Gets the details of the Cache specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the Cache entity. Cache identifier (should be either 'default' or valid Azure region identifier). /// The cancellation token to use. @@ -407,8 +407,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or updates an External Cache to be used in Api Management instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the Cache entity. Cache identifier (should be either 'default' or valid Azure region identifier). /// Create or Update parameters. @@ -442,8 +442,8 @@ public async Task> CreateOrUpdateAsync(string s } /// Creates or updates an External Cache to be used in Api Management instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the Cache entity. Cache identifier (should be either 'default' or valid Azure region identifier). /// Create or Update parameters. @@ -520,8 +520,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates the details of the cache specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the Cache entity. Cache identifier (should be either 'default' or valid Azure region identifier). /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -554,8 +554,8 @@ public async Task> UpdateAsync(string subscript } /// Updates the details of the cache specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the Cache entity. Cache identifier (should be either 'default' or valid Azure region identifier). /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -627,8 +627,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes specific Cache. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the Cache entity. Cache identifier (should be either 'default' or valid Azure region identifier). /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -655,8 +655,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes specific Cache. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the Cache entity. Cache identifier (should be either 'default' or valid Azure region identifier). /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -706,8 +706,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists a collection of all external Caches in the specified service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Number of records to return. /// Number of records to skip. @@ -739,8 +739,8 @@ public async Task> ListByServiceNextPageAsync(string n /// Lists a collection of all external Caches in the specified service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Number of records to return. /// Number of records to skip. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/CertificateRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/CertificateRestOperations.cs index 382995078615f..ad9cf52da40d6 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/CertificateRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/CertificateRestOperations.cs @@ -32,7 +32,7 @@ public CertificateRestOperations(HttpPipeline pipeline, string applicationId, Ur { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -105,8 +105,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists a collection of all certificates in the specified service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| subject | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| thumbprint | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| expirationDate | filter | ge, le, eq, ne, gt, lt | |</br>. /// Number of records to return. @@ -138,8 +138,8 @@ public async Task> ListByServiceAsync(string sub } /// Lists a collection of all certificates in the specified service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| subject | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| thumbprint | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| expirationDate | filter | ge, le, eq, ne, gt, lt | |</br>. /// Number of records to return. @@ -209,8 +209,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the certificate specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the certificate entity. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -243,8 +243,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the certificate specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the certificate entity. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -315,8 +315,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the details of the certificate specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the certificate entity. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -348,8 +348,8 @@ public async Task> GetAsync(string subscr } /// Gets the details of the certificate specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the certificate entity. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -427,8 +427,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or updates the certificate being used for authentication with the backend. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the certificate entity. Must be unique in the current API Management service instance. /// Create or Update parameters. @@ -462,8 +462,8 @@ public async Task> CreateOrUpdateAsync(st } /// Creates or updates the certificate being used for authentication with the backend. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the certificate entity. Must be unique in the current API Management service instance. /// Create or Update parameters. @@ -536,8 +536,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes specific certificate. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the certificate entity. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -564,8 +564,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes specific certificate. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the certificate entity. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -632,8 +632,8 @@ internal HttpMessage CreateRefreshSecretRequest(string subscriptionId, string re } /// From KeyVault, Refresh the certificate being used for authentication with the backend. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the certificate entity. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -663,8 +663,8 @@ public async Task> RefreshSecretAsync(str } /// From KeyVault, Refresh the certificate being used for authentication with the backend. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the certificate entity. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -717,8 +717,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists a collection of all certificates in the specified service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| subject | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| thumbprint | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| expirationDate | filter | ge, le, eq, ne, gt, lt | |</br>. /// Number of records to return. @@ -752,8 +752,8 @@ public async Task> ListByServiceNextPageAsync(st /// Lists a collection of all certificates in the specified service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| subject | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| thumbprint | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| expirationDate | filter | ge, le, eq, ne, gt, lt | |</br>. /// Number of records to return. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ContentItemRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ContentItemRestOperations.cs index b5a2bb6ee50bc..2b63cbc086b12 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ContentItemRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ContentItemRestOperations.cs @@ -32,7 +32,7 @@ public ContentItemRestOperations(HttpPipeline pipeline, string applicationId, Ur { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -77,8 +77,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists developer portal's content items specified by the provided content type. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Content type identifier. /// The cancellation token to use. @@ -108,8 +108,8 @@ public async Task> ListByServiceAsync(string sub } /// Lists developer portal's content items specified by the provided content type. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Content type identifier. /// The cancellation token to use. @@ -181,8 +181,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Returns the entity state (ETag) version of the developer portal's content item specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Content type identifier. /// Content item identifier. @@ -217,8 +217,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Returns the entity state (ETag) version of the developer portal's content item specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Content type identifier. /// Content item identifier. @@ -295,8 +295,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Returns the developer portal's content item specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Content type identifier. /// Content item identifier. @@ -328,8 +328,8 @@ public async Task> GetAsync(string subscripti } /// Returns the developer portal's content item specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Content type identifier. /// Content item identifier. @@ -407,8 +407,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates a new developer portal's content item specified by the provided content type. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Content type identifier. /// Content item identifier. @@ -442,8 +442,8 @@ public async Task> CreateOrUpdateAsync(string } /// Creates a new developer portal's content item specified by the provided content type. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Content type identifier. /// Content item identifier. @@ -520,8 +520,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Removes the specified developer portal's content item. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Content type identifier. /// Content item identifier. @@ -550,8 +550,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Removes the specified developer portal's content item. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Content type identifier. /// Content item identifier. @@ -603,8 +603,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists developer portal's content items specified by the provided content type. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Content type identifier. /// The cancellation token to use. @@ -636,8 +636,8 @@ public async Task> ListByServiceNextPageAsync(st /// Lists developer portal's content items specified by the provided content type. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Content type identifier. /// The cancellation token to use. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ContentTypeRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ContentTypeRestOperations.cs index 8ffde73521396..3a6751e859f72 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ContentTypeRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ContentTypeRestOperations.cs @@ -32,7 +32,7 @@ public ContentTypeRestOperations(HttpPipeline pipeline, string applicationId, Ur { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -73,8 +73,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists the developer portal's content types. Content types describe content items' properties, validation rules, and constraints. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -102,8 +102,8 @@ public async Task> ListByServiceAsync(string sub } /// Lists the developer portal's content types. Content types describe content items' properties, validation rules, and constraints. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -169,8 +169,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the details of the developer portal's content type. Content types describe content items' properties, validation rules, and constraints. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Content type identifier. /// The cancellation token to use. @@ -200,8 +200,8 @@ public async Task> GetAsync(string subscripti } /// Gets the details of the developer portal's content type. Content types describe content items' properties, validation rules, and constraints. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Content type identifier. /// The cancellation token to use. @@ -273,8 +273,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or updates the developer portal's content type. Content types describe content items' properties, validation rules, and constraints. Custom content types' identifiers need to start with the `c-` prefix. Built-in content types can't be modified. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Content type identifier. /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. @@ -306,8 +306,8 @@ public async Task> CreateOrUpdateAsync(string } /// Creates or updates the developer portal's content type. Content types describe content items' properties, validation rules, and constraints. Custom content types' identifiers need to start with the `c-` prefix. Built-in content types can't be modified. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Content type identifier. /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. @@ -378,8 +378,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Removes the specified developer portal's content type. Content types describe content items' properties, validation rules, and constraints. Built-in content types (with identifiers starting with the `c-` prefix) can't be removed. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Content type identifier. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -406,8 +406,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Removes the specified developer portal's content type. Content types describe content items' properties, validation rules, and constraints. Built-in content types (with identifiers starting with the `c-` prefix) can't be removed. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Content type identifier. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -457,8 +457,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists the developer portal's content types. Content types describe content items' properties, validation rules, and constraints. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , , or is null. @@ -488,8 +488,8 @@ public async Task> ListByServiceNextPageAsync(st /// Lists the developer portal's content types. Content types describe content items' properties, validation rules, and constraints. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , , or is null. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/DelegationSettingsRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/DelegationSettingsRestOperations.cs index e7c87ad17f488..f19e16806f1f1 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/DelegationSettingsRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/DelegationSettingsRestOperations.cs @@ -32,7 +32,7 @@ public DelegationSettingsRestOperations(HttpPipeline pipeline, string applicatio { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -73,8 +73,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the DelegationSettings. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -105,8 +105,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the DelegationSettings. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -173,8 +173,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Get Delegation Settings for the Portal. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -204,8 +204,8 @@ public async Task> GetAsync(s } /// Get Delegation Settings for the Portal. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -276,8 +276,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Update Delegation settings. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. /// Update Delegation settings. @@ -303,8 +303,8 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr } /// Update Delegation settings. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. /// Update Delegation settings. @@ -374,8 +374,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Create or Update Delegation settings. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Create or update parameters. /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. @@ -406,8 +406,8 @@ public async Task> CreateOrUp } /// Create or Update Delegation settings. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Create or update parameters. /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. @@ -474,8 +474,8 @@ internal HttpMessage CreateListSecretsRequest(string subscriptionId, string reso } /// Gets the secret validation key of the DelegationSettings. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -503,8 +503,8 @@ public async Task> ListSecretsAsync } /// Gets the secret validation key of the DelegationSettings. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/DeletedServicesRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/DeletedServicesRestOperations.cs index 2188b7b4d483b..fdcbe1476f33e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/DeletedServicesRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/DeletedServicesRestOperations.cs @@ -32,7 +32,7 @@ public DeletedServicesRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -65,7 +65,7 @@ internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId) } /// Lists all soft-deleted services available for undelete for the given subscription. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The ID of the target subscription. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -90,7 +90,7 @@ public async Task> ListBySubscriptionAsync(s } /// Lists all soft-deleted services available for undelete for the given subscription. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The ID of the target subscription. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -149,7 +149,7 @@ internal HttpMessage CreateGetByNameRequest(string subscriptionId, AzureLocation } /// Get soft-deleted Api Management Service by name. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The ID of the target subscription. /// The location of the deleted API Management service. /// The name of the API Management service. /// The cancellation token to use. @@ -179,7 +179,7 @@ public async Task> GetByNameAsync(stri } /// Get soft-deleted Api Management Service by name. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The ID of the target subscription. /// The location of the deleted API Management service. /// The name of the API Management service. /// The cancellation token to use. @@ -243,7 +243,7 @@ internal HttpMessage CreatePurgeRequest(string subscriptionId, AzureLocation loc } /// Purges Api Management Service (deletes it with no option to undelete). - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The ID of the target subscription. /// The location of the deleted API Management service. /// The name of the API Management service. /// The cancellation token to use. @@ -268,7 +268,7 @@ public async Task PurgeAsync(string subscriptionId, AzureLocation loca } /// Purges Api Management Service (deletes it with no option to undelete). - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The ID of the target subscription. /// The location of the deleted API Management service. /// The name of the API Management service. /// The cancellation token to use. @@ -316,7 +316,7 @@ internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, st /// Lists all soft-deleted services available for undelete for the given subscription. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The ID of the target subscription. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. @@ -343,7 +343,7 @@ public async Task> ListBySubscriptionNextPag /// Lists all soft-deleted services available for undelete for the given subscription. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The ID of the target subscription. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/DiagnosticRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/DiagnosticRestOperations.cs index 0ebbdaf68f2fa..036a30d073e35 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/DiagnosticRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/DiagnosticRestOperations.cs @@ -32,7 +32,7 @@ public DiagnosticRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -97,8 +97,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists all diagnostics of the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -129,8 +129,8 @@ public async Task> ListByServiceAsync(string subs } /// Lists all diagnostics of the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -199,8 +199,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the Diagnostic specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Diagnostic identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -233,8 +233,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the Diagnostic specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Diagnostic identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -305,8 +305,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the details of the Diagnostic specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Diagnostic identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -338,8 +338,8 @@ public async Task> GetAsync(string subscription } /// Gets the details of the Diagnostic specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Diagnostic identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -417,8 +417,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates a new Diagnostic or updates an existing one. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Diagnostic identifier. Must be unique in the current API Management service instance. /// Create parameters. @@ -452,8 +452,8 @@ public async Task> CreateOrUpdateAsync(string s } /// Creates a new Diagnostic or updates an existing one. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Diagnostic identifier. Must be unique in the current API Management service instance. /// Create parameters. @@ -530,8 +530,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates the details of the Diagnostic specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Diagnostic identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -564,8 +564,8 @@ public async Task> UpdateAsync(string subscript } /// Updates the details of the Diagnostic specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Diagnostic identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -637,8 +637,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes the specified Diagnostic. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Diagnostic identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -665,8 +665,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes the specified Diagnostic. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Diagnostic identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -716,8 +716,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists all diagnostics of the API Management service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -750,8 +750,8 @@ public async Task> ListByServiceNextPageAsync(str /// Lists all diagnostics of the API Management service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/DocumentationRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/DocumentationRestOperations.cs new file mode 100644 index 0000000000000..d02e234a2036b --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/DocumentationRestOperations.cs @@ -0,0 +1,785 @@ +// 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.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + internal partial class DocumentationRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of DocumentationRestOperations. + /// 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 DocumentationRestOperations(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 ?? "2022-08-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListByServiceRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string filter, int? top, int? skip) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/documentations", false); + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + if (skip != null) + { + uri.AppendQuery("$skip", skip.Value, true); + } + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByServiceRequest(string subscriptionId, string resourceGroupName, string serviceName, string filter, int? top, int? skip) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/documentations", false); + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + if (skip != null) + { + uri.AppendQuery("$skip", skip.Value, true); + } + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists all Documentations of the API Management service instance. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | eq | contains |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByServiceAsync(string subscriptionId, string resourceGroupName, string serviceName, string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateListByServiceRequest(subscriptionId, resourceGroupName, serviceName, filter, top, skip); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DocumentationListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = DocumentationListResult.DeserializeDocumentationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists all Documentations of the API Management service instance. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | eq | contains |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByService(string subscriptionId, string resourceGroupName, string serviceName, string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateListByServiceRequest(subscriptionId, resourceGroupName, serviceName, filter, top, skip); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DocumentationListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = DocumentationListResult.DeserializeDocumentationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetEntityTagRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string documentationId) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/documentations/", false); + uri.AppendPath(documentationId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string resourceGroupName, string serviceName, string documentationId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Head; + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/documentations/", false); + uri.AppendPath(documentationId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the entity state (Etag) version of the Documentation by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Documentation identifier. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetEntityTagAsync(string subscriptionId, string resourceGroupName, string serviceName, string documentationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(documentationId, nameof(documentationId)); + + using var message = CreateGetEntityTagRequest(subscriptionId, resourceGroupName, serviceName, documentationId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case int s when s >= 200 && s < 300: + { + bool value = true; + return Response.FromValue(value, message.Response); + } + case int s when s >= 400 && s < 500: + { + bool value = false; + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the entity state (Etag) version of the Documentation by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Documentation identifier. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetEntityTag(string subscriptionId, string resourceGroupName, string serviceName, string documentationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(documentationId, nameof(documentationId)); + + using var message = CreateGetEntityTagRequest(subscriptionId, resourceGroupName, serviceName, documentationId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case int s when s >= 200 && s < 300: + { + bool value = true; + return Response.FromValue(value, message.Response); + } + case int s when s >= 400 && s < 500: + { + bool value = false; + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string documentationId) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/documentations/", false); + uri.AppendPath(documentationId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serviceName, string documentationId) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/documentations/", false); + uri.AppendPath(documentationId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the details of the Documentation specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Documentation identifier. Must be unique in the current API Management service instance. + /// 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 serviceName, string documentationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(documentationId, nameof(documentationId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, documentationId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DocumentationContractData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = DocumentationContractData.DeserializeDocumentationContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DocumentationContractData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the details of the Documentation specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Documentation identifier. Must be unique in the current API Management service instance. + /// 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 serviceName, string documentationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(documentationId, nameof(documentationId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, documentationId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DocumentationContractData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = DocumentationContractData.DeserializeDocumentationContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DocumentationContractData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string documentationId, DocumentationContractData data, ETag? ifMatch) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/documentations/", false); + uri.AppendPath(documentationId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string documentationId, DocumentationContractData data, ETag? ifMatch) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/documentations/", false); + uri.AppendPath(documentationId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + if (ifMatch != null) + { + request.Headers.Add("If-Match", ifMatch.Value); + } + 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 a new Documentation or updates an existing one. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Documentation identifier. Must be unique in the current API Management service instance. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string serviceName, string documentationId, DocumentationContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(documentationId, nameof(documentationId)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, documentationId, data, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + { + DocumentationContractData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = DocumentationContractData.DeserializeDocumentationContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates a new Documentation or updates an existing one. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Documentation identifier. Must be unique in the current API Management service instance. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string serviceName, string documentationId, DocumentationContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(documentationId, nameof(documentationId)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, documentationId, data, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + { + DocumentationContractData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = DocumentationContractData.DeserializeDocumentationContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string documentationId, ETag ifMatch, DocumentationContractPatch patch) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/documentations/", false); + uri.AppendPath(documentationId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string documentationId, ETag ifMatch, DocumentationContractPatch patch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/documentations/", false); + uri.AppendPath(documentationId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("If-Match", ifMatch); + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Updates the details of the Documentation for an API specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Documentation identifier. Must be unique in the current API Management service instance. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// Documentation Update parameters. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> UpdateAsync(string subscriptionId, string resourceGroupName, string serviceName, string documentationId, ETag ifMatch, DocumentationContractPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(documentationId, nameof(documentationId)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, serviceName, documentationId, ifMatch, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DocumentationContractData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = DocumentationContractData.DeserializeDocumentationContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Updates the details of the Documentation for an API specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Documentation identifier. Must be unique in the current API Management service instance. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// Documentation Update parameters. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string serviceName, string documentationId, ETag ifMatch, DocumentationContractPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(documentationId, nameof(documentationId)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, serviceName, documentationId, ifMatch, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DocumentationContractData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = DocumentationContractData.DeserializeDocumentationContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string documentationId, ETag ifMatch) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/documentations/", false); + uri.AppendPath(documentationId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string serviceName, string documentationId, ETag ifMatch) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/documentations/", false); + uri.AppendPath(documentationId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("If-Match", ifMatch); + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Deletes the specified Documentation from an API. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Documentation identifier. Must be unique in the current API Management service instance. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string serviceName, string documentationId, ETag ifMatch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(documentationId, nameof(documentationId)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, documentationId, ifMatch); + 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 the specified Documentation from an API. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Documentation identifier. Must be unique in the current API Management service instance. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string serviceName, string documentationId, ETag ifMatch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(documentationId, nameof(documentationId)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, documentationId, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByServiceNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string filter, int? top, int? skip) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string filter, int? top, int? skip) + { + 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 Documentations of the API Management service instance. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | eq | contains |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByServiceNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateListByServiceNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName, filter, top, skip); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DocumentationListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = DocumentationListResult.DeserializeDocumentationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists all Documentations of the API Management service instance. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | eq | contains |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByServiceNextPage(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateListByServiceNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName, filter, top, skip); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DocumentationListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = DocumentationListResult.DeserializeDocumentationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/EmailTemplateRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/EmailTemplateRestOperations.cs index 977a66a702dd3..6c1fa2c873158 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/EmailTemplateRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/EmailTemplateRestOperations.cs @@ -32,7 +32,7 @@ public EmailTemplateRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -97,8 +97,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Gets all email templates. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -129,8 +129,8 @@ public async Task> ListByServiceAsync(string s } /// Gets all email templates. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -199,8 +199,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the email template specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Email Template Name Identifier. /// The cancellation token to use. @@ -232,8 +232,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the email template specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Email Template Name Identifier. /// The cancellation token to use. @@ -303,8 +303,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the details of the email template specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Email Template Name Identifier. /// The cancellation token to use. @@ -335,8 +335,8 @@ public async Task> GetAsync(string subs } /// Gets the details of the email template specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Email Template Name Identifier. /// The cancellation token to use. @@ -413,8 +413,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Updates an Email Template. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Email Template Name Identifier. /// Email Template update parameters. @@ -447,8 +447,8 @@ public async Task> CreateOrUpdateAsync( } /// Updates an Email Template. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Email Template Name Identifier. /// Email Template update parameters. @@ -524,8 +524,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates API Management email template. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Email Template Name Identifier. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -557,8 +557,8 @@ public async Task> UpdateAsync(string s } /// Updates API Management email template. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Email Template Name Identifier. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -629,8 +629,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Reset the Email Template to default template provided by the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Email Template Name Identifier. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -656,8 +656,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Reset the Email Template to default template provided by the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Email Template Name Identifier. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -706,8 +706,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Gets all email templates. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -740,8 +740,8 @@ public async Task> ListByServiceNextPageAsync( /// Gets all email templates. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GatewayApiRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GatewayApiRestOperations.cs index 412c6c8c300cf..216c86c6cf332 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GatewayApiRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GatewayApiRestOperations.cs @@ -32,7 +32,7 @@ public GatewayApiRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -101,8 +101,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists a collection of the APIs associated with a gateway. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -135,8 +135,8 @@ public async Task> ListByServiceAsyn } /// Lists a collection of the APIs associated with a gateway. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -211,8 +211,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Checks that API entity specified by identifier is associated with the Gateway entity. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// API identifier. Must be unique in the current API Management service instance. @@ -247,8 +247,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Checks that API entity specified by identifier is associated with the Gateway entity. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// API identifier. Must be unique in the current API Management service instance. @@ -332,8 +332,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Adds an API to the specified Gateway. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// API identifier. Must be unique in the current API Management service instance. @@ -367,8 +367,8 @@ public async Task> CreateOrUpdateAsync(string subscript } /// Adds an API to the specified Gateway. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// API identifier. Must be unique in the current API Management service instance. @@ -444,8 +444,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes the specified API from the specified Gateway. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// API identifier. Must be unique in the current API Management service instance. @@ -473,8 +473,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes the specified API from the specified Gateway. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// API identifier. Must be unique in the current API Management service instance. @@ -525,8 +525,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists a collection of the APIs associated with a gateway. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -561,8 +561,8 @@ public async Task> ListByServiceNext /// Lists a collection of the APIs associated with a gateway. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GatewayCertificateAuthorityRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GatewayCertificateAuthorityRestOperations.cs index 3e542e9f263a1..00d8a3674ef36 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GatewayCertificateAuthorityRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GatewayCertificateAuthorityRestOperations.cs @@ -32,7 +32,7 @@ public GatewayCertificateAuthorityRestOperations(HttpPipeline pipeline, string a { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -101,8 +101,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists the collection of Certificate Authorities for the specified Gateway entity. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | eq, ne | |</br>. @@ -135,8 +135,8 @@ public async Task> ListByService } /// Lists the collection of Certificate Authorities for the specified Gateway entity. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | eq, ne | |</br>. @@ -211,8 +211,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Checks if Certificate entity is assigned to Gateway entity as Certificate Authority. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// Identifier of the certificate entity. Must be unique in the current API Management service instance. @@ -247,8 +247,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Checks if Certificate entity is assigned to Gateway entity as Certificate Authority. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// Identifier of the certificate entity. Must be unique in the current API Management service instance. @@ -325,8 +325,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Get assigned Gateway Certificate Authority details. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// Identifier of the certificate entity. Must be unique in the current API Management service instance. @@ -360,8 +360,8 @@ public async Task> GetAsy } /// Get assigned Gateway Certificate Authority details. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// Identifier of the certificate entity. Must be unique in the current API Management service instance. @@ -445,8 +445,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Assign Certificate entity to Gateway entity as Certificate Authority. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// Identifier of the certificate entity. Must be unique in the current API Management service instance. @@ -482,8 +482,8 @@ public async Task> Create } /// Assign Certificate entity to Gateway entity as Certificate Authority. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// Identifier of the certificate entity. Must be unique in the current API Management service instance. @@ -562,8 +562,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Remove relationship between Certificate Authority and Gateway entity. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// Identifier of the certificate entity. Must be unique in the current API Management service instance. @@ -592,8 +592,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Remove relationship between Certificate Authority and Gateway entity. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// Identifier of the certificate entity. Must be unique in the current API Management service instance. @@ -645,8 +645,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists the collection of Certificate Authorities for the specified Gateway entity. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | eq, ne | |</br>. @@ -681,8 +681,8 @@ public async Task> ListByService /// Lists the collection of Certificate Authorities for the specified Gateway entity. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | eq, ne | |</br>. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GatewayHostnameConfigurationRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GatewayHostnameConfigurationRestOperations.cs index 2b96373c4cea3..ed44ce446bb09 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GatewayHostnameConfigurationRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GatewayHostnameConfigurationRestOperations.cs @@ -32,7 +32,7 @@ public GatewayHostnameConfigurationRestOperations(HttpPipeline pipeline, string { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -101,8 +101,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists the collection of hostname configurations for the specified gateway. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| hostname | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -135,8 +135,8 @@ public async Task> ListByServic } /// Lists the collection of hostname configurations for the specified gateway. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| hostname | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -211,8 +211,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Checks that hostname configuration entity specified by identifier exists for specified Gateway entity. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// Gateway hostname configuration identifier. Must be unique in the scope of parent Gateway entity. @@ -247,8 +247,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Checks that hostname configuration entity specified by identifier exists for specified Gateway entity. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// Gateway hostname configuration identifier. Must be unique in the scope of parent Gateway entity. @@ -325,8 +325,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Get details of a hostname configuration. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// Gateway hostname configuration identifier. Must be unique in the scope of parent Gateway entity. @@ -360,8 +360,8 @@ public async Task> GetAs } /// Get details of a hostname configuration. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// Gateway hostname configuration identifier. Must be unique in the scope of parent Gateway entity. @@ -445,8 +445,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates of updates hostname configuration for a Gateway. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// Gateway hostname configuration identifier. Must be unique in the scope of parent Gateway entity. @@ -482,8 +482,8 @@ public async Task> Creat } /// Creates of updates hostname configuration for a Gateway. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// Gateway hostname configuration identifier. Must be unique in the scope of parent Gateway entity. @@ -562,8 +562,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes the specified hostname configuration from the specified Gateway. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// Gateway hostname configuration identifier. Must be unique in the scope of parent Gateway entity. @@ -592,8 +592,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes the specified hostname configuration from the specified Gateway. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// Gateway hostname configuration identifier. Must be unique in the scope of parent Gateway entity. @@ -645,8 +645,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists the collection of hostname configurations for the specified gateway. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| hostname | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -681,8 +681,8 @@ public async Task> ListByServic /// Lists the collection of hostname configurations for the specified gateway. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| hostname | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GatewayRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GatewayRestOperations.cs index 2baee3bc686b8..c70e02707671b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GatewayRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GatewayRestOperations.cs @@ -32,7 +32,7 @@ public GatewayRestOperations(HttpPipeline pipeline, string applicationId, Uri en { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -97,8 +97,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists a collection of gateways registered with service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| region | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -129,8 +129,8 @@ public async Task> ListByServiceAsync(string subscri } /// Lists a collection of gateways registered with service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| region | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -199,8 +199,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the Gateway specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// The cancellation token to use. @@ -233,8 +233,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the Gateway specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// The cancellation token to use. @@ -305,8 +305,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the details of the Gateway specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// The cancellation token to use. @@ -338,8 +338,8 @@ public async Task> GetAsync(string subscripti } /// Gets the details of the Gateway specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// The cancellation token to use. @@ -417,8 +417,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or updates a Gateway to be used in Api Management instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// The to use. @@ -452,8 +452,8 @@ public async Task> CreateOrUpdateAsync(string } /// Creates or updates a Gateway to be used in Api Management instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// The to use. @@ -530,8 +530,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates the details of the gateway specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -564,8 +564,8 @@ public async Task> UpdateAsync(string subscri } /// Updates the details of the gateway specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -637,8 +637,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes specific Gateway. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -665,8 +665,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes specific Gateway. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -733,8 +733,8 @@ internal HttpMessage CreateListKeysRequest(string subscriptionId, string resourc } /// Retrieves gateway keys. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// The cancellation token to use. @@ -764,8 +764,8 @@ public async Task> ListKeysAsync(string subscripti } /// Retrieves gateway keys. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// The cancellation token to use. @@ -839,8 +839,8 @@ internal HttpMessage CreateRegenerateKeyRequest(string subscriptionId, string re } /// Regenerates specified gateway key invalidating any tokens created with it. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// The to use. @@ -867,8 +867,8 @@ public async Task RegenerateKeyAsync(string subscriptionId, string res } /// Regenerates specified gateway key invalidating any tokens created with it. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// The to use. @@ -939,8 +939,8 @@ internal HttpMessage CreateGenerateTokenRequest(string subscriptionId, string re } /// Gets the Shared Access Authorization Token for the gateway. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// The to use. @@ -972,8 +972,8 @@ public async Task> GenerateTokenAsync(string subs } /// Gets the Shared Access Authorization Token for the gateway. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// The to use. @@ -1028,8 +1028,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists a collection of gateways registered with service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| region | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -1062,8 +1062,8 @@ public async Task> ListByServiceNextPageAsync(string /// Lists a collection of gateways registered with service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| region | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GlobalSchemaRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GlobalSchemaRestOperations.cs index 62830a0e533b7..b7ca448dd336c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GlobalSchemaRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GlobalSchemaRestOperations.cs @@ -32,7 +32,7 @@ public GlobalSchemaRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -97,8 +97,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists a collection of schemas registered with service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -129,8 +129,8 @@ public async Task> ListByServiceAsync(string su } /// Lists a collection of schemas registered with service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -199,8 +199,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the Schema specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Schema id identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -233,8 +233,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the Schema specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Schema id identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -305,8 +305,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the details of the Schema specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Schema id identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -338,8 +338,8 @@ public async Task> GetAsync(string subsc } /// Gets the details of the Schema specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Schema id identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -417,8 +417,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates new or updates existing specified Schema of the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Schema id identifier. Must be unique in the current API Management service instance. /// Create or update parameters. @@ -448,8 +448,8 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re } /// Creates new or updates existing specified Schema of the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Schema id identifier. Must be unique in the current API Management service instance. /// Create or update parameters. @@ -518,8 +518,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes specific Schema. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Schema id identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -546,8 +546,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes specific Schema. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Schema id identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -597,8 +597,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists a collection of schemas registered with service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -631,8 +631,8 @@ public async Task> ListByServiceNextPageAsync(s /// Lists a collection of schemas registered with service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GraphQLApiResolverPolicyRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GraphQLApiResolverPolicyRestOperations.cs new file mode 100644 index 0000000000000..ca13fcc417b7e --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GraphQLApiResolverPolicyRestOperations.cs @@ -0,0 +1,728 @@ +// 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.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + internal partial class GraphQLApiResolverPolicyRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of GraphQLApiResolverPolicyRestOperations. + /// 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 GraphQLApiResolverPolicyRestOperations(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 ?? "2022-08-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListByResolverRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/resolvers/", false); + uri.AppendPath(resolverId, true); + uri.AppendPath("/policies", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByResolverRequest(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/resolvers/", false); + uri.AppendPath(resolverId, true); + uri.AppendPath("/policies", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get the list of policy configuration at the GraphQL API Resolver level. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> ListByResolverAsync(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + + using var message = CreateListByResolverRequest(subscriptionId, resourceGroupName, serviceName, apiId, resolverId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PolicyListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = PolicyListResult.DeserializePolicyListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get the list of policy configuration at the GraphQL API Resolver level. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response ListByResolver(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + + using var message = CreateListByResolverRequest(subscriptionId, resourceGroupName, serviceName, apiId, resolverId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PolicyListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = PolicyListResult.DeserializePolicyListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetEntityTagRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, PolicyName policyId) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/resolvers/", false); + uri.AppendPath(resolverId, true); + uri.AppendPath("/policies/", false); + uri.AppendPath(policyId.ToString(), true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, PolicyName policyId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Head; + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/resolvers/", false); + uri.AppendPath(resolverId, true); + uri.AppendPath("/policies/", false); + uri.AppendPath(policyId.ToString(), true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the entity state (Etag) version of the GraphQL API resolver policy specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// The identifier of the Policy. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetEntityTagAsync(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, PolicyName policyId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + + using var message = CreateGetEntityTagRequest(subscriptionId, resourceGroupName, serviceName, apiId, resolverId, policyId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case int s when s >= 200 && s < 300: + { + bool value = true; + return Response.FromValue(value, message.Response); + } + case int s when s >= 400 && s < 500: + { + bool value = false; + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the entity state (Etag) version of the GraphQL API resolver policy specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// The identifier of the Policy. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response GetEntityTag(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, PolicyName policyId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + + using var message = CreateGetEntityTagRequest(subscriptionId, resourceGroupName, serviceName, apiId, resolverId, policyId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case int s when s >= 200 && s < 300: + { + bool value = true; + return Response.FromValue(value, message.Response); + } + case int s when s >= 400 && s < 500: + { + bool value = false; + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, PolicyName policyId, PolicyExportFormat? format) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/resolvers/", false); + uri.AppendPath(resolverId, true); + uri.AppendPath("/policies/", false); + uri.AppendPath(policyId.ToString(), true); + if (format != null) + { + uri.AppendQuery("format", format.Value.ToString(), true); + } + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, PolicyName policyId, PolicyExportFormat? format) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/resolvers/", false); + uri.AppendPath(resolverId, true); + uri.AppendPath("/policies/", false); + uri.AppendPath(policyId.ToString(), true); + if (format != null) + { + uri.AppendQuery("format", format.Value.ToString(), true); + } + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get the policy configuration at the GraphQL API Resolver level. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// The identifier of the Policy. + /// Policy Export Format. + /// 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 serviceName, string apiId, string resolverId, PolicyName policyId, PolicyExportFormat? format = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, apiId, resolverId, policyId, format); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PolicyContractData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = PolicyContractData.DeserializePolicyContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((PolicyContractData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get the policy configuration at the GraphQL API Resolver level. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// The identifier of the Policy. + /// Policy Export Format. + /// 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 serviceName, string apiId, string resolverId, PolicyName policyId, PolicyExportFormat? format = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, apiId, resolverId, policyId, format); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PolicyContractData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = PolicyContractData.DeserializePolicyContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((PolicyContractData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, PolicyName policyId, PolicyContractData data, ETag? ifMatch) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/resolvers/", false); + uri.AppendPath(resolverId, true); + uri.AppendPath("/policies/", false); + uri.AppendPath(policyId.ToString(), true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, PolicyName policyId, PolicyContractData data, ETag? ifMatch) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/resolvers/", false); + uri.AppendPath(resolverId, true); + uri.AppendPath("/policies/", false); + uri.AppendPath(policyId.ToString(), true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + if (ifMatch != null) + { + request.Headers.Add("If-Match", ifMatch.Value); + } + 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 policy configuration for the GraphQL API Resolver level. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// The identifier of the Policy. + /// The policy contents to apply. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, PolicyName policyId, PolicyContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, apiId, resolverId, policyId, data, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + { + PolicyContractData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = PolicyContractData.DeserializePolicyContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates or updates policy configuration for the GraphQL API Resolver level. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// The identifier of the Policy. + /// The policy contents to apply. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, PolicyName policyId, PolicyContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, apiId, resolverId, policyId, data, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + { + PolicyContractData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = PolicyContractData.DeserializePolicyContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, PolicyName policyId, ETag ifMatch) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/resolvers/", false); + uri.AppendPath(resolverId, true); + uri.AppendPath("/policies/", false); + uri.AppendPath(policyId.ToString(), true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, PolicyName policyId, ETag ifMatch) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/resolvers/", false); + uri.AppendPath(resolverId, true); + uri.AppendPath("/policies/", false); + uri.AppendPath(policyId.ToString(), true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("If-Match", ifMatch); + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Deletes the policy configuration at the GraphQL Api Resolver. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// The identifier of the Policy. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, PolicyName policyId, ETag ifMatch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, apiId, resolverId, policyId, ifMatch); + 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 the policy configuration at the GraphQL Api Resolver. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// The identifier of the Policy. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, PolicyName policyId, ETag ifMatch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, apiId, resolverId, policyId, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByResolverNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByResolverNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId) + { + 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 the list of policy configuration at the GraphQL API Resolver level. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> ListByResolverNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + + using var message = CreateListByResolverNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName, apiId, resolverId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PolicyListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = PolicyListResult.DeserializePolicyListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get the list of policy configuration at the GraphQL API Resolver level. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response ListByResolverNextPage(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + + using var message = CreateListByResolverNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName, apiId, resolverId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PolicyListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = PolicyListResult.DeserializePolicyListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GraphQLApiResolverRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GraphQLApiResolverRestOperations.cs new file mode 100644 index 0000000000000..96b4bc0d2bb81 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GraphQLApiResolverRestOperations.cs @@ -0,0 +1,837 @@ +// 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.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + internal partial class GraphQLApiResolverRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of GraphQLApiResolverRestOperations. + /// 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 GraphQLApiResolverRestOperations(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 ?? "2022-08-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListByApiRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string filter, int? top, int? skip) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/resolvers", false); + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + if (skip != null) + { + uri.AppendQuery("$skip", skip.Value, true); + } + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByApiRequest(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string filter, int? top, int? skip) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/resolvers", false); + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + if (skip != null) + { + uri.AppendQuery("$skip", skip.Value, true); + } + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists a collection of the resolvers for the specified GraphQL API. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListByApiAsync(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + + using var message = CreateListByApiRequest(subscriptionId, resourceGroupName, serviceName, apiId, filter, top, skip); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ResolverListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ResolverListResult.DeserializeResolverListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists a collection of the resolvers for the specified GraphQL API. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListByApi(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + + using var message = CreateListByApiRequest(subscriptionId, resourceGroupName, serviceName, apiId, filter, top, skip); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ResolverListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ResolverListResult.DeserializeResolverListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetEntityTagRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/resolvers/", false); + uri.AppendPath(resolverId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Head; + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/resolvers/", false); + uri.AppendPath(resolverId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the entity state (Etag) version of the GraphQL API resolver specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetEntityTagAsync(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + + using var message = CreateGetEntityTagRequest(subscriptionId, resourceGroupName, serviceName, apiId, resolverId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case int s when s >= 200 && s < 300: + { + bool value = true; + return Response.FromValue(value, message.Response); + } + case int s when s >= 400 && s < 500: + { + bool value = false; + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the entity state (Etag) version of the GraphQL API resolver specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response GetEntityTag(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + + using var message = CreateGetEntityTagRequest(subscriptionId, resourceGroupName, serviceName, apiId, resolverId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case int s when s >= 200 && s < 300: + { + bool value = true; + return Response.FromValue(value, message.Response); + } + case int s when s >= 400 && s < 500: + { + bool value = false; + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/resolvers/", false); + uri.AppendPath(resolverId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/resolvers/", false); + uri.AppendPath(resolverId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the details of the GraphQL API Resolver specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// 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 serviceName, string apiId, string resolverId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, apiId, resolverId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ResolverContractData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ResolverContractData.DeserializeResolverContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ResolverContractData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the details of the GraphQL API Resolver specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// 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 serviceName, string apiId, string resolverId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, apiId, resolverId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ResolverContractData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ResolverContractData.DeserializeResolverContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ResolverContractData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, ResolverContractData data, ETag? ifMatch) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/resolvers/", false); + uri.AppendPath(resolverId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, ResolverContractData data, ETag? ifMatch) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/resolvers/", false); + uri.AppendPath(resolverId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + if (ifMatch != null) + { + request.Headers.Add("If-Match", ifMatch.Value); + } + 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 a new resolver in the GraphQL API or updates an existing one. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, ResolverContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, apiId, resolverId, data, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + { + ResolverContractData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ResolverContractData.DeserializeResolverContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates a new resolver in the GraphQL API or updates an existing one. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, ResolverContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, apiId, resolverId, data, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + { + ResolverContractData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ResolverContractData.DeserializeResolverContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, ETag ifMatch, ResolverContractPatch patch) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/resolvers/", false); + uri.AppendPath(resolverId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, ETag ifMatch, ResolverContractPatch patch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/resolvers/", false); + uri.AppendPath(resolverId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("If-Match", ifMatch); + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Updates the details of the resolver in the GraphQL API specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// GraphQL API Resolver Update parameters. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> UpdateAsync(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, ETag ifMatch, ResolverContractPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, serviceName, apiId, resolverId, ifMatch, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ResolverContractData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ResolverContractData.DeserializeResolverContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Updates the details of the resolver in the GraphQL API specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// GraphQL API Resolver Update parameters. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, ETag ifMatch, ResolverContractPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, serviceName, apiId, resolverId, ifMatch, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ResolverContractData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ResolverContractData.DeserializeResolverContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, ETag ifMatch) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/resolvers/", false); + uri.AppendPath(resolverId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, ETag ifMatch) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/resolvers/", false); + uri.AppendPath(resolverId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("If-Match", ifMatch); + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Deletes the specified resolver in the GraphQL API. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, ETag ifMatch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, apiId, resolverId, ifMatch); + 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 the specified resolver in the GraphQL API. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, ETag ifMatch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, apiId, resolverId, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByApiNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string apiId, string filter, int? top, int? skip) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByApiNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string apiId, string filter, int? top, int? skip) + { + 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 collection of the resolvers for the specified GraphQL API. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListByApiNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string apiId, string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + + using var message = CreateListByApiNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName, apiId, filter, top, skip); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ResolverListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ResolverListResult.DeserializeResolverListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists a collection of the resolvers for the specified GraphQL API. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListByApiNextPage(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string apiId, string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + + using var message = CreateListByApiNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName, apiId, filter, top, skip); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ResolverListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ResolverListResult.DeserializeResolverListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GroupRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GroupRestOperations.cs index 26d24fc47cf88..e8683db949246 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GroupRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GroupRestOperations.cs @@ -32,7 +32,7 @@ public GroupRestOperations(HttpPipeline pipeline, string applicationId, Uri endp { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -97,8 +97,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists a collection of groups defined within a service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| externalId | filter | eq | |</br>. /// Number of records to return. @@ -129,8 +129,8 @@ public async Task> ListByServiceAsync(string subscript } /// Lists a collection of groups defined within a service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| externalId | filter | eq | |</br>. /// Number of records to return. @@ -199,8 +199,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the group specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Group identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -233,8 +233,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the group specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Group identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -305,8 +305,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the details of the group specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Group identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -338,8 +338,8 @@ public async Task> GetAsync(string subscription } /// Gets the details of the group specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Group identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -417,8 +417,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or Updates a group. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Group identifier. Must be unique in the current API Management service instance. /// Create parameters. @@ -452,8 +452,8 @@ public async Task> CreateOrUpdateAsync(string s } /// Creates or Updates a group. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Group identifier. Must be unique in the current API Management service instance. /// Create parameters. @@ -530,8 +530,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates the details of the group specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Group identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -564,8 +564,8 @@ public async Task> UpdateAsync(string subscript } /// Updates the details of the group specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Group identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -637,8 +637,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes specific group of the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Group identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -665,8 +665,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes specific group of the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Group identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -716,8 +716,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists a collection of groups defined within a service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| externalId | filter | eq | |</br>. /// Number of records to return. @@ -750,8 +750,8 @@ public async Task> ListByServiceNextPageAsync(string n /// Lists a collection of groups defined within a service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| externalId | filter | eq | |</br>. /// Number of records to return. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GroupUserRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GroupUserRestOperations.cs index e13f7b1e4f832..3137c29bba3ae 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GroupUserRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GroupUserRestOperations.cs @@ -32,7 +32,7 @@ public GroupUserRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -101,8 +101,8 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro } /// Lists a collection of user entities associated with the group. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Group identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| firstName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| lastName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| email | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| registrationDate | filter | ge, le, eq, ne, gt, lt | |</br>| note | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -135,8 +135,8 @@ public async Task> ListAsync(string s } /// Lists a collection of user entities associated with the group. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Group identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| firstName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| lastName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| email | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| registrationDate | filter | ge, le, eq, ne, gt, lt | |</br>| note | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -211,8 +211,8 @@ internal HttpMessage CreateCheckEntityExistsRequest(string subscriptionId, strin } /// Checks that user entity specified by identifier is associated with the group entity. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Group identifier. Must be unique in the current API Management service instance. /// User identifier. Must be unique in the current API Management service instance. @@ -247,8 +247,8 @@ public async Task> CheckEntityExistsAsync(string subscriptionId, } /// Checks that user entity specified by identifier is associated with the group entity. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Group identifier. Must be unique in the current API Management service instance. /// User identifier. Must be unique in the current API Management service instance. @@ -325,8 +325,8 @@ internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceG } /// Add existing user to existing group. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Group identifier. Must be unique in the current API Management service instance. /// User identifier. Must be unique in the current API Management service instance. @@ -359,8 +359,8 @@ public async Task> CreateAsync(string subsc } /// Add existing user to existing group. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Group identifier. Must be unique in the current API Management service instance. /// User identifier. Must be unique in the current API Management service instance. @@ -435,8 +435,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Remove existing user from existing group. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Group identifier. Must be unique in the current API Management service instance. /// User identifier. Must be unique in the current API Management service instance. @@ -464,8 +464,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Remove existing user from existing group. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Group identifier. Must be unique in the current API Management service instance. /// User identifier. Must be unique in the current API Management service instance. @@ -516,8 +516,8 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// Lists a collection of user entities associated with the group. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Group identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| firstName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| lastName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| email | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| registrationDate | filter | ge, le, eq, ne, gt, lt | |</br>| note | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -552,8 +552,8 @@ public async Task> ListNextPageAsync( /// Lists a collection of user entities associated with the group. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Group identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| firstName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| lastName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| email | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| registrationDate | filter | ge, le, eq, ne, gt, lt | |</br>| note | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/IdentityProviderRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/IdentityProviderRestOperations.cs index 54c12302dc156..ca2741b30328d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/IdentityProviderRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/IdentityProviderRestOperations.cs @@ -32,7 +32,7 @@ public IdentityProviderRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -73,8 +73,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists a collection of Identity Provider configured in the specified service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -102,8 +102,8 @@ public async Task> ListByServiceAsync(string subs } /// Lists a collection of Identity Provider configured in the specified service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -169,8 +169,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the identityProvider specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identity Provider Type identifier. /// The cancellation token to use. @@ -202,8 +202,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the identityProvider specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identity Provider Type identifier. /// The cancellation token to use. @@ -273,8 +273,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the configuration details of the identity Provider configured in specified service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identity Provider Type identifier. /// The cancellation token to use. @@ -305,8 +305,8 @@ public async Task> GetAsync(string s } /// Gets the configuration details of the identity Provider configured in specified service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identity Provider Type identifier. /// The cancellation token to use. @@ -383,8 +383,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or Updates the IdentityProvider configuration. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identity Provider Type identifier. /// Create parameters. @@ -417,8 +417,8 @@ public async Task> CreateOrUpdateAsy } /// Creates or Updates the IdentityProvider configuration. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identity Provider Type identifier. /// Create parameters. @@ -494,8 +494,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates an existing IdentityProvider configuration. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identity Provider Type identifier. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -527,8 +527,8 @@ public async Task> UpdateAsync(strin } /// Updates an existing IdentityProvider configuration. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identity Provider Type identifier. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -599,8 +599,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes the specified identity provider configuration. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identity Provider Type identifier. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -626,8 +626,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes the specified identity provider configuration. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identity Provider Type identifier. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -693,8 +693,8 @@ internal HttpMessage CreateListSecretsRequest(string subscriptionId, string reso } /// Gets the client secret details of the Identity Provider. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identity Provider Type identifier. /// The cancellation token to use. @@ -723,8 +723,8 @@ public async Task> ListSecretsAsync(string subscr } /// Gets the client secret details of the Identity Provider. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identity Provider Type identifier. /// The cancellation token to use. @@ -776,8 +776,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists a collection of Identity Provider configured in the specified service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , , or is null. @@ -807,8 +807,8 @@ public async Task> ListByServiceNextPageAsync(str /// Lists a collection of Identity Provider configured in the specified service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , , or is null. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/IssueRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/IssueRestOperations.cs index beb398202ba98..be82c91b55422 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/IssueRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/IssueRestOperations.cs @@ -32,7 +32,7 @@ public IssueRestOperations(HttpPipeline pipeline, string applicationId, Uri endp { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -97,8 +97,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists a collection of issues in the specified service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| apiId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| title | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| authorName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>. /// Number of records to return. @@ -129,8 +129,8 @@ public async Task> ListByServiceAsync(string subscript } /// Lists a collection of issues in the specified service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| apiId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| title | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| authorName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>. /// Number of records to return. @@ -199,8 +199,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets API Management issue details. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Issue identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -232,8 +232,8 @@ public async Task> GetAsync(string subscriptionId, s } /// Gets API Management issue details. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Issue identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -288,8 +288,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists a collection of issues in the specified service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| apiId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| title | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| authorName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>. /// Number of records to return. @@ -322,8 +322,8 @@ public async Task> ListByServiceNextPageAsync(string n /// Lists a collection of issues in the specified service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| apiId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| title | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| authorName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>. /// Number of records to return. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/LoggerRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/LoggerRestOperations.cs index dccbd6a62f1ba..ca0c0f646769b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/LoggerRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/LoggerRestOperations.cs @@ -32,7 +32,7 @@ public LoggerRestOperations(HttpPipeline pipeline, string applicationId, Uri end { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -97,8 +97,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists a collection of loggers in the specified service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| loggerType | filter | eq | |</br>| resourceId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -129,8 +129,8 @@ public async Task> ListByServiceAsync(string subscrip } /// Lists a collection of loggers in the specified service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| loggerType | filter | eq | |</br>| resourceId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -199,8 +199,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the logger specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Logger identifier. Must be unique in the API Management service instance. /// The cancellation token to use. @@ -233,8 +233,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the logger specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Logger identifier. Must be unique in the API Management service instance. /// The cancellation token to use. @@ -305,8 +305,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the details of the logger specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Logger identifier. Must be unique in the API Management service instance. /// The cancellation token to use. @@ -338,8 +338,8 @@ public async Task> GetAsync(string subscriptio } /// Gets the details of the logger specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Logger identifier. Must be unique in the API Management service instance. /// The cancellation token to use. @@ -417,8 +417,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or Updates a logger. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Logger identifier. Must be unique in the API Management service instance. /// Create parameters. @@ -452,8 +452,8 @@ public async Task> CreateOrUpdateAsync(string } /// Creates or Updates a logger. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Logger identifier. Must be unique in the API Management service instance. /// Create parameters. @@ -530,8 +530,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates an existing logger. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Logger identifier. Must be unique in the API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -564,8 +564,8 @@ public async Task> UpdateAsync(string subscrip } /// Updates an existing logger. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Logger identifier. Must be unique in the API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -637,8 +637,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes the specified logger. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Logger identifier. Must be unique in the API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -665,8 +665,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes the specified logger. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Logger identifier. Must be unique in the API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -716,8 +716,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists a collection of loggers in the specified service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| loggerType | filter | eq | |</br>| resourceId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -750,8 +750,8 @@ public async Task> ListByServiceNextPageAsync(string /// Lists a collection of loggers in the specified service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| loggerType | filter | eq | |</br>| resourceId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/NamedValueRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/NamedValueRestOperations.cs index 49ca8b40f4485..266ed84dc34a8 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/NamedValueRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/NamedValueRestOperations.cs @@ -32,7 +32,7 @@ public NamedValueRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -105,8 +105,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists a collection of named values defined within a service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| tags | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith, any, all |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -138,8 +138,8 @@ public async Task> ListByServiceAsync(string subs } /// Lists a collection of named values defined within a service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| tags | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith, any, all |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -209,8 +209,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the named value specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the NamedValue. /// The cancellation token to use. @@ -243,8 +243,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the named value specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the NamedValue. /// The cancellation token to use. @@ -315,8 +315,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the details of the named value specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the NamedValue. /// The cancellation token to use. @@ -348,8 +348,8 @@ public async Task> GetAsync(string subscri } /// Gets the details of the named value specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the NamedValue. /// The cancellation token to use. @@ -427,8 +427,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or updates named value. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the NamedValue. /// Create parameters. @@ -458,8 +458,8 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re } /// Creates or updates named value. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the NamedValue. /// Create parameters. @@ -532,8 +532,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates the specific named value. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the NamedValue. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -562,8 +562,8 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr } /// Updates the specific named value. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the NamedValue. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -631,8 +631,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes specific named value from the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the NamedValue. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -659,8 +659,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes specific named value from the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the NamedValue. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -727,8 +727,8 @@ internal HttpMessage CreateListValueRequest(string subscriptionId, string resour } /// Gets the secret of the named value specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the NamedValue. /// The cancellation token to use. @@ -758,8 +758,8 @@ public async Task> ListValueAsync(string subs } /// Gets the secret of the named value specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the NamedValue. /// The cancellation token to use. @@ -829,8 +829,8 @@ internal HttpMessage CreateRefreshSecretRequest(string subscriptionId, string re } /// Refresh the secret of the named value specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the NamedValue. /// The cancellation token to use. @@ -856,8 +856,8 @@ public async Task RefreshSecretAsync(string subscriptionId, string res } /// Refresh the secret of the named value specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the NamedValue. /// The cancellation token to use. @@ -906,8 +906,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists a collection of named values defined within a service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| tags | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith, any, all |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -941,8 +941,8 @@ public async Task> ListByServiceNextPageAsync(str /// Lists a collection of named values defined within a service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| tags | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith, any, all |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/NetworkStatusRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/NetworkStatusRestOperations.cs index e0b16e4362560..99db18c2758b7 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/NetworkStatusRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/NetworkStatusRestOperations.cs @@ -33,7 +33,7 @@ public NetworkStatusRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -74,8 +74,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -108,8 +108,8 @@ public async Task>> Li } /// Gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -182,8 +182,8 @@ internal HttpMessage CreateListByLocationRequest(string subscriptionId, string r } /// Gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Location in which the API Management service is deployed. This is one of the Azure Regions like West US, East US, South Central US. /// The cancellation token to use. @@ -212,8 +212,8 @@ public async Task> ListByLocationAsync(string su } /// Gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Location in which the API Management service is deployed. This is one of the Azure Regions like West US, East US, South Central US. /// The cancellation token to use. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/NotificationRecipientEmailRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/NotificationRecipientEmailRestOperations.cs index fa1e34e33cb0d..131bedddde002 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/NotificationRecipientEmailRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/NotificationRecipientEmailRestOperations.cs @@ -32,7 +32,7 @@ public NotificationRecipientEmailRestOperations(HttpPipeline pipeline, string ap { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -77,8 +77,8 @@ internal HttpMessage CreateListByNotificationRequest(string subscriptionId, stri } /// Gets the list of the Notification Recipient Emails subscribed to a notification. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Notification Name Identifier. /// The cancellation token to use. @@ -107,8 +107,8 @@ public async Task> ListByNotificationAsync(st } /// Gets the list of the Notification Recipient Emails subscribed to a notification. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Notification Name Identifier. /// The cancellation token to use. @@ -179,8 +179,8 @@ internal HttpMessage CreateCheckEntityExistsRequest(string subscriptionId, strin } /// Determine if Notification Recipient Email subscribed to the notification. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Notification Name Identifier. /// Email identifier. @@ -214,8 +214,8 @@ public async Task> CheckEntityExistsAsync(string subscriptionId, } /// Determine if Notification Recipient Email subscribed to the notification. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Notification Name Identifier. /// Email identifier. @@ -291,8 +291,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Adds the Email address to the list of Recipients for the Notification. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Notification Name Identifier. /// Email identifier. @@ -324,8 +324,8 @@ public async Task> CreateOrUpdateAsync(string s } /// Adds the Email address to the list of Recipients for the Notification. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Notification Name Identifier. /// Email identifier. @@ -399,8 +399,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Removes the email from the list of Notification. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Notification Name Identifier. /// Email identifier. @@ -427,8 +427,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Removes the email from the list of Notification. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Notification Name Identifier. /// Email identifier. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/NotificationRecipientUserRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/NotificationRecipientUserRestOperations.cs index 4aada53a8203e..7595b53d227ce 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/NotificationRecipientUserRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/NotificationRecipientUserRestOperations.cs @@ -32,7 +32,7 @@ public NotificationRecipientUserRestOperations(HttpPipeline pipeline, string app { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -77,8 +77,8 @@ internal HttpMessage CreateListByNotificationRequest(string subscriptionId, stri } /// Gets the list of the Notification Recipient User subscribed to the notification. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Notification Name Identifier. /// The cancellation token to use. @@ -107,8 +107,8 @@ public async Task> ListByNotificationAsync(str } /// Gets the list of the Notification Recipient User subscribed to the notification. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Notification Name Identifier. /// The cancellation token to use. @@ -179,8 +179,8 @@ internal HttpMessage CreateCheckEntityExistsRequest(string subscriptionId, strin } /// Determine if the Notification Recipient User is subscribed to the notification. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Notification Name Identifier. /// User identifier. Must be unique in the current API Management service instance. @@ -214,8 +214,8 @@ public async Task> CheckEntityExistsAsync(string subscriptionId, } /// Determine if the Notification Recipient User is subscribed to the notification. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Notification Name Identifier. /// User identifier. Must be unique in the current API Management service instance. @@ -291,8 +291,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Adds the API Management User to the list of Recipients for the Notification. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Notification Name Identifier. /// User identifier. Must be unique in the current API Management service instance. @@ -324,8 +324,8 @@ public async Task> CreateOrUpdateAsync(string su } /// Adds the API Management User to the list of Recipients for the Notification. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Notification Name Identifier. /// User identifier. Must be unique in the current API Management service instance. @@ -399,8 +399,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Removes the API Management user from the list of Notification. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Notification Name Identifier. /// User identifier. Must be unique in the current API Management service instance. @@ -427,8 +427,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Removes the API Management user from the list of Notification. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Notification Name Identifier. /// User identifier. Must be unique in the current API Management service instance. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/NotificationRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/NotificationRestOperations.cs index 4876ed14b855d..a11a38ec2c657 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/NotificationRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/NotificationRestOperations.cs @@ -32,7 +32,7 @@ public NotificationRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -89,8 +89,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists a collection of properties defined within a service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Number of records to return. /// Number of records to skip. @@ -120,8 +120,8 @@ public async Task> ListByServiceAsync(string su } /// Lists a collection of properties defined within a service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Number of records to return. /// Number of records to skip. @@ -189,8 +189,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the details of the Notification specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Notification Name Identifier. /// The cancellation token to use. @@ -221,8 +221,8 @@ public async Task> GetAsync(string subsc } /// Gets the details of the Notification specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Notification Name Identifier. /// The cancellation token to use. @@ -295,8 +295,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Create or Update API Management publisher notification. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Notification Name Identifier. /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. @@ -326,8 +326,8 @@ public async Task> CreateOrUpdateAsync(s } /// Create or Update API Management publisher notification. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Notification Name Identifier. /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. @@ -380,8 +380,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists a collection of properties defined within a service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Number of records to return. /// Number of records to skip. @@ -413,8 +413,8 @@ public async Task> ListByServiceNextPageAsync(s /// Lists a collection of properties defined within a service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Number of records to return. /// Number of records to skip. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/OpenIdConnectProviderRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/OpenIdConnectProviderRestOperations.cs index caf0e4c4b68bb..53d069dc2b51e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/OpenIdConnectProviderRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/OpenIdConnectProviderRestOperations.cs @@ -32,7 +32,7 @@ public OpenIdConnectProviderRestOperations(HttpPipeline pipeline, string applica { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -97,8 +97,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists of all the OpenId Connect Providers. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -129,8 +129,8 @@ public async Task> ListByServiceAsync( } /// Lists of all the OpenId Connect Providers. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -199,8 +199,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the openIdConnectProvider specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the OpenID Connect Provider. /// The cancellation token to use. @@ -233,8 +233,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the openIdConnectProvider specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the OpenID Connect Provider. /// The cancellation token to use. @@ -305,8 +305,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets specific OpenID Connect Provider without secrets. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the OpenID Connect Provider. /// The cancellation token to use. @@ -338,8 +338,8 @@ public async Task> GetAsync(str } /// Gets specific OpenID Connect Provider without secrets. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the OpenID Connect Provider. /// The cancellation token to use. @@ -417,8 +417,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or updates the OpenID Connect Provider. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the OpenID Connect Provider. /// Create parameters. @@ -452,8 +452,8 @@ public async Task> CreateOrUpda } /// Creates or updates the OpenID Connect Provider. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the OpenID Connect Provider. /// Create parameters. @@ -530,8 +530,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates the specific OpenID Connect Provider. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the OpenID Connect Provider. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -564,8 +564,8 @@ public async Task> UpdateAsync( } /// Updates the specific OpenID Connect Provider. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the OpenID Connect Provider. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -637,8 +637,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes specific OpenID Connect Provider of the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the OpenID Connect Provider. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -665,8 +665,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes specific OpenID Connect Provider of the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the OpenID Connect Provider. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -733,8 +733,8 @@ internal HttpMessage CreateListSecretsRequest(string subscriptionId, string reso } /// Gets the client secret details of the OpenID Connect Provider. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the OpenID Connect Provider. /// The cancellation token to use. @@ -764,8 +764,8 @@ public async Task> ListSecretsAsync(string subscr } /// Gets the client secret details of the OpenID Connect Provider. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the OpenID Connect Provider. /// The cancellation token to use. @@ -818,8 +818,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists of all the OpenId Connect Providers. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -852,8 +852,8 @@ public async Task> ListByServiceNextPa /// Lists of all the OpenId Connect Providers. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/OperationRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/OperationRestOperations.cs index c17d1672e162f..46472fdaf7b54 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/OperationRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/OperationRestOperations.cs @@ -32,7 +32,7 @@ public OperationRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -109,8 +109,8 @@ internal HttpMessage CreateListByTagsRequest(string subscriptionId, string resou } /// Lists a collection of operations associated with tags. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| apiName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -144,8 +144,8 @@ public async Task> ListByTagsAsync(string subscr } /// Lists a collection of operations associated with tags. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| apiName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -202,8 +202,8 @@ internal HttpMessage CreateListByTagsNextPageRequest(string nextLink, string sub /// Lists a collection of operations associated with tags. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| apiName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -239,8 +239,8 @@ public async Task> ListByTagsNextPageAsync(strin /// Lists a collection of operations associated with tags. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| apiName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/OutboundNetworkDependenciesEndpointsRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/OutboundNetworkDependenciesEndpointsRestOperations.cs index b586b712f32d6..db0162ffac1ea 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/OutboundNetworkDependenciesEndpointsRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/OutboundNetworkDependenciesEndpointsRestOperations.cs @@ -32,7 +32,7 @@ public OutboundNetworkDependenciesEndpointsRestOperations(HttpPipeline pipeline, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -73,8 +73,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Gets the network endpoints of all outbound dependencies of a ApiManagement service. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -102,8 +102,8 @@ public async Task> ListByServiceAsync( } /// Gets the network endpoints of all outbound dependencies of a ApiManagement service. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PolicyDescriptionRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PolicyDescriptionRestOperations.cs index 4e933dad2cc80..23e585d585efd 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PolicyDescriptionRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PolicyDescriptionRestOperations.cs @@ -32,7 +32,7 @@ public PolicyDescriptionRestOperations(HttpPipeline pipeline, string application { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -81,8 +81,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists all policy descriptions. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Policy scope. /// The cancellation token to use. @@ -111,8 +111,8 @@ public async Task> ListByServiceAsync(stri } /// Lists all policy descriptions. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Policy scope. /// The cancellation token to use. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PolicyFragmentRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PolicyFragmentRestOperations.cs new file mode 100644 index 0000000000000..61856470b4374 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PolicyFragmentRestOperations.cs @@ -0,0 +1,718 @@ +// 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.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + internal partial class PolicyFragmentRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of PolicyFragmentRestOperations. + /// 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 PolicyFragmentRestOperations(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 ?? "2022-08-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListByServiceRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string filter, string orderBy, int? top, int? skip) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/policyFragments", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + if (orderBy != null) + { + uri.AppendQuery("$orderby", orderBy, true); + } + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + if (skip != null) + { + uri.AppendQuery("$skip", skip.Value, true); + } + return uri; + } + + internal HttpMessage CreateListByServiceRequest(string subscriptionId, string resourceGroupName, string serviceName, string filter, string orderBy, int? top, int? skip) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/policyFragments", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + if (orderBy != null) + { + uri.AppendQuery("$orderby", orderBy, true); + } + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + if (skip != null) + { + uri.AppendQuery("$skip", skip.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets all policy fragments. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter, orderBy | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| value | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// OData order by query option. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByServiceAsync(string subscriptionId, string resourceGroupName, string serviceName, string filter = null, string orderBy = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateListByServiceRequest(subscriptionId, resourceGroupName, serviceName, filter, orderBy, top, skip); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PolicyFragmentListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = PolicyFragmentListResult.DeserializePolicyFragmentListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets all policy fragments. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter, orderBy | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| value | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// OData order by query option. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByService(string subscriptionId, string resourceGroupName, string serviceName, string filter = null, string orderBy = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateListByServiceRequest(subscriptionId, resourceGroupName, serviceName, filter, orderBy, top, skip); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PolicyFragmentListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = PolicyFragmentListResult.DeserializePolicyFragmentListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetEntityTagRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string id) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/policyFragments/", false); + uri.AppendPath(id, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string resourceGroupName, string serviceName, string id) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Head; + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/policyFragments/", false); + uri.AppendPath(id, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the entity state (Etag) version of a policy fragment. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// A resource identifier. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetEntityTagAsync(string subscriptionId, string resourceGroupName, string serviceName, string id, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(id, nameof(id)); + + using var message = CreateGetEntityTagRequest(subscriptionId, resourceGroupName, serviceName, id); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case int s when s >= 200 && s < 300: + { + bool value = true; + return Response.FromValue(value, message.Response); + } + case int s when s >= 400 && s < 500: + { + bool value = false; + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the entity state (Etag) version of a policy fragment. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// A resource identifier. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetEntityTag(string subscriptionId, string resourceGroupName, string serviceName, string id, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(id, nameof(id)); + + using var message = CreateGetEntityTagRequest(subscriptionId, resourceGroupName, serviceName, id); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case int s when s >= 200 && s < 300: + { + bool value = true; + return Response.FromValue(value, message.Response); + } + case int s when s >= 400 && s < 500: + { + bool value = false; + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string id, PolicyFragmentContentFormat? format) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/policyFragments/", false); + uri.AppendPath(id, true); + uri.AppendQuery("api-version", _apiVersion, true); + if (format != null) + { + uri.AppendQuery("format", format.Value.ToString(), true); + } + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serviceName, string id, PolicyFragmentContentFormat? format) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/policyFragments/", false); + uri.AppendPath(id, true); + uri.AppendQuery("api-version", _apiVersion, true); + if (format != null) + { + uri.AppendQuery("format", format.Value.ToString(), true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets a policy fragment. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// A resource identifier. + /// Policy fragment content format. + /// 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 serviceName, string id, PolicyFragmentContentFormat? format = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(id, nameof(id)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, id, format); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PolicyFragmentContractData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = PolicyFragmentContractData.DeserializePolicyFragmentContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((PolicyFragmentContractData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets a policy fragment. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// A resource identifier. + /// Policy fragment content format. + /// 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 serviceName, string id, PolicyFragmentContentFormat? format = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(id, nameof(id)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, id, format); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PolicyFragmentContractData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = PolicyFragmentContractData.DeserializePolicyFragmentContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((PolicyFragmentContractData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string id, PolicyFragmentContractData data, ETag? ifMatch) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/policyFragments/", false); + uri.AppendPath(id, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string id, PolicyFragmentContractData data, ETag? ifMatch) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/policyFragments/", false); + uri.AppendPath(id, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + if (ifMatch != null) + { + request.Headers.Add("If-Match", ifMatch.Value); + } + 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 policy fragment. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// A resource identifier. + /// The policy fragment contents to apply. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string serviceName, string id, PolicyFragmentContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(id, nameof(id)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, id, data, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates or updates a policy fragment. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// A resource identifier. + /// The policy fragment contents to apply. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string serviceName, string id, PolicyFragmentContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(id, nameof(id)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, id, data, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string id, ETag ifMatch) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/policyFragments/", false); + uri.AppendPath(id, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string serviceName, string id, ETag ifMatch) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/policyFragments/", false); + uri.AppendPath(id, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("If-Match", ifMatch); + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Deletes a policy fragment. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// A resource identifier. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string serviceName, string id, ETag ifMatch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(id, nameof(id)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, id, ifMatch); + 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 policy fragment. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// A resource identifier. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string serviceName, string id, ETag ifMatch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(id, nameof(id)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, id, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListReferencesRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string id, int? top, int? skip) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/policyFragments/", false); + uri.AppendPath(id, true); + uri.AppendPath("/listReferences", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + if (skip != null) + { + uri.AppendQuery("$skip", skip.Value, true); + } + return uri; + } + + internal HttpMessage CreateListReferencesRequest(string subscriptionId, string resourceGroupName, string serviceName, string id, int? top, int? skip) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/policyFragments/", false); + uri.AppendPath(id, true); + uri.AppendPath("/listReferences", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + if (skip != null) + { + uri.AppendQuery("$skip", skip.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists policy resources that reference the policy fragment. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// A resource identifier. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListReferencesAsync(string subscriptionId, string resourceGroupName, string serviceName, string id, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(id, nameof(id)); + + using var message = CreateListReferencesRequest(subscriptionId, resourceGroupName, serviceName, id, top, skip); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ResourceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ResourceListResult.DeserializeResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists policy resources that reference the policy fragment. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// A resource identifier. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListReferences(string subscriptionId, string resourceGroupName, string serviceName, string id, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(id, nameof(id)); + + using var message = CreateListReferencesRequest(subscriptionId, resourceGroupName, serviceName, id, top, skip); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ResourceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ResourceListResult.DeserializeResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PolicyRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PolicyRestOperations.cs index d3b36f7e7f36e..42cada163f79c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PolicyRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PolicyRestOperations.cs @@ -32,7 +32,7 @@ public PolicyRestOperations(HttpPipeline pipeline, string applicationId, Uri end { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -73,8 +73,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists all the Global Policy definitions of the Api Management service. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -102,8 +102,8 @@ public async Task> ListByServiceAsync(string subscrip } /// Lists all the Global Policy definitions of the Api Management service. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -169,8 +169,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the Global policy definition in the Api Management service. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Policy. /// The cancellation token to use. @@ -202,8 +202,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the Global policy definition in the Api Management service. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Policy. /// The cancellation token to use. @@ -281,8 +281,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Get the Global policy definition of the Api Management service. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Policy. /// Policy Export Format. @@ -314,8 +314,8 @@ public async Task> GetAsync(string subscriptionId, } /// Get the Global policy definition of the Api Management service. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Policy. /// Policy Export Format. @@ -393,8 +393,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or updates the global policy configuration of the Api Management service. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Policy. /// The policy contents to apply. @@ -427,8 +427,8 @@ public async Task> CreateOrUpdateAsync(string subsc } /// Creates or updates the global policy configuration of the Api Management service. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Policy. /// The policy contents to apply. @@ -500,8 +500,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes the global policy configuration of the Api Management Service. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Policy. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -527,8 +527,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes the global policy configuration of the Api Management Service. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Policy. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PortalConfigRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PortalConfigRestOperations.cs new file mode 100644 index 0000000000000..a2b0aa42532f9 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PortalConfigRestOperations.cs @@ -0,0 +1,565 @@ +// 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.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + internal partial class PortalConfigRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of PortalConfigRestOperations. + /// 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 PortalConfigRestOperations(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 ?? "2022-08-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListByServiceRequestUri(string subscriptionId, string resourceGroupName, string serviceName) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/portalconfigs", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByServiceRequest(string subscriptionId, string resourceGroupName, string serviceName) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/portalconfigs", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists the developer portal configurations. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByServiceAsync(string subscriptionId, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateListByServiceRequest(subscriptionId, resourceGroupName, serviceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PortalConfigListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = PortalConfigListResult.DeserializePortalConfigListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists the developer portal configurations. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByService(string subscriptionId, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateListByServiceRequest(subscriptionId, resourceGroupName, serviceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PortalConfigListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = PortalConfigListResult.DeserializePortalConfigListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetEntityTagRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string portalConfigId) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/portalconfigs/", false); + uri.AppendPath(portalConfigId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string resourceGroupName, string serviceName, string portalConfigId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Head; + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/portalconfigs/", false); + uri.AppendPath(portalConfigId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the entity state (Etag) version of the developer portal configuration. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Portal configuration identifier. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetEntityTagAsync(string subscriptionId, string resourceGroupName, string serviceName, string portalConfigId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(portalConfigId, nameof(portalConfigId)); + + using var message = CreateGetEntityTagRequest(subscriptionId, resourceGroupName, serviceName, portalConfigId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case int s when s >= 200 && s < 300: + { + bool value = true; + return Response.FromValue(value, message.Response); + } + case int s when s >= 400 && s < 500: + { + bool value = false; + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the entity state (Etag) version of the developer portal configuration. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Portal configuration identifier. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetEntityTag(string subscriptionId, string resourceGroupName, string serviceName, string portalConfigId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(portalConfigId, nameof(portalConfigId)); + + using var message = CreateGetEntityTagRequest(subscriptionId, resourceGroupName, serviceName, portalConfigId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case int s when s >= 200 && s < 300: + { + bool value = true; + return Response.FromValue(value, message.Response); + } + case int s when s >= 400 && s < 500: + { + bool value = false; + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string portalConfigId) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/portalconfigs/", false); + uri.AppendPath(portalConfigId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serviceName, string portalConfigId) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/portalconfigs/", false); + uri.AppendPath(portalConfigId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get the developer portal configuration. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Portal configuration identifier. + /// 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 serviceName, string portalConfigId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(portalConfigId, nameof(portalConfigId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, portalConfigId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PortalConfigContractData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = PortalConfigContractData.DeserializePortalConfigContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((PortalConfigContractData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get the developer portal configuration. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Portal configuration identifier. + /// 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 serviceName, string portalConfigId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(portalConfigId, nameof(portalConfigId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, portalConfigId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PortalConfigContractData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = PortalConfigContractData.DeserializePortalConfigContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((PortalConfigContractData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string portalConfigId, ETag ifMatch, PortalConfigContractData 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/portalconfigs/", false); + uri.AppendPath(portalConfigId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string portalConfigId, ETag ifMatch, PortalConfigContractData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/portalconfigs/", false); + uri.AppendPath(portalConfigId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("If-Match", ifMatch); + 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 the developer portal configuration. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Portal configuration identifier. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// Update the developer portal configuration. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> UpdateAsync(string subscriptionId, string resourceGroupName, string serviceName, string portalConfigId, ETag ifMatch, PortalConfigContractData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(portalConfigId, nameof(portalConfigId)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, serviceName, portalConfigId, ifMatch, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PortalConfigContractData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = PortalConfigContractData.DeserializePortalConfigContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Update the developer portal configuration. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Portal configuration identifier. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// Update the developer portal configuration. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string serviceName, string portalConfigId, ETag ifMatch, PortalConfigContractData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(portalConfigId, nameof(portalConfigId)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, serviceName, portalConfigId, ifMatch, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PortalConfigContractData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = PortalConfigContractData.DeserializePortalConfigContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string portalConfigId, ETag ifMatch, PortalConfigContractData 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/portalconfigs/", false); + uri.AppendPath(portalConfigId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string portalConfigId, ETag ifMatch, PortalConfigContractData 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/portalconfigs/", false); + uri.AppendPath(portalConfigId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("If-Match", ifMatch); + 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; + } + + /// Create or update the developer portal configuration. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Portal configuration identifier. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// Update the developer portal configuration. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string serviceName, string portalConfigId, ETag ifMatch, PortalConfigContractData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(portalConfigId, nameof(portalConfigId)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, portalConfigId, ifMatch, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PortalConfigContractData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = PortalConfigContractData.DeserializePortalConfigContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create or update the developer portal configuration. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Portal configuration identifier. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// Update the developer portal configuration. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string serviceName, string portalConfigId, ETag ifMatch, PortalConfigContractData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(portalConfigId, nameof(portalConfigId)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, portalConfigId, ifMatch, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PortalConfigContractData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = PortalConfigContractData.DeserializePortalConfigContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PortalRevisionRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PortalRevisionRestOperations.cs index 76b3ea0d8d062..c6bbe40ac7584 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PortalRevisionRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PortalRevisionRestOperations.cs @@ -32,7 +32,7 @@ public PortalRevisionRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -97,8 +97,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists developer portal's revisions. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// /// | Field | Supported operators | Supported functions | @@ -137,8 +137,8 @@ public async Task> ListByServiceAsync(string } /// Lists developer portal's revisions. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// /// | Field | Supported operators | Supported functions | @@ -215,8 +215,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the developer portal revision specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Portal revision identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -249,8 +249,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the developer portal revision specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Portal revision identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -321,8 +321,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the developer portal's revision specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Portal revision identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -354,8 +354,8 @@ public async Task> GetAsync(string sub } /// Gets the developer portal's revision specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Portal revision identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -429,8 +429,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates a new developer portal's revision by running the portal's publishing. The `isCurrent` property indicates if the revision is publicly accessible. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Portal revision identifier. Must be unique in the current API Management service instance. /// The to use. @@ -458,8 +458,8 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re } /// Creates a new developer portal's revision by running the portal's publishing. The `isCurrent` property indicates if the revision is publicly accessible. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Portal revision identifier. Must be unique in the current API Management service instance. /// The to use. @@ -530,8 +530,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates the description of specified portal revision or makes it current. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Portal revision identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -560,8 +560,8 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr } /// Updates the description of specified portal revision or makes it current. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Portal revision identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -613,8 +613,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists developer portal's revisions. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// /// | Field | Supported operators | Supported functions | @@ -655,8 +655,8 @@ public async Task> ListByServiceNextPageAsync /// Lists developer portal's revisions. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// /// | Field | Supported operators | Supported functions | diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PortalSettingsRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PortalSettingsRestOperations.cs index 440202af83f83..5e1c313ed6eb1 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PortalSettingsRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PortalSettingsRestOperations.cs @@ -32,7 +32,7 @@ public PortalSettingsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -73,8 +73,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists a collection of portalsettings defined within a service instance.. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -102,8 +102,8 @@ public async Task> ListByServiceAsync(string } /// Lists a collection of portalsettings defined within a service instance.. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PrivateEndpointConnectionRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PrivateEndpointConnectionRestOperations.cs index 13d4f78ca5597..68e837c26eee4 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PrivateEndpointConnectionRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PrivateEndpointConnectionRestOperations.cs @@ -32,7 +32,7 @@ public PrivateEndpointConnectionRestOperations(HttpPipeline pipeline, string app { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -73,8 +73,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists all private endpoint connections of the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -102,8 +102,8 @@ public async Task> Li } /// Lists all private endpoint connections of the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -169,8 +169,8 @@ internal HttpMessage CreateGetByNameRequest(string subscriptionId, string resour } /// Gets the details of the Private Endpoint Connection specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Name of the private endpoint connection. /// The cancellation token to use. @@ -202,8 +202,8 @@ public async Task> GetByNam } /// Gets the details of the Private Endpoint Connection specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Name of the private endpoint connection. /// The cancellation token to use. @@ -277,8 +277,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates a new Private Endpoint Connection or updates an existing one. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Name of the private endpoint connection. /// The to use. @@ -306,8 +306,8 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re } /// Creates a new Private Endpoint Connection or updates an existing one. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Name of the private endpoint connection. /// The to use. @@ -373,8 +373,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes the specified Private Endpoint Connection. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Name of the private endpoint connection. /// The cancellation token to use. @@ -401,8 +401,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes the specified Private Endpoint Connection. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Name of the private endpoint connection. /// The cancellation token to use. @@ -465,8 +465,8 @@ internal HttpMessage CreateListPrivateLinkResourcesRequest(string subscriptionId } /// Gets the private link resources. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -494,8 +494,8 @@ public async Task> ListPriv } /// Gets the private link resources. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -561,8 +561,8 @@ internal HttpMessage CreateGetPrivateLinkResourceRequest(string subscriptionId, } /// Gets the private link resources. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Name of the private link resource. /// The cancellation token to use. @@ -594,8 +594,8 @@ public async Task> GetPrivateLink } /// Gets the private link resources. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Name of the private link resource. /// The cancellation token to use. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductApiRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductApiRestOperations.cs index 6be9d23054441..deda5f49ee464 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductApiRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductApiRestOperations.cs @@ -32,7 +32,7 @@ public ProductApiRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -101,8 +101,8 @@ internal HttpMessage CreateListByProductRequest(string subscriptionId, string re } /// Lists a collection of the APIs associated with a product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -135,8 +135,8 @@ public async Task> ListByProductAsyn } /// Lists a collection of the APIs associated with a product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -211,8 +211,8 @@ internal HttpMessage CreateCheckEntityExistsRequest(string subscriptionId, strin } /// Checks that API entity specified by identifier is associated with the Product entity. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. @@ -247,8 +247,8 @@ public async Task> CheckEntityExistsAsync(string subscriptionId, } /// Checks that API entity specified by identifier is associated with the Product entity. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. @@ -325,8 +325,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Adds an API to the specified product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. @@ -359,8 +359,8 @@ public async Task> CreateOrUpdateAsync(string subscript } /// Adds an API to the specified product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. @@ -435,8 +435,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes the specified API from the specified product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. @@ -464,8 +464,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes the specified API from the specified product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. @@ -516,8 +516,8 @@ internal HttpMessage CreateListByProductNextPageRequest(string nextLink, string /// Lists a collection of the APIs associated with a product. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -552,8 +552,8 @@ public async Task> ListByProductNext /// Lists a collection of the APIs associated with a product. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductGroupRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductGroupRestOperations.cs index 37f205664f041..66283b7ca8f14 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductGroupRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductGroupRestOperations.cs @@ -32,7 +32,7 @@ public ProductGroupRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -101,8 +101,8 @@ internal HttpMessage CreateListByProductRequest(string subscriptionId, string re } /// Lists the collection of developer groups associated with the specified product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | |</br>| displayName | filter | eq, ne | |</br>| description | filter | eq, ne | |</br>. @@ -135,8 +135,8 @@ public async Task> ListByProductAs } /// Lists the collection of developer groups associated with the specified product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | |</br>| displayName | filter | eq, ne | |</br>| description | filter | eq, ne | |</br>. @@ -211,8 +211,8 @@ internal HttpMessage CreateCheckEntityExistsRequest(string subscriptionId, strin } /// Checks that Group entity specified by identifier is associated with the Product entity. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// Group identifier. Must be unique in the current API Management service instance. @@ -247,8 +247,8 @@ public async Task> CheckEntityExistsAsync(string subscriptionId, } /// Checks that Group entity specified by identifier is associated with the Product entity. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// Group identifier. Must be unique in the current API Management service instance. @@ -325,8 +325,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Adds the association between the specified developer group with the specified product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// Group identifier. Must be unique in the current API Management service instance. @@ -359,8 +359,8 @@ public async Task> CreateOrUpdateAsync(string subscri } /// Adds the association between the specified developer group with the specified product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// Group identifier. Must be unique in the current API Management service instance. @@ -435,8 +435,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes the association between the specified group and product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// Group identifier. Must be unique in the current API Management service instance. @@ -464,8 +464,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes the association between the specified group and product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// Group identifier. Must be unique in the current API Management service instance. @@ -516,8 +516,8 @@ internal HttpMessage CreateListByProductNextPageRequest(string nextLink, string /// Lists the collection of developer groups associated with the specified product. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | |</br>| displayName | filter | eq, ne | |</br>| description | filter | eq, ne | |</br>. @@ -552,8 +552,8 @@ public async Task> ListByProductNe /// Lists the collection of developer groups associated with the specified product. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | |</br>| displayName | filter | eq, ne | |</br>| description | filter | eq, ne | |</br>. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductPolicyRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductPolicyRestOperations.cs index 9c598be7cedf5..de5f472786310 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductPolicyRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductPolicyRestOperations.cs @@ -32,7 +32,7 @@ public ProductPolicyRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -77,8 +77,8 @@ internal HttpMessage CreateListByProductRequest(string subscriptionId, string re } /// Get the policy configuration at the Product level. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -108,8 +108,8 @@ public async Task> ListByProductAsync(string subscrip } /// Get the policy configuration at the Product level. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -181,8 +181,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Get the ETag of the policy configuration at the Product level. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// The identifier of the Policy. @@ -216,8 +216,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Get the ETag of the policy configuration at the Product level. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// The identifier of the Policy. @@ -301,8 +301,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Get the policy configuration at the Product level. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// The identifier of the Policy. @@ -336,8 +336,8 @@ public async Task> GetAsync(string subscriptionId, } /// Get the policy configuration at the Product level. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// The identifier of the Policy. @@ -421,8 +421,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or updates policy configuration for the Product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// The identifier of the Policy. @@ -457,8 +457,8 @@ public async Task> CreateOrUpdateAsync(string subsc } /// Creates or updates policy configuration for the Product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// The identifier of the Policy. @@ -536,8 +536,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes the policy configuration at the Product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// The identifier of the Policy. @@ -565,8 +565,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes the policy configuration at the Product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// The identifier of the Policy. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductRestOperations.cs index dddf8e1ca9ff3..fdb07457b7237 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductRestOperations.cs @@ -32,7 +32,7 @@ public ProductRestOperations(HttpPipeline pipeline, string applicationId, Uri en { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -113,8 +113,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists a collection of products in the specified service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>| groups | expand | | |</br>. /// Number of records to return. @@ -147,8 +147,8 @@ public async Task> ListByServiceAsync(string subscri } /// Lists a collection of products in the specified service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>| groups | expand | | |</br>. /// Number of records to return. @@ -219,8 +219,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the product specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -253,8 +253,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the product specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -325,8 +325,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the details of the product specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -358,8 +358,8 @@ public async Task> GetAsync(string subscripti } /// Gets the details of the product specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -437,8 +437,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or Updates a product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// Create or update parameters. @@ -472,8 +472,8 @@ public async Task> CreateOrUpdateAsync(string } /// Creates or Updates a product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// Create or update parameters. @@ -550,8 +550,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Update existing product details. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -584,8 +584,8 @@ public async Task> UpdateAsync(string subscri } /// Update existing product details. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -665,8 +665,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Delete product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -694,8 +694,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Delete product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -791,8 +791,8 @@ internal HttpMessage CreateListByTagsRequest(string subscriptionId, string resou } /// Lists a collection of products associated with tags. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -824,8 +824,8 @@ public async Task> ListByTagsAsync(string subscr } /// Lists a collection of products associated with tags. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -880,8 +880,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists a collection of products in the specified service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>| groups | expand | | |</br>. /// Number of records to return. @@ -916,8 +916,8 @@ public async Task> ListByServiceNextPageAsync(string /// Lists a collection of products in the specified service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>| groups | expand | | |</br>. /// Number of records to return. @@ -974,8 +974,8 @@ internal HttpMessage CreateListByTagsNextPageRequest(string nextLink, string sub /// Lists a collection of products associated with tags. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -1009,8 +1009,8 @@ public async Task> ListByTagsNextPageAsync(strin /// Lists a collection of products associated with tags. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | substringof, contains, startswith, endswith |</br>. /// Number of records to return. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductSubscriptionsRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductSubscriptionsRestOperations.cs index 97d5113041083..4701f8430319b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductSubscriptionsRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductSubscriptionsRestOperations.cs @@ -32,7 +32,7 @@ public ProductSubscriptionsRestOperations(HttpPipeline pipeline, string applicat { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -101,8 +101,8 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro } /// Lists the collection of subscriptions to the specified product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>| user | expand | | |</br>. @@ -135,8 +135,8 @@ public async Task> ListAsync(string subscriptio } /// Lists the collection of subscriptions to the specified product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>| user | expand | | |</br>. @@ -192,8 +192,8 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// Lists the collection of subscriptions to the specified product. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>| user | expand | | |</br>. @@ -228,8 +228,8 @@ public async Task> ListNextPageAsync(string nex /// Lists the collection of subscriptions to the specified product. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>| user | expand | | |</br>. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductWikiRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductWikiRestOperations.cs new file mode 100644 index 0000000000000..d34f3569a44b8 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductWikiRestOperations.cs @@ -0,0 +1,581 @@ +// 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.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + internal partial class ProductWikiRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ProductWikiRestOperations. + /// 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 ProductWikiRestOperations(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 ?? "2022-08-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetEntityTagRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string productId) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/products/", false); + uri.AppendPath(productId, true); + uri.AppendPath("/wikis/default", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string resourceGroupName, string serviceName, string productId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Head; + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/products/", false); + uri.AppendPath(productId, true); + uri.AppendPath("/wikis/default", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the entity state (Etag) version of the Wiki for a Product specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Product identifier. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetEntityTagAsync(string subscriptionId, string resourceGroupName, string serviceName, string productId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(productId, nameof(productId)); + + using var message = CreateGetEntityTagRequest(subscriptionId, resourceGroupName, serviceName, productId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case int s when s >= 200 && s < 300: + { + bool value = true; + return Response.FromValue(value, message.Response); + } + case int s when s >= 400 && s < 500: + { + bool value = false; + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the entity state (Etag) version of the Wiki for a Product specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Product identifier. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetEntityTag(string subscriptionId, string resourceGroupName, string serviceName, string productId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(productId, nameof(productId)); + + using var message = CreateGetEntityTagRequest(subscriptionId, resourceGroupName, serviceName, productId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case int s when s >= 200 && s < 300: + { + bool value = true; + return Response.FromValue(value, message.Response); + } + case int s when s >= 400 && s < 500: + { + bool value = false; + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string productId) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/products/", false); + uri.AppendPath(productId, true); + uri.AppendPath("/wikis/default", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serviceName, string productId) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/products/", false); + uri.AppendPath(productId, true); + uri.AppendPath("/wikis/default", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the details of the Wiki for a Product specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Product identifier. Must be unique in the current API Management service instance. + /// 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 serviceName, string productId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(productId, nameof(productId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, productId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WikiContractData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WikiContractData.DeserializeWikiContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((WikiContractData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the details of the Wiki for a Product specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Product identifier. Must be unique in the current API Management service instance. + /// 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 serviceName, string productId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(productId, nameof(productId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, productId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WikiContractData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WikiContractData.DeserializeWikiContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((WikiContractData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string productId, WikiContractData data, ETag? ifMatch) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/products/", false); + uri.AppendPath(productId, true); + uri.AppendPath("/wikis/default", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string productId, WikiContractData data, ETag? ifMatch) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/products/", false); + uri.AppendPath(productId, true); + uri.AppendPath("/wikis/default", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + if (ifMatch != null) + { + request.Headers.Add("If-Match", ifMatch.Value); + } + 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 a new Wiki for a Product or updates an existing one. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Product identifier. Must be unique in the current API Management service instance. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string serviceName, string productId, WikiContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(productId, nameof(productId)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, productId, data, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + { + WikiContractData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WikiContractData.DeserializeWikiContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates a new Wiki for a Product or updates an existing one. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Product identifier. Must be unique in the current API Management service instance. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string serviceName, string productId, WikiContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(productId, nameof(productId)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, productId, data, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + { + WikiContractData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WikiContractData.DeserializeWikiContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string productId, ETag ifMatch, WikiUpdateContract wikiUpdateContract) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/products/", false); + uri.AppendPath(productId, true); + uri.AppendPath("/wikis/default", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string productId, ETag ifMatch, WikiUpdateContract wikiUpdateContract) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/products/", false); + uri.AppendPath(productId, true); + uri.AppendPath("/wikis/default", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("If-Match", ifMatch); + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(wikiUpdateContract, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Updates the details of the Wiki for a Product specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Product identifier. Must be unique in the current API Management service instance. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// Wiki Update parameters. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> UpdateAsync(string subscriptionId, string resourceGroupName, string serviceName, string productId, ETag ifMatch, WikiUpdateContract wikiUpdateContract, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(productId, nameof(productId)); + Argument.AssertNotNull(wikiUpdateContract, nameof(wikiUpdateContract)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, serviceName, productId, ifMatch, wikiUpdateContract); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WikiContractData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WikiContractData.DeserializeWikiContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Updates the details of the Wiki for a Product specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Product identifier. Must be unique in the current API Management service instance. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// Wiki Update parameters. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string serviceName, string productId, ETag ifMatch, WikiUpdateContract wikiUpdateContract, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(productId, nameof(productId)); + Argument.AssertNotNull(wikiUpdateContract, nameof(wikiUpdateContract)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, serviceName, productId, ifMatch, wikiUpdateContract); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WikiContractData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WikiContractData.DeserializeWikiContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string productId, ETag ifMatch) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/products/", false); + uri.AppendPath(productId, true); + uri.AppendPath("/wikis/default", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string serviceName, string productId, ETag ifMatch) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/products/", false); + uri.AppendPath(productId, true); + uri.AppendPath("/wikis/default", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("If-Match", ifMatch); + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Deletes the specified Wiki from a Product. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Product identifier. Must be unique in the current API Management service instance. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string serviceName, string productId, ETag ifMatch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(productId, nameof(productId)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, productId, ifMatch); + 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 the specified Wiki from a Product. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Product identifier. Must be unique in the current API Management service instance. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string serviceName, string productId, ETag ifMatch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(productId, nameof(productId)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, productId, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/QuotaByCounterKeysRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/QuotaByCounterKeysRestOperations.cs index f7b3f78f93058..3a1574505cf07 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/QuotaByCounterKeysRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/QuotaByCounterKeysRestOperations.cs @@ -32,7 +32,7 @@ public QuotaByCounterKeysRestOperations(HttpPipeline pipeline, string applicatio { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -75,8 +75,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists a collection of current quota counter periods associated with the counter-key configured in the policy on the specified service instance. The api does not support paging yet. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Quota counter key identifier.This is the result of expression defined in counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined as counter-key="@("b"+"a")" then it will be accessible by "ba" key. /// The cancellation token to use. @@ -106,8 +106,8 @@ public async Task> ListByServiceAsync(string su } /// Lists a collection of current quota counter periods associated with the counter-key configured in the policy on the specified service instance. The api does not support paging yet. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Quota counter key identifier.This is the result of expression defined in counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined as counter-key="@("b"+"a")" then it will be accessible by "ba" key. /// The cancellation token to use. @@ -179,8 +179,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates all the quota counter values specified with the existing quota counter key to a value in the specified service instance. This should be used for reset of the quota counter values. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Quota counter key identifier.This is the result of expression defined in counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined as counter-key="@("b"+"a")" then it will be accessible by "ba" key. /// The value of the quota counter to be applied to all quota counter periods. @@ -212,8 +212,8 @@ public async Task> UpdateAsync(string subscript } /// Updates all the quota counter values specified with the existing quota counter key to a value in the specified service instance. This should be used for reset of the quota counter values. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Quota counter key identifier.This is the result of expression defined in counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined as counter-key="@("b"+"a")" then it will be accessible by "ba" key. /// The value of the quota counter to be applied to all quota counter periods. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/QuotaByPeriodKeysRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/QuotaByPeriodKeysRestOperations.cs index dd354457a4234..f061b65b5e4b2 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/QuotaByPeriodKeysRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/QuotaByPeriodKeysRestOperations.cs @@ -32,7 +32,7 @@ public QuotaByPeriodKeysRestOperations(HttpPipeline pipeline, string application { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -79,8 +79,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the value of the quota counter associated with the counter-key in the policy for the specific period in service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Quota counter key identifier.This is the result of expression defined in counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined as counter-key="@("b"+"a")" then it will be accessible by "ba" key. /// Quota period key identifier. @@ -112,8 +112,8 @@ public async Task> GetAsync(string subscriptionId } /// Gets the value of the quota counter associated with the counter-key in the policy for the specific period in service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Quota counter key identifier.This is the result of expression defined in counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined as counter-key="@("b"+"a")" then it will be accessible by "ba" key. /// Quota period key identifier. @@ -191,8 +191,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates an existing quota counter value in the specified service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Quota counter key identifier.This is the result of expression defined in counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined as counter-key="@("b"+"a")" then it will be accessible by "ba" key. /// Quota period key identifier. @@ -226,8 +226,8 @@ public async Task> UpdateAsync(string subscriptio } /// Updates an existing quota counter value in the specified service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Quota counter key identifier.This is the result of expression defined in counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined as counter-key="@("b"+"a")" then it will be accessible by "ba" key. /// Quota period key identifier. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/RegionRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/RegionRestOperations.cs index 35294d4b1a537..33ea2f62fb5e3 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/RegionRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/RegionRestOperations.cs @@ -32,7 +32,7 @@ public RegionRestOperations(HttpPipeline pipeline, string applicationId, Uri end { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -73,8 +73,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists all azure regions in which the service exists. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -102,8 +102,8 @@ public async Task> ListByServiceAsync(string subscrip } /// Lists all azure regions in which the service exists. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -154,8 +154,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists all azure regions in which the service exists. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , , or is null. @@ -185,8 +185,8 @@ public async Task> ListByServiceNextPageAsync(string /// Lists all azure regions in which the service exists. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , , or is null. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ReportsRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ReportsRestOperations.cs index 6a2d16d5646f0..b6c75360b58f3 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ReportsRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ReportsRestOperations.cs @@ -32,7 +32,7 @@ public ReportsRestOperations(HttpPipeline pipeline, string applicationId, Uri en { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -99,8 +99,8 @@ internal HttpMessage CreateListByApiRequest(string subscriptionId, string resour } /// Lists report records by API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The filter to apply on the operation. /// Number of records to return. @@ -133,8 +133,8 @@ public async Task> ListByApiAsync(string subscription } /// Lists report records by API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The filter to apply on the operation. /// Number of records to return. @@ -229,8 +229,8 @@ internal HttpMessage CreateListByUserRequest(string subscriptionId, string resou } /// Lists report records by User. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| timestamp | filter | ge, le | | </br>| displayName | select, orderBy | | | </br>| userId | select, filter | eq | | </br>| apiRegion | filter | eq | | </br>| productId | filter | eq | | </br>| subscriptionId | filter | eq | | </br>| apiId | filter | eq | | </br>| operationId | filter | eq | | </br>| callCountSuccess | select, orderBy | | | </br>| callCountBlocked | select, orderBy | | | </br>| callCountFailed | select, orderBy | | | </br>| callCountOther | select, orderBy | | | </br>| callCountTotal | select, orderBy | | | </br>| bandwidth | select, orderBy | | | </br>| cacheHitsCount | select | | | </br>| cacheMissCount | select | | | </br>| apiTimeAvg | select, orderBy | | | </br>| apiTimeMin | select | | | </br>| apiTimeMax | select | | | </br>| serviceTimeAvg | select | | | </br>| serviceTimeMin | select | | | </br>| serviceTimeMax | select | | | </br>. /// Number of records to return. @@ -263,8 +263,8 @@ public async Task> ListByUserAsync(string subscriptio } /// Lists report records by User. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| timestamp | filter | ge, le | | </br>| displayName | select, orderBy | | | </br>| userId | select, filter | eq | | </br>| apiRegion | filter | eq | | </br>| productId | filter | eq | | </br>| subscriptionId | filter | eq | | </br>| apiId | filter | eq | | </br>| operationId | filter | eq | | </br>| callCountSuccess | select, orderBy | | | </br>| callCountBlocked | select, orderBy | | | </br>| callCountFailed | select, orderBy | | | </br>| callCountOther | select, orderBy | | | </br>| callCountTotal | select, orderBy | | | </br>| bandwidth | select, orderBy | | | </br>| cacheHitsCount | select | | | </br>| cacheMissCount | select | | | </br>| apiTimeAvg | select, orderBy | | | </br>| apiTimeMin | select | | | </br>| apiTimeMax | select | | | </br>| serviceTimeAvg | select | | | </br>| serviceTimeMin | select | | | </br>| serviceTimeMax | select | | | </br>. /// Number of records to return. @@ -359,8 +359,8 @@ internal HttpMessage CreateListByOperationRequest(string subscriptionId, string } /// Lists report records by API Operations. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| timestamp | filter | ge, le | | </br>| displayName | select, orderBy | | | </br>| apiRegion | filter | eq | | </br>| userId | filter | eq | | </br>| productId | filter | eq | | </br>| subscriptionId | filter | eq | | </br>| apiId | filter | eq | | </br>| operationId | select, filter | eq | | </br>| callCountSuccess | select, orderBy | | | </br>| callCountBlocked | select, orderBy | | | </br>| callCountFailed | select, orderBy | | | </br>| callCountOther | select, orderBy | | | </br>| callCountTotal | select, orderBy | | | </br>| bandwidth | select, orderBy | | | </br>| cacheHitsCount | select | | | </br>| cacheMissCount | select | | | </br>| apiTimeAvg | select, orderBy | | | </br>| apiTimeMin | select | | | </br>| apiTimeMax | select | | | </br>| serviceTimeAvg | select | | | </br>| serviceTimeMin | select | | | </br>| serviceTimeMax | select | | | </br>. /// Number of records to return. @@ -393,8 +393,8 @@ public async Task> ListByOperationAsync(string subscr } /// Lists report records by API Operations. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| timestamp | filter | ge, le | | </br>| displayName | select, orderBy | | | </br>| apiRegion | filter | eq | | </br>| userId | filter | eq | | </br>| productId | filter | eq | | </br>| subscriptionId | filter | eq | | </br>| apiId | filter | eq | | </br>| operationId | select, filter | eq | | </br>| callCountSuccess | select, orderBy | | | </br>| callCountBlocked | select, orderBy | | | </br>| callCountFailed | select, orderBy | | | </br>| callCountOther | select, orderBy | | | </br>| callCountTotal | select, orderBy | | | </br>| bandwidth | select, orderBy | | | </br>| cacheHitsCount | select | | | </br>| cacheMissCount | select | | | </br>| apiTimeAvg | select, orderBy | | | </br>| apiTimeMin | select | | | </br>| apiTimeMax | select | | | </br>| serviceTimeAvg | select | | | </br>| serviceTimeMin | select | | | </br>| serviceTimeMax | select | | | </br>. /// Number of records to return. @@ -489,8 +489,8 @@ internal HttpMessage CreateListByProductRequest(string subscriptionId, string re } /// Lists report records by Product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| timestamp | filter | ge, le | | </br>| displayName | select, orderBy | | | </br>| apiRegion | filter | eq | | </br>| userId | filter | eq | | </br>| productId | select, filter | eq | | </br>| subscriptionId | filter | eq | | </br>| callCountSuccess | select, orderBy | | | </br>| callCountBlocked | select, orderBy | | | </br>| callCountFailed | select, orderBy | | | </br>| callCountOther | select, orderBy | | | </br>| callCountTotal | select, orderBy | | | </br>| bandwidth | select, orderBy | | | </br>| cacheHitsCount | select | | | </br>| cacheMissCount | select | | | </br>| apiTimeAvg | select, orderBy | | | </br>| apiTimeMin | select | | | </br>| apiTimeMax | select | | | </br>| serviceTimeAvg | select | | | </br>| serviceTimeMin | select | | | </br>| serviceTimeMax | select | | | </br>. /// Number of records to return. @@ -523,8 +523,8 @@ public async Task> ListByProductAsync(string subscrip } /// Lists report records by Product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| timestamp | filter | ge, le | | </br>| displayName | select, orderBy | | | </br>| apiRegion | filter | eq | | </br>| userId | filter | eq | | </br>| productId | select, filter | eq | | </br>| subscriptionId | filter | eq | | </br>| callCountSuccess | select, orderBy | | | </br>| callCountBlocked | select, orderBy | | | </br>| callCountFailed | select, orderBy | | | </br>| callCountOther | select, orderBy | | | </br>| callCountTotal | select, orderBy | | | </br>| bandwidth | select, orderBy | | | </br>| cacheHitsCount | select | | | </br>| cacheMissCount | select | | | </br>| apiTimeAvg | select, orderBy | | | </br>| apiTimeMin | select | | | </br>| apiTimeMax | select | | | </br>| serviceTimeAvg | select | | | </br>| serviceTimeMin | select | | | </br>| serviceTimeMax | select | | | </br>. /// Number of records to return. @@ -611,8 +611,8 @@ internal HttpMessage CreateListByGeoRequest(string subscriptionId, string resour } /// Lists report records by geography. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| timestamp | filter | ge, le | | </br>| country | select | | | </br>| region | select | | | </br>| zip | select | | | </br>| apiRegion | filter | eq | | </br>| userId | filter | eq | | </br>| productId | filter | eq | | </br>| subscriptionId | filter | eq | | </br>| apiId | filter | eq | | </br>| operationId | filter | eq | | </br>| callCountSuccess | select | | | </br>| callCountBlocked | select | | | </br>| callCountFailed | select | | | </br>| callCountOther | select | | | </br>| bandwidth | select, orderBy | | | </br>| cacheHitsCount | select | | | </br>| cacheMissCount | select | | | </br>| apiTimeAvg | select | | | </br>| apiTimeMin | select | | | </br>| apiTimeMax | select | | | </br>| serviceTimeAvg | select | | | </br>| serviceTimeMin | select | | | </br>| serviceTimeMax | select | | | </br>. /// Number of records to return. @@ -644,8 +644,8 @@ public async Task> ListByGeoAsync(string subscription } /// Lists report records by geography. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| timestamp | filter | ge, le | | </br>| country | select | | | </br>| region | select | | | </br>| zip | select | | | </br>| apiRegion | filter | eq | | </br>| userId | filter | eq | | </br>| productId | filter | eq | | </br>| subscriptionId | filter | eq | | </br>| apiId | filter | eq | | </br>| operationId | filter | eq | | </br>| callCountSuccess | select | | | </br>| callCountBlocked | select | | | </br>| callCountFailed | select | | | </br>| callCountOther | select | | | </br>| bandwidth | select, orderBy | | | </br>| cacheHitsCount | select | | | </br>| cacheMissCount | select | | | </br>| apiTimeAvg | select | | | </br>| apiTimeMin | select | | | </br>| apiTimeMax | select | | | </br>| serviceTimeAvg | select | | | </br>| serviceTimeMin | select | | | </br>| serviceTimeMax | select | | | </br>. /// Number of records to return. @@ -739,8 +739,8 @@ internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId, stri } /// Lists report records by subscription. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| timestamp | filter | ge, le | | </br>| displayName | select, orderBy | | | </br>| apiRegion | filter | eq | | </br>| userId | select, filter | eq | | </br>| productId | select, filter | eq | | </br>| subscriptionId | select, filter | eq | | </br>| callCountSuccess | select, orderBy | | | </br>| callCountBlocked | select, orderBy | | | </br>| callCountFailed | select, orderBy | | | </br>| callCountOther | select, orderBy | | | </br>| callCountTotal | select, orderBy | | | </br>| bandwidth | select, orderBy | | | </br>| cacheHitsCount | select | | | </br>| cacheMissCount | select | | | </br>| apiTimeAvg | select, orderBy | | | </br>| apiTimeMin | select | | | </br>| apiTimeMax | select | | | </br>| serviceTimeAvg | select | | | </br>| serviceTimeMin | select | | | </br>| serviceTimeMax | select | | | </br>. /// Number of records to return. @@ -773,8 +773,8 @@ public async Task> ListBySubscriptionAsync(string sub } /// Lists report records by subscription. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| timestamp | filter | ge, le | | </br>| displayName | select, orderBy | | | </br>| apiRegion | filter | eq | | </br>| userId | select, filter | eq | | </br>| productId | select, filter | eq | | </br>| subscriptionId | select, filter | eq | | </br>| callCountSuccess | select, orderBy | | | </br>| callCountBlocked | select, orderBy | | | </br>| callCountFailed | select, orderBy | | | </br>| callCountOther | select, orderBy | | | </br>| callCountTotal | select, orderBy | | | </br>| bandwidth | select, orderBy | | | </br>| cacheHitsCount | select | | | </br>| cacheMissCount | select | | | </br>| apiTimeAvg | select, orderBy | | | </br>| apiTimeMin | select | | | </br>| apiTimeMax | select | | | </br>| serviceTimeAvg | select | | | </br>| serviceTimeMin | select | | | </br>| serviceTimeMax | select | | | </br>. /// Number of records to return. @@ -871,8 +871,8 @@ internal HttpMessage CreateListByTimeRequest(string subscriptionId, string resou } /// Lists report records by Time. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| timestamp | filter, select | ge, le | | </br>| interval | select | | | </br>| apiRegion | filter | eq | | </br>| userId | filter | eq | | </br>| productId | filter | eq | | </br>| subscriptionId | filter | eq | | </br>| apiId | filter | eq | | </br>| operationId | filter | eq | | </br>| callCountSuccess | select | | | </br>| callCountBlocked | select | | | </br>| callCountFailed | select | | | </br>| callCountOther | select | | | </br>| bandwidth | select, orderBy | | | </br>| cacheHitsCount | select | | | </br>| cacheMissCount | select | | | </br>| apiTimeAvg | select | | | </br>| apiTimeMin | select | | | </br>| apiTimeMax | select | | | </br>| serviceTimeAvg | select | | | </br>| serviceTimeMin | select | | | </br>| serviceTimeMax | select | | | </br>. /// By time interval. Interval must be multiple of 15 minutes and may not be zero. The value should be in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations).This code can be used to convert TimeSpan to a valid interval string: XmlConvert.ToString(new TimeSpan(hours, minutes, seconds)). @@ -906,8 +906,8 @@ public async Task> ListByTimeAsync(string subscriptio } /// Lists report records by Time. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| timestamp | filter, select | ge, le | | </br>| interval | select | | | </br>| apiRegion | filter | eq | | </br>| userId | filter | eq | | </br>| productId | filter | eq | | </br>| subscriptionId | filter | eq | | </br>| apiId | filter | eq | | </br>| operationId | filter | eq | | </br>| callCountSuccess | select | | | </br>| callCountBlocked | select | | | </br>| callCountFailed | select | | | </br>| callCountOther | select | | | </br>| bandwidth | select, orderBy | | | </br>| cacheHitsCount | select | | | </br>| cacheMissCount | select | | | </br>| apiTimeAvg | select | | | </br>| apiTimeMin | select | | | </br>| apiTimeMax | select | | | </br>| serviceTimeAvg | select | | | </br>| serviceTimeMin | select | | | </br>| serviceTimeMax | select | | | </br>. /// By time interval. Interval must be multiple of 15 minutes and may not be zero. The value should be in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations).This code can be used to convert TimeSpan to a valid interval string: XmlConvert.ToString(new TimeSpan(hours, minutes, seconds)). @@ -995,8 +995,8 @@ internal HttpMessage CreateListByRequestRequest(string subscriptionId, string re } /// Lists report records by Request. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| timestamp | filter | ge, le | | </br>| apiId | filter | eq | | </br>| operationId | filter | eq | | </br>| productId | filter | eq | | </br>| userId | filter | eq | | </br>| apiRegion | filter | eq | | </br>| subscriptionId | filter | eq | | </br>. /// Number of records to return. @@ -1028,8 +1028,8 @@ public async Task> ListByRequestAsync(string s } /// Lists report records by Request. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| timestamp | filter | ge, le | | </br>| apiId | filter | eq | | </br>| operationId | filter | eq | | </br>| productId | filter | eq | | </br>| userId | filter | eq | | </br>| apiRegion | filter | eq | | </br>| subscriptionId | filter | eq | | </br>. /// Number of records to return. @@ -1084,8 +1084,8 @@ internal HttpMessage CreateListByApiNextPageRequest(string nextLink, string subs /// Lists report records by API. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The filter to apply on the operation. /// Number of records to return. @@ -1120,8 +1120,8 @@ public async Task> ListByApiNextPageAsync(string next /// Lists report records by API. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The filter to apply on the operation. /// Number of records to return. @@ -1178,8 +1178,8 @@ internal HttpMessage CreateListByUserNextPageRequest(string nextLink, string sub /// Lists report records by User. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| timestamp | filter | ge, le | | </br>| displayName | select, orderBy | | | </br>| userId | select, filter | eq | | </br>| apiRegion | filter | eq | | </br>| productId | filter | eq | | </br>| subscriptionId | filter | eq | | </br>| apiId | filter | eq | | </br>| operationId | filter | eq | | </br>| callCountSuccess | select, orderBy | | | </br>| callCountBlocked | select, orderBy | | | </br>| callCountFailed | select, orderBy | | | </br>| callCountOther | select, orderBy | | | </br>| callCountTotal | select, orderBy | | | </br>| bandwidth | select, orderBy | | | </br>| cacheHitsCount | select | | | </br>| cacheMissCount | select | | | </br>| apiTimeAvg | select, orderBy | | | </br>| apiTimeMin | select | | | </br>| apiTimeMax | select | | | </br>| serviceTimeAvg | select | | | </br>| serviceTimeMin | select | | | </br>| serviceTimeMax | select | | | </br>. /// Number of records to return. @@ -1214,8 +1214,8 @@ public async Task> ListByUserNextPageAsync(string nex /// Lists report records by User. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| timestamp | filter | ge, le | | </br>| displayName | select, orderBy | | | </br>| userId | select, filter | eq | | </br>| apiRegion | filter | eq | | </br>| productId | filter | eq | | </br>| subscriptionId | filter | eq | | </br>| apiId | filter | eq | | </br>| operationId | filter | eq | | </br>| callCountSuccess | select, orderBy | | | </br>| callCountBlocked | select, orderBy | | | </br>| callCountFailed | select, orderBy | | | </br>| callCountOther | select, orderBy | | | </br>| callCountTotal | select, orderBy | | | </br>| bandwidth | select, orderBy | | | </br>| cacheHitsCount | select | | | </br>| cacheMissCount | select | | | </br>| apiTimeAvg | select, orderBy | | | </br>| apiTimeMin | select | | | </br>| apiTimeMax | select | | | </br>| serviceTimeAvg | select | | | </br>| serviceTimeMin | select | | | </br>| serviceTimeMax | select | | | </br>. /// Number of records to return. @@ -1272,8 +1272,8 @@ internal HttpMessage CreateListByOperationNextPageRequest(string nextLink, strin /// Lists report records by API Operations. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| timestamp | filter | ge, le | | </br>| displayName | select, orderBy | | | </br>| apiRegion | filter | eq | | </br>| userId | filter | eq | | </br>| productId | filter | eq | | </br>| subscriptionId | filter | eq | | </br>| apiId | filter | eq | | </br>| operationId | select, filter | eq | | </br>| callCountSuccess | select, orderBy | | | </br>| callCountBlocked | select, orderBy | | | </br>| callCountFailed | select, orderBy | | | </br>| callCountOther | select, orderBy | | | </br>| callCountTotal | select, orderBy | | | </br>| bandwidth | select, orderBy | | | </br>| cacheHitsCount | select | | | </br>| cacheMissCount | select | | | </br>| apiTimeAvg | select, orderBy | | | </br>| apiTimeMin | select | | | </br>| apiTimeMax | select | | | </br>| serviceTimeAvg | select | | | </br>| serviceTimeMin | select | | | </br>| serviceTimeMax | select | | | </br>. /// Number of records to return. @@ -1308,8 +1308,8 @@ public async Task> ListByOperationNextPageAsync(strin /// Lists report records by API Operations. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| timestamp | filter | ge, le | | </br>| displayName | select, orderBy | | | </br>| apiRegion | filter | eq | | </br>| userId | filter | eq | | </br>| productId | filter | eq | | </br>| subscriptionId | filter | eq | | </br>| apiId | filter | eq | | </br>| operationId | select, filter | eq | | </br>| callCountSuccess | select, orderBy | | | </br>| callCountBlocked | select, orderBy | | | </br>| callCountFailed | select, orderBy | | | </br>| callCountOther | select, orderBy | | | </br>| callCountTotal | select, orderBy | | | </br>| bandwidth | select, orderBy | | | </br>| cacheHitsCount | select | | | </br>| cacheMissCount | select | | | </br>| apiTimeAvg | select, orderBy | | | </br>| apiTimeMin | select | | | </br>| apiTimeMax | select | | | </br>| serviceTimeAvg | select | | | </br>| serviceTimeMin | select | | | </br>| serviceTimeMax | select | | | </br>. /// Number of records to return. @@ -1366,8 +1366,8 @@ internal HttpMessage CreateListByProductNextPageRequest(string nextLink, string /// Lists report records by Product. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| timestamp | filter | ge, le | | </br>| displayName | select, orderBy | | | </br>| apiRegion | filter | eq | | </br>| userId | filter | eq | | </br>| productId | select, filter | eq | | </br>| subscriptionId | filter | eq | | </br>| callCountSuccess | select, orderBy | | | </br>| callCountBlocked | select, orderBy | | | </br>| callCountFailed | select, orderBy | | | </br>| callCountOther | select, orderBy | | | </br>| callCountTotal | select, orderBy | | | </br>| bandwidth | select, orderBy | | | </br>| cacheHitsCount | select | | | </br>| cacheMissCount | select | | | </br>| apiTimeAvg | select, orderBy | | | </br>| apiTimeMin | select | | | </br>| apiTimeMax | select | | | </br>| serviceTimeAvg | select | | | </br>| serviceTimeMin | select | | | </br>| serviceTimeMax | select | | | </br>. /// Number of records to return. @@ -1402,8 +1402,8 @@ public async Task> ListByProductNextPageAsync(string /// Lists report records by Product. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| timestamp | filter | ge, le | | </br>| displayName | select, orderBy | | | </br>| apiRegion | filter | eq | | </br>| userId | filter | eq | | </br>| productId | select, filter | eq | | </br>| subscriptionId | filter | eq | | </br>| callCountSuccess | select, orderBy | | | </br>| callCountBlocked | select, orderBy | | | </br>| callCountFailed | select, orderBy | | | </br>| callCountOther | select, orderBy | | | </br>| callCountTotal | select, orderBy | | | </br>| bandwidth | select, orderBy | | | </br>| cacheHitsCount | select | | | </br>| cacheMissCount | select | | | </br>| apiTimeAvg | select, orderBy | | | </br>| apiTimeMin | select | | | </br>| apiTimeMax | select | | | </br>| serviceTimeAvg | select | | | </br>| serviceTimeMin | select | | | </br>| serviceTimeMax | select | | | </br>. /// Number of records to return. @@ -1460,8 +1460,8 @@ internal HttpMessage CreateListByGeoNextPageRequest(string nextLink, string subs /// Lists report records by geography. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| timestamp | filter | ge, le | | </br>| country | select | | | </br>| region | select | | | </br>| zip | select | | | </br>| apiRegion | filter | eq | | </br>| userId | filter | eq | | </br>| productId | filter | eq | | </br>| subscriptionId | filter | eq | | </br>| apiId | filter | eq | | </br>| operationId | filter | eq | | </br>| callCountSuccess | select | | | </br>| callCountBlocked | select | | | </br>| callCountFailed | select | | | </br>| callCountOther | select | | | </br>| bandwidth | select, orderBy | | | </br>| cacheHitsCount | select | | | </br>| cacheMissCount | select | | | </br>| apiTimeAvg | select | | | </br>| apiTimeMin | select | | | </br>| apiTimeMax | select | | | </br>| serviceTimeAvg | select | | | </br>| serviceTimeMin | select | | | </br>| serviceTimeMax | select | | | </br>. /// Number of records to return. @@ -1495,8 +1495,8 @@ public async Task> ListByGeoNextPageAsync(string next /// Lists report records by geography. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| timestamp | filter | ge, le | | </br>| country | select | | | </br>| region | select | | | </br>| zip | select | | | </br>| apiRegion | filter | eq | | </br>| userId | filter | eq | | </br>| productId | filter | eq | | </br>| subscriptionId | filter | eq | | </br>| apiId | filter | eq | | </br>| operationId | filter | eq | | </br>| callCountSuccess | select | | | </br>| callCountBlocked | select | | | </br>| callCountFailed | select | | | </br>| callCountOther | select | | | </br>| bandwidth | select, orderBy | | | </br>| cacheHitsCount | select | | | </br>| cacheMissCount | select | | | </br>| apiTimeAvg | select | | | </br>| apiTimeMin | select | | | </br>| apiTimeMax | select | | | </br>| serviceTimeAvg | select | | | </br>| serviceTimeMin | select | | | </br>| serviceTimeMax | select | | | </br>. /// Number of records to return. @@ -1552,8 +1552,8 @@ internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, st /// Lists report records by subscription. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| timestamp | filter | ge, le | | </br>| displayName | select, orderBy | | | </br>| apiRegion | filter | eq | | </br>| userId | select, filter | eq | | </br>| productId | select, filter | eq | | </br>| subscriptionId | select, filter | eq | | </br>| callCountSuccess | select, orderBy | | | </br>| callCountBlocked | select, orderBy | | | </br>| callCountFailed | select, orderBy | | | </br>| callCountOther | select, orderBy | | | </br>| callCountTotal | select, orderBy | | | </br>| bandwidth | select, orderBy | | | </br>| cacheHitsCount | select | | | </br>| cacheMissCount | select | | | </br>| apiTimeAvg | select, orderBy | | | </br>| apiTimeMin | select | | | </br>| apiTimeMax | select | | | </br>| serviceTimeAvg | select | | | </br>| serviceTimeMin | select | | | </br>| serviceTimeMax | select | | | </br>. /// Number of records to return. @@ -1588,8 +1588,8 @@ public async Task> ListBySubscriptionNextPageAsync(st /// Lists report records by subscription. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| timestamp | filter | ge, le | | </br>| displayName | select, orderBy | | | </br>| apiRegion | filter | eq | | </br>| userId | select, filter | eq | | </br>| productId | select, filter | eq | | </br>| subscriptionId | select, filter | eq | | </br>| callCountSuccess | select, orderBy | | | </br>| callCountBlocked | select, orderBy | | | </br>| callCountFailed | select, orderBy | | | </br>| callCountOther | select, orderBy | | | </br>| callCountTotal | select, orderBy | | | </br>| bandwidth | select, orderBy | | | </br>| cacheHitsCount | select | | | </br>| cacheMissCount | select | | | </br>| apiTimeAvg | select, orderBy | | | </br>| apiTimeMin | select | | | </br>| apiTimeMax | select | | | </br>| serviceTimeAvg | select | | | </br>| serviceTimeMin | select | | | </br>| serviceTimeMax | select | | | </br>. /// Number of records to return. @@ -1646,8 +1646,8 @@ internal HttpMessage CreateListByTimeNextPageRequest(string nextLink, string sub /// Lists report records by Time. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| timestamp | filter, select | ge, le | | </br>| interval | select | | | </br>| apiRegion | filter | eq | | </br>| userId | filter | eq | | </br>| productId | filter | eq | | </br>| subscriptionId | filter | eq | | </br>| apiId | filter | eq | | </br>| operationId | filter | eq | | </br>| callCountSuccess | select | | | </br>| callCountBlocked | select | | | </br>| callCountFailed | select | | | </br>| callCountOther | select | | | </br>| bandwidth | select, orderBy | | | </br>| cacheHitsCount | select | | | </br>| cacheMissCount | select | | | </br>| apiTimeAvg | select | | | </br>| apiTimeMin | select | | | </br>| apiTimeMax | select | | | </br>| serviceTimeAvg | select | | | </br>| serviceTimeMin | select | | | </br>| serviceTimeMax | select | | | </br>. /// By time interval. Interval must be multiple of 15 minutes and may not be zero. The value should be in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations).This code can be used to convert TimeSpan to a valid interval string: XmlConvert.ToString(new TimeSpan(hours, minutes, seconds)). @@ -1683,8 +1683,8 @@ public async Task> ListByTimeNextPageAsync(string nex /// Lists report records by Time. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| timestamp | filter, select | ge, le | | </br>| interval | select | | | </br>| apiRegion | filter | eq | | </br>| userId | filter | eq | | </br>| productId | filter | eq | | </br>| subscriptionId | filter | eq | | </br>| apiId | filter | eq | | </br>| operationId | filter | eq | | </br>| callCountSuccess | select | | | </br>| callCountBlocked | select | | | </br>| callCountFailed | select | | | </br>| callCountOther | select | | | </br>| bandwidth | select, orderBy | | | </br>| cacheHitsCount | select | | | </br>| cacheMissCount | select | | | </br>| apiTimeAvg | select | | | </br>| apiTimeMin | select | | | </br>| apiTimeMax | select | | | </br>| serviceTimeAvg | select | | | </br>| serviceTimeMin | select | | | </br>| serviceTimeMax | select | | | </br>. /// By time interval. Interval must be multiple of 15 minutes and may not be zero. The value should be in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations).This code can be used to convert TimeSpan to a valid interval string: XmlConvert.ToString(new TimeSpan(hours, minutes, seconds)). diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/SignInSettingsRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/SignInSettingsRestOperations.cs index ebdb55365ab9e..480d8f4bfbf64 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/SignInSettingsRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/SignInSettingsRestOperations.cs @@ -31,7 +31,7 @@ public SignInSettingsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -72,8 +72,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the SignInSettings. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -104,8 +104,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the SignInSettings. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -172,8 +172,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Get Sign In Settings for the Portal. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -203,8 +203,8 @@ public async Task> GetAsync(strin } /// Get Sign In Settings for the Portal. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -275,8 +275,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Update Sign-In settings. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. /// Update Sign-In settings. @@ -302,8 +302,8 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr } /// Update Sign-In settings. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. /// Update Sign-In settings. @@ -373,8 +373,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Create or Update Sign-In settings. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Create or update parameters. /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. @@ -405,8 +405,8 @@ public async Task> CreateOrUpdate } /// Create or Update Sign-In settings. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Create or update parameters. /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/SignUpSettingsRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/SignUpSettingsRestOperations.cs index b72fa5156ee82..11139e2c9f358 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/SignUpSettingsRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/SignUpSettingsRestOperations.cs @@ -31,7 +31,7 @@ public SignUpSettingsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -72,8 +72,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the SignUpSettings. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -104,8 +104,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the SignUpSettings. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -172,8 +172,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Get Sign Up Settings for the Portal. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -203,8 +203,8 @@ public async Task> GetAsync(strin } /// Get Sign Up Settings for the Portal. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -275,8 +275,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Update Sign-Up settings. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. /// Update Sign-Up settings. @@ -302,8 +302,8 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr } /// Update Sign-Up settings. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. /// Update Sign-Up settings. @@ -373,8 +373,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Create or Update Sign-Up settings. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Create or update parameters. /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. @@ -405,8 +405,8 @@ public async Task> CreateOrUpdate } /// Create or Update Sign-Up settings. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Create or update parameters. /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/SubscriptionRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/SubscriptionRestOperations.cs index 520f277dfc128..0083d4d2917d3 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/SubscriptionRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/SubscriptionRestOperations.cs @@ -32,7 +32,7 @@ public SubscriptionRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -97,8 +97,8 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro } /// Lists all subscriptions of the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>| user | expand | | |</br>. /// Number of records to return. @@ -129,8 +129,8 @@ public async Task> ListAsync(string subscriptio } /// Lists all subscriptions of the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>| user | expand | | |</br>. /// Number of records to return. @@ -199,8 +199,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the apimanagement subscription specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Subscription entity Identifier. The entity represents the association between a user and a product in API Management. /// The cancellation token to use. @@ -233,8 +233,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the apimanagement subscription specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Subscription entity Identifier. The entity represents the association between a user and a product in API Management. /// The cancellation token to use. @@ -305,8 +305,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the specified Subscription entity. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Subscription entity Identifier. The entity represents the association between a user and a product in API Management. /// The cancellation token to use. @@ -338,8 +338,8 @@ public async Task> GetAsync(string subscripti } /// Gets the specified Subscription entity. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Subscription entity Identifier. The entity represents the association between a user and a product in API Management. /// The cancellation token to use. @@ -433,8 +433,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or updates the subscription of specified user to the specified product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Subscription entity Identifier. The entity represents the association between a user and a product in API Management. /// Create parameters. @@ -474,8 +474,8 @@ public async Task> CreateOrUpdateAsync(string } /// Creates or updates the subscription of specified user to the specified product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Subscription entity Identifier. The entity represents the association between a user and a product in API Management. /// Create parameters. @@ -574,8 +574,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates the details of a subscription specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Subscription entity Identifier. The entity represents the association between a user and a product in API Management. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -614,8 +614,8 @@ public async Task> UpdateAsync(string subscri } /// Updates the details of a subscription specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Subscription entity Identifier. The entity represents the association between a user and a product in API Management. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -693,8 +693,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes the specified subscription. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Subscription entity Identifier. The entity represents the association between a user and a product in API Management. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -721,8 +721,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes the specified subscription. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Subscription entity Identifier. The entity represents the association between a user and a product in API Management. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -789,8 +789,8 @@ internal HttpMessage CreateRegeneratePrimaryKeyRequest(string subscriptionId, st } /// Regenerates primary key of existing subscription of the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Subscription entity Identifier. The entity represents the association between a user and a product in API Management. /// The cancellation token to use. @@ -815,8 +815,8 @@ public async Task RegeneratePrimaryKeyAsync(string subscriptionId, str } /// Regenerates primary key of existing subscription of the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Subscription entity Identifier. The entity represents the association between a user and a product in API Management. /// The cancellation token to use. @@ -881,8 +881,8 @@ internal HttpMessage CreateRegenerateSecondaryKeyRequest(string subscriptionId, } /// Regenerates secondary key of existing subscription of the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Subscription entity Identifier. The entity represents the association between a user and a product in API Management. /// The cancellation token to use. @@ -907,8 +907,8 @@ public async Task RegenerateSecondaryKeyAsync(string subscriptionId, s } /// Regenerates secondary key of existing subscription of the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Subscription entity Identifier. The entity represents the association between a user and a product in API Management. /// The cancellation token to use. @@ -973,8 +973,8 @@ internal HttpMessage CreateListSecretsRequest(string subscriptionId, string reso } /// Gets the specified Subscription keys. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Subscription entity Identifier. The entity represents the association between a user and a product in API Management. /// The cancellation token to use. @@ -1004,8 +1004,8 @@ public async Task> ListSecretsAsync(string su } /// Gets the specified Subscription keys. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Subscription entity Identifier. The entity represents the association between a user and a product in API Management. /// The cancellation token to use. @@ -1058,8 +1058,8 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// Lists all subscriptions of the API Management service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>| user | expand | | |</br>. /// Number of records to return. @@ -1092,8 +1092,8 @@ public async Task> ListNextPageAsync(string nex /// Lists all subscriptions of the API Management service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>| user | expand | | |</br>. /// Number of records to return. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TagResourceRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TagResourceRestOperations.cs index 2ba3f19e635d5..fda3c99d672ac 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TagResourceRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TagResourceRestOperations.cs @@ -32,7 +32,7 @@ public TagResourceRestOperations(HttpPipeline pipeline, string applicationId, Ur { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -97,8 +97,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists a collection of resources associated with tags. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| aid | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| apiName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>| isCurrent | filter | eq | |</br>. /// Number of records to return. @@ -129,8 +129,8 @@ public async Task> ListByServiceAsync(string sub } /// Lists a collection of resources associated with tags. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| aid | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| apiName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>| isCurrent | filter | eq | |</br>. /// Number of records to return. @@ -184,8 +184,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists a collection of resources associated with tags. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| aid | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| apiName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>| isCurrent | filter | eq | |</br>. /// Number of records to return. @@ -218,8 +218,8 @@ public async Task> ListByServiceNextPageAsync(st /// Lists a collection of resources associated with tags. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| aid | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| apiName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>| isCurrent | filter | eq | |</br>. /// Number of records to return. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TagRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TagRestOperations.cs index 4bc625b8b43e1..4a20a5b710f17 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TagRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TagRestOperations.cs @@ -32,7 +32,7 @@ public TagRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoi { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -105,8 +105,8 @@ internal HttpMessage CreateListByOperationRequest(string subscriptionId, string } /// Lists all Tags associated with the Operation. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -141,8 +141,8 @@ public async Task> ListByOperationAsync(string subscript } /// Lists all Tags associated with the Operation. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -223,8 +223,8 @@ internal HttpMessage CreateGetEntityStateByOperationRequest(string subscriptionI } /// Gets the entity state version of the tag specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -261,8 +261,8 @@ public async Task> GetEntityStateByOperationAsync(string subscrip } /// Gets the entity state version of the tag specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -345,8 +345,8 @@ internal HttpMessage CreateGetByOperationRequest(string subscriptionId, string r } /// Get tag associated with the Operation. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -382,8 +382,8 @@ public async Task> GetByOperationAsync(string subscrip } /// Get tag associated with the Operation. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -465,8 +465,8 @@ internal HttpMessage CreateAssignToOperationRequest(string subscriptionId, strin } /// Assign tag to the Operation. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -501,8 +501,8 @@ public async Task> AssignToOperationAsync(string subsc } /// Assign tag to the Operation. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -583,8 +583,8 @@ internal HttpMessage CreateDetachFromOperationRequest(string subscriptionId, str } /// Detach the tag from the Operation. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -614,8 +614,8 @@ public async Task DetachFromOperationAsync(string subscriptionId, stri } /// Detach the tag from the Operation. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -709,8 +709,8 @@ internal HttpMessage CreateListByApiRequest(string subscriptionId, string resour } /// Lists all Tags associated with the API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -743,8 +743,8 @@ public async Task> ListByApiAsync(string subscriptionId, } /// Lists all Tags associated with the API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -819,8 +819,8 @@ internal HttpMessage CreateGetEntityStateByApiRequest(string subscriptionId, str } /// Gets the entity state version of the tag specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Tag identifier. Must be unique in the current API Management service instance. @@ -855,8 +855,8 @@ public async Task> GetEntityStateByApiAsync(string subscriptionId } /// Gets the entity state version of the tag specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Tag identifier. Must be unique in the current API Management service instance. @@ -933,8 +933,8 @@ internal HttpMessage CreateGetByApiRequest(string subscriptionId, string resourc } /// Get tag associated with the API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Tag identifier. Must be unique in the current API Management service instance. @@ -968,8 +968,8 @@ public async Task> GetByApiAsync(string subscriptionId } /// Get tag associated with the API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Tag identifier. Must be unique in the current API Management service instance. @@ -1045,8 +1045,8 @@ internal HttpMessage CreateAssignToApiRequest(string subscriptionId, string reso } /// Assign tag to the Api. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Tag identifier. Must be unique in the current API Management service instance. @@ -1079,8 +1079,8 @@ public async Task> AssignToApiAsync(string subscriptio } /// Assign tag to the Api. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Tag identifier. Must be unique in the current API Management service instance. @@ -1155,8 +1155,8 @@ internal HttpMessage CreateDetachFromApiRequest(string subscriptionId, string re } /// Detach the tag from the Api. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Tag identifier. Must be unique in the current API Management service instance. @@ -1184,8 +1184,8 @@ public async Task DetachFromApiAsync(string subscriptionId, string res } /// Detach the tag from the Api. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Tag identifier. Must be unique in the current API Management service instance. @@ -1277,8 +1277,8 @@ internal HttpMessage CreateListByProductRequest(string subscriptionId, string re } /// Lists all Tags associated with the Product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -1311,8 +1311,8 @@ public async Task> ListByProductAsync(string subscriptio } /// Lists all Tags associated with the Product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -1387,8 +1387,8 @@ internal HttpMessage CreateGetEntityStateByProductRequest(string subscriptionId, } /// Gets the entity state version of the tag specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// Tag identifier. Must be unique in the current API Management service instance. @@ -1423,8 +1423,8 @@ public async Task> GetEntityStateByProductAsync(string subscripti } /// Gets the entity state version of the tag specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// Tag identifier. Must be unique in the current API Management service instance. @@ -1501,8 +1501,8 @@ internal HttpMessage CreateGetByProductRequest(string subscriptionId, string res } /// Get tag associated with the Product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// Tag identifier. Must be unique in the current API Management service instance. @@ -1536,8 +1536,8 @@ public async Task> GetByProductAsync(string subscripti } /// Get tag associated with the Product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// Tag identifier. Must be unique in the current API Management service instance. @@ -1613,8 +1613,8 @@ internal HttpMessage CreateAssignToProductRequest(string subscriptionId, string } /// Assign tag to the Product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// Tag identifier. Must be unique in the current API Management service instance. @@ -1647,8 +1647,8 @@ public async Task> AssignToProductAsync(string subscri } /// Assign tag to the Product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// Tag identifier. Must be unique in the current API Management service instance. @@ -1723,8 +1723,8 @@ internal HttpMessage CreateDetachFromProductRequest(string subscriptionId, strin } /// Detach the tag from the Product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// Tag identifier. Must be unique in the current API Management service instance. @@ -1752,8 +1752,8 @@ public async Task DetachFromProductAsync(string subscriptionId, string } /// Detach the tag from the Product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// Tag identifier. Must be unique in the current API Management service instance. @@ -1849,8 +1849,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists a collection of tags defined within a service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -1882,8 +1882,8 @@ public async Task> ListByServiceAsync(string subscriptio } /// Lists a collection of tags defined within a service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -1953,8 +1953,8 @@ internal HttpMessage CreateGetEntityStateRequest(string subscriptionId, string r } /// Gets the entity state version of the tag specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Tag identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -1987,8 +1987,8 @@ public async Task> GetEntityStateAsync(string subscriptionId, str } /// Gets the entity state version of the tag specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Tag identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -2059,8 +2059,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the details of the tag specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Tag identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -2092,8 +2092,8 @@ public async Task> GetAsync(string subscriptionId, str } /// Gets the details of the tag specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Tag identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -2171,8 +2171,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates a tag. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Tag identifier. Must be unique in the current API Management service instance. /// Create parameters. @@ -2206,8 +2206,8 @@ public async Task> CreateOrUpdateAsync(string subscrip } /// Creates a tag. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Tag identifier. Must be unique in the current API Management service instance. /// Create parameters. @@ -2284,8 +2284,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates the details of the tag specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Tag identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -2318,8 +2318,8 @@ public async Task> UpdateAsync(string subscriptionId, } /// Updates the details of the tag specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Tag identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -2391,8 +2391,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes specific tag of the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Tag identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -2419,8 +2419,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes specific tag of the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Tag identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -2470,8 +2470,8 @@ internal HttpMessage CreateListByOperationNextPageRequest(string nextLink, strin /// Lists all Tags associated with the Operation. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -2508,8 +2508,8 @@ public async Task> ListByOperationNextPageAsync(string n /// Lists all Tags associated with the Operation. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -2568,8 +2568,8 @@ internal HttpMessage CreateListByApiNextPageRequest(string nextLink, string subs /// Lists all Tags associated with the API. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -2604,8 +2604,8 @@ public async Task> ListByApiNextPageAsync(string nextLin /// Lists all Tags associated with the API. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -2662,8 +2662,8 @@ internal HttpMessage CreateListByProductNextPageRequest(string nextLink, string /// Lists all Tags associated with the Product. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -2698,8 +2698,8 @@ public async Task> ListByProductNextPageAsync(string nex /// Lists all Tags associated with the Product. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -2756,8 +2756,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists a collection of tags defined within a service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -2791,8 +2791,8 @@ public async Task> ListByServiceNextPageAsync(string nex /// Lists a collection of tags defined within a service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TenantAccessGitRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TenantAccessGitRestOperations.cs index b9d43afa980e4..b675d455f0a8d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TenantAccessGitRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TenantAccessGitRestOperations.cs @@ -31,7 +31,7 @@ public TenantAccessGitRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -76,8 +76,8 @@ internal HttpMessage CreateRegeneratePrimaryKeyRequest(string subscriptionId, st } /// Regenerate primary access key for GIT. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Access configuration. /// The cancellation token to use. @@ -101,8 +101,8 @@ public async Task RegeneratePrimaryKeyAsync(string subscriptionId, str } /// Regenerate primary access key for GIT. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Access configuration. /// The cancellation token to use. @@ -166,8 +166,8 @@ internal HttpMessage CreateRegenerateSecondaryKeyRequest(string subscriptionId, } /// Regenerate secondary access key for GIT. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Access configuration. /// The cancellation token to use. @@ -191,8 +191,8 @@ public async Task RegenerateSecondaryKeyAsync(string subscriptionId, s } /// Regenerate secondary access key for GIT. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Access configuration. /// The cancellation token to use. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TenantAccessRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TenantAccessRestOperations.cs index 31b67330f82c3..dccf472053e33 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TenantAccessRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TenantAccessRestOperations.cs @@ -32,7 +32,7 @@ public TenantAccessRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -81,8 +81,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Returns list of access infos - for Git and Management endpoints. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Not used. /// The cancellation token to use. @@ -111,8 +111,8 @@ public async Task> ListByServiceAsync(stri } /// Returns list of access infos - for Git and Management endpoints. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Not used. /// The cancellation token to use. @@ -179,8 +179,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Tenant access metadata. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Access configuration. /// The cancellation token to use. @@ -212,8 +212,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Tenant access metadata. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Access configuration. /// The cancellation token to use. @@ -283,8 +283,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Get tenant access information details without secrets. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Access configuration. /// The cancellation token to use. @@ -315,8 +315,8 @@ public async Task> GetAsync(string subscriptionId } /// Get tenant access information details without secrets. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Access configuration. /// The cancellation token to use. @@ -390,8 +390,8 @@ internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceG } /// Update tenant access information details. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Access configuration. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -423,8 +423,8 @@ public async Task> CreateAsync(string subscriptio } /// Update tenant access information details. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Access configuration. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -499,8 +499,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Update tenant access information details. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Access configuration. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -532,8 +532,8 @@ public async Task> UpdateAsync(string subscriptio } /// Update tenant access information details. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Access configuration. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -605,8 +605,8 @@ internal HttpMessage CreateRegeneratePrimaryKeyRequest(string subscriptionId, st } /// Regenerate primary access key. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Access configuration. /// The cancellation token to use. @@ -630,8 +630,8 @@ public async Task RegeneratePrimaryKeyAsync(string subscriptionId, str } /// Regenerate primary access key. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Access configuration. /// The cancellation token to use. @@ -695,8 +695,8 @@ internal HttpMessage CreateRegenerateSecondaryKeyRequest(string subscriptionId, } /// Regenerate secondary access key. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Access configuration. /// The cancellation token to use. @@ -720,8 +720,8 @@ public async Task RegenerateSecondaryKeyAsync(string subscriptionId, s } /// Regenerate secondary access key. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Access configuration. /// The cancellation token to use. @@ -785,8 +785,8 @@ internal HttpMessage CreateListSecretsRequest(string subscriptionId, string reso } /// Get tenant access information details. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Access configuration. /// The cancellation token to use. @@ -815,8 +815,8 @@ public async Task> ListSecretsAsync(str } /// Get tenant access information details. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Access configuration. /// The cancellation token to use. @@ -868,8 +868,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Returns list of access infos - for Git and Management endpoints. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Not used. /// The cancellation token to use. @@ -900,8 +900,8 @@ public async Task> ListByServiceNextPageAs /// Returns list of access infos - for Git and Management endpoints. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Not used. /// The cancellation token to use. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TenantConfigurationRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TenantConfigurationRestOperations.cs index 12b989dab41a4..c39fc51a35a14 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TenantConfigurationRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TenantConfigurationRestOperations.cs @@ -32,7 +32,7 @@ public TenantConfigurationRestOperations(HttpPipeline pipeline, string applicati { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -81,8 +81,8 @@ internal HttpMessage CreateDeployRequest(string subscriptionId, string resourceG } /// This operation applies changes from the specified Git branch to the configuration database. This is a long running operation and could take several minutes to complete. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Git Configuration Operation. /// Deploy Configuration parameters. @@ -109,8 +109,8 @@ public async Task DeployAsync(string subscriptionId, string resourceGr } /// This operation applies changes from the specified Git branch to the configuration database. This is a long running operation and could take several minutes to complete. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Git Configuration Operation. /// Deploy Configuration parameters. @@ -181,8 +181,8 @@ internal HttpMessage CreateSaveRequest(string subscriptionId, string resourceGro } /// This operation creates a commit with the current configuration snapshot to the specified branch in the repository. This is a long running operation and could take several minutes to complete. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Git Configuration Operation. /// Save Configuration parameters. @@ -209,8 +209,8 @@ public async Task SaveAsync(string subscriptionId, string resourceGrou } /// This operation creates a commit with the current configuration snapshot to the specified branch in the repository. This is a long running operation and could take several minutes to complete. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Git Configuration Operation. /// Save Configuration parameters. @@ -281,8 +281,8 @@ internal HttpMessage CreateValidateRequest(string subscriptionId, string resourc } /// This operation validates the changes in the specified Git branch. This is a long running operation and could take several minutes to complete. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Git Configuration Operation. /// Validate Configuration parameters. @@ -309,8 +309,8 @@ public async Task ValidateAsync(string subscriptionId, string resource } /// This operation validates the changes in the specified Git branch. This is a long running operation and could take several minutes to complete. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Git Configuration Operation. /// Validate Configuration parameters. @@ -377,8 +377,8 @@ internal HttpMessage CreateGetSyncStateRequest(string subscriptionId, string res } /// Gets the status of the most recent synchronization between the configuration database and the Git repository. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Git Configuration Operation. /// The cancellation token to use. @@ -407,8 +407,8 @@ public async Task> GetSyncStateAs } /// Gets the status of the most recent synchronization between the configuration database and the Git repository. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Git Configuration Operation. /// The cancellation token to use. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TenantSettingsRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TenantSettingsRestOperations.cs index cd836f9a04b5d..c9656659103e5 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TenantSettingsRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TenantSettingsRestOperations.cs @@ -32,7 +32,7 @@ public TenantSettingsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -81,8 +81,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Public settings. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Not used. /// The cancellation token to use. @@ -111,8 +111,8 @@ public async Task> ListByServiceAsync(string } /// Public settings. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Not used. /// The cancellation token to use. @@ -179,8 +179,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Get tenant settings. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the settings. /// The cancellation token to use. @@ -211,8 +211,8 @@ public async Task> GetAsync(string subs } /// Get tenant settings. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the settings. /// The cancellation token to use. @@ -266,8 +266,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Public settings. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Not used. /// The cancellation token to use. @@ -298,8 +298,8 @@ public async Task> ListByServiceNextPageAsync /// Public settings. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Not used. /// The cancellation token to use. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/UserConfirmationPasswordRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/UserConfirmationPasswordRestOperations.cs index 2a6d62dc02b2a..91550850fd0de 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/UserConfirmationPasswordRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/UserConfirmationPasswordRestOperations.cs @@ -31,7 +31,7 @@ public UserConfirmationPasswordRestOperations(HttpPipeline pipeline, string appl { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -84,8 +84,8 @@ internal HttpMessage CreateSendRequest(string subscriptionId, string resourceGro } /// Sends confirmation. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// Determines the type of application which send the create user request. Default is legacy publisher portal. @@ -111,8 +111,8 @@ public async Task SendAsync(string subscriptionId, string resourceGrou } /// Sends confirmation. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// Determines the type of application which send the create user request. Default is legacy publisher portal. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/UserGroupRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/UserGroupRestOperations.cs index d10853588456c..c7260e2895950 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/UserGroupRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/UserGroupRestOperations.cs @@ -32,7 +32,7 @@ public UserGroupRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -101,8 +101,8 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro } /// Lists all user groups. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|------------------------|-----------------------------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -135,8 +135,8 @@ public async Task> ListAsync(string subscriptionId, st } /// Lists all user groups. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|------------------------|-----------------------------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -192,8 +192,8 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// Lists all user groups. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|------------------------|-----------------------------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -228,8 +228,8 @@ public async Task> ListNextPageAsync(string nextLink, /// Lists all user groups. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|------------------------|-----------------------------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/UserIdentitiesRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/UserIdentitiesRestOperations.cs index be99c6a1ec510..3fef0b2062935 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/UserIdentitiesRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/UserIdentitiesRestOperations.cs @@ -32,7 +32,7 @@ public UserIdentitiesRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -77,8 +77,8 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro } /// List of all user identities. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -108,8 +108,8 @@ public async Task> ListAsync(string subscriptio } /// List of all user identities. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -162,8 +162,8 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// List of all user identities. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -195,8 +195,8 @@ public async Task> ListNextPageAsync(string nex /// List of all user identities. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/UserRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/UserRestOperations.cs index 36ce20f38eec9..03da755e51a19 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/UserRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/UserRestOperations.cs @@ -32,7 +32,7 @@ public UserRestOperations(HttpPipeline pipeline, string applicationId, Uri endpo { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -105,8 +105,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists a collection of registered users in the specified service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| firstName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| lastName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| email | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>| registrationDate | filter | ge, le, eq, ne, gt, lt | |</br>| note | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| groups | expand | | |</br>. /// Number of records to return. @@ -138,8 +138,8 @@ public async Task> ListByServiceAsync(string subscripti } /// Lists a collection of registered users in the specified service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| firstName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| lastName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| email | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>| registrationDate | filter | ge, le, eq, ne, gt, lt | |</br>| note | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| groups | expand | | |</br>. /// Number of records to return. @@ -209,8 +209,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the user specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -243,8 +243,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the user specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -315,8 +315,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the details of the user specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -348,8 +348,8 @@ public async Task> GetAsync(string subscriptionId, st } /// Gets the details of the user specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -435,8 +435,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or Updates a user. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// Create or update parameters. @@ -471,8 +471,8 @@ public async Task> CreateOrUpdateAsync(string subscri } /// Creates or Updates a user. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// Create or update parameters. @@ -550,8 +550,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates the details of the user specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -584,8 +584,8 @@ public async Task> UpdateAsync(string subscriptionId, } /// Updates the details of the user specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -681,8 +681,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes specific user. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -712,8 +712,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes specific user. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -783,8 +783,8 @@ internal HttpMessage CreateGenerateSsoUriRequest(string subscriptionId, string r } /// Retrieves a redirection URL containing an authentication token for signing a given user into the developer portal. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -814,8 +814,8 @@ public async Task> GenerateSsoUriAsync(string sub } /// Retrieves a redirection URL containing an authentication token for signing a given user into the developer portal. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -889,8 +889,8 @@ internal HttpMessage CreateGetSharedAccessTokenRequest(string subscriptionId, st } /// Gets the Shared Access Authorization Token for the User. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// Create Authorization Token parameters. @@ -922,8 +922,8 @@ public async Task> GetSharedAccessTokenAsync(string su } /// Gets the Shared Access Authorization Token for the User. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// Create Authorization Token parameters. @@ -978,8 +978,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists a collection of registered users in the specified service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| firstName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| lastName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| email | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>| registrationDate | filter | ge, le, eq, ne, gt, lt | |</br>| note | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| groups | expand | | |</br>. /// Number of records to return. @@ -1013,8 +1013,8 @@ public async Task> ListByServiceNextPageAsync(string ne /// Lists a collection of registered users in the specified service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| firstName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| lastName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| email | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>| registrationDate | filter | ge, le, eq, ne, gt, lt | |</br>| note | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| groups | expand | | |</br>. /// Number of records to return. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/UserSubscriptionRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/UserSubscriptionRestOperations.cs index 8b77d4231c489..a837d9ac106c3 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/UserSubscriptionRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/UserSubscriptionRestOperations.cs @@ -32,7 +32,7 @@ public UserSubscriptionRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -101,8 +101,8 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro } /// Lists the collection of subscriptions of the specified user. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|------------------------|-----------------------------------|</br>|name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>|displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>|stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>|ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>|scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>|userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>|productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -135,8 +135,8 @@ public async Task> ListAsync(string subscriptio } /// Lists the collection of subscriptions of the specified user. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|------------------------|-----------------------------------|</br>|name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>|displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>|stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>|ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>|scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>|userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>|productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -211,8 +211,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the specified Subscription entity associated with a particular user. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// Subscription entity Identifier. The entity represents the association between a user and a product in API Management. @@ -246,8 +246,8 @@ public async Task> GetAsync(string subscripti } /// Gets the specified Subscription entity associated with a particular user. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// Subscription entity Identifier. The entity represents the association between a user and a product in API Management. @@ -304,8 +304,8 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// Lists the collection of subscriptions of the specified user. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|------------------------|-----------------------------------|</br>|name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>|displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>|stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>|ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>|scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>|userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>|productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -340,8 +340,8 @@ public async Task> ListNextPageAsync(string nex /// Lists the collection of subscriptions of the specified user. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|------------------------|-----------------------------------|</br>|name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>|displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>|stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>|ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>|scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>|userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>|productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceApiResolverPolicyCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceApiResolverPolicyCollection.cs new file mode 100644 index 0000000000000..623d595084a7b --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceApiResolverPolicyCollection.cs @@ -0,0 +1,478 @@ +// 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.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + /// + /// 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 GetServiceApiResolverPolicies method from an instance of . + /// + public partial class ServiceApiResolverPolicyCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _serviceApiResolverPolicyGraphQLApiResolverPolicyClientDiagnostics; + private readonly GraphQLApiResolverPolicyRestOperations _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient; + + /// Initializes a new instance of the class for mocking. + protected ServiceApiResolverPolicyCollection() + { + } + + /// 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 ServiceApiResolverPolicyCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _serviceApiResolverPolicyGraphQLApiResolverPolicyClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", ServiceApiResolverPolicyResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ServiceApiResolverPolicyResource.ResourceType, out string serviceApiResolverPolicyGraphQLApiResolverPolicyApiVersion); + _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient = new GraphQLApiResolverPolicyRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, serviceApiResolverPolicyGraphQLApiResolverPolicyApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResolverContractResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResolverContractResource.ResourceType), nameof(id)); + } + + /// + /// Creates or updates policy configuration for the GraphQL API Resolver level. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId} + /// + /// + /// Operation Id + /// GraphQLApiResolverPolicy_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2022-08-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 identifier of the Policy. + /// The policy contents to apply. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, PolicyName policyId, PolicyContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _serviceApiResolverPolicyGraphQLApiResolverPolicyClientDiagnostics.CreateScope("ServiceApiResolverPolicyCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, policyId, data, ifMatch, cancellationToken).ConfigureAwait(false); + var uri = _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, policyId, data, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(Response.FromValue(new ServiceApiResolverPolicyResource(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 policy configuration for the GraphQL API Resolver level. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId} + /// + /// + /// Operation Id + /// GraphQLApiResolverPolicy_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2022-08-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 identifier of the Policy. + /// The policy contents to apply. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, PolicyName policyId, PolicyContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _serviceApiResolverPolicyGraphQLApiResolverPolicyClientDiagnostics.CreateScope("ServiceApiResolverPolicyCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, policyId, data, ifMatch, cancellationToken); + var uri = _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, policyId, data, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(Response.FromValue(new ServiceApiResolverPolicyResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the policy configuration at the GraphQL API Resolver level. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId} + /// + /// + /// Operation Id + /// GraphQLApiResolverPolicy_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The identifier of the Policy. + /// Policy Export Format. + /// The cancellation token to use. + public virtual async Task> GetAsync(PolicyName policyId, PolicyExportFormat? format = null, CancellationToken cancellationToken = default) + { + using var scope = _serviceApiResolverPolicyGraphQLApiResolverPolicyClientDiagnostics.CreateScope("ServiceApiResolverPolicyCollection.Get"); + scope.Start(); + try + { + var response = await _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, policyId, format, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ServiceApiResolverPolicyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the policy configuration at the GraphQL API Resolver level. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId} + /// + /// + /// Operation Id + /// GraphQLApiResolverPolicy_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The identifier of the Policy. + /// Policy Export Format. + /// The cancellation token to use. + public virtual Response Get(PolicyName policyId, PolicyExportFormat? format = null, CancellationToken cancellationToken = default) + { + using var scope = _serviceApiResolverPolicyGraphQLApiResolverPolicyClientDiagnostics.CreateScope("ServiceApiResolverPolicyCollection.Get"); + scope.Start(); + try + { + var response = _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, policyId, format, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ServiceApiResolverPolicyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the list of policy configuration at the GraphQL API Resolver level. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies + /// + /// + /// Operation Id + /// GraphQLApiResolverPolicy_ListByResolver + /// + /// + /// Default Api Version + /// 2022-08-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) => _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient.CreateListByResolverRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient.CreateListByResolverNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ServiceApiResolverPolicyResource(Client, PolicyContractData.DeserializePolicyContractData(e)), _serviceApiResolverPolicyGraphQLApiResolverPolicyClientDiagnostics, Pipeline, "ServiceApiResolverPolicyCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Get the list of policy configuration at the GraphQL API Resolver level. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies + /// + /// + /// Operation Id + /// GraphQLApiResolverPolicy_ListByResolver + /// + /// + /// Default Api Version + /// 2022-08-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) => _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient.CreateListByResolverRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient.CreateListByResolverNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ServiceApiResolverPolicyResource(Client, PolicyContractData.DeserializePolicyContractData(e)), _serviceApiResolverPolicyGraphQLApiResolverPolicyClientDiagnostics, Pipeline, "ServiceApiResolverPolicyCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId} + /// + /// + /// Operation Id + /// GraphQLApiResolverPolicy_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The identifier of the Policy. + /// Policy Export Format. + /// The cancellation token to use. + public virtual async Task> ExistsAsync(PolicyName policyId, PolicyExportFormat? format = null, CancellationToken cancellationToken = default) + { + using var scope = _serviceApiResolverPolicyGraphQLApiResolverPolicyClientDiagnostics.CreateScope("ServiceApiResolverPolicyCollection.Exists"); + scope.Start(); + try + { + var response = await _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, policyId, format, 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.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId} + /// + /// + /// Operation Id + /// GraphQLApiResolverPolicy_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The identifier of the Policy. + /// Policy Export Format. + /// The cancellation token to use. + public virtual Response Exists(PolicyName policyId, PolicyExportFormat? format = null, CancellationToken cancellationToken = default) + { + using var scope = _serviceApiResolverPolicyGraphQLApiResolverPolicyClientDiagnostics.CreateScope("ServiceApiResolverPolicyCollection.Exists"); + scope.Start(); + try + { + var response = _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, policyId, format, 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.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId} + /// + /// + /// Operation Id + /// GraphQLApiResolverPolicy_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The identifier of the Policy. + /// Policy Export Format. + /// The cancellation token to use. + public virtual async Task> GetIfExistsAsync(PolicyName policyId, PolicyExportFormat? format = null, CancellationToken cancellationToken = default) + { + using var scope = _serviceApiResolverPolicyGraphQLApiResolverPolicyClientDiagnostics.CreateScope("ServiceApiResolverPolicyCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, policyId, format, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ServiceApiResolverPolicyResource(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.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId} + /// + /// + /// Operation Id + /// GraphQLApiResolverPolicy_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The identifier of the Policy. + /// Policy Export Format. + /// The cancellation token to use. + public virtual NullableResponse GetIfExists(PolicyName policyId, PolicyExportFormat? format = null, CancellationToken cancellationToken = default) + { + using var scope = _serviceApiResolverPolicyGraphQLApiResolverPolicyClientDiagnostics.CreateScope("ServiceApiResolverPolicyCollection.GetIfExists"); + scope.Start(); + try + { + var response = _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, policyId, format, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ServiceApiResolverPolicyResource(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/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceApiResolverPolicyResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceApiResolverPolicyResource.Serialization.cs new file mode 100644 index 0000000000000..5614d3073b095 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceApiResolverPolicyResource.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.ApiManagement +{ + public partial class ServiceApiResolverPolicyResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + PolicyContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + PolicyContractData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceApiResolverPolicyResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceApiResolverPolicyResource.cs new file mode 100644 index 0000000000000..204c40285caa2 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceApiResolverPolicyResource.cs @@ -0,0 +1,440 @@ +// 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.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + /// + /// A Class representing a ServiceApiResolverPolicy 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 GetServiceApiResolverPolicyResource method. + /// Otherwise you can get one from its parent resource using the GetServiceApiResolverPolicy method. + /// + public partial class ServiceApiResolverPolicyResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The serviceName. + /// The apiId. + /// The resolverId. + /// The policyId. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, PolicyName policyId) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _serviceApiResolverPolicyGraphQLApiResolverPolicyClientDiagnostics; + private readonly GraphQLApiResolverPolicyRestOperations _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient; + private readonly PolicyContractData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.ApiManagement/service/apis/resolvers/policies"; + + /// Initializes a new instance of the class for mocking. + protected ServiceApiResolverPolicyResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal ServiceApiResolverPolicyResource(ArmClient client, PolicyContractData 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 ServiceApiResolverPolicyResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _serviceApiResolverPolicyGraphQLApiResolverPolicyClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string serviceApiResolverPolicyGraphQLApiResolverPolicyApiVersion); + _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient = new GraphQLApiResolverPolicyRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, serviceApiResolverPolicyGraphQLApiResolverPolicyApiVersion); +#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 PolicyContractData 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 the policy configuration at the GraphQL API Resolver level. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId} + /// + /// + /// Operation Id + /// GraphQLApiResolverPolicy_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Policy Export Format. + /// The cancellation token to use. + public virtual async Task> GetAsync(PolicyExportFormat? format = null, CancellationToken cancellationToken = default) + { + using var scope = _serviceApiResolverPolicyGraphQLApiResolverPolicyClientDiagnostics.CreateScope("ServiceApiResolverPolicyResource.Get"); + scope.Start(); + try + { + var response = await _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, format, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ServiceApiResolverPolicyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the policy configuration at the GraphQL API Resolver level. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId} + /// + /// + /// Operation Id + /// GraphQLApiResolverPolicy_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Policy Export Format. + /// The cancellation token to use. + public virtual Response Get(PolicyExportFormat? format = null, CancellationToken cancellationToken = default) + { + using var scope = _serviceApiResolverPolicyGraphQLApiResolverPolicyClientDiagnostics.CreateScope("ServiceApiResolverPolicyResource.Get"); + scope.Start(); + try + { + var response = _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, format, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ServiceApiResolverPolicyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes the policy configuration at the GraphQL Api Resolver. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId} + /// + /// + /// Operation Id + /// GraphQLApiResolverPolicy_Delete + /// + /// + /// Default Api Version + /// 2022-08-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. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag ifMatch, CancellationToken cancellationToken = default) + { + using var scope = _serviceApiResolverPolicyGraphQLApiResolverPolicyClientDiagnostics.CreateScope("ServiceApiResolverPolicyResource.Delete"); + scope.Start(); + try + { + var response = await _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ifMatch, cancellationToken).ConfigureAwait(false); + var uri = _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes the policy configuration at the GraphQL Api Resolver. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId} + /// + /// + /// Operation Id + /// GraphQLApiResolverPolicy_Delete + /// + /// + /// Default Api Version + /// 2022-08-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. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, CancellationToken cancellationToken = default) + { + using var scope = _serviceApiResolverPolicyGraphQLApiResolverPolicyClientDiagnostics.CreateScope("ServiceApiResolverPolicyResource.Delete"); + scope.Start(); + try + { + var response = _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ifMatch, cancellationToken); + var uri = _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates policy configuration for the GraphQL API Resolver level. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId} + /// + /// + /// Operation Id + /// GraphQLApiResolverPolicy_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2022-08-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 policy contents to apply. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, PolicyContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _serviceApiResolverPolicyGraphQLApiResolverPolicyClientDiagnostics.CreateScope("ServiceApiResolverPolicyResource.Update"); + scope.Start(); + try + { + var response = await _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, ifMatch, cancellationToken).ConfigureAwait(false); + var uri = _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(Response.FromValue(new ServiceApiResolverPolicyResource(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 policy configuration for the GraphQL API Resolver level. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId} + /// + /// + /// Operation Id + /// GraphQLApiResolverPolicy_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2022-08-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 policy contents to apply. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, PolicyContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _serviceApiResolverPolicyGraphQLApiResolverPolicyClientDiagnostics.CreateScope("ServiceApiResolverPolicyResource.Update"); + scope.Start(); + try + { + var response = _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, ifMatch, cancellationToken); + var uri = _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(Response.FromValue(new ServiceApiResolverPolicyResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the entity state (Etag) version of the GraphQL API resolver policy specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId} + /// + /// + /// Operation Id + /// GraphQLApiResolverPolicy_GetEntityTag + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetEntityTagAsync(CancellationToken cancellationToken = default) + { + using var scope = _serviceApiResolverPolicyGraphQLApiResolverPolicyClientDiagnostics.CreateScope("ServiceApiResolverPolicyResource.GetEntityTag"); + scope.Start(); + try + { + var response = await _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient.GetEntityTagAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the entity state (Etag) version of the GraphQL API resolver policy specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId} + /// + /// + /// Operation Id + /// GraphQLApiResolverPolicy_GetEntityTag + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response GetEntityTag(CancellationToken cancellationToken = default) + { + using var scope = _serviceApiResolverPolicyGraphQLApiResolverPolicyClientDiagnostics.CreateScope("ServiceApiResolverPolicyResource.GetEntityTag"); + scope.Start(); + try + { + var response = _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient.GetEntityTag(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceApiWikiResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceApiWikiResource.Serialization.cs new file mode 100644 index 0000000000000..032176be5c114 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceApiWikiResource.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.ApiManagement +{ + public partial class ServiceApiWikiResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + WikiContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + WikiContractData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceApiWikiResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceApiWikiResource.cs new file mode 100644 index 0000000000000..31d86e338f5b6 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceApiWikiResource.cs @@ -0,0 +1,522 @@ +// 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.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + /// + /// A Class representing a ServiceApiWiki 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 GetServiceApiWikiResource method. + /// Otherwise you can get one from its parent resource using the GetServiceApiWiki method. + /// + public partial class ServiceApiWikiResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The serviceName. + /// The apiId. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string apiId) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _serviceApiWikiApiWikiClientDiagnostics; + private readonly ApiWikiRestOperations _serviceApiWikiApiWikiRestClient; + private readonly WikiContractData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.ApiManagement/service/apis/wikis"; + + /// Initializes a new instance of the class for mocking. + protected ServiceApiWikiResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal ServiceApiWikiResource(ArmClient client, WikiContractData 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 ServiceApiWikiResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _serviceApiWikiApiWikiClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string serviceApiWikiApiWikiApiVersion); + _serviceApiWikiApiWikiRestClient = new ApiWikiRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, serviceApiWikiApiWikiApiVersion); +#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 WikiContractData 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 the details of the Wiki for an API specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default + /// + /// + /// Operation Id + /// ApiWiki_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _serviceApiWikiApiWikiClientDiagnostics.CreateScope("ServiceApiWikiResource.Get"); + scope.Start(); + try + { + var response = await _serviceApiWikiApiWikiRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ServiceApiWikiResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the Wiki for an API specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default + /// + /// + /// Operation Id + /// ApiWiki_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _serviceApiWikiApiWikiClientDiagnostics.CreateScope("ServiceApiWikiResource.Get"); + scope.Start(); + try + { + var response = _serviceApiWikiApiWikiRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ServiceApiWikiResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes the specified Wiki from an API. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default + /// + /// + /// Operation Id + /// ApiWiki_Delete + /// + /// + /// Default Api Version + /// 2022-08-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. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag ifMatch, CancellationToken cancellationToken = default) + { + using var scope = _serviceApiWikiApiWikiClientDiagnostics.CreateScope("ServiceApiWikiResource.Delete"); + scope.Start(); + try + { + var response = await _serviceApiWikiApiWikiRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, ifMatch, cancellationToken).ConfigureAwait(false); + var uri = _serviceApiWikiApiWikiRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes the specified Wiki from an API. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default + /// + /// + /// Operation Id + /// ApiWiki_Delete + /// + /// + /// Default Api Version + /// 2022-08-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. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, CancellationToken cancellationToken = default) + { + using var scope = _serviceApiWikiApiWikiClientDiagnostics.CreateScope("ServiceApiWikiResource.Delete"); + scope.Start(); + try + { + var response = _serviceApiWikiApiWikiRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, ifMatch, cancellationToken); + var uri = _serviceApiWikiApiWikiRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates the details of the Wiki for an API specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default + /// + /// + /// Operation Id + /// ApiWiki_Update + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// Wiki Update parameters. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(ETag ifMatch, WikiUpdateContract wikiUpdateContract, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(wikiUpdateContract, nameof(wikiUpdateContract)); + + using var scope = _serviceApiWikiApiWikiClientDiagnostics.CreateScope("ServiceApiWikiResource.Update"); + scope.Start(); + try + { + var response = await _serviceApiWikiApiWikiRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, ifMatch, wikiUpdateContract, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ServiceApiWikiResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates the details of the Wiki for an API specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default + /// + /// + /// Operation Id + /// ApiWiki_Update + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// Wiki Update parameters. + /// The cancellation token to use. + /// is null. + public virtual Response Update(ETag ifMatch, WikiUpdateContract wikiUpdateContract, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(wikiUpdateContract, nameof(wikiUpdateContract)); + + using var scope = _serviceApiWikiApiWikiClientDiagnostics.CreateScope("ServiceApiWikiResource.Update"); + scope.Start(); + try + { + var response = _serviceApiWikiApiWikiRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, ifMatch, wikiUpdateContract, cancellationToken); + return Response.FromValue(new ServiceApiWikiResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates a new Wiki for an API or updates an existing one. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default + /// + /// + /// Operation Id + /// ApiWiki_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2022-08-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. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, WikiContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _serviceApiWikiApiWikiClientDiagnostics.CreateScope("ServiceApiWikiResource.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _serviceApiWikiApiWikiRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, data, ifMatch, cancellationToken).ConfigureAwait(false); + var uri = _serviceApiWikiApiWikiRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, data, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(Response.FromValue(new ServiceApiWikiResource(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 a new Wiki for an API or updates an existing one. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default + /// + /// + /// Operation Id + /// ApiWiki_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2022-08-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. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, WikiContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _serviceApiWikiApiWikiClientDiagnostics.CreateScope("ServiceApiWikiResource.CreateOrUpdate"); + scope.Start(); + try + { + var response = _serviceApiWikiApiWikiRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, data, ifMatch, cancellationToken); + var uri = _serviceApiWikiApiWikiRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, data, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(Response.FromValue(new ServiceApiWikiResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the entity state (Etag) version of the Wiki for an API specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default + /// + /// + /// Operation Id + /// ApiWiki_GetEntityTag + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetEntityTagAsync(CancellationToken cancellationToken = default) + { + using var scope = _serviceApiWikiApiWikiClientDiagnostics.CreateScope("ServiceApiWikiResource.GetEntityTag"); + scope.Start(); + try + { + var response = await _serviceApiWikiApiWikiRestClient.GetEntityTagAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the entity state (Etag) version of the Wiki for an API specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default + /// + /// + /// Operation Id + /// ApiWiki_GetEntityTag + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response GetEntityTag(CancellationToken cancellationToken = default) + { + using var scope = _serviceApiWikiApiWikiClientDiagnostics.CreateScope("ServiceApiWikiResource.GetEntityTag"); + scope.Start(); + try + { + var response = _serviceApiWikiApiWikiRestClient.GetEntityTag(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceProductWikiResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceProductWikiResource.Serialization.cs new file mode 100644 index 0000000000000..e2d3eea09473f --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceProductWikiResource.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.ApiManagement +{ + public partial class ServiceProductWikiResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + WikiContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + WikiContractData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceProductWikiResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceProductWikiResource.cs new file mode 100644 index 0000000000000..4ac12711313d8 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceProductWikiResource.cs @@ -0,0 +1,522 @@ +// 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.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + /// + /// A Class representing a ServiceProductWiki 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 GetServiceProductWikiResource method. + /// Otherwise you can get one from its parent resource using the GetServiceProductWiki method. + /// + public partial class ServiceProductWikiResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The serviceName. + /// The productId. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string productId) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _serviceProductWikiProductWikiClientDiagnostics; + private readonly ProductWikiRestOperations _serviceProductWikiProductWikiRestClient; + private readonly WikiContractData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.ApiManagement/service/products/wikis"; + + /// Initializes a new instance of the class for mocking. + protected ServiceProductWikiResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal ServiceProductWikiResource(ArmClient client, WikiContractData 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 ServiceProductWikiResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _serviceProductWikiProductWikiClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string serviceProductWikiProductWikiApiVersion); + _serviceProductWikiProductWikiRestClient = new ProductWikiRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, serviceProductWikiProductWikiApiVersion); +#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 WikiContractData 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 the details of the Wiki for a Product specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default + /// + /// + /// Operation Id + /// ProductWiki_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _serviceProductWikiProductWikiClientDiagnostics.CreateScope("ServiceProductWikiResource.Get"); + scope.Start(); + try + { + var response = await _serviceProductWikiProductWikiRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ServiceProductWikiResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the Wiki for a Product specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default + /// + /// + /// Operation Id + /// ProductWiki_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _serviceProductWikiProductWikiClientDiagnostics.CreateScope("ServiceProductWikiResource.Get"); + scope.Start(); + try + { + var response = _serviceProductWikiProductWikiRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ServiceProductWikiResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes the specified Wiki from a Product. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default + /// + /// + /// Operation Id + /// ProductWiki_Delete + /// + /// + /// Default Api Version + /// 2022-08-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. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag ifMatch, CancellationToken cancellationToken = default) + { + using var scope = _serviceProductWikiProductWikiClientDiagnostics.CreateScope("ServiceProductWikiResource.Delete"); + scope.Start(); + try + { + var response = await _serviceProductWikiProductWikiRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, ifMatch, cancellationToken).ConfigureAwait(false); + var uri = _serviceProductWikiProductWikiRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes the specified Wiki from a Product. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default + /// + /// + /// Operation Id + /// ProductWiki_Delete + /// + /// + /// Default Api Version + /// 2022-08-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. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, CancellationToken cancellationToken = default) + { + using var scope = _serviceProductWikiProductWikiClientDiagnostics.CreateScope("ServiceProductWikiResource.Delete"); + scope.Start(); + try + { + var response = _serviceProductWikiProductWikiRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, ifMatch, cancellationToken); + var uri = _serviceProductWikiProductWikiRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates the details of the Wiki for a Product specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default + /// + /// + /// Operation Id + /// ProductWiki_Update + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// Wiki Update parameters. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(ETag ifMatch, WikiUpdateContract wikiUpdateContract, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(wikiUpdateContract, nameof(wikiUpdateContract)); + + using var scope = _serviceProductWikiProductWikiClientDiagnostics.CreateScope("ServiceProductWikiResource.Update"); + scope.Start(); + try + { + var response = await _serviceProductWikiProductWikiRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, ifMatch, wikiUpdateContract, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ServiceProductWikiResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates the details of the Wiki for a Product specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default + /// + /// + /// Operation Id + /// ProductWiki_Update + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// Wiki Update parameters. + /// The cancellation token to use. + /// is null. + public virtual Response Update(ETag ifMatch, WikiUpdateContract wikiUpdateContract, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(wikiUpdateContract, nameof(wikiUpdateContract)); + + using var scope = _serviceProductWikiProductWikiClientDiagnostics.CreateScope("ServiceProductWikiResource.Update"); + scope.Start(); + try + { + var response = _serviceProductWikiProductWikiRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, ifMatch, wikiUpdateContract, cancellationToken); + return Response.FromValue(new ServiceProductWikiResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates a new Wiki for a Product or updates an existing one. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default + /// + /// + /// Operation Id + /// ProductWiki_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2022-08-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. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, WikiContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _serviceProductWikiProductWikiClientDiagnostics.CreateScope("ServiceProductWikiResource.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _serviceProductWikiProductWikiRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, data, ifMatch, cancellationToken).ConfigureAwait(false); + var uri = _serviceProductWikiProductWikiRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, data, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(Response.FromValue(new ServiceProductWikiResource(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 a new Wiki for a Product or updates an existing one. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default + /// + /// + /// Operation Id + /// ProductWiki_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2022-08-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. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, WikiContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _serviceProductWikiProductWikiClientDiagnostics.CreateScope("ServiceProductWikiResource.CreateOrUpdate"); + scope.Start(); + try + { + var response = _serviceProductWikiProductWikiRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, data, ifMatch, cancellationToken); + var uri = _serviceProductWikiProductWikiRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, data, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(Response.FromValue(new ServiceProductWikiResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the entity state (Etag) version of the Wiki for a Product specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default + /// + /// + /// Operation Id + /// ProductWiki_GetEntityTag + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetEntityTagAsync(CancellationToken cancellationToken = default) + { + using var scope = _serviceProductWikiProductWikiClientDiagnostics.CreateScope("ServiceProductWikiResource.GetEntityTag"); + scope.Start(); + try + { + var response = await _serviceProductWikiProductWikiRestClient.GetEntityTagAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the entity state (Etag) version of the Wiki for a Product specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default + /// + /// + /// Operation Id + /// ProductWiki_GetEntityTag + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response GetEntityTag(CancellationToken cancellationToken = default) + { + using var scope = _serviceProductWikiProductWikiClientDiagnostics.CreateScope("ServiceProductWikiResource.GetEntityTag"); + scope.Start(); + try + { + var response = _serviceProductWikiProductWikiRestClient.GetEntityTag(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/SubscriptionContractData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/SubscriptionContractData.Serialization.cs index 8782dc3cecd8d..54f6a8d3f8737 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/SubscriptionContractData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/SubscriptionContractData.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.ApiManagement.Models; @@ -331,6 +332,326 @@ internal static SubscriptionContractData DeserializeSubscriptionContractData(Jso 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(OwnerId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" ownerId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(OwnerId)) + { + builder.Append(" ownerId: "); + if (OwnerId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{OwnerId}'''"); + } + else + { + builder.AppendLine($"'{OwnerId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Scope), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" scope: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Scope)) + { + builder.Append(" scope: "); + if (Scope.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Scope}'''"); + } + else + { + builder.AppendLine($"'{Scope}'"); + } + } + } + + 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(State), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" state: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(State)) + { + builder.Append(" state: "); + builder.AppendLine($"'{State.Value.ToSerialString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CreatedOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" createdDate: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CreatedOn)) + { + builder.Append(" createdDate: "); + var formattedDateTimeString = TypeFormatters.ToString(CreatedOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(StartOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" startDate: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(StartOn)) + { + builder.Append(" startDate: "); + var formattedDateTimeString = TypeFormatters.ToString(StartOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ExpireOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" expirationDate: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ExpireOn)) + { + builder.Append(" expirationDate: "); + var formattedDateTimeString = TypeFormatters.ToString(ExpireOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EndOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" endDate: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(EndOn)) + { + builder.Append(" endDate: "); + var formattedDateTimeString = TypeFormatters.ToString(EndOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NotifiesOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" notificationDate: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NotifiesOn)) + { + builder.Append(" notificationDate: "); + var formattedDateTimeString = TypeFormatters.ToString(NotifiesOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PrimaryKey), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" primaryKey: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PrimaryKey)) + { + builder.Append(" primaryKey: "); + if (PrimaryKey.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{PrimaryKey}'''"); + } + else + { + builder.AppendLine($"'{PrimaryKey}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SecondaryKey), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" secondaryKey: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SecondaryKey)) + { + builder.Append(" secondaryKey: "); + if (SecondaryKey.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{SecondaryKey}'''"); + } + else + { + builder.AppendLine($"'{SecondaryKey}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(StateComment), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" stateComment: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(StateComment)) + { + builder.Append(" stateComment: "); + if (StateComment.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{StateComment}'''"); + } + else + { + builder.AppendLine($"'{StateComment}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AllowTracing), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" allowTracing: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AllowTracing)) + { + builder.Append(" allowTracing: "); + var boolValue = AllowTracing.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + 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; @@ -339,6 +660,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOp { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(SubscriptionContractData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/SubscriptionContractData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/SubscriptionContractData.cs index 154ecc9024bc1..3b97420fd8e98 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/SubscriptionContractData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/SubscriptionContractData.cs @@ -109,45 +109,58 @@ internal SubscriptionContractData(ResourceIdentifier id, string name, ResourceTy } /// The user resource identifier of the subscription owner. The value is a valid relative URL in the format of /users/{userId} where {userId} is a user identifier. + [WirePath("properties.ownerId")] public string OwnerId { get; set; } /// Scope like /products/{productId} or /apis or /apis/{apiId}. + [WirePath("properties.scope")] public string Scope { get; set; } /// The name of the subscription, or null if the subscription has no name. + [WirePath("properties.displayName")] public string DisplayName { get; set; } /// Subscription state. Possible states are * active – the subscription is active, * suspended – the subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted – the subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription request has been denied by an administrator, * cancelled – the subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration date and was deactivated. + [WirePath("properties.state")] public SubscriptionState? State { get; set; } /// /// Subscription creation date. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. /// /// + [WirePath("properties.createdDate")] public DateTimeOffset? CreatedOn { get; } /// /// Subscription activation date. The setting is for audit purposes only and the subscription is not automatically activated. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. /// /// + [WirePath("properties.startDate")] public DateTimeOffset? StartOn { get; set; } /// /// Subscription expiration date. The setting is for audit purposes only and the subscription is not automatically expired. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. /// /// + [WirePath("properties.expirationDate")] public DateTimeOffset? ExpireOn { get; set; } /// /// Date when subscription was cancelled or expired. The setting is for audit purposes only and the subscription is not automatically cancelled. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. /// /// + [WirePath("properties.endDate")] public DateTimeOffset? EndOn { get; set; } /// /// Upcoming subscription expiration notification date. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. /// /// + [WirePath("properties.notificationDate")] public DateTimeOffset? NotifiesOn { get; set; } /// Subscription primary key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. + [WirePath("properties.primaryKey")] public string PrimaryKey { get; set; } /// Subscription secondary key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. + [WirePath("properties.secondaryKey")] public string SecondaryKey { get; set; } /// Optional subscription comment added by an administrator when the state is changed to the 'rejected'. + [WirePath("properties.stateComment")] public string StateComment { get; set; } /// Determines whether tracing is enabled. + [WirePath("properties.allowTracing")] public bool? AllowTracing { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/TagContractData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/TagContractData.Serialization.cs index efc6749e5d286..14a6186f45855 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/TagContractData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/TagContractData.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Models; @@ -158,6 +159,100 @@ internal static TagContractData DeserializeTagContractData(JsonElement element, 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(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}'"); + } + } + } + + 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; @@ -166,6 +261,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions opt { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(TagContractData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/TagContractData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/TagContractData.cs index 9c83f61f54eca..19fe7dc5f455c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/TagContractData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/TagContractData.cs @@ -69,6 +69,7 @@ internal TagContractData(ResourceIdentifier id, string name, ResourceType resour } /// Tag name. + [WirePath("properties.displayName")] public string DisplayName { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/TenantAccessInfoCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/TenantAccessInfoCollection.cs index 2294dc70c9230..f8fa27d811188 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/TenantAccessInfoCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/TenantAccessInfoCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> CreateOrUpdate /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -165,7 +165,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil w /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -206,7 +206,7 @@ public virtual async Task> GetAsync(AccessNam /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -247,7 +247,7 @@ public virtual Response Get(AccessName accessName, Can /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -278,7 +278,7 @@ public virtual AsyncPageable GetAllAsync(string filter /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -309,7 +309,7 @@ public virtual Pageable GetAll(string filter = null, C /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -348,7 +348,7 @@ public virtual async Task> ExistsAsync(AccessName accessName, Can /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -387,7 +387,7 @@ public virtual Response Exists(AccessName accessName, CancellationToken ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -428,7 +428,7 @@ public virtual async Task> GetIfExist /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/TenantAccessInfoData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/TenantAccessInfoData.Serialization.cs index 46cccd7779d84..29ef1eef82c02 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/TenantAccessInfoData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/TenantAccessInfoData.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Models; @@ -186,6 +187,139 @@ internal static TenantAccessInfoData DeserializeTenantAccessInfoData(JsonElement 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(AccessInfoType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AccessInfoType)) + { + builder.Append(" id: "); + if (AccessInfoType.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{AccessInfoType}'''"); + } + else + { + builder.AppendLine($"'{AccessInfoType}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PrincipalId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" principalId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PrincipalId)) + { + builder.Append(" principalId: "); + if (PrincipalId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{PrincipalId}'''"); + } + else + { + builder.AppendLine($"'{PrincipalId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsDirectAccessEnabled), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" enabled: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsDirectAccessEnabled)) + { + builder.Append(" enabled: "); + var boolValue = IsDirectAccessEnabled.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + 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; @@ -194,6 +328,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOption { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(TenantAccessInfoData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/TenantAccessInfoData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/TenantAccessInfoData.cs index 10af369edca08..29c3426eab3f9 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/TenantAccessInfoData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/TenantAccessInfoData.cs @@ -73,10 +73,13 @@ internal TenantAccessInfoData(ResourceIdentifier id, string name, ResourceType r } /// Access Information type ('access' or 'gitAccess'). + [WirePath("properties.id")] public string AccessInfoType { get; set; } /// Principal (User) Identifier. + [WirePath("properties.principalId")] public string PrincipalId { get; set; } /// Determines whether direct access is enabled. + [WirePath("properties.enabled")] public bool? IsDirectAccessEnabled { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/TenantAccessInfoResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/TenantAccessInfoResource.cs index 74d9f462c9607..0c752b9c3447d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/TenantAccessInfoResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/TenantAccessInfoResource.cs @@ -106,7 +106,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -146,7 +146,7 @@ public virtual async Task> GetAsync(Cancellat /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -186,7 +186,7 @@ public virtual Response Get(CancellationToken cancella /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -229,7 +229,7 @@ public virtual async Task> UpdateAsync(ETag i /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -272,7 +272,7 @@ public virtual Response Update(ETag ifMatch, TenantAcc /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -310,7 +310,7 @@ public virtual async Task RegeneratePrimaryKeyAsync(CancellationToken /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -348,7 +348,7 @@ public virtual Response RegeneratePrimaryKey(CancellationToken cancellationToken /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -386,7 +386,7 @@ public virtual async Task RegenerateSecondaryKeyAsync(CancellationToke /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -424,7 +424,7 @@ public virtual Response RegenerateSecondaryKey(CancellationToken cancellationTok /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -462,7 +462,7 @@ public virtual async Task> GetSecretsAs /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -500,7 +500,7 @@ public virtual Response GetSecrets(CancellationT /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -534,7 +534,7 @@ public virtual async Task RegeneratePrimaryKeyForGitAsync(Cancellation /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -568,7 +568,7 @@ public virtual Response RegeneratePrimaryKeyForGit(CancellationToken cancellatio /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -602,7 +602,7 @@ public virtual async Task RegenerateSecondaryKeyForGitAsync(Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -636,7 +636,7 @@ public virtual Response RegenerateSecondaryKeyForGit(CancellationToken cancellat /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -674,7 +674,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/UserContractData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/UserContractData.Serialization.cs index 35080c4aa2cd2..89f15639f0a9e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/UserContractData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/UserContractData.Serialization.cs @@ -8,6 +8,8 @@ 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.ApiManagement.Models; @@ -279,6 +281,246 @@ internal static UserContractData DeserializeUserContractData(JsonElement element 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(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(Note), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" note: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Note)) + { + builder.Append(" note: "); + if (Note.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Note}'''"); + } + else + { + builder.AppendLine($"'{Note}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Identities), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" identities: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Identities)) + { + if (Identities.Any()) + { + builder.Append(" identities: "); + builder.AppendLine("["); + foreach (var item in Identities) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " identities: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(FirstName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" firstName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(FirstName)) + { + builder.Append(" firstName: "); + if (FirstName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{FirstName}'''"); + } + else + { + builder.AppendLine($"'{FirstName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(LastName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" lastName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(LastName)) + { + builder.Append(" lastName: "); + if (LastName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{LastName}'''"); + } + else + { + builder.AppendLine($"'{LastName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Email), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" email: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Email)) + { + builder.Append(" email: "); + if (Email.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Email}'''"); + } + else + { + builder.AppendLine($"'{Email}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(RegistriesOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" registrationDate: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(RegistriesOn)) + { + builder.Append(" registrationDate: "); + var formattedDateTimeString = TypeFormatters.ToString(RegistriesOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Groups), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" groups: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Groups)) + { + if (Groups.Any()) + { + builder.Append(" groups: "); + builder.AppendLine("["); + foreach (var item in Groups) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " groups: "); + } + 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; @@ -287,6 +529,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions op { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(UserContractData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/UserContractData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/UserContractData.cs index e30e74005c312..d542545e5a475 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/UserContractData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/UserContractData.cs @@ -89,23 +89,31 @@ internal UserContractData(ResourceIdentifier id, string name, ResourceType resou } /// Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal or call any APIs of subscribed products. Default state is Active. + [WirePath("properties.state")] public ApiManagementUserState? State { get; set; } /// Optional note about a user set by the administrator. + [WirePath("properties.note")] public string Note { get; set; } /// Collection of user identities. + [WirePath("properties.identities")] public IList Identities { get; } /// First name. + [WirePath("properties.firstName")] public string FirstName { get; set; } /// Last name. + [WirePath("properties.lastName")] public string LastName { get; set; } /// Email address. + [WirePath("properties.email")] public string Email { get; set; } /// /// Date of user registration. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. /// /// + [WirePath("properties.registrationDate")] public DateTimeOffset? RegistriesOn { get; set; } /// Collection of groups user is part of. + [WirePath("properties.groups")] public IReadOnlyList Groups { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/WikiContractData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/WikiContractData.Serialization.cs new file mode 100644 index 0000000000000..981ed3f986ac8 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/WikiContractData.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.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.ApiManagement.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + public partial class WikiContractData : 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(WikiContractData)} 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 (Optional.IsCollectionDefined(Documents)) + { + writer.WritePropertyName("documents"u8); + writer.WriteStartArray(); + foreach (var item in Documents) + { + 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(); + } + + WikiContractData 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(WikiContractData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWikiContractData(document.RootElement, options); + } + + internal static WikiContractData DeserializeWikiContractData(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; + IList documents = 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("documents"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(WikiDocumentationContract.DeserializeWikiDocumentationContract(item, options)); + } + documents = array; + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WikiContractData( + id, + name, + type, + systemData, + documents ?? 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(Documents), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" documents: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Documents)) + { + if (Documents.Any()) + { + builder.Append(" documents: "); + builder.AppendLine("["); + foreach (var item in Documents) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " documents: "); + } + 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(WikiContractData)} does not support writing '{options.Format}' format."); + } + } + + WikiContractData 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 DeserializeWikiContractData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WikiContractData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/WikiContractData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/WikiContractData.cs new file mode 100644 index 0000000000000..8d8cfd334caf9 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/WikiContractData.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; +using Azure.ResourceManager.ApiManagement.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + /// + /// A class representing the WikiContract data model. + /// Wiki properties + /// + public partial class WikiContractData : 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 WikiContractData() + { + Documents = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Collection wiki documents included into this wiki. + /// Keeps track of any properties unknown to the library. + internal WikiContractData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IList documents, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Documents = documents; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Collection wiki documents included into this wiki. + [WirePath("properties.documents")] + public IList Documents { get; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/autorest.md b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/autorest.md index 4f5f0fdc9fd5e..b2bee00fa7e7c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/autorest.md +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/autorest.md @@ -8,7 +8,8 @@ azure-arm: true csharp: true library-name: ApiManagement namespace: Azure.ResourceManager.ApiManagement -require: https://github.com/Azure/azure-rest-api-specs/blob/2f28b5026a4b44adefd0237087acb0c48cfe31a6/specification/apimanagement/resource-manager/readme.md +require: https://github.com/Azure/azure-rest-api-specs/blob/2d973fccf9f28681a481e9760fa12b2334216e21/specification/apimanagement/resource-manager/readme.md +tag: package-2022-08 output-folder: $(this-folder)/Generated clear-output-folder: true sample-gen: @@ -19,8 +20,10 @@ modelerfour: flatten-payloads: false use-model-reader-writer: true skip-serialization-format-xml: true -# mgmt-debug: -# show-serialized-names: true +enable-bicep-serialization: true + +#mgmt-debug: +# show-serialized-names: true list-exception: - /subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/locations/{location}/deletedservices/{serviceName} @@ -114,6 +117,9 @@ override-operation-name: prepend-rp-prefix: - ResourceSkuCapacity - ResourceSkuCapacityScaleType +- AuthorizationType +- AuthorizationError +- NatGatewayState rename-mapping: GatewayHostnameConfigurationContract.properties.negotiateClientCertificate: IsClientCertificateRequired @@ -280,6 +286,9 @@ rename-mapping: ApiCreateOrUpdateParameter.properties.termsOfServiceUrl: termsOfServiceLink ApiCreateOrUpdateParameter.properties.serviceUrl: serviceLink ApiEntityBaseContract.termsOfServiceUrl: termsOfServiceLink + AuthorizationConfirmConsentCodeRequestContract: AuthorizationConfirmConsentCodeContent + AuthorizationLoginRequestContract: AuthorizationLoginContent + AuthorizationLoginResponseContract: AuthorizationLoginResult directive: - remove-operation: 'ApiManagementOperations_List' @@ -555,9 +564,57 @@ directive: } ] } - reason: Modify the original swagger since the id in the real response is slightly different from the ApiManagementGroupResource. + # reason: Modify the original swagger since the id in the real response is slightly different from the ApiManagementGroupResource. - from: swagger-document where: $..[?(@.name=='$orderby')] transform: $['x-ms-client-name'] = 'orderBy' - + - from: apimcontenttypes.json + where: $.paths.['/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}'].put + transform: > + $['parameters']=[ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/ContentTypeIdParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/IfMatchOptionalParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + } + ] + - from: apimcontenttypes.json + where: $.paths.['/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}/contentItems/{contentItemId}'].put + transform: > + $['parameters']=[ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/ContentTypeIdParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/ContentItemIdParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/IfMatchOptionalParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + } + ] ```