From 83e9dbf8a6079c92b2c12a6a96824317263cee4e Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Sat, 2 Apr 2022 02:34:25 +0000 Subject: [PATCH] CodeGen from PR 18478 in Azure/azure-rest-api-specs Merge 5d07d8bf4b4d496a20f66aef4a064cecee988314 into a1a224b54f05debfa94fd19477ed820c64f0f9fc --- .../src/Generated/ApiSchemaOperations.cs | 14 ++++---------- .../src/Generated/CacheOperations.cs | 14 ++++---------- .../src/Generated/EmailTemplateOperations.cs | 14 ++++---------- .../Generated/Models/BodyDiagnosticSettings.cs | 7 ++----- .../Models/KeyVaultContractCreateProperties.cs | 11 ++++++----- .../Models/KeyVaultContractProperties.cs | 6 +++--- .../src/Generated/Models/SamplingSettings.cs | 15 ++++++--------- .../src/Generated/NotificationOperations.cs | 14 ++++---------- .../src/Generated/PortalRevisionOperations.cs | 14 ++++---------- 9 files changed, 37 insertions(+), 72 deletions(-) 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..59d0d06b5920 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/ApiSchemaOperations.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/src/Generated/ApiSchemaOperations.cs @@ -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) { 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/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/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/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) {