From d197f19ac193302e282e267b2444fcda8a84fd4d Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 17 Nov 2020 14:39:23 +0000 Subject: [PATCH] CodeGen from PR 11689 in Azure/azure-rest-api-specs Merge 9f92c339bd0b47f0b7a293359fcacae05ef7fe62 into 150da63a09d1cb156cb0b6d8fe575cb9ccf7b6de --- .../AzureNetAppFilesManagementClient.cs | 2 +- .../src/Generated/Models/ActiveDirectory.cs | 22 +++++++++- .../src/Generated/Models/Backup.cs | 28 ++++++++++++- .../src/Generated/Models/BackupPatch.cs | 37 ++++++++++++++++- .../src/Generated/Models/BackupPolicyPatch.cs | 41 +++++++++++++++++-- .../Generated/Models/SnapshotPolicyPatch.cs | 2 +- .../src/Generated/Models/Volume.cs | 38 +++++------------ .../SdkInfo_NetAppManagementClient.cs | 35 +++++----------- 8 files changed, 144 insertions(+), 61 deletions(-) diff --git a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/AzureNetAppFilesManagementClient.cs b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/AzureNetAppFilesManagementClient.cs index 1798c24f3a0e..f322a7432ca9 100644 --- a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/AzureNetAppFilesManagementClient.cs +++ b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/AzureNetAppFilesManagementClient.cs @@ -384,7 +384,7 @@ private void Initialize() BackupPolicies = new BackupPoliciesOperations(this); Vaults = new VaultsOperations(this); BaseUri = new System.Uri("https://management.azure.com"); - ApiVersion = "2020-06-01"; + ApiVersion = "2020-08-01"; AcceptLanguage = "en-US"; LongRunningOperationRetryTimeout = 30; GenerateClientRequestId = true; diff --git a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/ActiveDirectory.cs b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/ActiveDirectory.cs index 573ef294a4ad..f26dd4631148 100644 --- a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/ActiveDirectory.cs +++ b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/ActiveDirectory.cs @@ -66,7 +66,11 @@ public ActiveDirectory() /// Directory Certificate Service's self-signed root CA certificate, /// this optional parameter is used only for dual protocol with LDAP /// user-mapping volumes. - public ActiveDirectory(string activeDirectoryId = default(string), string username = default(string), string password = default(string), string domain = default(string), string dns = default(string), string status = default(string), string statusDetails = default(string), string smbServerName = default(string), string organizationalUnit = default(string), string site = default(string), IList backupOperators = default(IList), string kdcIP = default(string), string adName = default(string), string serverRootCACertificate = default(string)) + /// If enabled, AES encryption will be + /// enabled for SMB communication. + /// Specifies whether or not the LDAP traffic + /// needs to be signed. + public ActiveDirectory(string activeDirectoryId = default(string), string username = default(string), string password = default(string), string domain = default(string), string dns = default(string), string status = default(string), string statusDetails = default(string), string smbServerName = default(string), string organizationalUnit = default(string), string site = default(string), IList backupOperators = default(IList), string kdcIP = default(string), string adName = default(string), string serverRootCACertificate = default(string), bool? aesEncryption = default(bool?), bool? ldapSigning = default(bool?)) { ActiveDirectoryId = activeDirectoryId; Username = username; @@ -82,6 +86,8 @@ public ActiveDirectory() KdcIP = kdcIP; AdName = adName; ServerRootCACertificate = serverRootCACertificate; + AesEncryption = aesEncryption; + LdapSigning = ldapSigning; CustomInit(); } @@ -189,6 +195,20 @@ public ActiveDirectory() [JsonProperty(PropertyName = "serverRootCACertificate")] public string ServerRootCACertificate { get; set; } + /// + /// Gets or sets if enabled, AES encryption will be enabled for SMB + /// communication. + /// + [JsonProperty(PropertyName = "aesEncryption")] + public bool? AesEncryption { get; set; } + + /// + /// Gets or sets specifies whether or not the LDAP traffic needs to be + /// signed. + /// + [JsonProperty(PropertyName = "ldapSigning")] + public bool? LdapSigning { get; set; } + /// /// Validate the object. /// diff --git a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/Backup.cs b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/Backup.cs index f2ae5a9017d8..937a7c346896 100644 --- a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/Backup.cs +++ b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/Backup.cs @@ -37,17 +37,19 @@ public Backup() /// Resource Id /// Resource name /// Resource type + /// backupId /// name /// Azure lifecycle management /// Size of backup /// Label for backup /// Type of backup adhoc or scheduled - public Backup(string location, string id = default(string), string name = default(string), string type = default(string), System.DateTime? creationDate = default(System.DateTime?), string provisioningState = default(string), long? size = default(long?), string label = default(string), string backupType = default(string)) + public Backup(string location, string id = default(string), string name = default(string), string type = default(string), string backupId = default(string), System.DateTime? creationDate = default(System.DateTime?), string provisioningState = default(string), long? size = default(long?), string label = default(string), string backupType = default(string)) { Location = location; Id = id; Name = name; Type = type; + BackupId = backupId; CreationDate = creationDate; ProvisioningState = provisioningState; Size = size; @@ -85,6 +87,15 @@ public Backup() [JsonProperty(PropertyName = "type")] public string Type { get; private set; } + /// + /// Gets backupId + /// + /// + /// UUID v4 used to identify the Backup + /// + [JsonProperty(PropertyName = "properties.backupId")] + public string BackupId { get; private set; } + /// /// Gets name /// @@ -130,6 +141,21 @@ public virtual void Validate() { throw new ValidationException(ValidationRules.CannotBeNull, "Location"); } + if (BackupId != null) + { + if (BackupId.Length > 36) + { + throw new ValidationException(ValidationRules.MaxLength, "BackupId", 36); + } + if (BackupId.Length < 36) + { + throw new ValidationException(ValidationRules.MinLength, "BackupId", 36); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(BackupId, "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$")) + { + throw new ValidationException(ValidationRules.Pattern, "BackupId", "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"); + } + } } } } diff --git a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/BackupPatch.cs b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/BackupPatch.cs index c494743b21a0..6dd59b8f5747 100644 --- a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/BackupPatch.cs +++ b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/BackupPatch.cs @@ -36,14 +36,16 @@ public BackupPatch() /// Initializes a new instance of the BackupPatch class. /// /// Resource tags + /// backupId /// name /// Azure lifecycle management /// Size of backup /// Label for backup /// Type of backup adhoc or scheduled - public BackupPatch(IDictionary tags = default(IDictionary), System.DateTime? creationDate = default(System.DateTime?), string provisioningState = default(string), long? size = default(long?), string label = default(string), string backupType = default(string)) + public BackupPatch(IDictionary tags = default(IDictionary), string backupId = default(string), System.DateTime? creationDate = default(System.DateTime?), string provisioningState = default(string), long? size = default(long?), string label = default(string), string backupType = default(string)) { Tags = tags; + BackupId = backupId; CreationDate = creationDate; ProvisioningState = provisioningState; Size = size; @@ -63,6 +65,15 @@ public BackupPatch() [JsonProperty(PropertyName = "tags")] public IDictionary Tags { get; set; } + /// + /// Gets backupId + /// + /// + /// UUID v4 used to identify the Backup + /// + [JsonProperty(PropertyName = "properties.backupId")] + public string BackupId { get; private set; } + /// /// Gets name /// @@ -96,5 +107,29 @@ public BackupPatch() [JsonProperty(PropertyName = "properties.backupType")] public string BackupType { get; private set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (BackupId != null) + { + if (BackupId.Length > 36) + { + throw new ValidationException(ValidationRules.MaxLength, "BackupId", 36); + } + if (BackupId.Length < 36) + { + throw new ValidationException(ValidationRules.MinLength, "BackupId", 36); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(BackupId, "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$")) + { + throw new ValidationException(ValidationRules.Pattern, "BackupId", "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"); + } + } + } } } diff --git a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/BackupPolicyPatch.cs b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/BackupPolicyPatch.cs index 6285b3d2dfe7..af8c0407aca6 100644 --- a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/BackupPolicyPatch.cs +++ b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/BackupPolicyPatch.cs @@ -11,6 +11,7 @@ namespace Microsoft.Azure.Management.NetApp.Models { using Microsoft.Rest; + using Microsoft.Rest.Azure; using Microsoft.Rest.Serialization; using Newtonsoft.Json; using System.Collections; @@ -21,7 +22,7 @@ namespace Microsoft.Azure.Management.NetApp.Models /// Backup policy Details for create and update /// [Rest.Serialization.JsonTransformation] - public partial class BackupPolicyPatch + public partial class BackupPolicyPatch : IResource { /// /// Initializes a new instance of the BackupPolicyPatch class. @@ -35,7 +36,11 @@ public BackupPolicyPatch() /// Initializes a new instance of the BackupPolicyPatch class. /// /// Resource location - /// Name of backup policy + /// Resource Id + /// Resource name + /// Resource type + /// Resource tags + /// Name of backup policy /// Azure lifecycle management /// Daily backups count to /// keep @@ -51,10 +56,14 @@ public BackupPolicyPatch() /// not /// A list of volumes assigned to this /// policy - public BackupPolicyPatch(string location = default(string), string name = default(string), string provisioningState = default(string), int? dailyBackupsToKeep = default(int?), int? weeklyBackupsToKeep = default(int?), int? monthlyBackupsToKeep = default(int?), int? yearlyBackupsToKeep = default(int?), int? volumesAssigned = default(int?), bool? enabled = default(bool?), IList volumeBackups = default(IList)) + public BackupPolicyPatch(string location = default(string), string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string name1 = default(string), string provisioningState = default(string), int? dailyBackupsToKeep = default(int?), int? weeklyBackupsToKeep = default(int?), int? monthlyBackupsToKeep = default(int?), int? yearlyBackupsToKeep = default(int?), int? volumesAssigned = default(int?), bool? enabled = default(bool?), IList volumeBackups = default(IList)) { Location = location; + Id = id; Name = name; + Type = type; + Tags = tags; + Name1 = name1; ProvisioningState = provisioningState; DailyBackupsToKeep = dailyBackupsToKeep; WeeklyBackupsToKeep = weeklyBackupsToKeep; @@ -77,11 +86,35 @@ public BackupPolicyPatch() [JsonProperty(PropertyName = "location")] public string Location { get; set; } + /// + /// Gets resource Id + /// + [JsonProperty(PropertyName = "id")] + public string Id { get; private set; } + + /// + /// Gets resource name + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; private set; } + + /// + /// Gets resource type + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; private set; } + + /// + /// Gets or sets resource tags + /// + [JsonProperty(PropertyName = "tags")] + public IDictionary Tags { get; set; } + /// /// Gets name of backup policy /// [JsonProperty(PropertyName = "properties.name")] - public string Name { get; private set; } + public string Name1 { get; private set; } /// /// Gets azure lifecycle management diff --git a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/SnapshotPolicyPatch.cs b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/SnapshotPolicyPatch.cs index b9c46bfe5b70..8cb7f1eb57c2 100644 --- a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/SnapshotPolicyPatch.cs +++ b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/SnapshotPolicyPatch.cs @@ -1,4 +1,4 @@ - // +// // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for // license information. diff --git a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/Volume.cs b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/Volume.cs index 777d6ced81ed..1ff70b51781c 100644 --- a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/Volume.cs +++ b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/Volume.cs @@ -375,21 +375,6 @@ public virtual void Validate() throw new ValidationException(ValidationRules.Pattern, "BackupId", "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}|(\\\\?([^\\/]*[\\/])*)([^\\/]+)$"); } } - if (BaremetalTenantId != null) - { - if (BaremetalTenantId.Length > 36) - { - throw new ValidationException(ValidationRules.MaxLength, "BaremetalTenantId", 36); - } - if (BaremetalTenantId.Length < 36) - { - throw new ValidationException(ValidationRules.MinLength, "BaremetalTenantId", 36); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(BaremetalTenantId, "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$")) - { - throw new ValidationException(ValidationRules.Pattern, "BaremetalTenantId", "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"); - } - } if (MountTargets != null) { foreach (var element in MountTargets) @@ -404,20 +389,17 @@ public virtual void Validate() { DataProtection.Validate(); } - if (ThroughputMibps != null) + if (ThroughputMibps > 4500) { - if (ThroughputMibps > 4500) - { - throw new ValidationException(ValidationRules.InclusiveMaximum, "ThroughputMibps", 4500); - } - if (ThroughputMibps < 1) - { - throw new ValidationException(ValidationRules.InclusiveMinimum, "ThroughputMibps", 1); - } - if (ThroughputMibps % 0.001 != 0) - { - throw new ValidationException(ValidationRules.MultipleOf, "ThroughputMibps", 0.001); - } + throw new ValidationException(ValidationRules.InclusiveMaximum, "ThroughputMibps", 4500); + } + if (ThroughputMibps < 1) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "ThroughputMibps", 1); + } + if (ThroughputMibps % 0.001 != 0) + { + throw new ValidationException(ValidationRules.MultipleOf, "ThroughputMibps", 0.001); } } } diff --git a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/SdkInfo_NetAppManagementClient.cs b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/SdkInfo_NetAppManagementClient.cs index 3c3f6f85696e..fc5ab004dbd6 100644 --- a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/SdkInfo_NetAppManagementClient.cs +++ b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/SdkInfo_NetAppManagementClient.cs @@ -19,32 +19,19 @@ public static IEnumerable> ApiInfo_NetAppManagemen { return new Tuple[] { - new Tuple("NetApp", "AccountBackups", "2020-06-01"), - new Tuple("NetApp", "Accounts", "2020-06-01"), - new Tuple("NetApp", "BackupPolicies", "2020-06-01"), - new Tuple("NetApp", "Backups", "2020-06-01"), - new Tuple("NetApp", "NetAppResource", "2020-06-01"), - new Tuple("NetApp", "Operations", "2020-06-01"), - new Tuple("NetApp", "Pools", "2020-06-01"), - new Tuple("NetApp", "SnapshotPolicies", "2020-06-01"), - new Tuple("NetApp", "Snapshots", "2020-06-01"), - new Tuple("NetApp", "Vaults", "2020-06-01"), - new Tuple("NetApp", "Volumes", "2020-06-01"), - new Tuple("NetApp", "backupPolicies", "2020-06-01"), - new Tuple("NetApp", "snapshotPolicies", "2020-06-01"), + new Tuple("NetApp", "AccountBackups", "2020-08-01"), + new Tuple("NetApp", "Accounts", "2020-08-01"), + new Tuple("NetApp", "BackupPolicies", "2020-08-01"), + new Tuple("NetApp", "Backups", "2020-08-01"), + new Tuple("NetApp", "NetAppResource", "2020-08-01"), + new Tuple("NetApp", "Operations", "2020-08-01"), + new Tuple("NetApp", "Pools", "2020-08-01"), + new Tuple("NetApp", "SnapshotPolicies", "2020-08-01"), + new Tuple("NetApp", "Snapshots", "2020-08-01"), + new Tuple("NetApp", "Vaults", "2020-08-01"), + new Tuple("NetApp", "Volumes", "2020-08-01"), }.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/master/specification/netapp/resource-manager/readme.md --csharp --version=v2 --reflect-api-versions --csharp-sdks-folder=C:\\Users\\audunn\\Source\\repos\\azure\\azure-sdk-for-net\\sdk"; - public static readonly String GithubForkName = "Azure"; - public static readonly String GithubBranchName = "master"; - public static readonly String GithubCommidId = "56d853a348eac1f33085073d1eaeb314d414dd46"; - public static readonly String CodeGenerationErrors = ""; - public static readonly String GithubRepoName = "azure-rest-api-specs"; - // END: Code Generation Metadata Section } } -