From e7b759d1d6ce5ef7f092406bd974edddf147f846 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 1 Mar 2022 02:49:09 +0000 Subject: [PATCH] CodeGen from PR 18036 in Azure/azure-rest-api-specs Merge df6fb86272dd44076375e890032ba65f4ed712be into 5ddd845e91e2721882dc57c7b61570e8080676e0 --- .../src/Generated/ApiManagementClient.cs | 8 +- .../src/Generated/ApiSchemaOperations.cs | 44 +++-- .../ApiSchemaOperationsExtensions.cs | 20 +-- .../src/Generated/CacheOperations.cs | 14 +- .../src/Generated/EmailTemplateOperations.cs | 14 +- .../src/Generated/IApiManagementClient.cs | 4 +- .../src/Generated/IApiSchemaOperations.cs | 10 +- ...hemaOperations.cs => ISchemaOperations.cs} | 16 +- .../src/Generated/Models/ApiSchemaContract.cs | 123 ++++++++++++++ .../Models/BodyDiagnosticSettings.cs | 7 +- .../Generated/Models/GlobalSchemaContract.cs | 104 ------------ .../KeyVaultContractCreateProperties.cs | 11 +- .../Models/KeyVaultContractProperties.cs | 6 +- .../src/Generated/Models/SamplingSettings.cs | 15 +- .../src/Generated/Models/SchemaContract.cs | 77 ++++----- ...ders.cs => SchemaCreateOrUpdateHeaders.cs} | 10 +- ...eaders.cs => SchemaGetEntityTagHeaders.cs} | 12 +- ...chemaGetHeaders.cs => SchemaGetHeaders.cs} | 10 +- .../src/Generated/NotificationOperations.cs | 14 +- .../src/Generated/PortalRevisionOperations.cs | 14 +- .../PrivateEndpointConnectionOperations.cs | 2 +- ...chemaOperations.cs => SchemaOperations.cs} | 48 +++--- ...sions.cs => SchemaOperationsExtensions.cs} | 32 ++-- .../Generated/SdkInfo_ApiManagementClient.cs | 152 +++++++++--------- 24 files changed, 365 insertions(+), 402 deletions(-) rename sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/{IGlobalSchemaOperations.cs => ISchemaOperations.cs} (82%) create mode 100644 sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiSchemaContract.cs delete mode 100644 sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/GlobalSchemaContract.cs rename sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/{GlobalSchemaCreateOrUpdateHeaders.cs => SchemaCreateOrUpdateHeaders.cs} (80%) rename sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/{GlobalSchemaGetEntityTagHeaders.cs => SchemaGetEntityTagHeaders.cs} (78%) rename sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/{GlobalSchemaGetHeaders.cs => SchemaGetHeaders.cs} (81%) rename sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/{GlobalSchemaOperations.cs => SchemaOperations.cs} (94%) rename sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/{GlobalSchemaOperationsExtensions.cs => SchemaOperationsExtensions.cs} (81%) diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/ApiManagementClient.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/ApiManagementClient.cs index 33b2caeb7386..772df3ac4e9e 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/ApiManagementClient.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/ApiManagementClient.cs @@ -384,9 +384,9 @@ public partial class ApiManagementClient : ServiceClient, I public virtual IReportsOperations Reports { get; private set; } /// - /// Gets the IGlobalSchemaOperations. + /// Gets the ISchemaOperations. /// - public virtual IGlobalSchemaOperations GlobalSchema { get; private set; } + public virtual ISchemaOperations Schema { get; private set; } /// /// Gets the ITenantSettingsOperations. @@ -755,7 +755,7 @@ private void Initialize() QuotaByPeriodKeys = new QuotaByPeriodKeysOperations(this); Region = new RegionOperations(this); Reports = new ReportsOperations(this); - GlobalSchema = new GlobalSchemaOperations(this); + Schema = new SchemaOperations(this); TenantSettings = new TenantSettingsOperations(this); ApiManagementSkus = new ApiManagementSkusOperations(this); Subscription = new SubscriptionOperations(this); @@ -770,7 +770,7 @@ private void Initialize() UserConfirmationPassword = new UserConfirmationPasswordOperations(this); ApiExport = new ApiExportOperations(this); BaseUri = new System.Uri("https://management.azure.com"); - ApiVersion = "2021-08-01"; + ApiVersion = "2021-04-01-preview"; AcceptLanguage = "en-US"; LongRunningOperationRetryTimeout = 30; GenerateClientRequestId = true; diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/ApiSchemaOperations.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/ApiSchemaOperations.cs index e07a7a1d1d64..e966a5b1e5bf 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/ApiSchemaOperations.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/ApiSchemaOperations.cs @@ -98,7 +98,7 @@ internal ApiSchemaOperations(ApiManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListByApiWithHttpMessagesAsync(string resourceGroupName, string serviceName, string apiId, string filter = default(string), int? top = default(int?), int? skip = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListByApiWithHttpMessagesAsync(string resourceGroupName, string serviceName, string apiId, string filter = default(string), int? top = default(int?), int? skip = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -142,19 +142,13 @@ internal ApiSchemaOperations(ApiManagementClient client) throw new ValidationException(ValidationRules.Pattern, "apiId", "^[^*#&+:<>?]+$"); } } - if (top != null) + if (top < 1) { - if (top < 1) - { - throw new ValidationException(ValidationRules.InclusiveMinimum, "top", 1); - } + throw new ValidationException(ValidationRules.InclusiveMinimum, "top", 1); } - if (skip != null) + if (skip < 0) { - if (skip < 0) - { - throw new ValidationException(ValidationRules.InclusiveMinimum, "skip", 0); - } + throw new ValidationException(ValidationRules.InclusiveMinimum, "skip", 0); } if (Client.ApiVersion == null) { @@ -292,7 +286,7 @@ internal ApiSchemaOperations(ApiManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -305,7 +299,7 @@ internal ApiSchemaOperations(ApiManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -609,7 +603,7 @@ internal ApiSchemaOperations(ApiManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string serviceName, string apiId, string schemaId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string serviceName, string apiId, string schemaId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -791,7 +785,7 @@ internal ApiSchemaOperations(ApiManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -804,7 +798,7 @@ internal ApiSchemaOperations(ApiManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -867,10 +861,10 @@ internal ApiSchemaOperations(ApiManagementClient client) /// /// The cancellation token. /// - public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, string apiId, string schemaId, SchemaContract parameters, string ifMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, string apiId, string schemaId, ApiSchemaContract parameters, string ifMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { // Send Request - AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serviceName, apiId, schemaId, parameters, ifMatch, customHeaders, cancellationToken).ConfigureAwait(false); + AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serviceName, apiId, schemaId, parameters, ifMatch, customHeaders, cancellationToken).ConfigureAwait(false); return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } @@ -1178,7 +1172,7 @@ internal ApiSchemaOperations(ApiManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, string apiId, string schemaId, SchemaContract parameters, string ifMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, string apiId, string schemaId, ApiSchemaContract parameters, string ifMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -1384,7 +1378,7 @@ internal ApiSchemaOperations(ApiManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -1397,7 +1391,7 @@ internal ApiSchemaOperations(ApiManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -1415,7 +1409,7 @@ internal ApiSchemaOperations(ApiManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -1474,7 +1468,7 @@ internal ApiSchemaOperations(ApiManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListByApiNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListByApiNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -1583,7 +1577,7 @@ internal ApiSchemaOperations(ApiManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -1596,7 +1590,7 @@ internal ApiSchemaOperations(ApiManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/ApiSchemaOperationsExtensions.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/ApiSchemaOperationsExtensions.cs index 319a10f2adfc..d03f145d68ac 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/ApiSchemaOperationsExtensions.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/ApiSchemaOperationsExtensions.cs @@ -51,7 +51,7 @@ public static partial class ApiSchemaOperationsExtensions /// /// Number of records to skip. /// - public static IPage ListByApi(this IApiSchemaOperations operations, string resourceGroupName, string serviceName, string apiId, string filter = default(string), int? top = default(int?), int? skip = default(int?)) + public static IPage ListByApi(this IApiSchemaOperations operations, string resourceGroupName, string serviceName, string apiId, string filter = default(string), int? top = default(int?), int? skip = default(int?)) { return operations.ListByApiAsync(resourceGroupName, serviceName, apiId, filter, top, skip).GetAwaiter().GetResult(); } @@ -89,7 +89,7 @@ public static partial class ApiSchemaOperationsExtensions /// /// The cancellation token. /// - public static async Task> ListByApiAsync(this IApiSchemaOperations operations, string resourceGroupName, string serviceName, string apiId, string filter = default(string), int? top = default(int?), int? skip = default(int?), CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListByApiAsync(this IApiSchemaOperations operations, string resourceGroupName, string serviceName, string apiId, string filter = default(string), int? top = default(int?), int? skip = default(int?), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListByApiWithHttpMessagesAsync(resourceGroupName, serviceName, apiId, filter, top, skip, null, cancellationToken).ConfigureAwait(false)) { @@ -178,7 +178,7 @@ public static ApiSchemaGetEntityTagHeaders GetEntityTag(this IApiSchemaOperation /// Schema id identifier. Must be unique in the current API Management service /// instance. /// - public static SchemaContract Get(this IApiSchemaOperations operations, string resourceGroupName, string serviceName, string apiId, string schemaId) + public static ApiSchemaContract Get(this IApiSchemaOperations operations, string resourceGroupName, string serviceName, string apiId, string schemaId) { return operations.GetAsync(resourceGroupName, serviceName, apiId, schemaId).GetAwaiter().GetResult(); } @@ -207,7 +207,7 @@ public static SchemaContract Get(this IApiSchemaOperations operations, string re /// /// The cancellation token. /// - public static async Task GetAsync(this IApiSchemaOperations operations, string resourceGroupName, string serviceName, string apiId, string schemaId, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task GetAsync(this IApiSchemaOperations operations, string resourceGroupName, string serviceName, string apiId, string schemaId, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serviceName, apiId, schemaId, null, cancellationToken).ConfigureAwait(false)) { @@ -243,7 +243,7 @@ public static SchemaContract Get(this IApiSchemaOperations operations, string re /// ETag of the Entity. Not required when creating an entity, but required when /// updating an entity. /// - public static SchemaContract CreateOrUpdate(this IApiSchemaOperations operations, string resourceGroupName, string serviceName, string apiId, string schemaId, SchemaContract parameters, string ifMatch = default(string)) + public static ApiSchemaContract CreateOrUpdate(this IApiSchemaOperations operations, string resourceGroupName, string serviceName, string apiId, string schemaId, ApiSchemaContract parameters, string ifMatch = default(string)) { return operations.CreateOrUpdateAsync(resourceGroupName, serviceName, apiId, schemaId, parameters, ifMatch).GetAwaiter().GetResult(); } @@ -279,7 +279,7 @@ public static SchemaContract Get(this IApiSchemaOperations operations, string re /// /// The cancellation token. /// - public static async Task CreateOrUpdateAsync(this IApiSchemaOperations operations, string resourceGroupName, string serviceName, string apiId, string schemaId, SchemaContract parameters, string ifMatch = default(string), CancellationToken cancellationToken = default(CancellationToken)) + public static async Task CreateOrUpdateAsync(this IApiSchemaOperations operations, string resourceGroupName, string serviceName, string apiId, string schemaId, ApiSchemaContract parameters, string ifMatch = default(string), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serviceName, apiId, schemaId, parameters, ifMatch, null, cancellationToken).ConfigureAwait(false)) { @@ -386,7 +386,7 @@ public static SchemaContract Get(this IApiSchemaOperations operations, string re /// ETag of the Entity. Not required when creating an entity, but required when /// updating an entity. /// - public static SchemaContract BeginCreateOrUpdate(this IApiSchemaOperations operations, string resourceGroupName, string serviceName, string apiId, string schemaId, SchemaContract parameters, string ifMatch = default(string)) + public static ApiSchemaContract BeginCreateOrUpdate(this IApiSchemaOperations operations, string resourceGroupName, string serviceName, string apiId, string schemaId, ApiSchemaContract parameters, string ifMatch = default(string)) { return operations.BeginCreateOrUpdateAsync(resourceGroupName, serviceName, apiId, schemaId, parameters, ifMatch).GetAwaiter().GetResult(); } @@ -422,7 +422,7 @@ public static SchemaContract Get(this IApiSchemaOperations operations, string re /// /// The cancellation token. /// - public static async Task BeginCreateOrUpdateAsync(this IApiSchemaOperations operations, string resourceGroupName, string serviceName, string apiId, string schemaId, SchemaContract parameters, string ifMatch = default(string), CancellationToken cancellationToken = default(CancellationToken)) + public static async Task BeginCreateOrUpdateAsync(this IApiSchemaOperations operations, string resourceGroupName, string serviceName, string apiId, string schemaId, ApiSchemaContract parameters, string ifMatch = default(string), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serviceName, apiId, schemaId, parameters, ifMatch, null, cancellationToken).ConfigureAwait(false)) { @@ -439,7 +439,7 @@ public static SchemaContract Get(this IApiSchemaOperations operations, string re /// /// The NextLink from the previous successful call to List operation. /// - public static IPage ListByApiNext(this IApiSchemaOperations operations, string nextPageLink) + public static IPage ListByApiNext(this IApiSchemaOperations operations, string nextPageLink) { return operations.ListByApiNextAsync(nextPageLink).GetAwaiter().GetResult(); } @@ -456,7 +456,7 @@ public static IPage ListByApiNext(this IApiSchemaOperations oper /// /// The cancellation token. /// - public static async Task> ListByApiNextAsync(this IApiSchemaOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListByApiNextAsync(this IApiSchemaOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListByApiNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/CacheOperations.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/CacheOperations.cs index e69abdadd6fe..f400465d74c0 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/CacheOperations.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/CacheOperations.cs @@ -112,19 +112,13 @@ internal CacheOperations(ApiManagementClient client) throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); } } - if (top != null) + if (top < 1) { - if (top < 1) - { - throw new ValidationException(ValidationRules.InclusiveMinimum, "top", 1); - } + throw new ValidationException(ValidationRules.InclusiveMinimum, "top", 1); } - if (skip != null) + if (skip < 0) { - if (skip < 0) - { - throw new ValidationException(ValidationRules.InclusiveMinimum, "skip", 0); - } + throw new ValidationException(ValidationRules.InclusiveMinimum, "skip", 0); } if (Client.ApiVersion == null) { diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/EmailTemplateOperations.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/EmailTemplateOperations.cs index 22e959d63135..7f0cec1c6e97 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/EmailTemplateOperations.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/EmailTemplateOperations.cs @@ -118,19 +118,13 @@ internal EmailTemplateOperations(ApiManagementClient client) throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); } } - if (top != null) + if (top < 1) { - if (top < 1) - { - throw new ValidationException(ValidationRules.InclusiveMinimum, "top", 1); - } + throw new ValidationException(ValidationRules.InclusiveMinimum, "top", 1); } - if (skip != null) + if (skip < 0) { - if (skip < 0) - { - throw new ValidationException(ValidationRules.InclusiveMinimum, "skip", 0); - } + throw new ValidationException(ValidationRules.InclusiveMinimum, "skip", 0); } if (Client.ApiVersion == null) { diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/IApiManagementClient.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/IApiManagementClient.cs index b032caac9330..6cf5d81c637d 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/IApiManagementClient.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/IApiManagementClient.cs @@ -381,9 +381,9 @@ public partial interface IApiManagementClient : System.IDisposable IReportsOperations Reports { get; } /// - /// Gets the IGlobalSchemaOperations. + /// Gets the ISchemaOperations. /// - IGlobalSchemaOperations GlobalSchema { get; } + ISchemaOperations Schema { get; } /// /// Gets the ITenantSettingsOperations. diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/IApiSchemaOperations.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/IApiSchemaOperations.cs index ecb989d186b2..8d7c3c547038 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/IApiSchemaOperations.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/IApiSchemaOperations.cs @@ -65,7 +65,7 @@ public partial interface IApiSchemaOperations /// /// Thrown when a required parameter is null /// - Task>> ListByApiWithHttpMessagesAsync(string resourceGroupName, string serviceName, string apiId, string filter = default(string), int? top = default(int?), int? skip = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListByApiWithHttpMessagesAsync(string resourceGroupName, string serviceName, string apiId, string filter = default(string), int? top = default(int?), int? skip = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Gets the entity state (Etag) version of the schema specified by its /// identifier. @@ -131,7 +131,7 @@ public partial interface IApiSchemaOperations /// /// Thrown when a required parameter is null /// - Task> GetWithHttpMessagesAsync(string resourceGroupName, string serviceName, string apiId, string schemaId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> GetWithHttpMessagesAsync(string resourceGroupName, string serviceName, string apiId, string schemaId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Creates or updates schema configuration for the API. /// @@ -172,7 +172,7 @@ public partial interface IApiSchemaOperations /// /// Thrown when a required parameter is null /// - Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, string apiId, string schemaId, SchemaContract parameters, string ifMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, string apiId, string schemaId, ApiSchemaContract parameters, string ifMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Deletes the schema configuration at the Api. /// @@ -252,7 +252,7 @@ public partial interface IApiSchemaOperations /// /// Thrown when a required parameter is null /// - Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, string apiId, string schemaId, SchemaContract parameters, string ifMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, string apiId, string schemaId, ApiSchemaContract parameters, string ifMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get the schema configuration at the API level. /// @@ -274,6 +274,6 @@ public partial interface IApiSchemaOperations /// /// Thrown when a required parameter is null /// - Task>> ListByApiNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListByApiNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/IGlobalSchemaOperations.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/ISchemaOperations.cs similarity index 82% rename from sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/IGlobalSchemaOperations.cs rename to sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/ISchemaOperations.cs index 53b6edfa80b3..db73a9c8a65f 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/IGlobalSchemaOperations.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/ISchemaOperations.cs @@ -20,9 +20,9 @@ namespace Microsoft.Azure.Management.ApiManagement using System.Threading.Tasks; /// - /// GlobalSchemaOperations operations. + /// SchemaOperations operations. /// - public partial interface IGlobalSchemaOperations + public partial interface ISchemaOperations { /// /// Lists a collection of schemas registered with service instance. @@ -51,7 +51,7 @@ public partial interface IGlobalSchemaOperations /// /// Thrown when a required parameter is null /// - Task>> ListByServiceWithHttpMessagesAsync(string resourceGroupName, string serviceName, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListByServiceWithHttpMessagesAsync(string resourceGroupName, string serviceName, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Gets the entity state (Etag) version of the Schema specified by its /// identifier. @@ -78,7 +78,7 @@ public partial interface IGlobalSchemaOperations /// /// Thrown when a required parameter is null /// - Task> GetEntityTagWithHttpMessagesAsync(string resourceGroupName, string serviceName, string schemaId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> GetEntityTagWithHttpMessagesAsync(string resourceGroupName, string serviceName, string schemaId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Gets the details of the Schema specified by its identifier. /// @@ -107,7 +107,7 @@ public partial interface IGlobalSchemaOperations /// /// Thrown when a required parameter is null /// - Task> GetWithHttpMessagesAsync(string resourceGroupName, string serviceName, string schemaId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> GetWithHttpMessagesAsync(string resourceGroupName, string serviceName, string schemaId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Creates new or updates existing specified Schema of the API /// Management service instance. @@ -144,7 +144,7 @@ public partial interface IGlobalSchemaOperations /// /// Thrown when a required parameter is null /// - Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, string schemaId, GlobalSchemaContract parameters, string ifMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, string schemaId, SchemaContract parameters, string ifMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Deletes specific Schema. /// @@ -212,7 +212,7 @@ public partial interface IGlobalSchemaOperations /// /// Thrown when a required parameter is null /// - Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, string schemaId, GlobalSchemaContract parameters, string ifMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, string schemaId, SchemaContract parameters, string ifMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Lists a collection of schemas registered with service instance. /// @@ -234,6 +234,6 @@ public partial interface IGlobalSchemaOperations /// /// Thrown when a required parameter is null /// - Task>> ListByServiceNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListByServiceNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiSchemaContract.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiSchemaContract.cs new file mode 100644 index 000000000000..1f0179f8c7a2 --- /dev/null +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/ApiSchemaContract.cs @@ -0,0 +1,123 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Linq; + + /// + /// API Schema Contract details. + /// + [Rest.Serialization.JsonTransformation] + public partial class ApiSchemaContract : Resource + { + /// + /// Initializes a new instance of the ApiSchemaContract class. + /// + public ApiSchemaContract() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ApiSchemaContract class. + /// + /// 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`. + /// Fully qualified resource ID for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. E.g. + /// "Microsoft.Compute/virtualMachines" or + /// "Microsoft.Storage/storageAccounts" + /// Json escaped string defining the document + /// representing the Schema. Used for schemas other than + /// Swagger/OpenAPI. + /// Types definitions. Used for + /// Swagger/OpenAPI v1 schemas only, null otherwise. + /// Types definitions. Used for + /// Swagger/OpenAPI v2/v3 schemas only, null otherwise. + public ApiSchemaContract(string contentType, string id = default(string), string name = default(string), string type = default(string), string value = default(string), object definitions = default(object), object components = default(object)) + : base(id, name, type) + { + ContentType = contentType; + Value = value; + Definitions = definitions; + Components = components; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets 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). + /// &lt;/br&gt; - `Swagger` Schema use + /// `application/vnd.ms-azure-apim.swagger.definitions+json` + /// &lt;/br&gt; - `WSDL` Schema use + /// `application/vnd.ms-azure-apim.xsd+xml` &lt;/br&gt; - + /// `OpenApi` Schema use `application/vnd.oai.openapi.components+json` + /// &lt;/br&gt; - `WADL Schema` use + /// `application/vnd.ms-azure-apim.wadl.grammars+xml`. + /// + [JsonProperty(PropertyName = "properties.contentType")] + public string ContentType { get; set; } + + /// + /// Gets or sets json escaped string defining the document representing + /// the Schema. Used for schemas other than Swagger/OpenAPI. + /// + [JsonProperty(PropertyName = "properties.document.value")] + public string Value { get; set; } + + /// + /// Gets or sets types definitions. Used for Swagger/OpenAPI v1 schemas + /// only, null otherwise. + /// + [JsonProperty(PropertyName = "properties.document.definitions")] + public object Definitions { get; set; } + + /// + /// Gets or sets types definitions. Used for Swagger/OpenAPI v2/v3 + /// schemas only, null otherwise. + /// + [JsonProperty(PropertyName = "properties.document.components")] + public object Components { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (ContentType == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ContentType"); + } + } + } +} diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/BodyDiagnosticSettings.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/BodyDiagnosticSettings.cs index 22426c7308a6..89eefdb8ba67 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/BodyDiagnosticSettings.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/BodyDiagnosticSettings.cs @@ -56,12 +56,9 @@ public BodyDiagnosticSettings() /// public virtual void Validate() { - if (Bytes != null) + if (Bytes > 8192) { - if (Bytes > 8192) - { - throw new ValidationException(ValidationRules.InclusiveMaximum, "Bytes", 8192); - } + throw new ValidationException(ValidationRules.InclusiveMaximum, "Bytes", 8192); } } } diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/GlobalSchemaContract.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/GlobalSchemaContract.cs deleted file mode 100644 index 14a89b550bf7..000000000000 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/GlobalSchemaContract.cs +++ /dev/null @@ -1,104 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.ApiManagement.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Global Schema Contract details. - /// - [Rest.Serialization.JsonTransformation] - public partial class GlobalSchemaContract : Resource - { - /// - /// Initializes a new instance of the GlobalSchemaContract class. - /// - public GlobalSchemaContract() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the GlobalSchemaContract class. - /// - /// Schema Type. Immutable. Possible values - /// include: 'Xml', 'Json' - /// Fully qualified resource ID for the resource. Ex - - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - /// The name of the resource - /// The type of the resource. E.g. - /// "Microsoft.Compute/virtualMachines" or - /// "Microsoft.Storage/storageAccounts" - /// Free-form schema entity - /// description. - /// Json-encoded string for non json-based - /// schema. - /// Global Schema document object for json-based - /// schema formats(e.g. json schema). - public GlobalSchemaContract(string schemaType, string id = default(string), string name = default(string), string type = default(string), string description = default(string), object value = default(object), object document = default(object)) - : base(id, name, type) - { - SchemaType = schemaType; - Description = description; - Value = value; - Document = document; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets schema Type. Immutable. Possible values include: - /// 'Xml', 'Json' - /// - [JsonProperty(PropertyName = "properties.schemaType")] - public string SchemaType { get; set; } - - /// - /// Gets or sets free-form schema entity description. - /// - [JsonProperty(PropertyName = "properties.description")] - public string Description { get; set; } - - /// - /// Gets or sets json-encoded string for non json-based schema. - /// - [JsonProperty(PropertyName = "properties.value")] - public object Value { get; set; } - - /// - /// Gets or sets global Schema document object for json-based schema - /// formats(e.g. json schema). - /// - [JsonProperty(PropertyName = "properties.document")] - public object Document { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (SchemaType == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "SchemaType"); - } - } - } -} diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/KeyVaultContractCreateProperties.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/KeyVaultContractCreateProperties.cs index a93de81cfc12..854d1f6937f8 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/KeyVaultContractCreateProperties.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/KeyVaultContractCreateProperties.cs @@ -35,9 +35,9 @@ public KeyVaultContractCreateProperties() /// fetching secret. Providing a versioned secret will prevent /// auto-refresh. This requires API Management service to be configured /// with aka.ms/apimmsi - /// SystemAssignedIdentity or - /// UserAssignedIdentity Client Id which will be used to access key - /// vault secret. + /// Null for SystemAssignedIdentity or + /// Client Id for UserAssignedIdentity , which will be used to access + /// key vault secret. public KeyVaultContractCreateProperties(string secretIdentifier = default(string), string identityClientId = default(string)) { SecretIdentifier = secretIdentifier; @@ -60,8 +60,9 @@ public KeyVaultContractCreateProperties() public string SecretIdentifier { get; set; } /// - /// Gets or sets systemAssignedIdentity or UserAssignedIdentity Client - /// Id which will be used to access key vault secret. + /// Gets or sets null for SystemAssignedIdentity or Client Id for + /// UserAssignedIdentity , which will be used to access key vault + /// secret. /// [JsonProperty(PropertyName = "identityClientId")] public string IdentityClientId { get; set; } diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/KeyVaultContractProperties.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/KeyVaultContractProperties.cs index ffdefe3b070e..6cf96732cafe 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/KeyVaultContractProperties.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/KeyVaultContractProperties.cs @@ -33,9 +33,9 @@ public KeyVaultContractProperties() /// fetching secret. Providing a versioned secret will prevent /// auto-refresh. This requires API Management service to be configured /// with aka.ms/apimmsi - /// SystemAssignedIdentity or - /// UserAssignedIdentity Client Id which will be used to access key - /// vault secret. + /// Null for SystemAssignedIdentity or + /// Client Id for UserAssignedIdentity , which will be used to access + /// key vault secret. /// Last time sync and refresh status of /// secret from key vault. public KeyVaultContractProperties(string secretIdentifier = default(string), string identityClientId = default(string), KeyVaultLastAccessStatusContractProperties lastStatus = default(KeyVaultLastAccessStatusContractProperties)) diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/SamplingSettings.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/SamplingSettings.cs index b6932f4dde92..6b018b3efe4e 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/SamplingSettings.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/SamplingSettings.cs @@ -66,16 +66,13 @@ public SamplingSettings() /// public virtual void Validate() { - if (Percentage != null) + if (Percentage > 100) { - if (Percentage > 100) - { - throw new ValidationException(ValidationRules.InclusiveMaximum, "Percentage", 100); - } - if (Percentage < 0) - { - throw new ValidationException(ValidationRules.InclusiveMinimum, "Percentage", 0); - } + throw new ValidationException(ValidationRules.InclusiveMaximum, "Percentage", 100); + } + if (Percentage < 0) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "Percentage", 0); } } } diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/SchemaContract.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/SchemaContract.cs index fc50005964a9..60ea1bdbd68d 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/SchemaContract.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/SchemaContract.cs @@ -16,7 +16,7 @@ namespace Microsoft.Azure.Management.ApiManagement.Models using System.Linq; /// - /// API Schema Contract details. + /// Schema Contract details. /// [Rest.Serialization.JsonTransformation] public partial class SchemaContract : Resource @@ -32,36 +32,27 @@ public SchemaContract() /// /// Initializes a new instance of the SchemaContract class. /// - /// 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`. + /// Schema Type. Immutable. Possible values + /// include: 'Xml', 'Json' /// Fully qualified resource ID for the resource. Ex - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} /// The name of the resource /// The type of the resource. E.g. /// "Microsoft.Compute/virtualMachines" or /// "Microsoft.Storage/storageAccounts" - /// Json escaped string defining the document - /// representing the Schema. Used for schemas other than - /// Swagger/OpenAPI. - /// Types definitions. Used for - /// Swagger/OpenAPI v1 schemas only, null otherwise. - /// Types definitions. Used for - /// Swagger/OpenAPI v2/v3 schemas only, null otherwise. - public SchemaContract(string contentType, string id = default(string), string name = default(string), string type = default(string), string value = default(string), object definitions = default(object), object components = default(object)) + /// Free-form schema entity + /// description. + /// Json-encoded string for non json-based + /// schema. + /// Schema document object for json-based schema + /// formats(e.g. json schema). + public SchemaContract(string schemaType, string id = default(string), string name = default(string), string type = default(string), string description = default(string), string value = default(string), object document = default(object)) : base(id, name, type) { - ContentType = contentType; + SchemaType = schemaType; + Description = description; Value = value; - Definitions = definitions; - Components = components; + Document = document; CustomInit(); } @@ -71,40 +62,30 @@ public SchemaContract() partial void CustomInit(); /// - /// Gets or sets 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). - /// &lt;/br&gt; - `Swagger` Schema use - /// `application/vnd.ms-azure-apim.swagger.definitions+json` - /// &lt;/br&gt; - `WSDL` Schema use - /// `application/vnd.ms-azure-apim.xsd+xml` &lt;/br&gt; - - /// `OpenApi` Schema use `application/vnd.oai.openapi.components+json` - /// &lt;/br&gt; - `WADL Schema` use - /// `application/vnd.ms-azure-apim.wadl.grammars+xml`. + /// Gets or sets schema Type. Immutable. Possible values include: + /// 'Xml', 'Json' /// - [JsonProperty(PropertyName = "properties.contentType")] - public string ContentType { get; set; } + [JsonProperty(PropertyName = "properties.schemaType")] + public string SchemaType { get; set; } /// - /// Gets or sets json escaped string defining the document representing - /// the Schema. Used for schemas other than Swagger/OpenAPI. + /// Gets or sets free-form schema entity description. /// - [JsonProperty(PropertyName = "properties.document.value")] - public string Value { get; set; } + [JsonProperty(PropertyName = "properties.description")] + public string Description { get; set; } /// - /// Gets or sets types definitions. Used for Swagger/OpenAPI v1 schemas - /// only, null otherwise. + /// Gets or sets json-encoded string for non json-based schema. /// - [JsonProperty(PropertyName = "properties.document.definitions")] - public object Definitions { get; set; } + [JsonProperty(PropertyName = "properties.value")] + public string Value { get; set; } /// - /// Gets or sets types definitions. Used for Swagger/OpenAPI v2/v3 - /// schemas only, null otherwise. + /// Gets or sets schema document object for json-based schema + /// formats(e.g. json schema). /// - [JsonProperty(PropertyName = "properties.document.components")] - public object Components { get; set; } + [JsonProperty(PropertyName = "properties.document")] + public object Document { get; set; } /// /// Validate the object. @@ -114,9 +95,9 @@ public SchemaContract() /// public virtual void Validate() { - if (ContentType == null) + if (SchemaType == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "ContentType"); + throw new ValidationException(ValidationRules.CannotBeNull, "SchemaType"); } } } diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/GlobalSchemaCreateOrUpdateHeaders.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/SchemaCreateOrUpdateHeaders.cs similarity index 80% rename from sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/GlobalSchemaCreateOrUpdateHeaders.cs rename to sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/SchemaCreateOrUpdateHeaders.cs index 04639a7d46e1..2a333a5f0c1a 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/GlobalSchemaCreateOrUpdateHeaders.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/SchemaCreateOrUpdateHeaders.cs @@ -16,24 +16,24 @@ namespace Microsoft.Azure.Management.ApiManagement.Models /// /// Defines headers for CreateOrUpdate operation. /// - public partial class GlobalSchemaCreateOrUpdateHeaders + public partial class SchemaCreateOrUpdateHeaders { /// - /// Initializes a new instance of the GlobalSchemaCreateOrUpdateHeaders + /// Initializes a new instance of the SchemaCreateOrUpdateHeaders /// class. /// - public GlobalSchemaCreateOrUpdateHeaders() + public SchemaCreateOrUpdateHeaders() { CustomInit(); } /// - /// Initializes a new instance of the GlobalSchemaCreateOrUpdateHeaders + /// Initializes a new instance of the SchemaCreateOrUpdateHeaders /// class. /// /// Current entity state version. Should be treated /// as opaque and used to make conditional HTTP requests. - public GlobalSchemaCreateOrUpdateHeaders(string eTag = default(string)) + public SchemaCreateOrUpdateHeaders(string eTag = default(string)) { ETag = eTag; CustomInit(); diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/GlobalSchemaGetEntityTagHeaders.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/SchemaGetEntityTagHeaders.cs similarity index 78% rename from sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/GlobalSchemaGetEntityTagHeaders.cs rename to sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/SchemaGetEntityTagHeaders.cs index ecaa75d911ab..192f0a01b053 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/GlobalSchemaGetEntityTagHeaders.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/SchemaGetEntityTagHeaders.cs @@ -16,24 +16,22 @@ namespace Microsoft.Azure.Management.ApiManagement.Models /// /// Defines headers for GetEntityTag operation. /// - public partial class GlobalSchemaGetEntityTagHeaders + public partial class SchemaGetEntityTagHeaders { /// - /// Initializes a new instance of the GlobalSchemaGetEntityTagHeaders - /// class. + /// Initializes a new instance of the SchemaGetEntityTagHeaders class. /// - public GlobalSchemaGetEntityTagHeaders() + public SchemaGetEntityTagHeaders() { CustomInit(); } /// - /// Initializes a new instance of the GlobalSchemaGetEntityTagHeaders - /// class. + /// Initializes a new instance of the SchemaGetEntityTagHeaders class. /// /// Current entity state version. Should be treated /// as opaque and used to make conditional HTTP requests. - public GlobalSchemaGetEntityTagHeaders(string eTag = default(string)) + public SchemaGetEntityTagHeaders(string eTag = default(string)) { ETag = eTag; CustomInit(); diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/GlobalSchemaGetHeaders.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/SchemaGetHeaders.cs similarity index 81% rename from sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/GlobalSchemaGetHeaders.cs rename to sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/SchemaGetHeaders.cs index 0eaf65dc28be..4ecea3190a92 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/GlobalSchemaGetHeaders.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/Models/SchemaGetHeaders.cs @@ -16,22 +16,22 @@ namespace Microsoft.Azure.Management.ApiManagement.Models /// /// Defines headers for Get operation. /// - public partial class GlobalSchemaGetHeaders + public partial class SchemaGetHeaders { /// - /// Initializes a new instance of the GlobalSchemaGetHeaders class. + /// Initializes a new instance of the SchemaGetHeaders class. /// - public GlobalSchemaGetHeaders() + public SchemaGetHeaders() { CustomInit(); } /// - /// Initializes a new instance of the GlobalSchemaGetHeaders class. + /// Initializes a new instance of the SchemaGetHeaders class. /// /// Current entity state version. Should be treated /// as opaque and used to make conditional HTTP requests. - public GlobalSchemaGetHeaders(string eTag = default(string)) + public SchemaGetHeaders(string eTag = default(string)) { ETag = eTag; CustomInit(); diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/NotificationOperations.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/NotificationOperations.cs index fa6cd8d2154e..78443260da12 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/NotificationOperations.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/NotificationOperations.cs @@ -111,19 +111,13 @@ internal NotificationOperations(ApiManagementClient client) throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); } } - if (top != null) + if (top < 1) { - if (top < 1) - { - throw new ValidationException(ValidationRules.InclusiveMinimum, "top", 1); - } + throw new ValidationException(ValidationRules.InclusiveMinimum, "top", 1); } - if (skip != null) + if (skip < 0) { - if (skip < 0) - { - throw new ValidationException(ValidationRules.InclusiveMinimum, "skip", 0); - } + throw new ValidationException(ValidationRules.InclusiveMinimum, "skip", 0); } if (Client.ApiVersion == null) { diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/PortalRevisionOperations.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/PortalRevisionOperations.cs index 2159b4733618..8fd9bf1748e2 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/PortalRevisionOperations.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/PortalRevisionOperations.cs @@ -122,19 +122,13 @@ internal PortalRevisionOperations(ApiManagementClient client) throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); } } - if (top != null) + if (top < 1) { - if (top < 1) - { - throw new ValidationException(ValidationRules.InclusiveMinimum, "top", 1); - } + throw new ValidationException(ValidationRules.InclusiveMinimum, "top", 1); } - if (skip != null) + if (skip < 0) { - if (skip < 0) - { - throw new ValidationException(ValidationRules.InclusiveMinimum, "skip", 0); - } + throw new ValidationException(ValidationRules.InclusiveMinimum, "skip", 0); } if (Client.ApiVersion == null) { diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/PrivateEndpointConnectionOperations.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/PrivateEndpointConnectionOperations.cs index f0e9e520784d..f16e4c3498ec 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/PrivateEndpointConnectionOperations.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/PrivateEndpointConnectionOperations.cs @@ -1112,7 +1112,7 @@ internal PrivateEndpointConnectionOperations(ApiManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 202) + if ((int)_statusCode != 200 && (int)_statusCode != 201) { var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/GlobalSchemaOperations.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/SchemaOperations.cs similarity index 94% rename from sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/GlobalSchemaOperations.cs rename to sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/SchemaOperations.cs index 26801e41a9fc..a78dc7528a03 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/GlobalSchemaOperations.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/SchemaOperations.cs @@ -24,12 +24,12 @@ namespace Microsoft.Azure.Management.ApiManagement using System.Threading.Tasks; /// - /// GlobalSchemaOperations operations. + /// SchemaOperations operations. /// - internal partial class GlobalSchemaOperations : IServiceOperations, IGlobalSchemaOperations + internal partial class SchemaOperations : IServiceOperations, ISchemaOperations { /// - /// Initializes a new instance of the GlobalSchemaOperations class. + /// Initializes a new instance of the SchemaOperations class. /// /// /// Reference to the service client. @@ -37,7 +37,7 @@ internal partial class GlobalSchemaOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal GlobalSchemaOperations(ApiManagementClient client) + internal SchemaOperations(ApiManagementClient client) { if (client == null) { @@ -84,7 +84,7 @@ internal GlobalSchemaOperations(ApiManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListByServiceWithHttpMessagesAsync(string resourceGroupName, string serviceName, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListByServiceWithHttpMessagesAsync(string resourceGroupName, string serviceName, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -237,7 +237,7 @@ internal GlobalSchemaOperations(ApiManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -250,7 +250,7 @@ internal GlobalSchemaOperations(ApiManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -301,7 +301,7 @@ internal GlobalSchemaOperations(ApiManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetEntityTagWithHttpMessagesAsync(string resourceGroupName, string serviceName, string schemaId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetEntityTagWithHttpMessagesAsync(string resourceGroupName, string serviceName, string schemaId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -462,7 +462,7 @@ internal GlobalSchemaOperations(ApiManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationHeaderResponse(); + var _result = new AzureOperationHeaderResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -471,7 +471,7 @@ internal GlobalSchemaOperations(ApiManagementClient client) } try { - _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings)); + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings)); } catch (JsonException ex) { @@ -523,7 +523,7 @@ internal GlobalSchemaOperations(ApiManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string serviceName, string schemaId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string serviceName, string schemaId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -684,7 +684,7 @@ internal GlobalSchemaOperations(ApiManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -697,7 +697,7 @@ internal GlobalSchemaOperations(ApiManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -711,7 +711,7 @@ internal GlobalSchemaOperations(ApiManagementClient client) } try { - _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings)); + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings)); } catch (JsonException ex) { @@ -756,10 +756,10 @@ internal GlobalSchemaOperations(ApiManagementClient client) /// /// The cancellation token. /// - public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, string schemaId, GlobalSchemaContract parameters, string ifMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, string schemaId, SchemaContract parameters, string ifMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { // Send Request - AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serviceName, schemaId, parameters, ifMatch, customHeaders, cancellationToken).ConfigureAwait(false); + AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serviceName, schemaId, parameters, ifMatch, customHeaders, cancellationToken).ConfigureAwait(false); return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } @@ -1029,7 +1029,7 @@ internal GlobalSchemaOperations(ApiManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, string schemaId, GlobalSchemaContract parameters, string ifMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, string schemaId, SchemaContract parameters, string ifMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -1214,7 +1214,7 @@ internal GlobalSchemaOperations(ApiManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -1227,7 +1227,7 @@ internal GlobalSchemaOperations(ApiManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -1245,7 +1245,7 @@ internal GlobalSchemaOperations(ApiManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -1259,7 +1259,7 @@ internal GlobalSchemaOperations(ApiManagementClient client) } try { - _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings)); + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings)); } catch (JsonException ex) { @@ -1304,7 +1304,7 @@ internal GlobalSchemaOperations(ApiManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListByServiceNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListByServiceNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -1413,7 +1413,7 @@ internal GlobalSchemaOperations(ApiManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -1426,7 +1426,7 @@ internal GlobalSchemaOperations(ApiManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/GlobalSchemaOperationsExtensions.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/SchemaOperationsExtensions.cs similarity index 81% rename from sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/GlobalSchemaOperationsExtensions.cs rename to sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/SchemaOperationsExtensions.cs index 2eb683688f30..98f81dc02c5f 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/GlobalSchemaOperationsExtensions.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/SchemaOperationsExtensions.cs @@ -18,9 +18,9 @@ namespace Microsoft.Azure.Management.ApiManagement using System.Threading.Tasks; /// - /// Extension methods for GlobalSchemaOperations. + /// Extension methods for SchemaOperations. /// - public static partial class GlobalSchemaOperationsExtensions + public static partial class SchemaOperationsExtensions { /// /// Lists a collection of schemas registered with service instance. @@ -37,7 +37,7 @@ public static partial class GlobalSchemaOperationsExtensions /// /// OData parameters to apply to the operation. /// - public static IPage ListByService(this IGlobalSchemaOperations operations, string resourceGroupName, string serviceName, ODataQuery odataQuery = default(ODataQuery)) + public static IPage ListByService(this ISchemaOperations operations, string resourceGroupName, string serviceName, ODataQuery odataQuery = default(ODataQuery)) { return operations.ListByServiceAsync(resourceGroupName, serviceName, odataQuery).GetAwaiter().GetResult(); } @@ -60,7 +60,7 @@ public static partial class GlobalSchemaOperationsExtensions /// /// The cancellation token. /// - public static async Task> ListByServiceAsync(this IGlobalSchemaOperations operations, string resourceGroupName, string serviceName, ODataQuery odataQuery = default(ODataQuery), CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListByServiceAsync(this ISchemaOperations operations, string resourceGroupName, string serviceName, ODataQuery odataQuery = default(ODataQuery), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListByServiceWithHttpMessagesAsync(resourceGroupName, serviceName, odataQuery, null, cancellationToken).ConfigureAwait(false)) { @@ -85,7 +85,7 @@ public static partial class GlobalSchemaOperationsExtensions /// Schema id identifier. Must be unique in the current API Management service /// instance. /// - public static GlobalSchemaGetEntityTagHeaders GetEntityTag(this IGlobalSchemaOperations operations, string resourceGroupName, string serviceName, string schemaId) + public static SchemaGetEntityTagHeaders GetEntityTag(this ISchemaOperations operations, string resourceGroupName, string serviceName, string schemaId) { return operations.GetEntityTagAsync(resourceGroupName, serviceName, schemaId).GetAwaiter().GetResult(); } @@ -110,7 +110,7 @@ public static GlobalSchemaGetEntityTagHeaders GetEntityTag(this IGlobalSchemaOpe /// /// The cancellation token. /// - public static async Task GetEntityTagAsync(this IGlobalSchemaOperations operations, string resourceGroupName, string serviceName, string schemaId, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task GetEntityTagAsync(this ISchemaOperations operations, string resourceGroupName, string serviceName, string schemaId, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetEntityTagWithHttpMessagesAsync(resourceGroupName, serviceName, schemaId, null, cancellationToken).ConfigureAwait(false)) { @@ -134,7 +134,7 @@ public static GlobalSchemaGetEntityTagHeaders GetEntityTag(this IGlobalSchemaOpe /// Schema id identifier. Must be unique in the current API Management service /// instance. /// - public static GlobalSchemaContract Get(this IGlobalSchemaOperations operations, string resourceGroupName, string serviceName, string schemaId) + public static SchemaContract Get(this ISchemaOperations operations, string resourceGroupName, string serviceName, string schemaId) { return operations.GetAsync(resourceGroupName, serviceName, schemaId).GetAwaiter().GetResult(); } @@ -158,7 +158,7 @@ public static GlobalSchemaContract Get(this IGlobalSchemaOperations operations, /// /// The cancellation token. /// - public static async Task GetAsync(this IGlobalSchemaOperations operations, string resourceGroupName, string serviceName, string schemaId, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task GetAsync(this ISchemaOperations operations, string resourceGroupName, string serviceName, string schemaId, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serviceName, schemaId, null, cancellationToken).ConfigureAwait(false)) { @@ -190,7 +190,7 @@ public static GlobalSchemaContract Get(this IGlobalSchemaOperations operations, /// ETag of the Entity. Not required when creating an entity, but required when /// updating an entity. /// - public static GlobalSchemaContract CreateOrUpdate(this IGlobalSchemaOperations operations, string resourceGroupName, string serviceName, string schemaId, GlobalSchemaContract parameters, string ifMatch = default(string)) + public static SchemaContract CreateOrUpdate(this ISchemaOperations operations, string resourceGroupName, string serviceName, string schemaId, SchemaContract parameters, string ifMatch = default(string)) { return operations.CreateOrUpdateAsync(resourceGroupName, serviceName, schemaId, parameters, ifMatch).GetAwaiter().GetResult(); } @@ -222,7 +222,7 @@ public static GlobalSchemaContract Get(this IGlobalSchemaOperations operations, /// /// The cancellation token. /// - public static async Task CreateOrUpdateAsync(this IGlobalSchemaOperations operations, string resourceGroupName, string serviceName, string schemaId, GlobalSchemaContract parameters, string ifMatch = default(string), CancellationToken cancellationToken = default(CancellationToken)) + public static async Task CreateOrUpdateAsync(this ISchemaOperations operations, string resourceGroupName, string serviceName, string schemaId, SchemaContract parameters, string ifMatch = default(string), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serviceName, schemaId, parameters, ifMatch, null, cancellationToken).ConfigureAwait(false)) { @@ -251,7 +251,7 @@ public static GlobalSchemaContract Get(this IGlobalSchemaOperations operations, /// header response of the GET request or it should be * for unconditional /// update. /// - public static void Delete(this IGlobalSchemaOperations operations, string resourceGroupName, string serviceName, string schemaId, string ifMatch) + public static void Delete(this ISchemaOperations operations, string resourceGroupName, string serviceName, string schemaId, string ifMatch) { operations.DeleteAsync(resourceGroupName, serviceName, schemaId, ifMatch).GetAwaiter().GetResult(); } @@ -280,7 +280,7 @@ public static void Delete(this IGlobalSchemaOperations operations, string resour /// /// The cancellation token. /// - public static async Task DeleteAsync(this IGlobalSchemaOperations operations, string resourceGroupName, string serviceName, string schemaId, string ifMatch, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task DeleteAsync(this ISchemaOperations operations, string resourceGroupName, string serviceName, string schemaId, string ifMatch, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, serviceName, schemaId, ifMatch, null, cancellationToken).ConfigureAwait(false)).Dispose(); } @@ -309,7 +309,7 @@ public static void Delete(this IGlobalSchemaOperations operations, string resour /// ETag of the Entity. Not required when creating an entity, but required when /// updating an entity. /// - public static GlobalSchemaContract BeginCreateOrUpdate(this IGlobalSchemaOperations operations, string resourceGroupName, string serviceName, string schemaId, GlobalSchemaContract parameters, string ifMatch = default(string)) + public static SchemaContract BeginCreateOrUpdate(this ISchemaOperations operations, string resourceGroupName, string serviceName, string schemaId, SchemaContract parameters, string ifMatch = default(string)) { return operations.BeginCreateOrUpdateAsync(resourceGroupName, serviceName, schemaId, parameters, ifMatch).GetAwaiter().GetResult(); } @@ -341,7 +341,7 @@ public static void Delete(this IGlobalSchemaOperations operations, string resour /// /// The cancellation token. /// - public static async Task BeginCreateOrUpdateAsync(this IGlobalSchemaOperations operations, string resourceGroupName, string serviceName, string schemaId, GlobalSchemaContract parameters, string ifMatch = default(string), CancellationToken cancellationToken = default(CancellationToken)) + public static async Task BeginCreateOrUpdateAsync(this ISchemaOperations operations, string resourceGroupName, string serviceName, string schemaId, SchemaContract parameters, string ifMatch = default(string), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serviceName, schemaId, parameters, ifMatch, null, cancellationToken).ConfigureAwait(false)) { @@ -358,7 +358,7 @@ public static void Delete(this IGlobalSchemaOperations operations, string resour /// /// The NextLink from the previous successful call to List operation. /// - public static IPage ListByServiceNext(this IGlobalSchemaOperations operations, string nextPageLink) + public static IPage ListByServiceNext(this ISchemaOperations operations, string nextPageLink) { return operations.ListByServiceNextAsync(nextPageLink).GetAwaiter().GetResult(); } @@ -375,7 +375,7 @@ public static IPage ListByServiceNext(this IGlobalSchemaOp /// /// The cancellation token. /// - public static async Task> ListByServiceNextAsync(this IGlobalSchemaOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListByServiceNextAsync(this ISchemaOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListByServiceNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/SdkInfo_ApiManagementClient.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/SdkInfo_ApiManagementClient.cs index 4fec95bd78da..9424de8bbac3 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/SdkInfo_ApiManagementClient.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/SdkInfo_ApiManagementClient.cs @@ -19,82 +19,82 @@ public static IEnumerable> ApiInfo_ApiManagementCl { return new Tuple[] { - new Tuple("ApiManagement", "Api", "2021-08-01"), - new Tuple("ApiManagement", "ApiDiagnostic", "2021-08-01"), - new Tuple("ApiManagement", "ApiExport", "2021-08-01"), - new Tuple("ApiManagement", "ApiIssue", "2021-08-01"), - new Tuple("ApiManagement", "ApiIssueAttachment", "2021-08-01"), - new Tuple("ApiManagement", "ApiIssueComment", "2021-08-01"), - new Tuple("ApiManagement", "ApiManagementOperations", "2021-08-01"), - new Tuple("ApiManagement", "ApiManagementService", "2021-08-01"), - new Tuple("ApiManagement", "ApiManagementServiceSkus", "2021-08-01"), - new Tuple("ApiManagement", "ApiManagementSkus", "2021-08-01"), - new Tuple("ApiManagement", "ApiOperation", "2021-08-01"), - new Tuple("ApiManagement", "ApiOperationPolicy", "2021-08-01"), - new Tuple("ApiManagement", "ApiPolicy", "2021-08-01"), - new Tuple("ApiManagement", "ApiProduct", "2021-08-01"), - new Tuple("ApiManagement", "ApiRelease", "2021-08-01"), - new Tuple("ApiManagement", "ApiRevision", "2021-08-01"), - new Tuple("ApiManagement", "ApiSchema", "2021-08-01"), - new Tuple("ApiManagement", "ApiTagDescription", "2021-08-01"), - new Tuple("ApiManagement", "ApiVersionSet", "2021-08-01"), - new Tuple("ApiManagement", "AuthorizationServer", "2021-08-01"), - new Tuple("ApiManagement", "Backend", "2021-08-01"), - new Tuple("ApiManagement", "Cache", "2021-08-01"), - new Tuple("ApiManagement", "Certificate", "2021-08-01"), - new Tuple("ApiManagement", "ContentItem", "2021-08-01"), - new Tuple("ApiManagement", "ContentType", "2021-08-01"), - new Tuple("ApiManagement", "DelegationSettings", "2021-08-01"), - new Tuple("ApiManagement", "DeletedServices", "2021-08-01"), - new Tuple("ApiManagement", "Diagnostic", "2021-08-01"), - new Tuple("ApiManagement", "EmailTemplate", "2021-08-01"), - new Tuple("ApiManagement", "Gateway", "2021-08-01"), - new Tuple("ApiManagement", "GatewayApi", "2021-08-01"), - new Tuple("ApiManagement", "GatewayCertificateAuthority", "2021-08-01"), - new Tuple("ApiManagement", "GatewayHostnameConfiguration", "2021-08-01"), - new Tuple("ApiManagement", "GlobalSchema", "2021-08-01"), - new Tuple("ApiManagement", "Group", "2021-08-01"), - new Tuple("ApiManagement", "GroupUser", "2021-08-01"), - new Tuple("ApiManagement", "IdentityProvider", "2021-08-01"), - new Tuple("ApiManagement", "Issue", "2021-08-01"), - new Tuple("ApiManagement", "Logger", "2021-08-01"), - new Tuple("ApiManagement", "NamedValue", "2021-08-01"), - new Tuple("ApiManagement", "NetworkStatus", "2021-08-01"), - new Tuple("ApiManagement", "Notification", "2021-08-01"), - new Tuple("ApiManagement", "NotificationRecipientEmail", "2021-08-01"), - new Tuple("ApiManagement", "NotificationRecipientUser", "2021-08-01"), - new Tuple("ApiManagement", "OpenIdConnectProvider", "2021-08-01"), - new Tuple("ApiManagement", "Operation", "2021-08-01"), - new Tuple("ApiManagement", "OutboundNetworkDependenciesEndpoints", "2021-08-01"), - new Tuple("ApiManagement", "PerformConnectivityCheckAsync", "2021-08-01"), - new Tuple("ApiManagement", "Policy", "2021-08-01"), - new Tuple("ApiManagement", "PolicyDescription", "2021-08-01"), - new Tuple("ApiManagement", "PortalRevision", "2021-08-01"), - new Tuple("ApiManagement", "PortalSettings", "2021-08-01"), - new Tuple("ApiManagement", "PrivateEndpointConnection", "2021-08-01"), - new Tuple("ApiManagement", "Product", "2021-08-01"), - new Tuple("ApiManagement", "ProductApi", "2021-08-01"), - new Tuple("ApiManagement", "ProductGroup", "2021-08-01"), - new Tuple("ApiManagement", "ProductPolicy", "2021-08-01"), - new Tuple("ApiManagement", "ProductSubscriptions", "2021-08-01"), - new Tuple("ApiManagement", "QuotaByCounterKeys", "2021-08-01"), - new Tuple("ApiManagement", "QuotaByPeriodKeys", "2021-08-01"), - new Tuple("ApiManagement", "Region", "2021-08-01"), - new Tuple("ApiManagement", "Reports", "2021-08-01"), - new Tuple("ApiManagement", "SignInSettings", "2021-08-01"), - new Tuple("ApiManagement", "SignUpSettings", "2021-08-01"), - new Tuple("ApiManagement", "Subscription", "2021-08-01"), - new Tuple("ApiManagement", "Tag", "2021-08-01"), - new Tuple("ApiManagement", "TagResource", "2021-08-01"), - new Tuple("ApiManagement", "TenantAccess", "2021-08-01"), - new Tuple("ApiManagement", "TenantAccessGit", "2021-08-01"), - new Tuple("ApiManagement", "TenantConfiguration", "2021-08-01"), - new Tuple("ApiManagement", "TenantSettings", "2021-08-01"), - new Tuple("ApiManagement", "User", "2021-08-01"), - new Tuple("ApiManagement", "UserConfirmationPassword", "2021-08-01"), - new Tuple("ApiManagement", "UserGroup", "2021-08-01"), - new Tuple("ApiManagement", "UserIdentities", "2021-08-01"), - new Tuple("ApiManagement", "UserSubscription", "2021-08-01"), + new Tuple("ApiManagement", "Api", "2021-04-01-preview"), + new Tuple("ApiManagement", "ApiDiagnostic", "2021-04-01-preview"), + new Tuple("ApiManagement", "ApiExport", "2021-04-01-preview"), + new Tuple("ApiManagement", "ApiIssue", "2021-04-01-preview"), + new Tuple("ApiManagement", "ApiIssueAttachment", "2021-04-01-preview"), + new Tuple("ApiManagement", "ApiIssueComment", "2021-04-01-preview"), + new Tuple("ApiManagement", "ApiManagementOperations", "2021-04-01-preview"), + new Tuple("ApiManagement", "ApiManagementService", "2021-04-01-preview"), + new Tuple("ApiManagement", "ApiManagementServiceSkus", "2021-04-01-preview"), + new Tuple("ApiManagement", "ApiManagementSkus", "2021-04-01-preview"), + new Tuple("ApiManagement", "ApiOperation", "2021-04-01-preview"), + new Tuple("ApiManagement", "ApiOperationPolicy", "2021-04-01-preview"), + new Tuple("ApiManagement", "ApiPolicy", "2021-04-01-preview"), + new Tuple("ApiManagement", "ApiProduct", "2021-04-01-preview"), + new Tuple("ApiManagement", "ApiRelease", "2021-04-01-preview"), + new Tuple("ApiManagement", "ApiRevision", "2021-04-01-preview"), + new Tuple("ApiManagement", "ApiSchema", "2021-04-01-preview"), + new Tuple("ApiManagement", "ApiTagDescription", "2021-04-01-preview"), + new Tuple("ApiManagement", "ApiVersionSet", "2021-04-01-preview"), + new Tuple("ApiManagement", "AuthorizationServer", "2021-04-01-preview"), + new Tuple("ApiManagement", "Backend", "2021-04-01-preview"), + new Tuple("ApiManagement", "Cache", "2021-04-01-preview"), + new Tuple("ApiManagement", "Certificate", "2021-04-01-preview"), + new Tuple("ApiManagement", "ContentItem", "2021-04-01-preview"), + new Tuple("ApiManagement", "ContentType", "2021-04-01-preview"), + new Tuple("ApiManagement", "DelegationSettings", "2021-04-01-preview"), + new Tuple("ApiManagement", "DeletedServices", "2021-04-01-preview"), + new Tuple("ApiManagement", "Diagnostic", "2021-04-01-preview"), + new Tuple("ApiManagement", "EmailTemplate", "2021-04-01-preview"), + new Tuple("ApiManagement", "Gateway", "2021-04-01-preview"), + new Tuple("ApiManagement", "GatewayApi", "2021-04-01-preview"), + new Tuple("ApiManagement", "GatewayCertificateAuthority", "2021-04-01-preview"), + new Tuple("ApiManagement", "GatewayHostnameConfiguration", "2021-04-01-preview"), + new Tuple("ApiManagement", "Group", "2021-04-01-preview"), + new Tuple("ApiManagement", "GroupUser", "2021-04-01-preview"), + new Tuple("ApiManagement", "IdentityProvider", "2021-04-01-preview"), + new Tuple("ApiManagement", "Issue", "2021-04-01-preview"), + new Tuple("ApiManagement", "Logger", "2021-04-01-preview"), + new Tuple("ApiManagement", "NamedValue", "2021-04-01-preview"), + new Tuple("ApiManagement", "NetworkStatus", "2021-04-01-preview"), + new Tuple("ApiManagement", "Notification", "2021-04-01-preview"), + new Tuple("ApiManagement", "NotificationRecipientEmail", "2021-04-01-preview"), + new Tuple("ApiManagement", "NotificationRecipientUser", "2021-04-01-preview"), + new Tuple("ApiManagement", "OpenIdConnectProvider", "2021-04-01-preview"), + new Tuple("ApiManagement", "Operation", "2021-04-01-preview"), + new Tuple("ApiManagement", "OutboundNetworkDependenciesEndpoints", "2021-04-01-preview"), + new Tuple("ApiManagement", "PerformConnectivityCheckAsync", "2021-04-01-preview"), + new Tuple("ApiManagement", "Policy", "2021-04-01-preview"), + new Tuple("ApiManagement", "PolicyDescription", "2021-04-01-preview"), + new Tuple("ApiManagement", "PortalRevision", "2021-04-01-preview"), + new Tuple("ApiManagement", "PortalSettings", "2021-04-01-preview"), + new Tuple("ApiManagement", "PrivateEndpointConnection", "2021-04-01-preview"), + new Tuple("ApiManagement", "Product", "2021-04-01-preview"), + new Tuple("ApiManagement", "ProductApi", "2021-04-01-preview"), + new Tuple("ApiManagement", "ProductGroup", "2021-04-01-preview"), + new Tuple("ApiManagement", "ProductPolicy", "2021-04-01-preview"), + new Tuple("ApiManagement", "ProductSubscriptions", "2021-04-01-preview"), + new Tuple("ApiManagement", "QuotaByCounterKeys", "2021-04-01-preview"), + new Tuple("ApiManagement", "QuotaByPeriodKeys", "2021-04-01-preview"), + new Tuple("ApiManagement", "Region", "2021-04-01-preview"), + new Tuple("ApiManagement", "Reports", "2021-04-01-preview"), + new Tuple("ApiManagement", "Schema", "2021-04-01-preview"), + new Tuple("ApiManagement", "SignInSettings", "2021-04-01-preview"), + new Tuple("ApiManagement", "SignUpSettings", "2021-04-01-preview"), + new Tuple("ApiManagement", "Subscription", "2021-04-01-preview"), + new Tuple("ApiManagement", "Tag", "2021-04-01-preview"), + new Tuple("ApiManagement", "TagResource", "2021-04-01-preview"), + new Tuple("ApiManagement", "TenantAccess", "2021-04-01-preview"), + new Tuple("ApiManagement", "TenantAccessGit", "2021-04-01-preview"), + new Tuple("ApiManagement", "TenantConfiguration", "2021-04-01-preview"), + new Tuple("ApiManagement", "TenantSettings", "2021-04-01-preview"), + new Tuple("ApiManagement", "User", "2021-04-01-preview"), + new Tuple("ApiManagement", "UserConfirmationPassword", "2021-04-01-preview"), + new Tuple("ApiManagement", "UserGroup", "2021-04-01-preview"), + new Tuple("ApiManagement", "UserIdentities", "2021-04-01-preview"), + new Tuple("ApiManagement", "UserSubscription", "2021-04-01-preview"), }.AsEnumerable(); } }