diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/api/Azure.ResourceManager.HDInsight.netstandard2.0.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/api/Azure.ResourceManager.HDInsight.netstandard2.0.cs index b4b06ceb04706..59ee1866e5d98 100644 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/api/Azure.ResourceManager.HDInsight.netstandard2.0.cs +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/api/Azure.ResourceManager.HDInsight.netstandard2.0.cs @@ -248,6 +248,23 @@ public HDInsightPrivateLinkResourceData() { } } namespace Azure.ResourceManager.HDInsight.Models { + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AuthenticationDirectoryType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AuthenticationDirectoryType(string value) { throw null; } + public static Azure.ResourceManager.HDInsight.Models.AuthenticationDirectoryType ActiveDirectory { get { throw null; } } + public bool Equals(Azure.ResourceManager.HDInsight.Models.AuthenticationDirectoryType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.HDInsight.Models.AuthenticationDirectoryType left, Azure.ResourceManager.HDInsight.Models.AuthenticationDirectoryType right) { throw null; } + public static implicit operator Azure.ResourceManager.HDInsight.Models.AuthenticationDirectoryType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.HDInsight.Models.AuthenticationDirectoryType left, Azure.ResourceManager.HDInsight.Models.AuthenticationDirectoryType right) { throw null; } + public override string ToString() { throw null; } + } public partial class ClientGroupInfo { public ClientGroupInfo() { } @@ -286,23 +303,6 @@ public ConnectivityEndpoint() { } public static bool operator !=(Azure.ResourceManager.HDInsight.Models.DaysOfWeek left, Azure.ResourceManager.HDInsight.Models.DaysOfWeek right) { throw null; } public override string ToString() { throw null; } } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct DirectoryType : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public DirectoryType(string value) { throw null; } - public static Azure.ResourceManager.HDInsight.Models.DirectoryType ActiveDirectory { get { throw null; } } - public bool Equals(Azure.ResourceManager.HDInsight.Models.DirectoryType other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.HDInsight.Models.DirectoryType left, Azure.ResourceManager.HDInsight.Models.DirectoryType right) { throw null; } - public static implicit operator Azure.ResourceManager.HDInsight.Models.DirectoryType (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.HDInsight.Models.DirectoryType left, Azure.ResourceManager.HDInsight.Models.DirectoryType right) { throw null; } - public override string ToString() { throw null; } - } public partial class ExcludedServicesConfig { public ExcludedServicesConfig() { } @@ -475,8 +475,8 @@ internal HDInsightClusterAaddsDetail() { } public bool? IsInitialSyncComplete { get { throw null; } } public bool? IsLdapsEnabled { get { throw null; } } public string LdapsPublicCertificateInBase64 { get { throw null; } } - public string ResourceId { get { throw null; } } - public string SubnetId { get { throw null; } } + public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } } + public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } } public System.Guid? TenantId { get { throw null; } } } public partial class HDInsightClusterConfigurations @@ -700,7 +700,7 @@ public partial class HDInsightDiskEncryptionProperties { public HDInsightDiskEncryptionProperties() { } public Azure.ResourceManager.HDInsight.Models.JsonWebKeyEncryptionAlgorithm? EncryptionAlgorithm { get { throw null; } set { } } - public bool? EncryptionAtHost { get { throw null; } set { } } + public bool? IsEncryptionAtHostEnabled { get { throw null; } set { } } public string KeyName { get { throw null; } set { } } public string KeyVersion { get { throw null; } set { } } public Azure.Core.ResourceIdentifier MsiResourceId { get { throw null; } set { } } @@ -938,7 +938,7 @@ public partial class HDInsightSecurityProfile public HDInsightSecurityProfile() { } public string AaddsResourceId { get { throw null; } set { } } public System.Collections.Generic.IList ClusterUsersGroupDNs { get { throw null; } } - public Azure.ResourceManager.HDInsight.Models.DirectoryType? DirectoryType { get { throw null; } set { } } + public Azure.ResourceManager.HDInsight.Models.AuthenticationDirectoryType? DirectoryType { get { throw null; } set { } } public string Domain { get { throw null; } set { } } public string DomainUsername { get { throw null; } set { } } public string DomainUserPassword { get { throw null; } set { } } diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/AuthenticationDirectoryType.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/AuthenticationDirectoryType.cs new file mode 100644 index 0000000000000..16e57470d10ca --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/AuthenticationDirectoryType.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// The directory type. + public readonly partial struct AuthenticationDirectoryType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AuthenticationDirectoryType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ActiveDirectoryValue = "ActiveDirectory"; + + /// ActiveDirectory. + public static AuthenticationDirectoryType ActiveDirectory { get; } = new AuthenticationDirectoryType(ActiveDirectoryValue); + /// Determines if two values are the same. + public static bool operator ==(AuthenticationDirectoryType left, AuthenticationDirectoryType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AuthenticationDirectoryType left, AuthenticationDirectoryType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator AuthenticationDirectoryType(string value) => new AuthenticationDirectoryType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AuthenticationDirectoryType other && Equals(other); + /// + public bool Equals(AuthenticationDirectoryType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/DirectoryType.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/DirectoryType.cs deleted file mode 100644 index 43b0673fd901e..0000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/DirectoryType.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The directory type. - public readonly partial struct DirectoryType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public DirectoryType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string ActiveDirectoryValue = "ActiveDirectory"; - - /// ActiveDirectory. - public static DirectoryType ActiveDirectory { get; } = new DirectoryType(ActiveDirectoryValue); - /// Determines if two values are the same. - public static bool operator ==(DirectoryType left, DirectoryType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(DirectoryType left, DirectoryType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator DirectoryType(string value) => new DirectoryType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is DirectoryType other && Equals(other); - /// - public bool Equals(DirectoryType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterAaddsDetail.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterAaddsDetail.Serialization.cs index 2a2fd184e2fdc..09c321ec537ec 100644 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterAaddsDetail.Serialization.cs +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterAaddsDetail.Serialization.cs @@ -19,8 +19,8 @@ internal static HDInsightClusterAaddsDetail DeserializeHDInsightClusterAaddsDeta Optional initialSyncComplete = default; Optional ldapsEnabled = default; Optional ldapsPublicCertificateInBase64 = default; - Optional resourceId = default; - Optional subnetId = default; + Optional resourceId = default; + Optional subnetId = default; Optional tenantId = default; foreach (var property in element.EnumerateObject()) { @@ -56,12 +56,22 @@ internal static HDInsightClusterAaddsDetail DeserializeHDInsightClusterAaddsDeta } if (property.NameEquals("resourceId")) { - resourceId = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + resourceId = new ResourceIdentifier(property.Value.GetString()); continue; } if (property.NameEquals("subnetId")) { - subnetId = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + subnetId = new ResourceIdentifier(property.Value.GetString()); continue; } if (property.NameEquals("tenantId")) diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterAaddsDetail.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterAaddsDetail.cs index 68c208d9bb304..a9907ccf45e7f 100644 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterAaddsDetail.cs +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterAaddsDetail.cs @@ -6,6 +6,7 @@ #nullable disable using System; +using Azure.Core; namespace Azure.ResourceManager.HDInsight.Models { @@ -25,7 +26,7 @@ internal HDInsightClusterAaddsDetail() /// The resource id of azure active directory domain service. /// The subnet resource id. /// The tenant id of azure active directory domain service . - internal HDInsightClusterAaddsDetail(string domainName, bool? isInitialSyncComplete, bool? isLdapsEnabled, string ldapsPublicCertificateInBase64, string resourceId, string subnetId, Guid? tenantId) + internal HDInsightClusterAaddsDetail(string domainName, bool? isInitialSyncComplete, bool? isLdapsEnabled, string ldapsPublicCertificateInBase64, ResourceIdentifier resourceId, ResourceIdentifier subnetId, Guid? tenantId) { DomainName = domainName; IsInitialSyncComplete = isInitialSyncComplete; @@ -45,9 +46,9 @@ internal HDInsightClusterAaddsDetail(string domainName, bool? isInitialSyncCompl /// The base 64 format string of public ldap certificate. public string LdapsPublicCertificateInBase64 { get; } /// The resource id of azure active directory domain service. - public string ResourceId { get; } + public ResourceIdentifier ResourceId { get; } /// The subnet resource id. - public string SubnetId { get; } + public ResourceIdentifier SubnetId { get; } /// The tenant id of azure active directory domain service . public Guid? TenantId { get; } } diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightDiskEncryptionProperties.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightDiskEncryptionProperties.Serialization.cs index 8b54382d1b448..8d2034eec0574 100644 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightDiskEncryptionProperties.Serialization.cs +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightDiskEncryptionProperties.Serialization.cs @@ -41,10 +41,10 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("msiResourceId"); writer.WriteStringValue(MsiResourceId); } - if (Optional.IsDefined(EncryptionAtHost)) + if (Optional.IsDefined(IsEncryptionAtHostEnabled)) { writer.WritePropertyName("encryptionAtHost"); - writer.WriteBooleanValue(EncryptionAtHost.Value); + writer.WriteBooleanValue(IsEncryptionAtHostEnabled.Value); } writer.WriteEndObject(); } diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightDiskEncryptionProperties.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightDiskEncryptionProperties.cs index a4bcf49089e25..258a3c46383f0 100644 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightDiskEncryptionProperties.cs +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightDiskEncryptionProperties.cs @@ -24,15 +24,15 @@ public HDInsightDiskEncryptionProperties() /// Specific key version that is used for enabling disk encryption. /// Algorithm identifier for encryption, default RSA-OAEP. /// Resource ID of Managed Identity that is used to access the key vault. - /// Indicates whether or not resource disk encryption is enabled. - internal HDInsightDiskEncryptionProperties(Uri vaultUri, string keyName, string keyVersion, JsonWebKeyEncryptionAlgorithm? encryptionAlgorithm, ResourceIdentifier msiResourceId, bool? encryptionAtHost) + /// Indicates whether or not resource disk encryption is enabled. + internal HDInsightDiskEncryptionProperties(Uri vaultUri, string keyName, string keyVersion, JsonWebKeyEncryptionAlgorithm? encryptionAlgorithm, ResourceIdentifier msiResourceId, bool? isEncryptionAtHostEnabled) { VaultUri = vaultUri; KeyName = keyName; KeyVersion = keyVersion; EncryptionAlgorithm = encryptionAlgorithm; MsiResourceId = msiResourceId; - EncryptionAtHost = encryptionAtHost; + IsEncryptionAtHostEnabled = isEncryptionAtHostEnabled; } /// Base key vault URI where the customers key is located eg. https://myvault.vault.azure.net. @@ -46,6 +46,6 @@ internal HDInsightDiskEncryptionProperties(Uri vaultUri, string keyName, string /// Resource ID of Managed Identity that is used to access the key vault. public ResourceIdentifier MsiResourceId { get; set; } /// Indicates whether or not resource disk encryption is enabled. - public bool? EncryptionAtHost { get; set; } + public bool? IsEncryptionAtHostEnabled { get; set; } } } diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightSecurityProfile.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightSecurityProfile.Serialization.cs index bd3b9ca6702ac..8273dabb634de 100644 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightSecurityProfile.Serialization.cs +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightSecurityProfile.Serialization.cs @@ -76,7 +76,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) internal static HDInsightSecurityProfile DeserializeHDInsightSecurityProfile(JsonElement element) { - Optional directoryType = default; + Optional directoryType = default; Optional domain = default; Optional organizationalUnitDN = default; Optional> ldapsUrls = default; @@ -94,7 +94,7 @@ internal static HDInsightSecurityProfile DeserializeHDInsightSecurityProfile(Jso property.ThrowNonNullablePropertyIsNull(); continue; } - directoryType = new DirectoryType(property.Value.GetString()); + directoryType = new AuthenticationDirectoryType(property.Value.GetString()); continue; } if (property.NameEquals("domain")) diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightSecurityProfile.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightSecurityProfile.cs index 39b1aea432cb3..75b167145c074 100644 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightSecurityProfile.cs +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightSecurityProfile.cs @@ -30,7 +30,7 @@ public HDInsightSecurityProfile() /// Optional. The Distinguished Names for cluster user groups. /// The resource ID of the user's Azure Active Directory Domain Service. /// User assigned identity that has permissions to read and create cluster-related artifacts in the user's AADDS. - internal HDInsightSecurityProfile(DirectoryType? directoryType, string domain, string organizationalUnitDN, IList ldapsUrls, string domainUsername, string domainUserPassword, IList clusterUsersGroupDNs, string aaddsResourceId, ResourceIdentifier msiResourceId) + internal HDInsightSecurityProfile(AuthenticationDirectoryType? directoryType, string domain, string organizationalUnitDN, IList ldapsUrls, string domainUsername, string domainUserPassword, IList clusterUsersGroupDNs, string aaddsResourceId, ResourceIdentifier msiResourceId) { DirectoryType = directoryType; Domain = domain; @@ -44,7 +44,7 @@ internal HDInsightSecurityProfile(DirectoryType? directoryType, string domain, s } /// The directory type. - public DirectoryType? DirectoryType { get; set; } + public AuthenticationDirectoryType? DirectoryType { get; set; } /// The organization's active directory domain. public string Domain { get; set; } /// The organizational unit within the Active Directory to place the cluster and service accounts. diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/autorest.md b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/autorest.md index 5c69432e06019..ec3d3ceedf71d 100644 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/autorest.md +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/autorest.md @@ -82,6 +82,8 @@ rename-mapping: ValidationErrorInfo: HDInsightClusterValidationErrorInfo AaddsResourceDetails.initialSyncComplete: IsInitialSyncComplete AaddsResourceDetails.ldapsEnabled: IsLdapsEnabled + AaddsResourceDetails.resourceId: -|arm-id + AaddsResourceDetails.subnetId: -|arm-id AsyncOperationResult: HDInsightAsyncOperationResult AsyncOperationState: HDInsightAsyncOperationState ApplicationProperties: HDInsightApplicationProperties @@ -142,6 +144,8 @@ rename-mapping: NameAvailabilityCheckResult.nameAvailable: IsNameAvailable RuntimeScriptActionDetail.startTime: -|datetime RuntimeScriptActionDetail.endTime: -|datetime + DiskEncryptionProperties.encryptionAtHost: IsEncryptionAtHostEnabled + DirectoryType: AuthenticationDirectoryType prepend-rp-prefix: - VmSizeCompatibilityFilterV2