From 72453c853face1f7cf48f19ff19c621b3dbec293 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 15 Dec 2021 03:36:57 +0000 Subject: [PATCH] CodeGen from PR 17027 in Azure/azure-rest-api-specs Merge 7fc6d91683c0eb91ca5ae85ca67e0bd8bb7a2ce5 into b8fa43756c72adab0cb47380d59d82f7c53034ec --- ...{ISKUsOperations.cs => ISkusOperations.cs} | 0 .../AccountImmutabilityPolicyProperties.cs | 15 ++++------ .../src/Generated/Models/ChangeFeed.cs | 15 ++++------ .../Generated/Models/DateAfterModification.cs | 30 ++++++++----------- .../Generated/Models/DeleteRetentionPolicy.cs | 15 ++++------ .../src/Generated/Models/FileShare.cs | 15 ++++------ .../src/Generated/Models/FileShareItem.cs | 15 ++++------ .../Generated/Models/{IpRule.cs => IPRule.cs} | 0 .../Models/RestorePolicyProperties.cs | 15 ++++------ .../{signedResource.cs => SignedResource.cs} | 0 .../SdkInfo_StorageManagementClient.cs | 11 ------- .../{SKUsOperations.cs => SkusOperations.cs} | 0 ...ensions.cs => SkusOperationsExtensions.cs} | 0 13 files changed, 48 insertions(+), 83 deletions(-) rename sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/{ISKUsOperations.cs => ISkusOperations.cs} (100%) rename sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/{IpRule.cs => IPRule.cs} (100%) rename sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/{signedResource.cs => SignedResource.cs} (100%) rename sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/{SKUsOperations.cs => SkusOperations.cs} (100%) rename sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/{SKUsOperationsExtensions.cs => SkusOperationsExtensions.cs} (100%) diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/ISKUsOperations.cs b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/ISkusOperations.cs similarity index 100% rename from sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/ISKUsOperations.cs rename to sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/ISkusOperations.cs diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/AccountImmutabilityPolicyProperties.cs b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/AccountImmutabilityPolicyProperties.cs index e95cfdb45214..9d9c09d190bf 100644 --- a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/AccountImmutabilityPolicyProperties.cs +++ b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/AccountImmutabilityPolicyProperties.cs @@ -102,16 +102,13 @@ public AccountImmutabilityPolicyProperties() /// public virtual void Validate() { - if (ImmutabilityPeriodSinceCreationInDays != null) + if (ImmutabilityPeriodSinceCreationInDays > 146000) { - if (ImmutabilityPeriodSinceCreationInDays > 146000) - { - throw new ValidationException(ValidationRules.InclusiveMaximum, "ImmutabilityPeriodSinceCreationInDays", 146000); - } - if (ImmutabilityPeriodSinceCreationInDays < 1) - { - throw new ValidationException(ValidationRules.InclusiveMinimum, "ImmutabilityPeriodSinceCreationInDays", 1); - } + throw new ValidationException(ValidationRules.InclusiveMaximum, "ImmutabilityPeriodSinceCreationInDays", 146000); + } + if (ImmutabilityPeriodSinceCreationInDays < 1) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "ImmutabilityPeriodSinceCreationInDays", 1); } } } diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/ChangeFeed.cs b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/ChangeFeed.cs index 0c6b719765ee..2368b152208f 100644 --- a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/ChangeFeed.cs +++ b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/ChangeFeed.cs @@ -72,16 +72,13 @@ public ChangeFeed() /// public virtual void Validate() { - if (RetentionInDays != null) + if (RetentionInDays > 146000) { - if (RetentionInDays > 146000) - { - throw new ValidationException(ValidationRules.InclusiveMaximum, "RetentionInDays", 146000); - } - if (RetentionInDays < 1) - { - throw new ValidationException(ValidationRules.InclusiveMinimum, "RetentionInDays", 1); - } + throw new ValidationException(ValidationRules.InclusiveMaximum, "RetentionInDays", 146000); + } + if (RetentionInDays < 1) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "RetentionInDays", 1); } } } diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/DateAfterModification.cs b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/DateAfterModification.cs index 2a6bdd42c43c..0948ac5c79c3 100644 --- a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/DateAfterModification.cs +++ b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/DateAfterModification.cs @@ -72,27 +72,21 @@ public DateAfterModification() /// public virtual void Validate() { - if (DaysAfterModificationGreaterThan != null) + if (DaysAfterModificationGreaterThan < 0) { - if (DaysAfterModificationGreaterThan < 0) - { - throw new ValidationException(ValidationRules.InclusiveMinimum, "DaysAfterModificationGreaterThan", 0); - } - if (DaysAfterModificationGreaterThan % 1 != 0) - { - throw new ValidationException(ValidationRules.MultipleOf, "DaysAfterModificationGreaterThan", 1); - } + throw new ValidationException(ValidationRules.InclusiveMinimum, "DaysAfterModificationGreaterThan", 0); } - if (DaysAfterLastAccessTimeGreaterThan != null) + if (DaysAfterModificationGreaterThan % 1 != 0) { - if (DaysAfterLastAccessTimeGreaterThan < 0) - { - throw new ValidationException(ValidationRules.InclusiveMinimum, "DaysAfterLastAccessTimeGreaterThan", 0); - } - if (DaysAfterLastAccessTimeGreaterThan % 1 != 0) - { - throw new ValidationException(ValidationRules.MultipleOf, "DaysAfterLastAccessTimeGreaterThan", 1); - } + throw new ValidationException(ValidationRules.MultipleOf, "DaysAfterModificationGreaterThan", 1); + } + if (DaysAfterLastAccessTimeGreaterThan < 0) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "DaysAfterLastAccessTimeGreaterThan", 0); + } + if (DaysAfterLastAccessTimeGreaterThan % 1 != 0) + { + throw new ValidationException(ValidationRules.MultipleOf, "DaysAfterLastAccessTimeGreaterThan", 1); } } } diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/DeleteRetentionPolicy.cs b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/DeleteRetentionPolicy.cs index 26e5d6dc8208..b5f1c7ccb8c4 100644 --- a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/DeleteRetentionPolicy.cs +++ b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/DeleteRetentionPolicy.cs @@ -69,16 +69,13 @@ public DeleteRetentionPolicy() /// public virtual void Validate() { - if (Days != null) + if (Days > 365) { - if (Days > 365) - { - throw new ValidationException(ValidationRules.InclusiveMaximum, "Days", 365); - } - if (Days < 1) - { - throw new ValidationException(ValidationRules.InclusiveMinimum, "Days", 1); - } + throw new ValidationException(ValidationRules.InclusiveMaximum, "Days", 365); + } + if (Days < 1) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "Days", 1); } } } diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/FileShare.cs b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/FileShare.cs index e62683bc92eb..18f51af3a8a1 100644 --- a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/FileShare.cs +++ b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/FileShare.cs @@ -248,16 +248,13 @@ public FileShare() /// public virtual void Validate() { - if (ShareQuota != null) + if (ShareQuota > 102400) { - if (ShareQuota > 102400) - { - throw new ValidationException(ValidationRules.InclusiveMaximum, "ShareQuota", 102400); - } - if (ShareQuota < 1) - { - throw new ValidationException(ValidationRules.InclusiveMinimum, "ShareQuota", 1); - } + throw new ValidationException(ValidationRules.InclusiveMaximum, "ShareQuota", 102400); + } + if (ShareQuota < 1) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "ShareQuota", 1); } } } diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/FileShareItem.cs b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/FileShareItem.cs index da5a4d9bcbf2..f0449e1da84c 100644 --- a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/FileShareItem.cs +++ b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/FileShareItem.cs @@ -247,16 +247,13 @@ public FileShareItem() /// public virtual void Validate() { - if (ShareQuota != null) + if (ShareQuota > 102400) { - if (ShareQuota > 102400) - { - throw new ValidationException(ValidationRules.InclusiveMaximum, "ShareQuota", 102400); - } - if (ShareQuota < 1) - { - throw new ValidationException(ValidationRules.InclusiveMinimum, "ShareQuota", 1); - } + throw new ValidationException(ValidationRules.InclusiveMaximum, "ShareQuota", 102400); + } + if (ShareQuota < 1) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "ShareQuota", 1); } } } diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/IpRule.cs b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/IPRule.cs similarity index 100% rename from sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/IpRule.cs rename to sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/IPRule.cs diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/RestorePolicyProperties.cs b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/RestorePolicyProperties.cs index 8f6eef161321..55a39da16715 100644 --- a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/RestorePolicyProperties.cs +++ b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/RestorePolicyProperties.cs @@ -86,16 +86,13 @@ public RestorePolicyProperties() /// public virtual void Validate() { - if (Days != null) + if (Days > 365) { - if (Days > 365) - { - throw new ValidationException(ValidationRules.InclusiveMaximum, "Days", 365); - } - if (Days < 1) - { - throw new ValidationException(ValidationRules.InclusiveMinimum, "Days", 1); - } + throw new ValidationException(ValidationRules.InclusiveMaximum, "Days", 365); + } + if (Days < 1) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "Days", 1); } } } diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/signedResource.cs b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/SignedResource.cs similarity index 100% rename from sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/signedResource.cs rename to sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/SignedResource.cs diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/SdkInfo_StorageManagementClient.cs b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/SdkInfo_StorageManagementClient.cs index 2c3517203440..63630c8f5914 100644 --- a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/SdkInfo_StorageManagementClient.cs +++ b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/SdkInfo_StorageManagementClient.cs @@ -41,16 +41,5 @@ public static IEnumerable> ApiInfo_StorageManageme }.AsEnumerable(); } } - // BEGIN: Code Generation Metadata Section - public static readonly String AutoRestVersion = "v2"; - public static readonly String AutoRestBootStrapperVersion = "autorest@2.0.4413"; - public static readonly String AutoRestCmdExecuted = "cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/main/specification/storage/resource-manager/readme.md --csharp --version=v2 --reflect-api-versions --csharp.output-folder=C:\\code\\srpsdk\\sdk\\storage\\Microsoft.Azure.Management.Storage\\src\\Generated"; - public static readonly String GithubForkName = "Azure"; - public static readonly String GithubBranchName = "main"; - public static readonly String GithubCommidId = "05bea6721decb69a05d9a975bb9b7dfc6a755405"; - public static readonly String CodeGenerationErrors = ""; - public static readonly String GithubRepoName = "azure-rest-api-specs"; - // END: Code Generation Metadata Section } } - diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/SKUsOperations.cs b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/SkusOperations.cs similarity index 100% rename from sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/SKUsOperations.cs rename to sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/SkusOperations.cs diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/SKUsOperationsExtensions.cs b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/SkusOperationsExtensions.cs similarity index 100% rename from sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/SKUsOperationsExtensions.cs rename to sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/SkusOperationsExtensions.cs