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/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) {