diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/api/Azure.ResourceManager.KeyVault.netstandard2.0.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/api/Azure.ResourceManager.KeyVault.netstandard2.0.cs index e284e03b0cfe..0552efeba2a2 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/api/Azure.ResourceManager.KeyVault.netstandard2.0.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/api/Azure.ResourceManager.KeyVault.netstandard2.0.cs @@ -65,10 +65,14 @@ protected KeyVaultCollection() { } System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } } - public partial class KeyVaultData : Azure.ResourceManager.Models.TrackedResourceData + public partial class KeyVaultData : Azure.ResourceManager.Models.TrackedResourceData, Azure.Core.Serialization.IModelJsonSerializable, Azure.Core.Serialization.IModelSerializable { public KeyVaultData(Azure.Core.AzureLocation location, Azure.ResourceManager.KeyVault.Models.KeyVaultProperties properties) : base (default(Azure.Core.AzureLocation)) { } public Azure.ResourceManager.KeyVault.Models.KeyVaultProperties Properties { get { throw null; } set { } } + Azure.ResourceManager.KeyVault.KeyVaultData Azure.Core.Serialization.IModelJsonSerializable.Deserialize(ref System.Text.Json.Utf8JsonReader reader, Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } + void Azure.Core.Serialization.IModelJsonSerializable.Serialize(System.Text.Json.Utf8JsonWriter writer, Azure.Core.Serialization.ModelSerializerOptions options) { } + Azure.ResourceManager.KeyVault.KeyVaultData Azure.Core.Serialization.IModelSerializable.Deserialize(System.BinaryData data, Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } + System.BinaryData Azure.Core.Serialization.IModelSerializable.Serialize(Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } } public static partial class KeyVaultExtensions { @@ -206,12 +210,16 @@ protected KeyVaultSecretCollection() { } System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } } - public partial class KeyVaultSecretData : Azure.ResourceManager.Models.ResourceData + public partial class KeyVaultSecretData : Azure.ResourceManager.Models.ResourceData, Azure.Core.Serialization.IModelJsonSerializable, Azure.Core.Serialization.IModelSerializable { public KeyVaultSecretData(Azure.ResourceManager.KeyVault.Models.SecretProperties properties) { } public Azure.Core.AzureLocation? Location { get { throw null; } } public Azure.ResourceManager.KeyVault.Models.SecretProperties Properties { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyDictionary Tags { get { throw null; } } + Azure.ResourceManager.KeyVault.KeyVaultSecretData Azure.Core.Serialization.IModelJsonSerializable.Deserialize(ref System.Text.Json.Utf8JsonReader reader, Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } + void Azure.Core.Serialization.IModelJsonSerializable.Serialize(System.Text.Json.Utf8JsonWriter writer, Azure.Core.Serialization.ModelSerializerOptions options) { } + Azure.ResourceManager.KeyVault.KeyVaultSecretData Azure.Core.Serialization.IModelSerializable.Deserialize(System.BinaryData data, Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } + System.BinaryData Azure.Core.Serialization.IModelSerializable.Serialize(Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } } public partial class KeyVaultSecretResource : Azure.ResourceManager.ArmResource { @@ -448,13 +456,17 @@ internal DeletedManagedHsmProperties() { } public static bool operator !=(Azure.ResourceManager.KeyVault.Models.IdentityAccessKeyPermission left, Azure.ResourceManager.KeyVault.Models.IdentityAccessKeyPermission right) { throw null; } public override string ToString() { throw null; } } - public partial class IdentityAccessPermissions + public partial class IdentityAccessPermissions : Azure.Core.Serialization.IModelJsonSerializable, Azure.Core.Serialization.IModelSerializable { public IdentityAccessPermissions() { } public System.Collections.Generic.IList Certificates { get { throw null; } } public System.Collections.Generic.IList Keys { get { throw null; } } public System.Collections.Generic.IList Secrets { get { throw null; } } public System.Collections.Generic.IList Storage { get { throw null; } } + Azure.ResourceManager.KeyVault.Models.IdentityAccessPermissions Azure.Core.Serialization.IModelJsonSerializable.Deserialize(ref System.Text.Json.Utf8JsonReader reader, Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } + void Azure.Core.Serialization.IModelJsonSerializable.Serialize(System.Text.Json.Utf8JsonWriter writer, Azure.Core.Serialization.ModelSerializerOptions options) { } + Azure.ResourceManager.KeyVault.Models.IdentityAccessPermissions Azure.Core.Serialization.IModelSerializable.Deserialize(System.BinaryData data, Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } + System.BinaryData Azure.Core.Serialization.IModelSerializable.Serialize(Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct IdentityAccessSecretPermission : System.IEquatable @@ -512,24 +524,36 @@ public IdentityAccessPermissions() { } public static bool operator !=(Azure.ResourceManager.KeyVault.Models.IdentityAccessStoragePermission left, Azure.ResourceManager.KeyVault.Models.IdentityAccessStoragePermission right) { throw null; } public override string ToString() { throw null; } } - public partial class KeyVaultAccessPolicy + public partial class KeyVaultAccessPolicy : Azure.Core.Serialization.IModelJsonSerializable, Azure.Core.Serialization.IModelSerializable { public KeyVaultAccessPolicy(System.Guid tenantId, string objectId, Azure.ResourceManager.KeyVault.Models.IdentityAccessPermissions permissions) { } public System.Guid? ApplicationId { get { throw null; } set { } } public string ObjectId { get { throw null; } set { } } public Azure.ResourceManager.KeyVault.Models.IdentityAccessPermissions Permissions { get { throw null; } set { } } public System.Guid TenantId { get { throw null; } set { } } + Azure.ResourceManager.KeyVault.Models.KeyVaultAccessPolicy Azure.Core.Serialization.IModelJsonSerializable.Deserialize(ref System.Text.Json.Utf8JsonReader reader, Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } + void Azure.Core.Serialization.IModelJsonSerializable.Serialize(System.Text.Json.Utf8JsonWriter writer, Azure.Core.Serialization.ModelSerializerOptions options) { } + Azure.ResourceManager.KeyVault.Models.KeyVaultAccessPolicy Azure.Core.Serialization.IModelSerializable.Deserialize(System.BinaryData data, Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } + System.BinaryData Azure.Core.Serialization.IModelSerializable.Serialize(Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } } - public partial class KeyVaultAccessPolicyParameters : Azure.ResourceManager.Models.ResourceData + public partial class KeyVaultAccessPolicyParameters : Azure.ResourceManager.Models.ResourceData, Azure.Core.Serialization.IModelJsonSerializable, Azure.Core.Serialization.IModelSerializable { public KeyVaultAccessPolicyParameters(Azure.ResourceManager.KeyVault.Models.KeyVaultAccessPolicyProperties properties) { } public System.Collections.Generic.IList AccessPolicies { get { throw null; } set { } } public Azure.Core.AzureLocation? Location { get { throw null; } } + Azure.ResourceManager.KeyVault.Models.KeyVaultAccessPolicyParameters Azure.Core.Serialization.IModelJsonSerializable.Deserialize(ref System.Text.Json.Utf8JsonReader reader, Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } + void Azure.Core.Serialization.IModelJsonSerializable.Serialize(System.Text.Json.Utf8JsonWriter writer, Azure.Core.Serialization.ModelSerializerOptions options) { } + Azure.ResourceManager.KeyVault.Models.KeyVaultAccessPolicyParameters Azure.Core.Serialization.IModelSerializable.Deserialize(System.BinaryData data, Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } + System.BinaryData Azure.Core.Serialization.IModelSerializable.Serialize(Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } } - public partial class KeyVaultAccessPolicyProperties + public partial class KeyVaultAccessPolicyProperties : Azure.Core.Serialization.IModelJsonSerializable, Azure.Core.Serialization.IModelSerializable { public KeyVaultAccessPolicyProperties(System.Collections.Generic.IEnumerable accessPolicies) { } public System.Collections.Generic.IList AccessPolicies { get { throw null; } } + Azure.ResourceManager.KeyVault.Models.KeyVaultAccessPolicyProperties Azure.Core.Serialization.IModelJsonSerializable.Deserialize(ref System.Text.Json.Utf8JsonReader reader, Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } + void Azure.Core.Serialization.IModelJsonSerializable.Serialize(System.Text.Json.Utf8JsonWriter writer, Azure.Core.Serialization.ModelSerializerOptions options) { } + Azure.ResourceManager.KeyVault.Models.KeyVaultAccessPolicyProperties Azure.Core.Serialization.IModelSerializable.Deserialize(System.BinaryData data, Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } + System.BinaryData Azure.Core.Serialization.IModelSerializable.Serialize(Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct KeyVaultActionsRequiredMessage : System.IEquatable @@ -722,7 +746,7 @@ public KeyVaultPrivateLinkServiceConnectionState() { } public string Description { get { throw null; } set { } } public Azure.ResourceManager.KeyVault.Models.KeyVaultPrivateEndpointServiceConnectionStatus? Status { get { throw null; } set { } } } - public partial class KeyVaultProperties + public partial class KeyVaultProperties : Azure.Core.Serialization.IModelJsonSerializable, Azure.Core.Serialization.IModelSerializable { public KeyVaultProperties(System.Guid tenantId, Azure.ResourceManager.KeyVault.Models.KeyVaultSku sku) { } public System.Collections.Generic.IList AccessPolicies { get { throw null; } } @@ -742,6 +766,10 @@ public KeyVaultProperties(System.Guid tenantId, Azure.ResourceManager.KeyVault.M public int? SoftDeleteRetentionInDays { get { throw null; } set { } } public System.Guid TenantId { get { throw null; } set { } } public System.Uri VaultUri { get { throw null; } set { } } + Azure.ResourceManager.KeyVault.Models.KeyVaultProperties Azure.Core.Serialization.IModelJsonSerializable.Deserialize(ref System.Text.Json.Utf8JsonReader reader, Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } + void Azure.Core.Serialization.IModelJsonSerializable.Serialize(System.Text.Json.Utf8JsonWriter writer, Azure.Core.Serialization.ModelSerializerOptions options) { } + Azure.ResourceManager.KeyVault.Models.KeyVaultProperties Azure.Core.Serialization.IModelSerializable.Deserialize(System.BinaryData data, Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } + System.BinaryData Azure.Core.Serialization.IModelSerializable.Serialize(Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct KeyVaultProvisioningState : System.IEquatable @@ -773,11 +801,15 @@ public KeyVaultSecretPatch() { } public Azure.ResourceManager.KeyVault.Models.SecretPatchProperties Properties { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } } - public partial class KeyVaultSku + public partial class KeyVaultSku : Azure.Core.Serialization.IModelJsonSerializable, Azure.Core.Serialization.IModelSerializable { public KeyVaultSku(Azure.ResourceManager.KeyVault.Models.KeyVaultSkuFamily family, Azure.ResourceManager.KeyVault.Models.KeyVaultSkuName name) { } public Azure.ResourceManager.KeyVault.Models.KeyVaultSkuFamily Family { get { throw null; } set { } } public Azure.ResourceManager.KeyVault.Models.KeyVaultSkuName Name { get { throw null; } set { } } + Azure.ResourceManager.KeyVault.Models.KeyVaultSku Azure.Core.Serialization.IModelJsonSerializable.Deserialize(ref System.Text.Json.Utf8JsonReader reader, Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } + void Azure.Core.Serialization.IModelJsonSerializable.Serialize(System.Text.Json.Utf8JsonWriter writer, Azure.Core.Serialization.ModelSerializerOptions options) { } + Azure.ResourceManager.KeyVault.Models.KeyVaultSku Azure.Core.Serialization.IModelSerializable.Deserialize(System.BinaryData data, Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } + System.BinaryData Azure.Core.Serialization.IModelSerializable.Serialize(Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct KeyVaultSkuFamily : System.IEquatable @@ -1144,7 +1176,7 @@ public SecretPatchProperties() { } public string ContentType { get { throw null; } set { } } public string Value { get { throw null; } set { } } } - public partial class SecretProperties + public partial class SecretProperties : Azure.Core.Serialization.IModelJsonSerializable, Azure.Core.Serialization.IModelSerializable { public SecretProperties() { } public Azure.ResourceManager.KeyVault.Models.SecretAttributes Attributes { get { throw null; } set { } } @@ -1152,5 +1184,9 @@ public SecretProperties() { } public System.Uri SecretUri { get { throw null; } } public string SecretUriWithVersion { get { throw null; } } public string Value { get { throw null; } set { } } + Azure.ResourceManager.KeyVault.Models.SecretProperties Azure.Core.Serialization.IModelJsonSerializable.Deserialize(ref System.Text.Json.Utf8JsonReader reader, Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } + void Azure.Core.Serialization.IModelJsonSerializable.Serialize(System.Text.Json.Utf8JsonWriter writer, Azure.Core.Serialization.ModelSerializerOptions options) { } + Azure.ResourceManager.KeyVault.Models.SecretProperties Azure.Core.Serialization.IModelSerializable.Deserialize(System.BinaryData data, Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } + System.BinaryData Azure.Core.Serialization.IModelSerializable.Serialize(Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } } } diff --git a/sdk/resourcemanager/Azure.ResourceManager/api/Azure.ResourceManager.netstandard2.0.cs b/sdk/resourcemanager/Azure.ResourceManager/api/Azure.ResourceManager.netstandard2.0.cs index f7132161f880..f515d815be55 100644 --- a/sdk/resourcemanager/Azure.ResourceManager/api/Azure.ResourceManager.netstandard2.0.cs +++ b/sdk/resourcemanager/Azure.ResourceManager/api/Azure.ResourceManager.netstandard2.0.cs @@ -860,11 +860,15 @@ protected ResourceGroupCollection() { } System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } } - public partial class ResourceGroupData : Azure.ResourceManager.Models.TrackedResourceData + public partial class ResourceGroupData : Azure.ResourceManager.Models.TrackedResourceData, Azure.Core.Serialization.IModelJsonSerializable, Azure.Core.Serialization.IModelSerializable { public ResourceGroupData(Azure.Core.AzureLocation location) { } public string ManagedBy { get { throw null; } set { } } public string ResourceGroupProvisioningState { get { throw null; } } + Azure.ResourceManager.Resources.ResourceGroupData Azure.Core.Serialization.IModelJsonSerializable.Deserialize(ref System.Text.Json.Utf8JsonReader reader, Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } + void Azure.Core.Serialization.IModelJsonSerializable.Serialize(System.Text.Json.Utf8JsonWriter writer, Azure.Core.Serialization.ModelSerializerOptions options) { } + Azure.ResourceManager.Resources.ResourceGroupData Azure.Core.Serialization.IModelSerializable.Deserialize(System.BinaryData data, Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } + System.BinaryData Azure.Core.Serialization.IModelSerializable.Serialize(Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } } public partial class ResourceGroupResource : Azure.ResourceManager.ArmResource { diff --git a/sdk/resourcemanager/Azure.ResourceManager/src/CdkHack/ResourceGroupData.Bicep.Serialization.cs b/sdk/resourcemanager/Azure.ResourceManager/src/CdkHack/ResourceGroupData.Bicep.Serialization.cs new file mode 100644 index 000000000000..0ed0611c4d40 --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager/src/CdkHack/ResourceGroupData.Bicep.Serialization.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.Core.Serialization; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.Resources +{ + public partial class ResourceGroupData : IModelJsonSerializable + { + void IModelJsonSerializable.Serialize(Utf8JsonWriter writer, ModelSerializerOptions options) => ((IUtf8JsonSerializable)this).Write(writer); + + ResourceGroupData IModelJsonSerializable.Deserialize(ref Utf8JsonReader reader, ModelSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeResourceGroupData(document.RootElement); + } + + BinaryData IModelSerializable.Serialize(ModelSerializerOptions options) => (options.Format.ToString()) switch + { + "J" or "W" => ModelSerializer.SerializeCore(this, options), + "bicep" => SerializeBicep(), + _ => throw new FormatException($"Unsupported format {options.Format}") + }; + + ResourceGroupData IModelSerializable.Deserialize(BinaryData data, ModelSerializerOptions options) + { + using var document = JsonDocument.Parse(data); + return DeserializeResourceGroupData(document.RootElement); + } + + private BinaryData SerializeBicep() + { + var sb = new StringBuilder(); + sb.AppendLine($" name: '{Name}'"); + sb.AppendLine($" location: '{Location}'"); + if(Optional.IsDefined(ManagedBy)) + { + sb.AppendLine($" managedBy: {ManagedBy}"); + } + if(Optional.IsCollectionDefined(Tags) && Tags.Count > 0) + { + sb.AppendLine($" tags: {{"); + foreach(var kv in Tags) + { + sb.AppendLine($" '{kv.Key}': '{kv.Value}'"); + } + sb.AppendLine($" }}"); + } + return BinaryData.FromString(sb.ToString()); + } + } +} diff --git a/sdk/resourcemanager/Azure.ResourceManager/src/Resources/Generated/Models/ResourceGroupData.Serialization.cs b/sdk/resourcemanager/Azure.ResourceManager/src/Resources/Generated/Models/ResourceGroupData.Serialization.cs index d2878621906c..722f0d775caa 100644 --- a/sdk/resourcemanager/Azure.ResourceManager/src/Resources/Generated/Models/ResourceGroupData.Serialization.cs +++ b/sdk/resourcemanager/Azure.ResourceManager/src/Resources/Generated/Models/ResourceGroupData.Serialization.cs @@ -5,22 +5,17 @@ #nullable disable -using System; using System.Collections.Generic; -using System.Text; using System.Text.Json; using Azure.Core; -using Azure.Core.Serialization; using Azure.ResourceManager.Models; using Azure.ResourceManager.Resources.Models; namespace Azure.ResourceManager.Resources { - public partial class ResourceGroupData : IUtf8JsonSerializable, IModelJsonSerializable + public partial class ResourceGroupData : IUtf8JsonSerializable { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => Serialize(writer, ModelSerializerOptions.DefaultWireOptions); - - private void Serialize(Utf8JsonWriter writer, ModelSerializerOptions options) + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); if (Optional.IsDefined(Properties)) @@ -49,10 +44,8 @@ private void Serialize(Utf8JsonWriter writer, ModelSerializerOptions options) writer.WriteEndObject(); } - internal static ResourceGroupData DeserializeResourceGroupData(JsonElement element, ModelSerializerOptions options = default) + internal static ResourceGroupData DeserializeResourceGroupData(JsonElement element) { - options ??= ModelSerializerOptions.DefaultWireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -127,47 +120,5 @@ internal static ResourceGroupData DeserializeResourceGroupData(JsonElement eleme } return new ResourceGroupData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, properties.Value, managedBy.Value); } - - void IModelJsonSerializable.Serialize(Utf8JsonWriter writer, ModelSerializerOptions options) => Serialize(writer, options); - - ResourceGroupData IModelJsonSerializable.Deserialize(ref Utf8JsonReader reader, ModelSerializerOptions options) - { - using var document = JsonDocument.ParseValue(ref reader); - return DeserializeResourceGroupData(document.RootElement, options); - } - - BinaryData IModelSerializable.Serialize(ModelSerializerOptions options) => (options.Format.ToString()) switch - { - "J" or "W" => ModelSerializer.SerializeCore(this, options), - "bicep" => SerializeBicep(), - _ => throw new FormatException($"Unsupported format {options.Format}") - }; - - ResourceGroupData IModelSerializable.Deserialize(BinaryData data, ModelSerializerOptions options) - { - using var document = JsonDocument.Parse(data); - return DeserializeResourceGroupData(document.RootElement, options); - } - - private BinaryData SerializeBicep() - { - var sb = new StringBuilder(); - sb.AppendLine($" name: '{Name}'"); - sb.AppendLine($" location: '{Location}'"); - if(Optional.IsDefined(ManagedBy)) - { - sb.AppendLine($" managedBy: {ManagedBy}"); - } - if(Optional.IsCollectionDefined(Tags) && Tags.Count > 0) - { - sb.AppendLine($" tags: {{"); - foreach(var kv in Tags) - { - sb.AppendLine($" '{kv.Key}': '{kv.Value}'"); - } - sb.AppendLine($" }}"); - } - return BinaryData.FromString(sb.ToString()); - } } } diff --git a/sdk/resources/Azure.ResourceManager.Resources/api/Azure.ResourceManager.Resources.netstandard2.0.cs b/sdk/resources/Azure.ResourceManager.Resources/api/Azure.ResourceManager.Resources.netstandard2.0.cs index b3f4c9408e27..0587e513e964 100644 --- a/sdk/resources/Azure.ResourceManager.Resources/api/Azure.ResourceManager.Resources.netstandard2.0.cs +++ b/sdk/resources/Azure.ResourceManager.Resources/api/Azure.ResourceManager.Resources.netstandard2.0.cs @@ -186,12 +186,16 @@ protected ArmDeploymentScriptCollection() { } System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } } - public partial class ArmDeploymentScriptData : Azure.ResourceManager.Models.ResourceData + public partial class ArmDeploymentScriptData : Azure.ResourceManager.Models.ResourceData, Azure.Core.Serialization.IModelJsonSerializable, Azure.Core.Serialization.IModelSerializable { public ArmDeploymentScriptData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.Resources.Models.ArmDeploymentScriptManagedIdentity Identity { get { throw null; } set { } } public Azure.Core.AzureLocation Location { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + Azure.ResourceManager.Resources.ArmDeploymentScriptData Azure.Core.Serialization.IModelJsonSerializable.Deserialize(ref System.Text.Json.Utf8JsonReader reader, Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } + void Azure.Core.Serialization.IModelJsonSerializable.Serialize(System.Text.Json.Utf8JsonWriter writer, Azure.Core.Serialization.ModelSerializerOptions options) { } + Azure.ResourceManager.Resources.ArmDeploymentScriptData Azure.Core.Serialization.IModelSerializable.Deserialize(System.BinaryData data, Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } + System.BinaryData Azure.Core.Serialization.IModelSerializable.Serialize(Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } } public partial class ArmDeploymentScriptResource : Azure.ResourceManager.ArmResource { @@ -819,7 +823,7 @@ public static partial class ArmResourcesModelFactory public static Azure.ResourceManager.Resources.Models.WhatIfOperationResult WhatIfOperationResult(string status = null, Azure.ResponseError error = null, System.Collections.Generic.IEnumerable changes = null) { throw null; } public static Azure.ResourceManager.Resources.Models.WhatIfPropertyChange WhatIfPropertyChange(string path = null, Azure.ResourceManager.Resources.Models.WhatIfPropertyChangeType propertyChangeType = Azure.ResourceManager.Resources.Models.WhatIfPropertyChangeType.Create, System.BinaryData before = null, System.BinaryData after = null, System.Collections.Generic.IEnumerable children = null) { throw null; } } - public partial class AzureCliScript : Azure.ResourceManager.Resources.ArmDeploymentScriptData + public partial class AzureCliScript : Azure.ResourceManager.Resources.ArmDeploymentScriptData, Azure.Core.Serialization.IModelJsonSerializable, Azure.Core.Serialization.IModelSerializable { public AzureCliScript(Azure.Core.AzureLocation location, System.TimeSpan retentionInterval, string azCliVersion) : base (default(Azure.Core.AzureLocation)) { } public string Arguments { get { throw null; } set { } } @@ -837,6 +841,10 @@ public AzureCliScript(Azure.Core.AzureLocation location, System.TimeSpan retenti public Azure.ResourceManager.Resources.Models.ScriptStorageConfiguration StorageAccountSettings { get { throw null; } set { } } public System.Collections.Generic.IList SupportingScriptUris { get { throw null; } } public System.TimeSpan? Timeout { get { throw null; } set { } } + Azure.ResourceManager.Resources.Models.AzureCliScript Azure.Core.Serialization.IModelJsonSerializable.Deserialize(ref System.Text.Json.Utf8JsonReader reader, Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } + void Azure.Core.Serialization.IModelJsonSerializable.Serialize(System.Text.Json.Utf8JsonWriter writer, Azure.Core.Serialization.ModelSerializerOptions options) { } + Azure.ResourceManager.Resources.Models.AzureCliScript Azure.Core.Serialization.IModelSerializable.Deserialize(System.BinaryData data, Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } + System.BinaryData Azure.Core.Serialization.IModelSerializable.Serialize(Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } } public partial class AzurePowerShellScript : Azure.ResourceManager.Resources.ArmDeploymentScriptData { @@ -1072,12 +1080,16 @@ public enum ProvisioningOperationKind public static bool operator !=(Azure.ResourceManager.Resources.Models.ScriptCleanupOptions left, Azure.ResourceManager.Resources.Models.ScriptCleanupOptions right) { throw null; } public override string ToString() { throw null; } } - public partial class ScriptEnvironmentVariable + public partial class ScriptEnvironmentVariable : Azure.Core.Serialization.IModelJsonSerializable, Azure.Core.Serialization.IModelSerializable { public ScriptEnvironmentVariable(string name) { } public string Name { get { throw null; } set { } } public string SecureValue { get { throw null; } set { } } public string Value { get { throw null; } set { } } + Azure.ResourceManager.Resources.Models.ScriptEnvironmentVariable Azure.Core.Serialization.IModelJsonSerializable.Deserialize(ref System.Text.Json.Utf8JsonReader reader, Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } + void Azure.Core.Serialization.IModelJsonSerializable.Serialize(System.Text.Json.Utf8JsonWriter writer, Azure.Core.Serialization.ModelSerializerOptions options) { } + Azure.ResourceManager.Resources.Models.ScriptEnvironmentVariable Azure.Core.Serialization.IModelSerializable.Deserialize(System.BinaryData data, Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } + System.BinaryData Azure.Core.Serialization.IModelSerializable.Serialize(Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct ScriptProvisioningState : System.IEquatable diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/CdkHack/ArmDeploymentScriptData.Bicep.Serialization.cs b/sdk/resources/Azure.ResourceManager.Resources/src/CdkHack/ArmDeploymentScriptData.Bicep.Serialization.cs new file mode 100644 index 000000000000..71120ff85ad7 --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources/src/CdkHack/ArmDeploymentScriptData.Bicep.Serialization.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.Core.Serialization; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.Resources +{ + public partial class ArmDeploymentScriptData : IModelJsonSerializable + { + void IModelJsonSerializable.Serialize(Utf8JsonWriter writer, ModelSerializerOptions options) => ((IUtf8JsonSerializable)this).Write(writer); + + ArmDeploymentScriptData IModelJsonSerializable.Deserialize(ref Utf8JsonReader reader, ModelSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeArmDeploymentScriptData(document.RootElement); + } + + BinaryData IModelSerializable.Serialize(ModelSerializerOptions options) => (options.Format.ToString()) switch + { + "J" or "W" => ModelSerializer.SerializeCore(this, options), + "bicep" => SerializeBicep(options), + _ => throw new FormatException($"Unsupported format {options.Format}") + }; + + ArmDeploymentScriptData IModelSerializable.Deserialize(BinaryData data, ModelSerializerOptions options) + { + using var document = JsonDocument.Parse(data); + return DeserializeArmDeploymentScriptData(document.RootElement); + } + + private BinaryData SerializeBicep(ModelSerializerOptions options) + { + var sb = new StringBuilder(); + sb.AppendLine($" name: '{Name}'"); + sb.AppendLine($" location: '{Location}'"); + sb.AppendLine($" kind: '{Kind}'"); + if (Optional.IsCollectionDefined(Tags) && Tags.Count > 0) + { + sb.AppendLine($" tags: {{"); + foreach (var kv in Tags) + { + sb.AppendLine($" '{kv.Key}': '{kv.Value}'"); + } + sb.AppendLine($" }}"); + } + return BinaryData.FromString(sb.ToString()); + } + } +} diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/CdkHack/AzureCliScript.Bicep.Serialization.cs b/sdk/resources/Azure.ResourceManager.Resources/src/CdkHack/AzureCliScript.Bicep.Serialization.cs new file mode 100644 index 000000000000..2817d11f5e16 --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources/src/CdkHack/AzureCliScript.Bicep.Serialization.cs @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Text; +using System.Text.Json; +using System.Xml; +using Azure.Core; +using Azure.Core.Serialization; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.Resources.Models +{ + public partial class AzureCliScript : IModelJsonSerializable + { + void IModelJsonSerializable.Serialize(Utf8JsonWriter writer, ModelSerializerOptions options) => ((IUtf8JsonSerializable)this).Write(writer); + + AzureCliScript IModelJsonSerializable.Deserialize(ref Utf8JsonReader reader, ModelSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeAzureCliScript(document.RootElement); + } + + BinaryData IModelSerializable.Serialize(ModelSerializerOptions options) => (options.Format.ToString()) switch + { + "J" or "W" => ModelSerializer.SerializeCore(this, options), + "bicep" => SerializeBicep(options), + _ => throw new FormatException($"Unsupported format {options.Format}") + }; + + AzureCliScript IModelSerializable.Deserialize(BinaryData data, ModelSerializerOptions options) + { + using var document = JsonDocument.Parse(data); + return DeserializeAzureCliScript(document.RootElement); + } + + private BinaryData SerializeBicep(ModelSerializerOptions options) + { + var sb = new StringBuilder(); + sb.AppendLine($" name: '{Name}'"); + sb.AppendLine($" location: '{Location}'"); + sb.AppendLine($" kind: '{Kind}'"); + if (Optional.IsCollectionDefined(Tags) && Tags.Count > 0) + { + sb.AppendLine($" tags: {{"); + foreach (var kv in Tags) + { + sb.AppendLine($" '{kv.Key}': '{kv.Value}'"); + } + sb.AppendLine($" }}"); + } + sb.AppendLine($" properties: {{"); + sb.AppendLine($" azCliVersion: '{AzCliVersion}'"); + sb.AppendLine($" retentionInterval: '{XmlConvert.ToString(RetentionInterval)}'"); + if (Timeout.HasValue) + { + sb.AppendLine($" timeout: '{XmlConvert.ToString(Timeout.Value)}'"); + } + sb.AppendLine($" cleanupPreference: '{CleanupPreference}'"); + if (Optional.IsCollectionDefined(EnvironmentVariables) && EnvironmentVariables.Count > 0) + { + sb.AppendLine($" environmentVariables: ["); + foreach (var variable in EnvironmentVariables) + { + sb.AppendLine($" {{"); + sb.AppendChildObject(variable, options, true, 6); + sb.AppendLine($" }}"); + } + sb.AppendLine($" ]"); + } + sb.AppendLine($" scriptContent: '''"); + sb.AppendLine($"{ScriptContent}"); + sb.AppendLine($" '''"); + sb.AppendLine($" }}"); + return BinaryData.FromString(sb.ToString()); + } + } +} diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/CdkHack/ScriptEnvironmentVariable.Bicep.Serialization.cs b/sdk/resources/Azure.ResourceManager.Resources/src/CdkHack/ScriptEnvironmentVariable.Bicep.Serialization.cs new file mode 100644 index 000000000000..45928a0e6c3e --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources/src/CdkHack/ScriptEnvironmentVariable.Bicep.Serialization.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.Core.Serialization; + +namespace Azure.ResourceManager.Resources.Models +{ + public partial class ScriptEnvironmentVariable : IModelJsonSerializable + { + void IModelJsonSerializable.Serialize(Utf8JsonWriter writer, ModelSerializerOptions options) => ((IUtf8JsonSerializable)this).Write(writer); + + ScriptEnvironmentVariable IModelJsonSerializable.Deserialize(ref Utf8JsonReader reader, ModelSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeScriptEnvironmentVariable(document.RootElement); + } + + BinaryData IModelSerializable.Serialize(ModelSerializerOptions options) => (options.Format.ToString()) switch + { + "J" or "W" => ModelSerializer.SerializeCore(this, options), + "bicep" => SerializeBicep(options), + _ => throw new FormatException($"Unsupported format {options.Format}") + }; + + ScriptEnvironmentVariable IModelSerializable.Deserialize(BinaryData data, ModelSerializerOptions options) + { + using var document = JsonDocument.Parse(data); + return DeserializeScriptEnvironmentVariable(document.RootElement); + } + + private BinaryData SerializeBicep(ModelSerializerOptions options) + { + var sb = new StringBuilder(); + sb.AppendLine($" name: '{Name}'"); + if (Optional.IsDefined(Value)) + { + string value = Value.StartsWith("_p_.", StringComparison.Ordinal) ? Value.Substring(4) : $"'{Value}'"; + sb.AppendLine($" value: {value}"); + } + if (Optional.IsDefined(SecureValue)) + { + string value = SecureValue.StartsWith("_p_.", StringComparison.Ordinal) ? SecureValue.Substring(4) : $"'{SecureValue}'"; + sb.AppendLine($" secureValue: {value}"); + } + return BinaryData.FromString(sb.ToString()); + } + } +} diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/StringBuilderExtensions.cs b/sdk/resources/Azure.ResourceManager.Resources/src/CdkHack/StringBuilderExtensions.cs similarity index 100% rename from sdk/resources/Azure.ResourceManager.Resources/src/StringBuilderExtensions.cs rename to sdk/resources/Azure.ResourceManager.Resources/src/CdkHack/StringBuilderExtensions.cs diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/ArmDeploymentScriptData.Serialization.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/ArmDeploymentScriptData.Serialization.cs index 83cd313e5697..1e72f180d7e4 100644 --- a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/ArmDeploymentScriptData.Serialization.cs +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/ArmDeploymentScriptData.Serialization.cs @@ -5,22 +5,17 @@ #nullable disable -using System; using System.Collections.Generic; -using System.Text; using System.Text.Json; using Azure.Core; -using Azure.Core.Serialization; using Azure.ResourceManager.Models; using Azure.ResourceManager.Resources.Models; namespace Azure.ResourceManager.Resources { - public partial class ArmDeploymentScriptData : IUtf8JsonSerializable, IModelJsonSerializable + public partial class ArmDeploymentScriptData : IUtf8JsonSerializable { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => Serialize(writer, ModelSerializerOptions.DefaultWireOptions); - - private void Serialize(Utf8JsonWriter writer, ModelSerializerOptions options) + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); if (Optional.IsDefined(Identity)) @@ -46,10 +41,8 @@ private void Serialize(Utf8JsonWriter writer, ModelSerializerOptions options) writer.WriteEndObject(); } - internal static ArmDeploymentScriptData DeserializeArmDeploymentScriptData(JsonElement element, ModelSerializerOptions options = default) + internal static ArmDeploymentScriptData DeserializeArmDeploymentScriptData(JsonElement element) { - options ??= ModelSerializerOptions.DefaultWireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -132,44 +125,5 @@ internal static ArmDeploymentScriptData DeserializeArmDeploymentScriptData(JsonE } return new ArmDeploymentScriptData(id, name, type, systemData.Value, identity.Value, location, Optional.ToDictionary(tags), kind); } - - void IModelJsonSerializable.Serialize(Utf8JsonWriter writer, ModelSerializerOptions options) => Serialize(writer, options); - - ArmDeploymentScriptData IModelJsonSerializable.Deserialize(ref Utf8JsonReader reader, ModelSerializerOptions options) - { - using var document = JsonDocument.ParseValue(ref reader); - return DeserializeArmDeploymentScriptData(document.RootElement, options); - } - - BinaryData IModelSerializable.Serialize(ModelSerializerOptions options) => (options.Format.ToString()) switch - { - "J" or "W" => ModelSerializer.SerializeCore(this, options), - "bicep" => SerializeBicep(options), - _ => throw new FormatException($"Unsupported format {options.Format}") - }; - - ArmDeploymentScriptData IModelSerializable.Deserialize(BinaryData data, ModelSerializerOptions options) - { - using var document = JsonDocument.Parse(data); - return DeserializeArmDeploymentScriptData(document.RootElement, options); - } - - private BinaryData SerializeBicep(ModelSerializerOptions options) - { - var sb = new StringBuilder(); - sb.AppendLine($" name: '{Name}'"); - sb.AppendLine($" location: '{Location}'"); - sb.AppendLine($" kind: '{Kind}'"); - if (Optional.IsCollectionDefined(Tags) && Tags.Count > 0) - { - sb.AppendLine($" tags: {{"); - foreach (var kv in Tags) - { - sb.AppendLine($" '{kv.Key}': '{kv.Value}'"); - } - sb.AppendLine($" }}"); - } - return BinaryData.FromString(sb.ToString()); - } } } diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/AzureCliScript.Serialization.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/AzureCliScript.Serialization.cs index c07d0bac5e42..d4db631632bf 100644 --- a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/AzureCliScript.Serialization.cs +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/AzureCliScript.Serialization.cs @@ -7,21 +7,15 @@ using System; using System.Collections.Generic; -using System.Globalization; -using System.Text; using System.Text.Json; -using System.Xml; using Azure.Core; -using Azure.Core.Serialization; using Azure.ResourceManager.Models; namespace Azure.ResourceManager.Resources.Models { - public partial class AzureCliScript : IUtf8JsonSerializable, IModelJsonSerializable + public partial class AzureCliScript : IUtf8JsonSerializable { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => Serialize(writer, ModelSerializerOptions.DefaultWireOptions); - - private void Serialize(Utf8JsonWriter writer, ModelSerializerOptions options) + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); if (Optional.IsDefined(Identity)) @@ -119,10 +113,8 @@ private void Serialize(Utf8JsonWriter writer, ModelSerializerOptions options) writer.WriteEndObject(); } - internal static AzureCliScript DeserializeAzureCliScript(JsonElement element, ModelSerializerOptions options = default) + internal static AzureCliScript DeserializeAzureCliScript(JsonElement element) { - options ??= ModelSerializerOptions.DefaultWireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -356,67 +348,5 @@ internal static AzureCliScript DeserializeAzureCliScript(JsonElement element, Mo } return new AzureCliScript(id, name, type, systemData.Value, identity.Value, location, Optional.ToDictionary(tags), kind, containerSettings.Value, storageAccountSettings.Value, Optional.ToNullable(cleanupPreference), Optional.ToNullable(provisioningState), status.Value, outputs.Value, primaryScriptUri.Value, Optional.ToList(supportingScriptUris), scriptContent.Value, arguments.Value, Optional.ToList(environmentVariables), forceUpdateTag.Value, retentionInterval, Optional.ToNullable(timeout), azCliVersion); } - - void IModelJsonSerializable.Serialize(Utf8JsonWriter writer, ModelSerializerOptions options) => Serialize(writer, options); - - AzureCliScript IModelJsonSerializable.Deserialize(ref Utf8JsonReader reader, ModelSerializerOptions options) - { - using var document = JsonDocument.ParseValue(ref reader); - return DeserializeAzureCliScript(document.RootElement, options); - } - - BinaryData IModelSerializable.Serialize(ModelSerializerOptions options) => (options.Format.ToString()) switch - { - "J" or "W" => ModelSerializer.SerializeCore(this, options), - "bicep" => SerializeBicep(options), - _ => throw new FormatException($"Unsupported format {options.Format}") - }; - - AzureCliScript IModelSerializable.Deserialize(BinaryData data, ModelSerializerOptions options) - { - using var document = JsonDocument.Parse(data); - return DeserializeAzureCliScript(document.RootElement, options); - } - - private BinaryData SerializeBicep(ModelSerializerOptions options) - { - var sb = new StringBuilder(); - sb.AppendLine($" name: '{Name}'"); - sb.AppendLine($" location: '{Location}'"); - sb.AppendLine($" kind: '{Kind}'"); - if (Optional.IsCollectionDefined(Tags) && Tags.Count > 0) - { - sb.AppendLine($" tags: {{"); - foreach (var kv in Tags) - { - sb.AppendLine($" '{kv.Key}': '{kv.Value}'"); - } - sb.AppendLine($" }}"); - } - sb.AppendLine($" properties: {{"); - sb.AppendLine($" azCliVersion: '{AzCliVersion}'"); - sb.AppendLine($" retentionInterval: '{XmlConvert.ToString(RetentionInterval)}'"); - if (Timeout.HasValue) - { - sb.AppendLine($" timeout: '{XmlConvert.ToString(Timeout.Value)}'"); - } - sb.AppendLine($" cleanupPreference: '{CleanupPreference}'"); - if (Optional.IsCollectionDefined(EnvironmentVariables) && EnvironmentVariables.Count > 0) - { - sb.AppendLine($" environmentVariables: ["); - foreach (var variable in EnvironmentVariables) - { - sb.AppendLine($" {{"); - sb.AppendChildObject(variable, options, true, 6); - sb.AppendLine($" }}"); - } - sb.AppendLine($" ]"); - } - sb.AppendLine($" scriptContent: '''"); - sb.AppendLine($"{ScriptContent}"); - sb.AppendLine($" '''"); - sb.AppendLine($" }}"); - return BinaryData.FromString(sb.ToString()); - } } } diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/ScriptEnvironmentVariable.Serialization.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/ScriptEnvironmentVariable.Serialization.cs index 4f4da05c7945..557b97218d87 100644 --- a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/ScriptEnvironmentVariable.Serialization.cs +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/ScriptEnvironmentVariable.Serialization.cs @@ -5,19 +5,14 @@ #nullable disable -using System; -using System.Text; using System.Text.Json; using Azure.Core; -using Azure.Core.Serialization; namespace Azure.ResourceManager.Resources.Models { - public partial class ScriptEnvironmentVariable : IUtf8JsonSerializable, IModelJsonSerializable + public partial class ScriptEnvironmentVariable : IUtf8JsonSerializable { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => Serialize(writer, ModelSerializerOptions.DefaultWireOptions); - - private void Serialize(Utf8JsonWriter writer, ModelSerializerOptions options) + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); writer.WritePropertyName("name"u8); @@ -35,10 +30,8 @@ private void Serialize(Utf8JsonWriter writer, ModelSerializerOptions options) writer.WriteEndObject(); } - internal static ScriptEnvironmentVariable DeserializeScriptEnvironmentVariable(JsonElement element, ModelSerializerOptions options = default) + internal static ScriptEnvironmentVariable DeserializeScriptEnvironmentVariable(JsonElement element) { - options ??= ModelSerializerOptions.DefaultWireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -66,43 +59,5 @@ internal static ScriptEnvironmentVariable DeserializeScriptEnvironmentVariable(J } return new ScriptEnvironmentVariable(name, value.Value, secureValue.Value); } - - void IModelJsonSerializable.Serialize(Utf8JsonWriter writer, ModelSerializerOptions options) => Serialize(writer, options); - - ScriptEnvironmentVariable IModelJsonSerializable.Deserialize(ref Utf8JsonReader reader, ModelSerializerOptions options) - { - using var document = JsonDocument.ParseValue(ref reader); - return DeserializeScriptEnvironmentVariable(document.RootElement, options); - } - - BinaryData IModelSerializable.Serialize(ModelSerializerOptions options) => (options.Format.ToString()) switch - { - "J" or "W" => ModelSerializer.SerializeCore(this, options), - "bicep" => SerializeBicep(options), - _ => throw new FormatException($"Unsupported format {options.Format}") - }; - - ScriptEnvironmentVariable IModelSerializable.Deserialize(BinaryData data, ModelSerializerOptions options) - { - using var document = JsonDocument.Parse(data); - return DeserializeScriptEnvironmentVariable(document.RootElement, options); - } - - private BinaryData SerializeBicep(ModelSerializerOptions options) - { - var sb = new StringBuilder(); - sb.AppendLine($" name: '{Name}'"); - if (Optional.IsDefined(Value)) - { - string value = Value.StartsWith("_p_.", StringComparison.Ordinal) ? Value.Substring(4) : $"'{Value}'"; - sb.AppendLine($" value: {value}"); - } - if (Optional.IsDefined(SecureValue)) - { - string value = SecureValue.StartsWith("_p_.", StringComparison.Ordinal) ? SecureValue.Substring(4) : $"'{SecureValue}'"; - sb.AppendLine($" secureValue: {value}"); - } - return BinaryData.FromString(sb.ToString()); - } } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/api/Azure.ResourceManager.Sql.netstandard2.0.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/api/Azure.ResourceManager.Sql.netstandard2.0.cs index a1e1fa3cc57d..510dcb12aef2 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/api/Azure.ResourceManager.Sql.netstandard2.0.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/api/Azure.ResourceManager.Sql.netstandard2.0.cs @@ -2698,7 +2698,7 @@ protected SqlDatabaseColumnResource() { } public virtual System.Threading.Tasks.Task> GetSqlDatabaseSensitivityLabelAsync(Azure.ResourceManager.Sql.Models.SensitivityLabelSource sensitivityLabelSource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.Sql.SqlDatabaseSensitivityLabelCollection GetSqlDatabaseSensitivityLabels() { throw null; } } - public partial class SqlDatabaseData : Azure.ResourceManager.Models.TrackedResourceData + public partial class SqlDatabaseData : Azure.ResourceManager.Models.TrackedResourceData, Azure.Core.Serialization.IModelJsonSerializable, Azure.Core.Serialization.IModelSerializable { public SqlDatabaseData(Azure.Core.AzureLocation location) : base (default(Azure.Core.AzureLocation)) { } public int? AutoPauseDelay { get { throw null; } set { } } @@ -2750,6 +2750,10 @@ public SqlDatabaseData(Azure.Core.AzureLocation location) : base (default(Azure. public Azure.Core.ResourceIdentifier SourceDatabaseId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SourceResourceId { get { throw null; } set { } } public Azure.ResourceManager.Sql.Models.SqlDatabaseStatus? Status { get { throw null; } } + Azure.ResourceManager.Sql.SqlDatabaseData Azure.Core.Serialization.IModelJsonSerializable.Deserialize(ref System.Text.Json.Utf8JsonReader reader, Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } + void Azure.Core.Serialization.IModelJsonSerializable.Serialize(System.Text.Json.Utf8JsonWriter writer, Azure.Core.Serialization.ModelSerializerOptions options) { } + Azure.ResourceManager.Sql.SqlDatabaseData Azure.Core.Serialization.IModelSerializable.Deserialize(System.BinaryData data, Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } + System.BinaryData Azure.Core.Serialization.IModelSerializable.Serialize(Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } } public partial class SqlDatabaseResource : Azure.ResourceManager.ArmResource { @@ -3466,11 +3470,15 @@ protected SqlFirewallRuleCollection() { } System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } } - public partial class SqlFirewallRuleData : Azure.ResourceManager.Sql.Models.ProxyResourceWithWritableName + public partial class SqlFirewallRuleData : Azure.ResourceManager.Sql.Models.ProxyResourceWithWritableName, Azure.Core.Serialization.IModelJsonSerializable, Azure.Core.Serialization.IModelSerializable { public SqlFirewallRuleData() { } public string EndIPAddress { get { throw null; } set { } } public string StartIPAddress { get { throw null; } set { } } + Azure.ResourceManager.Sql.SqlFirewallRuleData Azure.Core.Serialization.IModelJsonSerializable.Deserialize(ref System.Text.Json.Utf8JsonReader reader, Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } + void Azure.Core.Serialization.IModelJsonSerializable.Serialize(System.Text.Json.Utf8JsonWriter writer, Azure.Core.Serialization.ModelSerializerOptions options) { } + Azure.ResourceManager.Sql.SqlFirewallRuleData Azure.Core.Serialization.IModelSerializable.Deserialize(System.BinaryData data, Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } + System.BinaryData Azure.Core.Serialization.IModelSerializable.Serialize(Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } } public partial class SqlFirewallRuleResource : Azure.ResourceManager.ArmResource { @@ -3794,7 +3802,7 @@ protected SqlServerConnectionPolicyResource() { } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.Sql.SqlServerConnectionPolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.Sql.SqlServerConnectionPolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } - public partial class SqlServerData : Azure.ResourceManager.Models.TrackedResourceData + public partial class SqlServerData : Azure.ResourceManager.Models.TrackedResourceData, Azure.Core.Serialization.IModelJsonSerializable, Azure.Core.Serialization.IModelSerializable { public SqlServerData(Azure.Core.AzureLocation location) : base (default(Azure.Core.AzureLocation)) { } public string AdministratorLogin { get { throw null; } set { } } @@ -3814,6 +3822,10 @@ public SqlServerData(Azure.Core.AzureLocation location) : base (default(Azure.Co public string State { get { throw null; } } public string Version { get { throw null; } set { } } public Azure.ResourceManager.Sql.Models.ServerWorkspaceFeature? WorkspaceFeature { get { throw null; } } + Azure.ResourceManager.Sql.SqlServerData Azure.Core.Serialization.IModelJsonSerializable.Deserialize(ref System.Text.Json.Utf8JsonReader reader, Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } + void Azure.Core.Serialization.IModelJsonSerializable.Serialize(System.Text.Json.Utf8JsonWriter writer, Azure.Core.Serialization.ModelSerializerOptions options) { } + Azure.ResourceManager.Sql.SqlServerData Azure.Core.Serialization.IModelSerializable.Deserialize(System.BinaryData data, Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } + System.BinaryData Azure.Core.Serialization.IModelSerializable.Serialize(Azure.Core.Serialization.ModelSerializerOptions options) { throw null; } } public partial class SqlServerDatabaseReplicationLinkCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/CdkHack/SqlDatabaseData.Bicep.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/CdkHack/SqlDatabaseData.Bicep.Serialization.cs new file mode 100644 index 000000000000..6ad3b1a524de --- /dev/null +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/CdkHack/SqlDatabaseData.Bicep.Serialization.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.Core.Serialization; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.Sql.Models; + +namespace Azure.ResourceManager.Sql +{ + public partial class SqlDatabaseData : IModelJsonSerializable + { + void IModelJsonSerializable.Serialize(Utf8JsonWriter writer, ModelSerializerOptions options) => ((IUtf8JsonSerializable)this).Write(writer); + + SqlDatabaseData IModelJsonSerializable.Deserialize(ref Utf8JsonReader reader, ModelSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeSqlDatabaseData(document.RootElement); + } + + BinaryData IModelSerializable.Serialize(ModelSerializerOptions options) => (options.Format.ToString()) switch + { + "J" or "W" => ModelSerializer.SerializeCore(this, options), + "bicep" => SerializeBicep(), + _ => throw new FormatException($"Unsupported format {options.Format}") + }; + + SqlDatabaseData IModelSerializable.Deserialize(BinaryData data, ModelSerializerOptions options) + { + using var document = JsonDocument.Parse(data); + return DeserializeSqlDatabaseData(document.RootElement); + } + + private BinaryData SerializeBicep() + { + var sb = new StringBuilder(); + sb.AppendLine($" name: '{Name}'"); + sb.AppendLine($" location: '{Location}'"); + if (Optional.IsCollectionDefined(Tags) && Tags.Count > 0) + { + sb.AppendLine($" tags: {{"); + foreach (var kv in Tags) + { + sb.AppendLine($" '{kv.Key}': '{kv.Value}'"); + } + sb.AppendLine($" }}"); + } + return BinaryData.FromString(sb.ToString()); + } + } +} diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/CdkHack/SqlFirewallRuleData.Bicep.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/CdkHack/SqlFirewallRuleData.Bicep.Serialization.cs new file mode 100644 index 000000000000..69f89d60239c --- /dev/null +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/CdkHack/SqlFirewallRuleData.Bicep.Serialization.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.Core.Serialization; + +namespace Azure.ResourceManager.Sql +{ + public partial class SqlFirewallRuleData : IModelJsonSerializable + { + void IModelJsonSerializable.Serialize(Utf8JsonWriter writer, ModelSerializerOptions options) => ((IUtf8JsonSerializable)this).Write(writer); + + SqlFirewallRuleData IModelJsonSerializable.Deserialize(ref Utf8JsonReader reader, ModelSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeSqlFirewallRuleData(document.RootElement); + } + + BinaryData IModelSerializable.Serialize(ModelSerializerOptions options) => (options.Format.ToString()) switch + { + "J" or "W" => ModelSerializer.SerializeCore(this, options), + "bicep" => SerializeBicep(), + _ => throw new FormatException($"Unsupported format {options.Format}") + }; + + SqlFirewallRuleData IModelSerializable.Deserialize(BinaryData data, ModelSerializerOptions options) + { + using var document = JsonDocument.Parse(data); + return DeserializeSqlFirewallRuleData(document.RootElement); + } + + private BinaryData SerializeBicep() + { + var sb = new StringBuilder(); + sb.AppendLine($" name: '{Name}'"); + sb.AppendLine($" properties: {{"); + sb.AppendLine($" startIpAddress: '{StartIPAddress}'"); + sb.AppendLine($" endIpAddress: '{EndIPAddress}'"); + sb.AppendLine($" }}"); + return BinaryData.FromString(sb.ToString()); + } + } +} diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/CdkHack/SqlServerData.Bicep.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/CdkHack/SqlServerData.Bicep.Serialization.cs new file mode 100644 index 000000000000..69684e8908b5 --- /dev/null +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/CdkHack/SqlServerData.Bicep.Serialization.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.Core.Serialization; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.Sql.Models; + +namespace Azure.ResourceManager.Sql +{ + public partial class SqlServerData : IModelJsonSerializable + { + void IModelJsonSerializable.Serialize(Utf8JsonWriter writer, ModelSerializerOptions options) => ((IUtf8JsonSerializable)this).Write(writer); + + SqlServerData IModelJsonSerializable.Deserialize(ref Utf8JsonReader reader, ModelSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeSqlServerData(document.RootElement); + } + + BinaryData IModelSerializable.Serialize(ModelSerializerOptions options) => (options.Format.ToString()) switch + { + "J" or "W" => ModelSerializer.SerializeCore(this, options), + "bicep" => SerializeBicep(), + _ => throw new FormatException($"Unsupported format {options.Format}") + }; + + SqlServerData IModelSerializable.Deserialize(BinaryData data, ModelSerializerOptions options) + { + using var document = JsonDocument.Parse(data); + return DeserializeSqlServerData(document.RootElement); + } + + private BinaryData SerializeBicep() + { + var sb = new StringBuilder(); + sb.AppendLine($" name: '{Name}'"); + sb.AppendLine($" location: '{Location}'"); + if (Optional.IsCollectionDefined(Tags) && Tags.Count > 0) + { + sb.AppendLine($" tags: {{"); + foreach (var kv in Tags) + { + sb.AppendLine($" '{kv.Key}': '{kv.Value}'"); + } + sb.AppendLine($" }}"); + } + sb.AppendLine($" properties: {{"); + sb.AppendLine($" administratorLogin: '{AdministratorLogin}'"); + sb.AppendLine($" administratorLoginPassword: '{AdministratorLoginPassword}'"); + sb.AppendLine($" version: '{Version}'"); + sb.AppendLine($" minimalTlsVersion: '{MinimalTlsVersion}'"); + sb.AppendLine($" }}"); + return BinaryData.FromString(sb.ToString()); + } + } +} diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlDatabaseData.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlDatabaseData.Serialization.cs index 77738ce95a73..b6481b91f422 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlDatabaseData.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlDatabaseData.Serialization.cs @@ -7,20 +7,16 @@ using System; using System.Collections.Generic; -using System.Text; using System.Text.Json; using Azure.Core; -using Azure.Core.Serialization; using Azure.ResourceManager.Models; using Azure.ResourceManager.Sql.Models; namespace Azure.ResourceManager.Sql { - public partial class SqlDatabaseData : IUtf8JsonSerializable, IModelJsonSerializable + public partial class SqlDatabaseData : IUtf8JsonSerializable { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => Serialize(writer, ModelSerializerOptions.DefaultWireOptions); - - private void Serialize(Utf8JsonWriter writer, ModelSerializerOptions options) + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); if (Optional.IsDefined(Sku)) @@ -213,10 +209,8 @@ private void Serialize(Utf8JsonWriter writer, ModelSerializerOptions options) writer.WriteEndObject(); } - internal static SqlDatabaseData DeserializeSqlDatabaseData(JsonElement element, ModelSerializerOptions options = default) + internal static SqlDatabaseData DeserializeSqlDatabaseData(JsonElement element) { - options ??= ModelSerializerOptions.DefaultWireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -758,43 +752,5 @@ internal static SqlDatabaseData DeserializeSqlDatabaseData(JsonElement element, } return new SqlDatabaseData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, sku.Value, kind.Value, managedBy.Value, identity.Value, Optional.ToNullable(createMode), collation.Value, Optional.ToNullable(maxSizeBytes), Optional.ToNullable(sampleName), elasticPoolId.Value, sourceDatabaseId.Value, Optional.ToNullable(status), Optional.ToNullable(databaseId), Optional.ToNullable(creationDate), currentServiceObjectiveName.Value, requestedServiceObjectiveName.Value, Optional.ToNullable(defaultSecondaryLocation), failoverGroupId.Value, Optional.ToNullable(restorePointInTime), Optional.ToNullable(sourceDatabaseDeletionDate), recoveryServicesRecoveryPointId.Value, longTermRetentionBackupResourceId.Value, recoverableDatabaseId.Value, restorableDroppedDatabaseId.Value, Optional.ToNullable(catalogCollation), Optional.ToNullable(zoneRedundant), Optional.ToNullable(licenseType), Optional.ToNullable(maxLogSizeBytes), Optional.ToNullable(earliestRestoreDate), Optional.ToNullable(readScale), Optional.ToNullable(highAvailabilityReplicaCount), Optional.ToNullable(secondaryType), currentSku.Value, Optional.ToNullable(autoPauseDelay), Optional.ToNullable(currentBackupStorageRedundancy), Optional.ToNullable(requestedBackupStorageRedundancy), Optional.ToNullable(minCapacity), Optional.ToNullable(pausedDate), Optional.ToNullable(resumedDate), maintenanceConfigurationId.Value, Optional.ToNullable(isLedgerOn), Optional.ToNullable(isInfraEncryptionEnabled), Optional.ToNullable(federatedClientId), Optional.ToDictionary(keys), encryptionProtector.Value, Optional.ToNullable(preferredEnclaveType), sourceResourceId.Value, Optional.ToNullable(manualCutover), Optional.ToNullable(performCutover), Optional.ToNullable(availabilityZone)); } - - void IModelJsonSerializable.Serialize(Utf8JsonWriter writer, ModelSerializerOptions options) => Serialize(writer, options); - - SqlDatabaseData IModelJsonSerializable.Deserialize(ref Utf8JsonReader reader, ModelSerializerOptions options) - { - using var document = JsonDocument.ParseValue(ref reader); - return DeserializeSqlDatabaseData(document.RootElement, options); - } - - BinaryData IModelSerializable.Serialize(ModelSerializerOptions options) => (options.Format.ToString()) switch - { - "J" or "W" => ModelSerializer.SerializeCore(this, options), - "bicep" => SerializeBicep(), - _ => throw new FormatException($"Unsupported format {options.Format}") - }; - - SqlDatabaseData IModelSerializable.Deserialize(BinaryData data, ModelSerializerOptions options) - { - using var document = JsonDocument.Parse(data); - return DeserializeSqlDatabaseData(document.RootElement, options); - } - - private BinaryData SerializeBicep() - { - var sb = new StringBuilder(); - sb.AppendLine($" name: '{Name}'"); - sb.AppendLine($" location: '{Location}'"); - if (Optional.IsCollectionDefined(Tags) && Tags.Count > 0) - { - sb.AppendLine($" tags: {{"); - foreach (var kv in Tags) - { - sb.AppendLine($" '{kv.Key}': '{kv.Value}'"); - } - sb.AppendLine($" }}"); - } - return BinaryData.FromString(sb.ToString()); - } } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlFirewallRuleData.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlFirewallRuleData.Serialization.cs index 3337bf331c34..a74eff21a035 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlFirewallRuleData.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlFirewallRuleData.Serialization.cs @@ -5,19 +5,14 @@ #nullable disable -using System; -using System.Text; using System.Text.Json; using Azure.Core; -using Azure.Core.Serialization; namespace Azure.ResourceManager.Sql { - public partial class SqlFirewallRuleData : IUtf8JsonSerializable, IModelJsonSerializable + public partial class SqlFirewallRuleData : IUtf8JsonSerializable { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => Serialize(writer, ModelSerializerOptions.DefaultWireOptions); - - private void Serialize(Utf8JsonWriter writer, ModelSerializerOptions options) + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); if (Optional.IsDefined(Name)) @@ -41,10 +36,8 @@ private void Serialize(Utf8JsonWriter writer, ModelSerializerOptions options) writer.WriteEndObject(); } - internal static SqlFirewallRuleData DeserializeSqlFirewallRuleData(JsonElement element, ModelSerializerOptions options = default) + internal static SqlFirewallRuleData DeserializeSqlFirewallRuleData(JsonElement element) { - options ??= ModelSerializerOptions.DefaultWireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -104,37 +97,5 @@ internal static SqlFirewallRuleData DeserializeSqlFirewallRuleData(JsonElement e } return new SqlFirewallRuleData(id.Value, name.Value, Optional.ToNullable(type), startIPAddress.Value, endIPAddress.Value); } - - void IModelJsonSerializable.Serialize(Utf8JsonWriter writer, ModelSerializerOptions options) => Serialize(writer, options); - - SqlFirewallRuleData IModelJsonSerializable.Deserialize(ref Utf8JsonReader reader, ModelSerializerOptions options) - { - using var document = JsonDocument.ParseValue(ref reader); - return DeserializeSqlFirewallRuleData(document.RootElement, options); - } - - BinaryData IModelSerializable.Serialize(ModelSerializerOptions options) => (options.Format.ToString()) switch - { - "J" or "W" => ModelSerializer.SerializeCore(this, options), - "bicep" => SerializeBicep(), - _ => throw new FormatException($"Unsupported format {options.Format}") - }; - - SqlFirewallRuleData IModelSerializable.Deserialize(BinaryData data, ModelSerializerOptions options) - { - using var document = JsonDocument.Parse(data); - return DeserializeSqlFirewallRuleData(document.RootElement, options); - } - - private BinaryData SerializeBicep() - { - var sb = new StringBuilder(); - sb.AppendLine($" name: '{Name}'"); - sb.AppendLine($" properties: {{"); - sb.AppendLine($" startIpAddress: '{StartIPAddress}'"); - sb.AppendLine($" endIpAddress: '{EndIPAddress}'"); - sb.AppendLine($" }}"); - return BinaryData.FromString(sb.ToString()); - } } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlServerData.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlServerData.Serialization.cs index efb2bc607dbb..61b95ef6e807 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlServerData.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlServerData.Serialization.cs @@ -7,20 +7,16 @@ using System; using System.Collections.Generic; -using System.Text; using System.Text.Json; using Azure.Core; -using Azure.Core.Serialization; using Azure.ResourceManager.Models; using Azure.ResourceManager.Sql.Models; namespace Azure.ResourceManager.Sql { - public partial class SqlServerData : IUtf8JsonSerializable, IModelJsonSerializable + public partial class SqlServerData : IUtf8JsonSerializable { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => Serialize(writer, ModelSerializerOptions.DefaultWireOptions); - - private void Serialize(Utf8JsonWriter writer, ModelSerializerOptions options) + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); if (Optional.IsDefined(Identity)) @@ -98,10 +94,8 @@ private void Serialize(Utf8JsonWriter writer, ModelSerializerOptions options) writer.WriteEndObject(); } - internal static SqlServerData DeserializeSqlServerData(JsonElement element, ModelSerializerOptions options = default) + internal static SqlServerData DeserializeSqlServerData(JsonElement element) { - options ??= ModelSerializerOptions.DefaultWireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -320,49 +314,5 @@ internal static SqlServerData DeserializeSqlServerData(JsonElement element, Mode } return new SqlServerData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, identity, kind.Value, administratorLogin.Value, administratorLoginPassword.Value, version.Value, state.Value, fullyQualifiedDomainName.Value, Optional.ToList(privateEndpointConnections), minimalTlsVersion.Value, Optional.ToNullable(publicNetworkAccess), Optional.ToNullable(workspaceFeature), primaryUserAssignedIdentityId.Value, Optional.ToNullable(federatedClientId), keyId.Value, administrators.Value, Optional.ToNullable(restrictOutboundNetworkAccess), Optional.ToNullable(externalGovernanceStatus)); } - - void IModelJsonSerializable.Serialize(Utf8JsonWriter writer, ModelSerializerOptions options) => Serialize(writer, options); - - SqlServerData IModelJsonSerializable.Deserialize(ref Utf8JsonReader reader, ModelSerializerOptions options) - { - using var document = JsonDocument.ParseValue(ref reader); - return DeserializeSqlServerData(document.RootElement, options); - } - - BinaryData IModelSerializable.Serialize(ModelSerializerOptions options) => (options.Format.ToString()) switch - { - "J" or "W" => ModelSerializer.SerializeCore(this, options), - "bicep" => SerializeBicep(), - _ => throw new FormatException($"Unsupported format {options.Format}") - }; - - SqlServerData IModelSerializable.Deserialize(BinaryData data, ModelSerializerOptions options) - { - using var document = JsonDocument.Parse(data); - return DeserializeSqlServerData(document.RootElement, options); - } - - private BinaryData SerializeBicep() - { - var sb = new StringBuilder(); - sb.AppendLine($" name: '{Name}'"); - sb.AppendLine($" location: '{Location}'"); - if (Optional.IsCollectionDefined(Tags) && Tags.Count > 0) - { - sb.AppendLine($" tags: {{"); - foreach (var kv in Tags) - { - sb.AppendLine($" '{kv.Key}': '{kv.Value}'"); - } - sb.AppendLine($" }}"); - } - sb.AppendLine($" properties: {{"); - sb.AppendLine($" administratorLogin: '{AdministratorLogin}'"); - sb.AppendLine($" administratorLoginPassword: '{AdministratorLoginPassword}'"); - sb.AppendLine($" version: '{Version}'"); - sb.AppendLine($" minimalTlsVersion: '{MinimalTlsVersion}'"); - sb.AppendLine($" }}"); - return BinaryData.FromString(sb.ToString()); - } } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/api/Azure.ResourceManager.AppService.netstandard2.0.cs b/sdk/websites/Azure.ResourceManager.AppService/api/Azure.ResourceManager.AppService.netstandard2.0.cs index e53fe36c5ce8..eb168999c058 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/api/Azure.ResourceManager.AppService.netstandard2.0.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/api/Azure.ResourceManager.AppService.netstandard2.0.cs @@ -5400,6 +5400,7 @@ public static partial class ArmAppServiceModelFactory public static Azure.ResourceManager.AppService.Models.CertificateOrderContact CertificateOrderContact(string email = null, string nameFirst = null, string nameLast = null, string phone = null) { throw null; } public static Azure.ResourceManager.AppService.Models.ConnectionStringDictionary ConnectionStringDictionary(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary properties = null, string kind = null) { throw null; } public static Azure.ResourceManager.AppService.ContinuousWebJobData ContinuousWebJobData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.AppService.Models.ContinuousWebJobStatus? status = default(Azure.ResourceManager.AppService.Models.ContinuousWebJobStatus?), string detailedStatus = null, System.Uri logUri = null, string runCommand = null, System.Uri uri = null, System.Uri extraInfoUri = null, Azure.ResourceManager.AppService.Models.WebJobType? webJobType = default(Azure.ResourceManager.AppService.Models.WebJobType?), string error = null, bool? isUsingSdk = default(bool?), System.Collections.Generic.IDictionary settings = null, string kind = null) { throw null; } + public static Azure.ResourceManager.AppService.Models.CsmOperationDescription CsmOperationDescription(string name = null, bool? isDataAction = default(bool?), Azure.ResourceManager.AppService.Models.CsmOperationDisplay display = null, string origin = null, Azure.ResourceManager.AppService.Models.ServiceSpecification csmOperationDescriptionServiceSpecification = null) { throw null; } public static Azure.ResourceManager.AppService.Models.CsmOperationDisplay CsmOperationDisplay(string provider = null, string resource = null, string operation = null, string description = null) { throw null; } public static Azure.ResourceManager.AppService.CsmPublishingCredentialsPoliciesEntityData CsmPublishingCredentialsPoliciesEntityData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, bool? allow = default(bool?), string kind = null) { throw null; } public static Azure.ResourceManager.AppService.Models.CsmUsageQuota CsmUsageQuota(string unit = null, System.DateTimeOffset? nextResetOn = default(System.DateTimeOffset?), long? currentValue = default(long?), long? limit = default(long?), Azure.ResourceManager.AppService.Models.LocalizableString name = null) { throw null; } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/CdkHack/TempInternals.cs b/sdk/websites/Azure.ResourceManager.AppService/src/CdkHack/TempInternals.cs deleted file mode 100644 index d8f59ddde4c2..000000000000 --- a/sdk/websites/Azure.ResourceManager.AppService/src/CdkHack/TempInternals.cs +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -//This file is needed because we had to turn off the post processor which makes a bunch of types public. - -using System.Collections.Generic; -using Azure.Core; -using Azure.ResourceManager.Models; - -[assembly: CodeGenSuppressType("ArmIdWrapper")] -[assembly: CodeGenSuppressType("AppServiceGithubToken")] -[assembly: CodeGenSuppressType("AppServiceResource")] -[assembly: CodeGenSuppressType("AppserviceGithubTokenRequest")] -[assembly: CodeGenSuppressType("CsmMoveResourceEnvelope")] -[assembly: CodeGenSuppressType("DefaultErrorResponse")] -[assembly: CodeGenSuppressType("DefaultErrorResponseError")] -[assembly: CodeGenSuppressType("DefaultErrorResponseErrorDetailsItem")] -[assembly: CodeGenSuppressType("ExtendedLocation")] -[assembly: CodeGenSuppressType("ManagedServiceIdentity")] -[assembly: CodeGenSuppressType("ManagedServiceIdentityTypeExtensions")] -[assembly: CodeGenSuppressType("ProxyOnlyResource")] -[assembly: CodeGenSuppressType("StaticSiteUserProvidedFunctionAppProperties")] -[assembly: CodeGenSuppressType("UserAssignedIdentity")] -[assembly: CodeGenSuppressType("ManagedServiceIdentityType")] -[assembly: CodeGenSuppressType("ArmAppServiceModelFactory")] - -namespace Azure.ResourceManager.AppService.Models -{ -#pragma warning disable SA1402 // File may only contain a single type - internal partial class AllowedAudiencesValidation { } - internal partial class ApiManagementConfig { } - internal partial class AppServiceApiDefinitionInfo { } - internal partial class AppServiceBlobStorageTokenStore { } - internal partial class AppServiceHttpSettingsRoutes { } - internal partial class AppServiceStaticWebAppsRegistration { } - internal partial class CsmOperationDescriptionProperties { } - internal partial class DetectorMetadata { } - internal partial class FileSystemTokenStore { } - internal partial class FrontEndConfiguration { } - internal partial class LoginRoutes { } - internal partial class LoginScopes { } - internal partial class PrivateLinkResourcesWrapper { } - internal partial class RoutingRuleExperiments { } - internal partial class WebAppEnabledConfig { } - internal partial class PrivateLinkResourcesWrapper { } -#pragma warning restore SA1402 // File may only contain a single type -} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/ApiKeyVaultReferenceData.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/ApiKeyVaultReferenceData.cs index 6f4cee6aa39a..643d11e8851e 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/ApiKeyVaultReferenceData.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/ApiKeyVaultReferenceData.cs @@ -37,7 +37,7 @@ public ApiKeyVaultReferenceData() /// /// /// Kind of resource. - internal ApiKeyVaultReferenceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string reference, ResolveStatus? status, string vaultName, string secretName, string secretVersion, ResourceManager.Models.ManagedServiceIdentity identity, string details, ConfigReferenceSource? source, string activeVersion, string kind) : base(id, name, resourceType, systemData) + internal ApiKeyVaultReferenceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string reference, ResolveStatus? status, string vaultName, string secretName, string secretVersion, ManagedServiceIdentity identity, string details, ConfigReferenceSource? source, string activeVersion, string kind) : base(id, name, resourceType, systemData) { Reference = reference; Status = status; @@ -62,7 +62,7 @@ internal ApiKeyVaultReferenceData(ResourceIdentifier id, string name, ResourceTy /// Gets or sets the secret version. public string SecretVersion { get; set; } /// Managed service identity. - public ResourceManager.Models.ManagedServiceIdentity Identity { get; set; } + public ManagedServiceIdentity Identity { get; set; } /// Gets or sets the details. public string Details { get; set; } /// Gets or sets the source. diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanData.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanData.cs index 53c42c148ebf..c4e3c2d39558 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanData.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanData.cs @@ -64,7 +64,7 @@ public AppServicePlanData(AzureLocation location) : base(location) /// If <code>false</code>, this App Service Plan will not perform availability zone balancing. /// /// Kind of resource. - internal AppServicePlanData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, AppServiceSkuDescription sku, Resources.Models.ExtendedLocation extendedLocation, string workerTierName, AppServicePlanStatus? status, string subscription, HostingEnvironmentProfile hostingEnvironmentProfile, int? maximumNumberOfWorkers, string geoRegion, bool? isPerSiteScaling, bool? isElasticScaleEnabled, int? maximumElasticWorkerCount, int? numberOfSites, bool? isSpot, DateTimeOffset? spotExpireOn, DateTimeOffset? freeOfferExpireOn, string resourceGroup, bool? isReserved, bool? isXenon, bool? isHyperV, int? targetWorkerCount, int? targetWorkerSizeId, ProvisioningState? provisioningState, KubeEnvironmentProfile kubeEnvironmentProfile, bool? isZoneRedundant, string kind) : base(id, name, resourceType, systemData, tags, location) + internal AppServicePlanData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, AppServiceSkuDescription sku, ExtendedLocation extendedLocation, string workerTierName, AppServicePlanStatus? status, string subscription, HostingEnvironmentProfile hostingEnvironmentProfile, int? maximumNumberOfWorkers, string geoRegion, bool? isPerSiteScaling, bool? isElasticScaleEnabled, int? maximumElasticWorkerCount, int? numberOfSites, bool? isSpot, DateTimeOffset? spotExpireOn, DateTimeOffset? freeOfferExpireOn, string resourceGroup, bool? isReserved, bool? isXenon, bool? isHyperV, int? targetWorkerCount, int? targetWorkerSizeId, ProvisioningState? provisioningState, KubeEnvironmentProfile kubeEnvironmentProfile, bool? isZoneRedundant, string kind) : base(id, name, resourceType, systemData, tags, location) { Sku = sku; ExtendedLocation = extendedLocation; @@ -96,7 +96,7 @@ internal AppServicePlanData(ResourceIdentifier id, string name, ResourceType res /// Description of a SKU for a scalable resource. public AppServiceSkuDescription Sku { get; set; } /// Extended Location. - public Resources.Models.ExtendedLocation ExtendedLocation { get; set; } + public ExtendedLocation ExtendedLocation { get; set; } /// Target worker tier assigned to the App Service plan. public string WorkerTierName { get; set; } /// App Service plan status. diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/CdkHack/ArmAppServiceModelFactory.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/ArmAppServiceModelFactory.cs similarity index 98% rename from sdk/websites/Azure.ResourceManager.AppService/src/CdkHack/ArmAppServiceModelFactory.cs rename to sdk/websites/Azure.ResourceManager.AppService/src/Generated/ArmAppServiceModelFactory.cs index 730d699df646..87c034749a91 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/CdkHack/ArmAppServiceModelFactory.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/ArmAppServiceModelFactory.cs @@ -305,6 +305,18 @@ public static DataProviderKeyValuePair DataProviderKeyValuePair(string key = nul return new DataProviderKeyValuePair(key, value); } + /// Initializes a new instance of CsmOperationDescription. + /// + /// + /// Meta data about operation used for display in portal. + /// + /// Properties available for a Microsoft.Web resource provider operation. + /// A new instance for mocking. + public static CsmOperationDescription CsmOperationDescription(string name = null, bool? isDataAction = null, CsmOperationDisplay display = null, string origin = null, ServiceSpecification csmOperationDescriptionServiceSpecification = null) + { + return new CsmOperationDescription(name, isDataAction, display, origin, csmOperationDescriptionServiceSpecification != null ? new CsmOperationDescriptionProperties(csmOperationDescriptionServiceSpecification) : null); + } + /// Initializes a new instance of CsmOperationDisplay. /// /// @@ -965,7 +977,7 @@ public static AppServicePrivateLinkResourceProperties AppServicePrivateLinkResou /// /// Kind of resource. /// A new instance for mocking. - public static AppServicePlanData AppServicePlanData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, AppServiceSkuDescription sku = null, Resources.Models.ExtendedLocation extendedLocation = null, string workerTierName = null, AppServicePlanStatus? status = null, string subscription = null, HostingEnvironmentProfile hostingEnvironmentProfile = null, int? maximumNumberOfWorkers = null, string geoRegion = null, bool? isPerSiteScaling = null, bool? isElasticScaleEnabled = null, int? maximumElasticWorkerCount = null, int? numberOfSites = null, bool? isSpot = null, DateTimeOffset? spotExpireOn = null, DateTimeOffset? freeOfferExpireOn = null, string resourceGroup = null, bool? isReserved = null, bool? isXenon = null, bool? isHyperV = null, int? targetWorkerCount = null, int? targetWorkerSizeId = null, ProvisioningState? provisioningState = null, KubeEnvironmentProfile kubeEnvironmentProfile = null, bool? isZoneRedundant = null, string kind = null) + public static AppServicePlanData AppServicePlanData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, AppServiceSkuDescription sku = null, ExtendedLocation extendedLocation = null, string workerTierName = null, AppServicePlanStatus? status = null, string subscription = null, HostingEnvironmentProfile hostingEnvironmentProfile = null, int? maximumNumberOfWorkers = null, string geoRegion = null, bool? isPerSiteScaling = null, bool? isElasticScaleEnabled = null, int? maximumElasticWorkerCount = null, int? numberOfSites = null, bool? isSpot = null, DateTimeOffset? spotExpireOn = null, DateTimeOffset? freeOfferExpireOn = null, string resourceGroup = null, bool? isReserved = null, bool? isXenon = null, bool? isHyperV = null, int? targetWorkerCount = null, int? targetWorkerSizeId = null, ProvisioningState? provisioningState = null, KubeEnvironmentProfile kubeEnvironmentProfile = null, bool? isZoneRedundant = null, string kind = null) { tags ??= new Dictionary(); @@ -1064,7 +1076,7 @@ public static KubeEnvironmentProfile KubeEnvironmentProfile(ResourceIdentifier i /// /// Kind of resource. /// A new instance for mocking. - public static WebSiteData WebSiteData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ResourceManager.Models.ManagedServiceIdentity identity = null, Resources.Models.ExtendedLocation extendedLocation = null, string state = null, IEnumerable hostNames = null, string repositorySiteName = null, AppServiceUsageState? usageState = null, bool? isEnabled = null, IEnumerable enabledHostNames = null, WebSiteAvailabilityState? availabilityState = null, IEnumerable hostNameSslStates = null, ResourceIdentifier appServicePlanId = null, bool? isReserved = null, bool? isXenon = null, bool? isHyperV = null, DateTimeOffset? lastModifiedTimeUtc = null, SiteConfigProperties siteConfig = null, IEnumerable trafficManagerHostNames = null, bool? isScmSiteAlsoStopped = null, string targetSwapSlot = null, HostingEnvironmentProfile hostingEnvironmentProfile = null, bool? isClientAffinityEnabled = null, bool? isClientCertEnabled = null, ClientCertMode? clientCertMode = null, string clientCertExclusionPaths = null, bool? isHostNameDisabled = null, string customDomainVerificationId = null, string outboundIPAddresses = null, string possibleOutboundIPAddresses = null, int? containerSize = null, int? dailyMemoryTimeQuota = null, DateTimeOffset? suspendOn = null, int? maxNumberOfWorkers = null, CloningInfo cloningInfo = null, string resourceGroup = null, bool? isDefaultContainer = null, string defaultHostName = null, SlotSwapStatus slotSwapStatus = null, bool? isHttpsOnly = null, RedundancyMode? redundancyMode = null, Guid? inProgressOperationId = null, bool? isStorageAccountRequired = null, string keyVaultReferenceIdentity = null, ResourceIdentifier virtualNetworkSubnetId = null, string kind = null) + public static WebSiteData WebSiteData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, ExtendedLocation extendedLocation = null, string state = null, IEnumerable hostNames = null, string repositorySiteName = null, AppServiceUsageState? usageState = null, bool? isEnabled = null, IEnumerable enabledHostNames = null, WebSiteAvailabilityState? availabilityState = null, IEnumerable hostNameSslStates = null, ResourceIdentifier appServicePlanId = null, bool? isReserved = null, bool? isXenon = null, bool? isHyperV = null, DateTimeOffset? lastModifiedTimeUtc = null, SiteConfigProperties siteConfig = null, IEnumerable trafficManagerHostNames = null, bool? isScmSiteAlsoStopped = null, string targetSwapSlot = null, HostingEnvironmentProfile hostingEnvironmentProfile = null, bool? isClientAffinityEnabled = null, bool? isClientCertEnabled = null, ClientCertMode? clientCertMode = null, string clientCertExclusionPaths = null, bool? isHostNameDisabled = null, string customDomainVerificationId = null, string outboundIPAddresses = null, string possibleOutboundIPAddresses = null, int? containerSize = null, int? dailyMemoryTimeQuota = null, DateTimeOffset? suspendOn = null, int? maxNumberOfWorkers = null, CloningInfo cloningInfo = null, string resourceGroup = null, bool? isDefaultContainer = null, string defaultHostName = null, SlotSwapStatus slotSwapStatus = null, bool? isHttpsOnly = null, RedundancyMode? redundancyMode = null, Guid? inProgressOperationId = null, bool? isStorageAccountRequired = null, string keyVaultReferenceIdentity = null, ResourceIdentifier virtualNetworkSubnetId = null, string kind = null) { tags ??= new Dictionary(); hostNames ??= new List(); @@ -1075,6 +1087,103 @@ public static WebSiteData WebSiteData(ResourceIdentifier id = null, string name return new WebSiteData(id, name, resourceType, systemData, tags, location, identity, extendedLocation, state, hostNames?.ToList(), repositorySiteName, usageState, isEnabled, enabledHostNames?.ToList(), availabilityState, hostNameSslStates?.ToList(), appServicePlanId, isReserved, isXenon, isHyperV, lastModifiedTimeUtc, siteConfig, trafficManagerHostNames?.ToList(), isScmSiteAlsoStopped, targetSwapSlot, hostingEnvironmentProfile, isClientAffinityEnabled, isClientCertEnabled, clientCertMode, clientCertExclusionPaths, isHostNameDisabled, customDomainVerificationId, outboundIPAddresses, possibleOutboundIPAddresses, containerSize, dailyMemoryTimeQuota, suspendOn, maxNumberOfWorkers, cloningInfo, resourceGroup, isDefaultContainer, defaultHostName, slotSwapStatus, isHttpsOnly, redundancyMode, inProgressOperationId, isStorageAccountRequired, keyVaultReferenceIdentity, virtualNetworkSubnetId, kind); } + /// Initializes a new instance of SiteConfigProperties. + /// Number of workers. + /// Default documents. + /// .NET Framework version. + /// Version of PHP. + /// Version of Python. + /// Version of Node.js. + /// Version of PowerShell. + /// Linux App Framework and version. + /// Xenon App Framework and version. + /// <code>true</code> if request tracing is enabled; otherwise, <code>false</code>. + /// Request tracing expiration time. + /// <code>true</code> if remote debugging is enabled; otherwise, <code>false</code>. + /// Remote debugging version. + /// <code>true</code> if HTTP logging is enabled; otherwise, <code>false</code>. + /// Flag to use Managed Identity Creds for ACR pull. + /// If using user managed identity, the user managed identity ClientId. + /// HTTP logs directory size limit. + /// <code>true</code> if detailed error logging is enabled; otherwise, <code>false</code>. + /// Publishing user name. + /// Application settings. + /// Connection strings. + /// Site MachineKey. + /// Handler mappings. + /// Document root. + /// SCM type. + /// <code>true</code> to use 32-bit worker process; otherwise, <code>false</code>. + /// <code>true</code> if WebSocket is enabled; otherwise, <code>false</code>. + /// <code>true</code> if Always On is enabled; otherwise, <code>false</code>. + /// Java version. + /// Java container. + /// Java container version. + /// App command line to launch. + /// Managed pipeline mode. + /// Virtual applications. + /// Site load balancing. + /// This is work around for polymorphic types. + /// Site limits. + /// <code>true</code> if Auto Heal is enabled; otherwise, <code>false</code>. + /// Auto Heal rules. + /// Tracing options. + /// Virtual Network name. + /// Virtual Network Route All enabled. This causes all outbound traffic to have Virtual Network Security Groups and User Defined Routes applied. + /// The number of private ports assigned to this app. These will be assigned dynamically on runtime. + /// Cross-Origin Resource Sharing (CORS) settings. + /// Push endpoint settings. + /// Information about the formal API definition for the app. + /// Azure API management settings linked to the app. + /// Auto-swap slot name. + /// <code>true</code> to enable local MySQL; otherwise, <code>false</code>. + /// Managed Service Identity Id. + /// Explicit Managed Service Identity Id. + /// Identity to use for Key Vault Reference authentication. + /// IP security restrictions for main. + /// IP security restrictions for scm. + /// IP security restrictions for scm to use main. + /// Http20Enabled: configures a web site to allow clients to connect over http2.0. + /// MinTlsVersion: configures the minimum version of TLS required for SSL requests. + /// ScmMinTlsVersion: configures the minimum version of TLS required for SSL requests for SCM site. + /// State of FTP / FTPS service. + /// + /// Number of preWarmed instances. + /// This setting only applies to the Consumption and Elastic Plans + /// + /// + /// Maximum number of workers that a site can scale out to. + /// This setting only applies to the Consumption and Elastic Premium Plans + /// + /// Health check path. + /// + /// Gets or sets a value indicating whether functions runtime scale monitoring is enabled. When enabled, + /// the ScaleController will not monitor event sources directly, but will instead call to the + /// runtime to get scale status. + /// + /// Sets the time zone a site uses for generating timestamps. Compatible with Linux and Windows App Service. Setting the WEBSITE_TIME_ZONE app setting takes precedence over this config. For Linux, expects tz database values https://www.iana.org/time-zones (for a quick reference see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). For Windows, expects one of the time zones listed under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones. + /// + /// Number of minimum instance count for a site + /// This setting only applies to the Elastic Plans + /// + /// List of Azure Storage Accounts. + /// Property to allow or block all public traffic. + /// A new instance for mocking. + public static SiteConfigProperties SiteConfigProperties(int? numberOfWorkers = null, IEnumerable defaultDocuments = null, string netFrameworkVersion = null, string phpVersion = null, string pythonVersion = null, string nodeVersion = null, string powerShellVersion = null, string linuxFxVersion = null, string windowsFxVersion = null, bool? isRequestTracingEnabled = null, DateTimeOffset? requestTracingExpirationOn = null, bool? isRemoteDebuggingEnabled = null, string remoteDebuggingVersion = null, bool? isHttpLoggingEnabled = null, bool? useManagedIdentityCreds = null, string acrUserManagedIdentityId = null, int? logsDirectorySizeLimit = null, bool? isDetailedErrorLoggingEnabled = null, string publishingUsername = null, IEnumerable appSettings = null, IEnumerable connectionStrings = null, SiteMachineKey machineKey = null, IEnumerable handlerMappings = null, string documentRoot = null, ScmType? scmType = null, bool? use32BitWorkerProcess = null, bool? isWebSocketsEnabled = null, bool? isAlwaysOn = null, string javaVersion = null, string javaContainer = null, string javaContainerVersion = null, string appCommandLine = null, ManagedPipelineMode? managedPipelineMode = null, IEnumerable virtualApplications = null, SiteLoadBalancing? loadBalancing = null, IEnumerable experimentsRampUpRules = null, SiteLimits limits = null, bool? isAutoHealEnabled = null, AutoHealRules autoHealRules = null, string tracingOptions = null, string vnetName = null, bool? isVnetRouteAllEnabled = null, int? vnetPrivatePortsCount = null, AppServiceCorsSettings cors = null, WebAppPushSettings push = null, Uri apiDefinitionUri = null, string apiManagementConfigId = null, string autoSwapSlotName = null, bool? isLocalMySqlEnabled = null, int? managedServiceIdentityId = null, int? xManagedServiceIdentityId = null, string keyVaultReferenceIdentity = null, IEnumerable ipSecurityRestrictions = null, IEnumerable scmIPSecurityRestrictions = null, bool? allowIPSecurityRestrictionsForScmToUseMain = null, bool? isHttp20Enabled = null, AppServiceSupportedTlsVersion? minTlsVersion = null, AppServiceSupportedTlsVersion? scmMinTlsVersion = null, AppServiceFtpsState? ftpsState = null, int? preWarmedInstanceCount = null, int? functionAppScaleLimit = null, string healthCheckPath = null, bool? isFunctionsRuntimeScaleMonitoringEnabled = null, string websiteTimeZone = null, int? minimumElasticInstanceCount = null, IDictionary azureStorageAccounts = null, string publicNetworkAccess = null) + { + defaultDocuments ??= new List(); + appSettings ??= new List(); + connectionStrings ??= new List(); + handlerMappings ??= new List(); + virtualApplications ??= new List(); + experimentsRampUpRules ??= new List(); + ipSecurityRestrictions ??= new List(); + scmIPSecurityRestrictions ??= new List(); + azureStorageAccounts ??= new Dictionary(); + + return new SiteConfigProperties(numberOfWorkers, defaultDocuments?.ToList(), netFrameworkVersion, phpVersion, pythonVersion, nodeVersion, powerShellVersion, linuxFxVersion, windowsFxVersion, isRequestTracingEnabled, requestTracingExpirationOn, isRemoteDebuggingEnabled, remoteDebuggingVersion, isHttpLoggingEnabled, useManagedIdentityCreds, acrUserManagedIdentityId, logsDirectorySizeLimit, isDetailedErrorLoggingEnabled, publishingUsername, appSettings?.ToList(), connectionStrings?.ToList(), machineKey, handlerMappings?.ToList(), documentRoot, scmType, use32BitWorkerProcess, isWebSocketsEnabled, isAlwaysOn, javaVersion, javaContainer, javaContainerVersion, appCommandLine, managedPipelineMode, virtualApplications?.ToList(), loadBalancing, experimentsRampUpRules != null ? new RoutingRuleExperiments(experimentsRampUpRules?.ToList()) : null, limits, isAutoHealEnabled, autoHealRules, tracingOptions, vnetName, isVnetRouteAllEnabled, vnetPrivatePortsCount, cors, push, apiDefinitionUri != null ? new AppServiceApiDefinitionInfo(apiDefinitionUri) : null, apiManagementConfigId != null ? new ApiManagementConfig(apiManagementConfigId) : null, autoSwapSlotName, isLocalMySqlEnabled, managedServiceIdentityId, xManagedServiceIdentityId, keyVaultReferenceIdentity, ipSecurityRestrictions?.ToList(), scmIPSecurityRestrictions?.ToList(), allowIPSecurityRestrictionsForScmToUseMain, isHttp20Enabled, minTlsVersion, scmMinTlsVersion, ftpsState, preWarmedInstanceCount, functionAppScaleLimit, healthCheckPath, isFunctionsRuntimeScaleMonitoringEnabled, websiteTimeZone, minimumElasticInstanceCount, azureStorageAccounts, publicNetworkAccess); + } + /// Initializes a new instance of SiteMachineKey. /// MachineKey validation. /// Validation key. @@ -1488,6 +1597,30 @@ public static DetectorDefinitionResourceData DetectorDefinitionResourceData(Reso return new DetectorDefinitionResourceData(id, name, resourceType, systemData, displayName, description, rank, isEnabled, kind); } + /// Initializes a new instance of DiagnosticDetectorResponse. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Start time of the period. + /// End time of the period. + /// Flag representing Issue was detected. + /// Detector's definition. + /// Metrics provided by the detector. + /// List of Correlated events found by the detector. + /// Additional Data that detector wants to send. + /// Meta Data. + /// Kind of resource. + /// A new instance for mocking. + public static DiagnosticDetectorResponse DiagnosticDetectorResponse(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, bool? issueDetected = null, DetectorDefinition detectorDefinition = null, IEnumerable metrics = null, IEnumerable abnormalTimePeriods = null, IEnumerable> data = null, DetectorDataSource dataSource = null, string kind = null) + { + metrics ??= new List(); + abnormalTimePeriods ??= new List(); + data ??= new List>(); + + return new DiagnosticDetectorResponse(id, name, resourceType, systemData, startOn, endOn, issueDetected, detectorDefinition, metrics?.ToList(), abnormalTimePeriods?.ToList(), data?.ToList(), dataSource != null ? new DetectorMetadata(dataSource) : null, kind); + } + /// Initializes a new instance of AppSnapshot. /// The id. /// The name. @@ -1527,7 +1660,7 @@ public static AppSnapshot AppSnapshot(ResourceIdentifier id = null, string name /// /// Kind of resource. /// A new instance for mocking. - public static KubeEnvironmentData KubeEnvironmentData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, Resources.Models.ExtendedLocation extendedLocation = null, KubeEnvironmentProvisioningState? provisioningState = null, string deploymentErrors = null, bool? isInternalLoadBalancerEnabled = null, string defaultDomain = null, string staticIP = null, ArcConfiguration arcConfiguration = null, AppLogsConfiguration appLogsConfiguration = null, ResourceIdentifier aksResourceId = null, string kind = null) + public static KubeEnvironmentData KubeEnvironmentData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ExtendedLocation extendedLocation = null, KubeEnvironmentProvisioningState? provisioningState = null, string deploymentErrors = null, bool? isInternalLoadBalancerEnabled = null, string defaultDomain = null, string staticIP = null, ArcConfiguration arcConfiguration = null, AppLogsConfiguration appLogsConfiguration = null, ResourceIdentifier aksResourceId = null, string kind = null) { tags ??= new Dictionary(); @@ -2151,7 +2284,7 @@ public static StaticSitesWorkflowPreview StaticSitesWorkflowPreview(ResourceIden /// The provider that submitted the last deployment to the primary environment of the static site. /// Kind of resource. /// A new instance for mocking. - public static StaticSiteData StaticSiteData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, AppServiceSkuDescription sku = null, ResourceManager.Models.ManagedServiceIdentity identity = null, string defaultHostname = null, Uri repositoryUri = null, string branch = null, IEnumerable customDomains = null, string repositoryToken = null, StaticSiteBuildProperties buildProperties = null, IEnumerable privateEndpointConnections = null, StagingEnvironmentPolicy? stagingEnvironmentPolicy = null, bool? allowConfigFileUpdates = null, StaticSiteTemplate templateProperties = null, string contentDistributionEndpoint = null, string keyVaultReferenceIdentity = null, IEnumerable userProvidedFunctionApps = null, string provider = null, string kind = null) + public static StaticSiteData StaticSiteData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, AppServiceSkuDescription sku = null, ManagedServiceIdentity identity = null, string defaultHostname = null, Uri repositoryUri = null, string branch = null, IEnumerable customDomains = null, string repositoryToken = null, StaticSiteBuildProperties buildProperties = null, IEnumerable privateEndpointConnections = null, StagingEnvironmentPolicy? stagingEnvironmentPolicy = null, bool? allowConfigFileUpdates = null, StaticSiteTemplate templateProperties = null, string contentDistributionEndpoint = null, string keyVaultReferenceIdentity = null, IEnumerable userProvidedFunctionApps = null, string provider = null, string kind = null) { tags ??= new Dictionary(); customDomains ??= new List(); @@ -2176,7 +2309,7 @@ public static StaticSiteData StaticSiteData(ResourceIdentifier id = null, string /// MSI resource. /// Logical Availability Zones the service is hosted in. /// A new instance for mocking. - public static ResponseMessageEnvelopeRemotePrivateEndpointConnection ResponseMessageEnvelopeRemotePrivateEndpointConnection(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, AzureLocation? location = null, IReadOnlyDictionary tags = null, AppServiceArmPlan plan = null, RemotePrivateEndpointConnection properties = null, AppServiceSkuDescription sku = null, string status = null, ResponseError error = null, ResourceManager.Models.ManagedServiceIdentity identity = null, IEnumerable zones = null) + public static ResponseMessageEnvelopeRemotePrivateEndpointConnection ResponseMessageEnvelopeRemotePrivateEndpointConnection(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, AzureLocation? location = null, IReadOnlyDictionary tags = null, AppServiceArmPlan plan = null, RemotePrivateEndpointConnection properties = null, AppServiceSkuDescription sku = null, string status = null, ResponseError error = null, ManagedServiceIdentity identity = null, IEnumerable zones = null) { tags ??= new Dictionary(); zones ??= new List(); @@ -2502,7 +2635,7 @@ public static StaticSiteResetContent StaticSiteResetContent(ResourceIdentifier i /// /// Kind of resource. /// A new instance for mocking. - public static SitePatchInfo SitePatchInfo(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ResourceManager.Models.ManagedServiceIdentity identity = null, string state = null, IEnumerable hostNames = null, string repositorySiteName = null, AppServiceUsageState? usageState = null, bool? isEnabled = null, IEnumerable enabledHostNames = null, WebSiteAvailabilityState? availabilityState = null, IEnumerable hostNameSslStates = null, ResourceIdentifier serverFarmId = null, bool? isReserved = null, bool? isXenon = null, bool? isHyperV = null, DateTimeOffset? lastModifiedOn = null, SiteConfigProperties siteConfig = null, IEnumerable trafficManagerHostNames = null, bool? isScmSiteAlsoStopped = null, string targetSwapSlot = null, HostingEnvironmentProfile hostingEnvironmentProfile = null, bool? isClientAffinityEnabled = null, bool? isClientCertEnabled = null, ClientCertMode? clientCertMode = null, string clientCertExclusionPaths = null, bool? isHostNameDisabled = null, string customDomainVerificationId = null, string outboundIPAddresses = null, string possibleOutboundIPAddresses = null, int? containerSize = null, int? dailyMemoryTimeQuota = null, DateTimeOffset? suspendOn = null, int? maxNumberOfWorkers = null, CloningInfo cloningInfo = null, string resourceGroup = null, bool? isDefaultContainer = null, string defaultHostName = null, SlotSwapStatus slotSwapStatus = null, bool? isHttpsOnly = null, RedundancyMode? redundancyMode = null, Guid? inProgressOperationId = null, bool? isStorageAccountRequired = null, string keyVaultReferenceIdentity = null, ResourceIdentifier virtualNetworkSubnetId = null, string kind = null) + public static SitePatchInfo SitePatchInfo(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ManagedServiceIdentity identity = null, string state = null, IEnumerable hostNames = null, string repositorySiteName = null, AppServiceUsageState? usageState = null, bool? isEnabled = null, IEnumerable enabledHostNames = null, WebSiteAvailabilityState? availabilityState = null, IEnumerable hostNameSslStates = null, ResourceIdentifier serverFarmId = null, bool? isReserved = null, bool? isXenon = null, bool? isHyperV = null, DateTimeOffset? lastModifiedOn = null, SiteConfigProperties siteConfig = null, IEnumerable trafficManagerHostNames = null, bool? isScmSiteAlsoStopped = null, string targetSwapSlot = null, HostingEnvironmentProfile hostingEnvironmentProfile = null, bool? isClientAffinityEnabled = null, bool? isClientCertEnabled = null, ClientCertMode? clientCertMode = null, string clientCertExclusionPaths = null, bool? isHostNameDisabled = null, string customDomainVerificationId = null, string outboundIPAddresses = null, string possibleOutboundIPAddresses = null, int? containerSize = null, int? dailyMemoryTimeQuota = null, DateTimeOffset? suspendOn = null, int? maxNumberOfWorkers = null, CloningInfo cloningInfo = null, string resourceGroup = null, bool? isDefaultContainer = null, string defaultHostName = null, SlotSwapStatus slotSwapStatus = null, bool? isHttpsOnly = null, RedundancyMode? redundancyMode = null, Guid? inProgressOperationId = null, bool? isStorageAccountRequired = null, string keyVaultReferenceIdentity = null, ResourceIdentifier virtualNetworkSubnetId = null, string kind = null) { hostNames ??= new List(); enabledHostNames ??= new List(); @@ -2642,6 +2775,108 @@ public static CsmPublishingCredentialsPoliciesEntityData CsmPublishingCredential return new CsmPublishingCredentialsPoliciesEntityData(id, name, resourceType, systemData, allow, kind); } + /// Initializes a new instance of SiteConfigData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Number of workers. + /// Default documents. + /// .NET Framework version. + /// Version of PHP. + /// Version of Python. + /// Version of Node.js. + /// Version of PowerShell. + /// Linux App Framework and version. + /// Xenon App Framework and version. + /// <code>true</code> if request tracing is enabled; otherwise, <code>false</code>. + /// Request tracing expiration time. + /// <code>true</code> if remote debugging is enabled; otherwise, <code>false</code>. + /// Remote debugging version. + /// <code>true</code> if HTTP logging is enabled; otherwise, <code>false</code>. + /// Flag to use Managed Identity Creds for ACR pull. + /// If using user managed identity, the user managed identity ClientId. + /// HTTP logs directory size limit. + /// <code>true</code> if detailed error logging is enabled; otherwise, <code>false</code>. + /// Publishing user name. + /// Application settings. + /// Connection strings. + /// Site MachineKey. + /// Handler mappings. + /// Document root. + /// SCM type. + /// <code>true</code> to use 32-bit worker process; otherwise, <code>false</code>. + /// <code>true</code> if WebSocket is enabled; otherwise, <code>false</code>. + /// <code>true</code> if Always On is enabled; otherwise, <code>false</code>. + /// Java version. + /// Java container. + /// Java container version. + /// App command line to launch. + /// Managed pipeline mode. + /// Virtual applications. + /// Site load balancing. + /// This is work around for polymorphic types. + /// Site limits. + /// <code>true</code> if Auto Heal is enabled; otherwise, <code>false</code>. + /// Auto Heal rules. + /// Tracing options. + /// Virtual Network name. + /// Virtual Network Route All enabled. This causes all outbound traffic to have Virtual Network Security Groups and User Defined Routes applied. + /// The number of private ports assigned to this app. These will be assigned dynamically on runtime. + /// Cross-Origin Resource Sharing (CORS) settings. + /// Push endpoint settings. + /// Information about the formal API definition for the app. + /// Azure API management settings linked to the app. + /// Auto-swap slot name. + /// <code>true</code> to enable local MySQL; otherwise, <code>false</code>. + /// Managed Service Identity Id. + /// Explicit Managed Service Identity Id. + /// Identity to use for Key Vault Reference authentication. + /// IP security restrictions for main. + /// IP security restrictions for scm. + /// IP security restrictions for scm to use main. + /// Http20Enabled: configures a web site to allow clients to connect over http2.0. + /// MinTlsVersion: configures the minimum version of TLS required for SSL requests. + /// ScmMinTlsVersion: configures the minimum version of TLS required for SSL requests for SCM site. + /// State of FTP / FTPS service. + /// + /// Number of preWarmed instances. + /// This setting only applies to the Consumption and Elastic Plans + /// + /// + /// Maximum number of workers that a site can scale out to. + /// This setting only applies to the Consumption and Elastic Premium Plans + /// + /// Health check path. + /// + /// Gets or sets a value indicating whether functions runtime scale monitoring is enabled. When enabled, + /// the ScaleController will not monitor event sources directly, but will instead call to the + /// runtime to get scale status. + /// + /// Sets the time zone a site uses for generating timestamps. Compatible with Linux and Windows App Service. Setting the WEBSITE_TIME_ZONE app setting takes precedence over this config. For Linux, expects tz database values https://www.iana.org/time-zones (for a quick reference see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). For Windows, expects one of the time zones listed under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones. + /// + /// Number of minimum instance count for a site + /// This setting only applies to the Elastic Plans + /// + /// List of Azure Storage Accounts. + /// Property to allow or block all public traffic. + /// Kind of resource. + /// A new instance for mocking. + public static SiteConfigData SiteConfigData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, int? numberOfWorkers = null, IEnumerable defaultDocuments = null, string netFrameworkVersion = null, string phpVersion = null, string pythonVersion = null, string nodeVersion = null, string powerShellVersion = null, string linuxFxVersion = null, string windowsFxVersion = null, bool? isRequestTracingEnabled = null, DateTimeOffset? requestTracingExpirationOn = null, bool? isRemoteDebuggingEnabled = null, string remoteDebuggingVersion = null, bool? isHttpLoggingEnabled = null, bool? useManagedIdentityCreds = null, string acrUserManagedIdentityId = null, int? logsDirectorySizeLimit = null, bool? isDetailedErrorLoggingEnabled = null, string publishingUsername = null, IEnumerable appSettings = null, IEnumerable connectionStrings = null, SiteMachineKey machineKey = null, IEnumerable handlerMappings = null, string documentRoot = null, ScmType? scmType = null, bool? use32BitWorkerProcess = null, bool? isWebSocketsEnabled = null, bool? isAlwaysOn = null, string javaVersion = null, string javaContainer = null, string javaContainerVersion = null, string appCommandLine = null, ManagedPipelineMode? managedPipelineMode = null, IEnumerable virtualApplications = null, SiteLoadBalancing? loadBalancing = null, IEnumerable experimentsRampUpRules = null, SiteLimits limits = null, bool? isAutoHealEnabled = null, AutoHealRules autoHealRules = null, string tracingOptions = null, string vnetName = null, bool? isVnetRouteAllEnabled = null, int? vnetPrivatePortsCount = null, AppServiceCorsSettings cors = null, WebAppPushSettings push = null, Uri apiDefinitionUri = null, string apiManagementConfigId = null, string autoSwapSlotName = null, bool? isLocalMySqlEnabled = null, int? managedServiceIdentityId = null, int? xManagedServiceIdentityId = null, string keyVaultReferenceIdentity = null, IEnumerable ipSecurityRestrictions = null, IEnumerable scmIPSecurityRestrictions = null, bool? allowIPSecurityRestrictionsForScmToUseMain = null, bool? isHttp20Enabled = null, AppServiceSupportedTlsVersion? minTlsVersion = null, AppServiceSupportedTlsVersion? scmMinTlsVersion = null, AppServiceFtpsState? ftpsState = null, int? preWarmedInstanceCount = null, int? functionAppScaleLimit = null, string healthCheckPath = null, bool? isFunctionsRuntimeScaleMonitoringEnabled = null, string websiteTimeZone = null, int? minimumElasticInstanceCount = null, IDictionary azureStorageAccounts = null, string publicNetworkAccess = null, string kind = null) + { + defaultDocuments ??= new List(); + appSettings ??= new List(); + connectionStrings ??= new List(); + handlerMappings ??= new List(); + virtualApplications ??= new List(); + experimentsRampUpRules ??= new List(); + ipSecurityRestrictions ??= new List(); + scmIPSecurityRestrictions ??= new List(); + azureStorageAccounts ??= new Dictionary(); + + return new SiteConfigData(id, name, resourceType, systemData, numberOfWorkers, defaultDocuments?.ToList(), netFrameworkVersion, phpVersion, pythonVersion, nodeVersion, powerShellVersion, linuxFxVersion, windowsFxVersion, isRequestTracingEnabled, requestTracingExpirationOn, isRemoteDebuggingEnabled, remoteDebuggingVersion, isHttpLoggingEnabled, useManagedIdentityCreds, acrUserManagedIdentityId, logsDirectorySizeLimit, isDetailedErrorLoggingEnabled, publishingUsername, appSettings?.ToList(), connectionStrings?.ToList(), machineKey, handlerMappings?.ToList(), documentRoot, scmType, use32BitWorkerProcess, isWebSocketsEnabled, isAlwaysOn, javaVersion, javaContainer, javaContainerVersion, appCommandLine, managedPipelineMode, virtualApplications?.ToList(), loadBalancing, experimentsRampUpRules != null ? new RoutingRuleExperiments(experimentsRampUpRules?.ToList()) : null, limits, isAutoHealEnabled, autoHealRules, tracingOptions, vnetName, isVnetRouteAllEnabled, vnetPrivatePortsCount, cors, push, apiDefinitionUri != null ? new AppServiceApiDefinitionInfo(apiDefinitionUri) : null, apiManagementConfigId != null ? new ApiManagementConfig(apiManagementConfigId) : null, autoSwapSlotName, isLocalMySqlEnabled, managedServiceIdentityId, xManagedServiceIdentityId, keyVaultReferenceIdentity, ipSecurityRestrictions?.ToList(), scmIPSecurityRestrictions?.ToList(), allowIPSecurityRestrictionsForScmToUseMain, isHttp20Enabled, minTlsVersion, scmMinTlsVersion, ftpsState, preWarmedInstanceCount, functionAppScaleLimit, healthCheckPath, isFunctionsRuntimeScaleMonitoringEnabled, websiteTimeZone, minimumElasticInstanceCount, azureStorageAccounts, publicNetworkAccess, kind); + } + /// Initializes a new instance of SiteAuthSettings. /// The id. /// The name. @@ -2864,7 +3099,7 @@ public static AzureStoragePropertyDictionary AzureStoragePropertyDictionary(Reso /// /// Kind of resource. /// A new instance for mocking. - public static ApiKeyVaultReferenceData ApiKeyVaultReferenceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string reference = null, ResolveStatus? status = null, string vaultName = null, string secretName = null, string secretVersion = null, ResourceManager.Models.ManagedServiceIdentity identity = null, string details = null, ConfigReferenceSource? source = null, string activeVersion = null, string kind = null) + public static ApiKeyVaultReferenceData ApiKeyVaultReferenceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string reference = null, ResolveStatus? status = null, string vaultName = null, string secretName = null, string secretVersion = null, ManagedServiceIdentity identity = null, string details = null, ConfigReferenceSource? source = null, string activeVersion = null, string kind = null) { return new ApiKeyVaultReferenceData(id, name, resourceType, systemData, reference, status, vaultName, secretName, secretVersion, identity, details, source, activeVersion, kind); } @@ -2884,6 +3119,22 @@ public static ConnectionStringDictionary ConnectionStringDictionary(ResourceIden return new ConnectionStringDictionary(id, name, resourceType, systemData, properties, kind); } + /// Initializes a new instance of SiteLogsConfigData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Application logs configuration. + /// HTTP logs configuration. + /// Failed requests tracing configuration. + /// Detailed error messages configuration. + /// Kind of resource. + /// A new instance for mocking. + public static SiteLogsConfigData SiteLogsConfigData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ApplicationLogsConfig applicationLogs = null, AppServiceHttpLogsConfig httpLogs = null, bool? isFailedRequestsTracingEnabled = null, bool? isDetailedErrorMessagesEnabled = null, string kind = null) + { + return new SiteLogsConfigData(id, name, resourceType, systemData, applicationLogs, httpLogs, isFailedRequestsTracingEnabled != null ? new WebAppEnabledConfig(isFailedRequestsTracingEnabled) : null, isDetailedErrorMessagesEnabled != null ? new WebAppEnabledConfig(isDetailedErrorMessagesEnabled) : null, kind); + } + /// Initializes a new instance of SlotConfigNamesResourceData. /// The id. /// The name. @@ -3666,244 +3917,5 @@ public static WebJobData WebJobData(ResourceIdentifier id = null, string name = return new WebJobData(id, name, resourceType, systemData, runCommand, uri, extraInfoUri, webJobType, error, isUsingSdk, settings, kind); } - - /// Initializes a new instance of SiteConfigProperties. - /// Number of workers. - /// Default documents. - /// .NET Framework version. - /// Version of PHP. - /// Version of Python. - /// Version of Node.js. - /// Version of PowerShell. - /// Linux App Framework and version. - /// Xenon App Framework and version. - /// <code>true</code> if request tracing is enabled; otherwise, <code>false</code>. - /// Request tracing expiration time. - /// <code>true</code> if remote debugging is enabled; otherwise, <code>false</code>. - /// Remote debugging version. - /// <code>true</code> if HTTP logging is enabled; otherwise, <code>false</code>. - /// Flag to use Managed Identity Creds for ACR pull. - /// If using user managed identity, the user managed identity ClientId. - /// HTTP logs directory size limit. - /// <code>true</code> if detailed error logging is enabled; otherwise, <code>false</code>. - /// Publishing user name. - /// Application settings. - /// Connection strings. - /// Site MachineKey. - /// Handler mappings. - /// Document root. - /// SCM type. - /// <code>true</code> to use 32-bit worker process; otherwise, <code>false</code>. - /// <code>true</code> if WebSocket is enabled; otherwise, <code>false</code>. - /// <code>true</code> if Always On is enabled; otherwise, <code>false</code>. - /// Java version. - /// Java container. - /// Java container version. - /// App command line to launch. - /// Managed pipeline mode. - /// Virtual applications. - /// Site load balancing. - /// This is work around for polymorphic types. - /// Site limits. - /// <code>true</code> if Auto Heal is enabled; otherwise, <code>false</code>. - /// Auto Heal rules. - /// Tracing options. - /// Virtual Network name. - /// Virtual Network Route All enabled. This causes all outbound traffic to have Virtual Network Security Groups and User Defined Routes applied. - /// The number of private ports assigned to this app. These will be assigned dynamically on runtime. - /// Cross-Origin Resource Sharing (CORS) settings. - /// Push endpoint settings. - /// Information about the formal API definition for the app. - /// Azure API management settings linked to the app. - /// Auto-swap slot name. - /// <code>true</code> to enable local MySQL; otherwise, <code>false</code>. - /// Managed Service Identity Id. - /// Explicit Managed Service Identity Id. - /// Identity to use for Key Vault Reference authentication. - /// IP security restrictions for main. - /// IP security restrictions for scm. - /// IP security restrictions for scm to use main. - /// Http20Enabled: configures a web site to allow clients to connect over http2.0. - /// MinTlsVersion: configures the minimum version of TLS required for SSL requests. - /// ScmMinTlsVersion: configures the minimum version of TLS required for SSL requests for SCM site. - /// State of FTP / FTPS service. - /// - /// Number of preWarmed instances. - /// This setting only applies to the Consumption and Elastic Plans - /// - /// - /// Maximum number of workers that a site can scale out to. - /// This setting only applies to the Consumption and Elastic Premium Plans - /// - /// Health check path. - /// - /// Gets or sets a value indicating whether functions runtime scale monitoring is enabled. When enabled, - /// the ScaleController will not monitor event sources directly, but will instead call to the - /// runtime to get scale status. - /// - /// Sets the time zone a site uses for generating timestamps. Compatible with Linux and Windows App Service. Setting the WEBSITE_TIME_ZONE app setting takes precedence over this config. For Linux, expects tz database values https://www.iana.org/time-zones (for a quick reference see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). For Windows, expects one of the time zones listed under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones. - /// - /// Number of minimum instance count for a site - /// This setting only applies to the Elastic Plans - /// - /// List of Azure Storage Accounts. - /// Property to allow or block all public traffic. - /// A new instance for mocking. - public static SiteConfigProperties SiteConfigProperties(int? numberOfWorkers = null, IEnumerable defaultDocuments = null, string netFrameworkVersion = null, string phpVersion = null, string pythonVersion = null, string nodeVersion = null, string powerShellVersion = null, string linuxFxVersion = null, string windowsFxVersion = null, bool? isRequestTracingEnabled = null, DateTimeOffset? requestTracingExpirationOn = null, bool? isRemoteDebuggingEnabled = null, string remoteDebuggingVersion = null, bool? isHttpLoggingEnabled = null, bool? useManagedIdentityCreds = null, string acrUserManagedIdentityId = null, int? logsDirectorySizeLimit = null, bool? isDetailedErrorLoggingEnabled = null, string publishingUsername = null, IEnumerable appSettings = null, IEnumerable connectionStrings = null, SiteMachineKey machineKey = null, IEnumerable handlerMappings = null, string documentRoot = null, ScmType? scmType = null, bool? use32BitWorkerProcess = null, bool? isWebSocketsEnabled = null, bool? isAlwaysOn = null, string javaVersion = null, string javaContainer = null, string javaContainerVersion = null, string appCommandLine = null, ManagedPipelineMode? managedPipelineMode = null, IEnumerable virtualApplications = null, SiteLoadBalancing? loadBalancing = null, IEnumerable experimentsRampUpRules = null, SiteLimits limits = null, bool? isAutoHealEnabled = null, AutoHealRules autoHealRules = null, string tracingOptions = null, string vnetName = null, bool? isVnetRouteAllEnabled = null, int? vnetPrivatePortsCount = null, AppServiceCorsSettings cors = null, WebAppPushSettings push = null, Uri apiDefinitionUri = null, string apiManagementConfigId = null, string autoSwapSlotName = null, bool? isLocalMySqlEnabled = null, int? managedServiceIdentityId = null, int? xManagedServiceIdentityId = null, string keyVaultReferenceIdentity = null, IEnumerable ipSecurityRestrictions = null, IEnumerable scmIPSecurityRestrictions = null, bool? allowIPSecurityRestrictionsForScmToUseMain = null, bool? isHttp20Enabled = null, AppServiceSupportedTlsVersion? minTlsVersion = null, AppServiceSupportedTlsVersion? scmMinTlsVersion = null, AppServiceFtpsState? ftpsState = null, int? preWarmedInstanceCount = null, int? functionAppScaleLimit = null, string healthCheckPath = null, bool? isFunctionsRuntimeScaleMonitoringEnabled = null, string websiteTimeZone = null, int? minimumElasticInstanceCount = null, IDictionary azureStorageAccounts = null, string publicNetworkAccess = null) - { - defaultDocuments ??= new List(); - appSettings ??= new List(); - connectionStrings ??= new List(); - handlerMappings ??= new List(); - virtualApplications ??= new List(); - experimentsRampUpRules ??= new List(); - ipSecurityRestrictions ??= new List(); - scmIPSecurityRestrictions ??= new List(); - azureStorageAccounts ??= new Dictionary(); - - return new SiteConfigProperties(numberOfWorkers, defaultDocuments?.ToList(), netFrameworkVersion, phpVersion, pythonVersion, nodeVersion, powerShellVersion, linuxFxVersion, windowsFxVersion, isRequestTracingEnabled, requestTracingExpirationOn, isRemoteDebuggingEnabled, remoteDebuggingVersion, isHttpLoggingEnabled, useManagedIdentityCreds, acrUserManagedIdentityId, logsDirectorySizeLimit, isDetailedErrorLoggingEnabled, publishingUsername, appSettings?.ToList(), connectionStrings?.ToList(), machineKey, handlerMappings?.ToList(), documentRoot, scmType, use32BitWorkerProcess, isWebSocketsEnabled, isAlwaysOn, javaVersion, javaContainer, javaContainerVersion, appCommandLine, managedPipelineMode, virtualApplications?.ToList(), loadBalancing, experimentsRampUpRules != null ? new RoutingRuleExperiments(experimentsRampUpRules?.ToList()) : null, limits, isAutoHealEnabled, autoHealRules, tracingOptions, vnetName, isVnetRouteAllEnabled, vnetPrivatePortsCount, cors, push, apiDefinitionUri != null ? new AppServiceApiDefinitionInfo(apiDefinitionUri) : null, apiManagementConfigId != null ? new ApiManagementConfig(apiManagementConfigId) : null, autoSwapSlotName, isLocalMySqlEnabled, managedServiceIdentityId, xManagedServiceIdentityId, keyVaultReferenceIdentity, ipSecurityRestrictions?.ToList(), scmIPSecurityRestrictions?.ToList(), allowIPSecurityRestrictionsForScmToUseMain, isHttp20Enabled, minTlsVersion, scmMinTlsVersion, ftpsState, preWarmedInstanceCount, functionAppScaleLimit, healthCheckPath, isFunctionsRuntimeScaleMonitoringEnabled, websiteTimeZone, minimumElasticInstanceCount, azureStorageAccounts, publicNetworkAccess); - } - - /// Initializes a new instance of SiteConfigData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Number of workers. - /// Default documents. - /// .NET Framework version. - /// Version of PHP. - /// Version of Python. - /// Version of Node.js. - /// Version of PowerShell. - /// Linux App Framework and version. - /// Xenon App Framework and version. - /// <code>true</code> if request tracing is enabled; otherwise, <code>false</code>. - /// Request tracing expiration time. - /// <code>true</code> if remote debugging is enabled; otherwise, <code>false</code>. - /// Remote debugging version. - /// <code>true</code> if HTTP logging is enabled; otherwise, <code>false</code>. - /// Flag to use Managed Identity Creds for ACR pull. - /// If using user managed identity, the user managed identity ClientId. - /// HTTP logs directory size limit. - /// <code>true</code> if detailed error logging is enabled; otherwise, <code>false</code>. - /// Publishing user name. - /// Application settings. - /// Connection strings. - /// Site MachineKey. - /// Handler mappings. - /// Document root. - /// SCM type. - /// <code>true</code> to use 32-bit worker process; otherwise, <code>false</code>. - /// <code>true</code> if WebSocket is enabled; otherwise, <code>false</code>. - /// <code>true</code> if Always On is enabled; otherwise, <code>false</code>. - /// Java version. - /// Java container. - /// Java container version. - /// App command line to launch. - /// Managed pipeline mode. - /// Virtual applications. - /// Site load balancing. - /// This is work around for polymorphic types. - /// Site limits. - /// <code>true</code> if Auto Heal is enabled; otherwise, <code>false</code>. - /// Auto Heal rules. - /// Tracing options. - /// Virtual Network name. - /// Virtual Network Route All enabled. This causes all outbound traffic to have Virtual Network Security Groups and User Defined Routes applied. - /// The number of private ports assigned to this app. These will be assigned dynamically on runtime. - /// Cross-Origin Resource Sharing (CORS) settings. - /// Push endpoint settings. - /// Information about the formal API definition for the app. - /// Azure API management settings linked to the app. - /// Auto-swap slot name. - /// <code>true</code> to enable local MySQL; otherwise, <code>false</code>. - /// Managed Service Identity Id. - /// Explicit Managed Service Identity Id. - /// Identity to use for Key Vault Reference authentication. - /// IP security restrictions for main. - /// IP security restrictions for scm. - /// IP security restrictions for scm to use main. - /// Http20Enabled: configures a web site to allow clients to connect over http2.0. - /// MinTlsVersion: configures the minimum version of TLS required for SSL requests. - /// ScmMinTlsVersion: configures the minimum version of TLS required for SSL requests for SCM site. - /// State of FTP / FTPS service. - /// - /// Number of preWarmed instances. - /// This setting only applies to the Consumption and Elastic Plans - /// - /// - /// Maximum number of workers that a site can scale out to. - /// This setting only applies to the Consumption and Elastic Premium Plans - /// - /// Health check path. - /// - /// Gets or sets a value indicating whether functions runtime scale monitoring is enabled. When enabled, - /// the ScaleController will not monitor event sources directly, but will instead call to the - /// runtime to get scale status. - /// - /// Sets the time zone a site uses for generating timestamps. Compatible with Linux and Windows App Service. Setting the WEBSITE_TIME_ZONE app setting takes precedence over this config. For Linux, expects tz database values https://www.iana.org/time-zones (for a quick reference see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). For Windows, expects one of the time zones listed under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones. - /// - /// Number of minimum instance count for a site - /// This setting only applies to the Elastic Plans - /// - /// List of Azure Storage Accounts. - /// Property to allow or block all public traffic. - /// Kind of resource. - /// A new instance for mocking. - public static SiteConfigData SiteConfigData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, int? numberOfWorkers = null, IEnumerable defaultDocuments = null, string netFrameworkVersion = null, string phpVersion = null, string pythonVersion = null, string nodeVersion = null, string powerShellVersion = null, string linuxFxVersion = null, string windowsFxVersion = null, bool? isRequestTracingEnabled = null, DateTimeOffset? requestTracingExpirationOn = null, bool? isRemoteDebuggingEnabled = null, string remoteDebuggingVersion = null, bool? isHttpLoggingEnabled = null, bool? useManagedIdentityCreds = null, string acrUserManagedIdentityId = null, int? logsDirectorySizeLimit = null, bool? isDetailedErrorLoggingEnabled = null, string publishingUsername = null, IEnumerable appSettings = null, IEnumerable connectionStrings = null, SiteMachineKey machineKey = null, IEnumerable handlerMappings = null, string documentRoot = null, ScmType? scmType = null, bool? use32BitWorkerProcess = null, bool? isWebSocketsEnabled = null, bool? isAlwaysOn = null, string javaVersion = null, string javaContainer = null, string javaContainerVersion = null, string appCommandLine = null, ManagedPipelineMode? managedPipelineMode = null, IEnumerable virtualApplications = null, SiteLoadBalancing? loadBalancing = null, IEnumerable experimentsRampUpRules = null, SiteLimits limits = null, bool? isAutoHealEnabled = null, AutoHealRules autoHealRules = null, string tracingOptions = null, string vnetName = null, bool? isVnetRouteAllEnabled = null, int? vnetPrivatePortsCount = null, AppServiceCorsSettings cors = null, WebAppPushSettings push = null, Uri apiDefinitionUri = null, string apiManagementConfigId = null, string autoSwapSlotName = null, bool? isLocalMySqlEnabled = null, int? managedServiceIdentityId = null, int? xManagedServiceIdentityId = null, string keyVaultReferenceIdentity = null, IEnumerable ipSecurityRestrictions = null, IEnumerable scmIPSecurityRestrictions = null, bool? allowIPSecurityRestrictionsForScmToUseMain = null, bool? isHttp20Enabled = null, AppServiceSupportedTlsVersion? minTlsVersion = null, AppServiceSupportedTlsVersion? scmMinTlsVersion = null, AppServiceFtpsState? ftpsState = null, int? preWarmedInstanceCount = null, int? functionAppScaleLimit = null, string healthCheckPath = null, bool? isFunctionsRuntimeScaleMonitoringEnabled = null, string websiteTimeZone = null, int? minimumElasticInstanceCount = null, IDictionary azureStorageAccounts = null, string publicNetworkAccess = null, string kind = null) - { - defaultDocuments ??= new List(); - appSettings ??= new List(); - connectionStrings ??= new List(); - handlerMappings ??= new List(); - virtualApplications ??= new List(); - experimentsRampUpRules ??= new List(); - ipSecurityRestrictions ??= new List(); - scmIPSecurityRestrictions ??= new List(); - azureStorageAccounts ??= new Dictionary(); - - return new SiteConfigData(id, name, resourceType, systemData, numberOfWorkers, defaultDocuments?.ToList(), netFrameworkVersion, phpVersion, pythonVersion, nodeVersion, powerShellVersion, linuxFxVersion, windowsFxVersion, isRequestTracingEnabled, requestTracingExpirationOn, isRemoteDebuggingEnabled, remoteDebuggingVersion, isHttpLoggingEnabled, useManagedIdentityCreds, acrUserManagedIdentityId, logsDirectorySizeLimit, isDetailedErrorLoggingEnabled, publishingUsername, appSettings?.ToList(), connectionStrings?.ToList(), machineKey, handlerMappings?.ToList(), documentRoot, scmType, use32BitWorkerProcess, isWebSocketsEnabled, isAlwaysOn, javaVersion, javaContainer, javaContainerVersion, appCommandLine, managedPipelineMode, virtualApplications?.ToList(), loadBalancing, experimentsRampUpRules != null ? new RoutingRuleExperiments(experimentsRampUpRules?.ToList()) : null, limits, isAutoHealEnabled, autoHealRules, tracingOptions, vnetName, isVnetRouteAllEnabled, vnetPrivatePortsCount, cors, push, apiDefinitionUri != null ? new AppServiceApiDefinitionInfo(apiDefinitionUri) : null, apiManagementConfigId != null ? new ApiManagementConfig(apiManagementConfigId) : null, autoSwapSlotName, isLocalMySqlEnabled, managedServiceIdentityId, xManagedServiceIdentityId, keyVaultReferenceIdentity, ipSecurityRestrictions?.ToList(), scmIPSecurityRestrictions?.ToList(), allowIPSecurityRestrictionsForScmToUseMain, isHttp20Enabled, minTlsVersion, scmMinTlsVersion, ftpsState, preWarmedInstanceCount, functionAppScaleLimit, healthCheckPath, isFunctionsRuntimeScaleMonitoringEnabled, websiteTimeZone, minimumElasticInstanceCount, azureStorageAccounts, publicNetworkAccess, kind); - } - - /// Initializes a new instance of SiteLogsConfigData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Application logs configuration. - /// HTTP logs configuration. - /// Failed requests tracing configuration. - /// Detailed error messages configuration. - /// Kind of resource. - /// A new instance for mocking. - public static SiteLogsConfigData SiteLogsConfigData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ApplicationLogsConfig applicationLogs = null, AppServiceHttpLogsConfig httpLogs = null, bool? isFailedRequestsTracingEnabled = null, bool? isDetailedErrorMessagesEnabled = null, string kind = null) - { - return new SiteLogsConfigData(id, name, resourceType, systemData, applicationLogs, httpLogs, isFailedRequestsTracingEnabled != null ? new WebAppEnabledConfig(isFailedRequestsTracingEnabled) : null, isDetailedErrorMessagesEnabled != null ? new WebAppEnabledConfig(isDetailedErrorMessagesEnabled) : null, kind); - } - - /// Initializes a new instance of DiagnosticDetectorResponse. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Start time of the period. - /// End time of the period. - /// Flag representing Issue was detected. - /// Detector's definition. - /// Metrics provided by the detector. - /// List of Correlated events found by the detector. - /// Additional Data that detector wants to send. - /// Meta Data. - /// Kind of resource. - /// A new instance for mocking. - public static DiagnosticDetectorResponse DiagnosticDetectorResponse(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, bool? issueDetected = null, DetectorDefinition detectorDefinition = null, IEnumerable metrics = null, IEnumerable abnormalTimePeriods = null, IEnumerable> data = null, DetectorDataSource dataSource = null, string kind = null) - { - metrics ??= new List(); - abnormalTimePeriods ??= new List(); - data ??= new List>(); - - return new DiagnosticDetectorResponse(id, name, resourceType, systemData, startOn, endOn, issueDetected, detectorDefinition, metrics?.ToList(), abnormalTimePeriods?.ToList(), data?.ToList(), dataSource != null ? new DetectorMetadata(dataSource) : null, kind); - } } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/KubeEnvironmentData.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/KubeEnvironmentData.cs index c0ea55bdfb21..ffcc2b1480c1 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/KubeEnvironmentData.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/KubeEnvironmentData.cs @@ -50,7 +50,7 @@ public KubeEnvironmentData(AzureLocation location) : base(location) /// /// /// Kind of resource. - internal KubeEnvironmentData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, Resources.Models.ExtendedLocation extendedLocation, KubeEnvironmentProvisioningState? provisioningState, string deploymentErrors, bool? isInternalLoadBalancerEnabled, string defaultDomain, string staticIP, ArcConfiguration arcConfiguration, AppLogsConfiguration appLogsConfiguration, ResourceIdentifier aksResourceId, string kind) : base(id, name, resourceType, systemData, tags, location) + internal KubeEnvironmentData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ExtendedLocation extendedLocation, KubeEnvironmentProvisioningState? provisioningState, string deploymentErrors, bool? isInternalLoadBalancerEnabled, string defaultDomain, string staticIP, ArcConfiguration arcConfiguration, AppLogsConfiguration appLogsConfiguration, ResourceIdentifier aksResourceId, string kind) : base(id, name, resourceType, systemData, tags, location) { ExtendedLocation = extendedLocation; ProvisioningState = provisioningState; @@ -65,7 +65,7 @@ internal KubeEnvironmentData(ResourceIdentifier id, string name, ResourceType re } /// Extended Location. - public Resources.Models.ExtendedLocation ExtendedLocation { get; set; } + public ExtendedLocation ExtendedLocation { get; set; } /// Provisioning state of the Kubernetes Environment. public KubeEnvironmentProvisioningState? ProvisioningState { get; } /// Any errors that occurred during deployment or deployment validation. diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/ApiKeyVaultReferenceData.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/ApiKeyVaultReferenceData.Serialization.cs index 195608493c9b..20901f2b9083 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/ApiKeyVaultReferenceData.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/ApiKeyVaultReferenceData.Serialization.cs @@ -89,7 +89,7 @@ internal static ApiKeyVaultReferenceData DeserializeApiKeyVaultReferenceData(Jso Optional vaultName = default; Optional secretName = default; Optional secretVersion = default; - Optional identityType = default; + Optional identityType = default; Optional details = default; Optional source = default; Optional activeVersion = default; @@ -168,7 +168,7 @@ internal static ApiKeyVaultReferenceData DeserializeApiKeyVaultReferenceData(Jso { continue; } - identityType = JsonSerializer.Deserialize(property0.Value.GetRawText()); + identityType = JsonSerializer.Deserialize(property0.Value.GetRawText()); continue; } if (property0.NameEquals("details"u8)) diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServicePlanData.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServicePlanData.Serialization.cs index 1d17bcc10789..ca07066cd9c1 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServicePlanData.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServicePlanData.Serialization.cs @@ -164,7 +164,7 @@ internal static AppServicePlanData DeserializeAppServicePlanData(JsonElement ele return null; } Optional sku = default; - Optional extendedLocation = default; + Optional extendedLocation = default; Optional kind = default; Optional> tags = default; AzureLocation location = default; @@ -211,7 +211,7 @@ internal static AppServicePlanData DeserializeAppServicePlanData(JsonElement ele { continue; } - extendedLocation = JsonSerializer.Deserialize(property.Value.GetRawText()); + extendedLocation = JsonSerializer.Deserialize(property.Value.GetRawText()); continue; } if (property.NameEquals("kind"u8)) diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/KubeEnvironmentData.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/KubeEnvironmentData.Serialization.cs index 46b04d578904..433339638f41 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/KubeEnvironmentData.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/KubeEnvironmentData.Serialization.cs @@ -79,7 +79,7 @@ internal static KubeEnvironmentData DeserializeKubeEnvironmentData(JsonElement e { return null; } - Optional extendedLocation = default; + Optional extendedLocation = default; Optional kind = default; Optional> tags = default; AzureLocation location = default; @@ -103,7 +103,7 @@ internal static KubeEnvironmentData DeserializeKubeEnvironmentData(JsonElement e { continue; } - extendedLocation = JsonSerializer.Deserialize(property.Value.GetRawText()); + extendedLocation = JsonSerializer.Deserialize(property.Value.GetRawText()); continue; } if (property.NameEquals("kind"u8)) diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/ResponseMessageEnvelopeRemotePrivateEndpointConnection.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/ResponseMessageEnvelopeRemotePrivateEndpointConnection.Serialization.cs index 10b4fc835bbc..36639431eaa9 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/ResponseMessageEnvelopeRemotePrivateEndpointConnection.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/ResponseMessageEnvelopeRemotePrivateEndpointConnection.Serialization.cs @@ -28,7 +28,7 @@ internal static ResponseMessageEnvelopeRemotePrivateEndpointConnection Deseriali Optional sku = default; Optional status = default; Optional error = default; - Optional identity = default; + Optional identity = default; Optional> zones = default; ResourceIdentifier id = default; string name = default; @@ -106,7 +106,7 @@ internal static ResponseMessageEnvelopeRemotePrivateEndpointConnection Deseriali { continue; } - identity = JsonSerializer.Deserialize(property.Value.GetRawText()); + identity = JsonSerializer.Deserialize(property.Value.GetRawText()); continue; } if (property.NameEquals("zones"u8)) diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/ResponseMessageEnvelopeRemotePrivateEndpointConnection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/ResponseMessageEnvelopeRemotePrivateEndpointConnection.cs index 0f73c24e5a45..e4bec42d0545 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/ResponseMessageEnvelopeRemotePrivateEndpointConnection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/ResponseMessageEnvelopeRemotePrivateEndpointConnection.cs @@ -36,7 +36,7 @@ internal ResponseMessageEnvelopeRemotePrivateEndpointConnection() /// Azure-AsyncOperation Error info. /// MSI resource. /// Logical Availability Zones the service is hosted in. - internal ResponseMessageEnvelopeRemotePrivateEndpointConnection(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, AzureLocation? location, IReadOnlyDictionary tags, AppServiceArmPlan plan, RemotePrivateEndpointConnection properties, AppServiceSkuDescription sku, string status, ResponseError error, ResourceManager.Models.ManagedServiceIdentity identity, IReadOnlyList zones) : base(id, name, resourceType, systemData) + internal ResponseMessageEnvelopeRemotePrivateEndpointConnection(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, AzureLocation? location, IReadOnlyDictionary tags, AppServiceArmPlan plan, RemotePrivateEndpointConnection properties, AppServiceSkuDescription sku, string status, ResponseError error, ManagedServiceIdentity identity, IReadOnlyList zones) : base(id, name, resourceType, systemData) { Location = location; Tags = tags; @@ -64,7 +64,7 @@ internal ResponseMessageEnvelopeRemotePrivateEndpointConnection(ResourceIdentifi /// Azure-AsyncOperation Error info. public ResponseError Error { get; } /// MSI resource. - public ResourceManager.Models.ManagedServiceIdentity Identity { get; } + public ManagedServiceIdentity Identity { get; } /// Logical Availability Zones the service is hosted in. public IReadOnlyList Zones { get; } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SitePatchInfo.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SitePatchInfo.Serialization.cs index 26be8b878bc8..ae2a71a17ea1 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SitePatchInfo.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SitePatchInfo.Serialization.cs @@ -160,7 +160,7 @@ internal static SitePatchInfo DeserializeSitePatchInfo(JsonElement element) { return null; } - Optional identity = default; + Optional identity = default; Optional kind = default; ResourceIdentifier id = default; string name = default; @@ -215,7 +215,7 @@ internal static SitePatchInfo DeserializeSitePatchInfo(JsonElement element) { continue; } - identity = JsonSerializer.Deserialize(property.Value.GetRawText()); + identity = JsonSerializer.Deserialize(property.Value.GetRawText()); continue; } if (property.NameEquals("kind"u8)) diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SitePatchInfo.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SitePatchInfo.cs index eeac0b2c8e45..aa2e0732cbf5 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SitePatchInfo.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SitePatchInfo.cs @@ -92,7 +92,7 @@ public SitePatchInfo() /// This must be of the form /subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName} /// /// Kind of resource. - internal SitePatchInfo(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ResourceManager.Models.ManagedServiceIdentity identity, string state, IReadOnlyList hostNames, string repositorySiteName, AppServiceUsageState? usageState, bool? isEnabled, IReadOnlyList enabledHostNames, WebSiteAvailabilityState? availabilityState, IList hostNameSslStates, ResourceIdentifier serverFarmId, bool? isReserved, bool? isXenon, bool? isHyperV, DateTimeOffset? lastModifiedOn, SiteConfigProperties siteConfig, IReadOnlyList trafficManagerHostNames, bool? isScmSiteAlsoStopped, string targetSwapSlot, HostingEnvironmentProfile hostingEnvironmentProfile, bool? isClientAffinityEnabled, bool? isClientCertEnabled, ClientCertMode? clientCertMode, string clientCertExclusionPaths, bool? isHostNameDisabled, string customDomainVerificationId, string outboundIPAddresses, string possibleOutboundIPAddresses, int? containerSize, int? dailyMemoryTimeQuota, DateTimeOffset? suspendOn, int? maxNumberOfWorkers, CloningInfo cloningInfo, string resourceGroup, bool? isDefaultContainer, string defaultHostName, SlotSwapStatus slotSwapStatus, bool? isHttpsOnly, RedundancyMode? redundancyMode, Guid? inProgressOperationId, bool? isStorageAccountRequired, string keyVaultReferenceIdentity, ResourceIdentifier virtualNetworkSubnetId, string kind) : base(id, name, resourceType, systemData) + internal SitePatchInfo(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ManagedServiceIdentity identity, string state, IReadOnlyList hostNames, string repositorySiteName, AppServiceUsageState? usageState, bool? isEnabled, IReadOnlyList enabledHostNames, WebSiteAvailabilityState? availabilityState, IList hostNameSslStates, ResourceIdentifier serverFarmId, bool? isReserved, bool? isXenon, bool? isHyperV, DateTimeOffset? lastModifiedOn, SiteConfigProperties siteConfig, IReadOnlyList trafficManagerHostNames, bool? isScmSiteAlsoStopped, string targetSwapSlot, HostingEnvironmentProfile hostingEnvironmentProfile, bool? isClientAffinityEnabled, bool? isClientCertEnabled, ClientCertMode? clientCertMode, string clientCertExclusionPaths, bool? isHostNameDisabled, string customDomainVerificationId, string outboundIPAddresses, string possibleOutboundIPAddresses, int? containerSize, int? dailyMemoryTimeQuota, DateTimeOffset? suspendOn, int? maxNumberOfWorkers, CloningInfo cloningInfo, string resourceGroup, bool? isDefaultContainer, string defaultHostName, SlotSwapStatus slotSwapStatus, bool? isHttpsOnly, RedundancyMode? redundancyMode, Guid? inProgressOperationId, bool? isStorageAccountRequired, string keyVaultReferenceIdentity, ResourceIdentifier virtualNetworkSubnetId, string kind) : base(id, name, resourceType, systemData) { Identity = identity; State = state; @@ -140,7 +140,7 @@ internal SitePatchInfo(ResourceIdentifier id, string name, ResourceType resource } /// Managed service identity. - public ResourceManager.Models.ManagedServiceIdentity Identity { get; set; } + public ManagedServiceIdentity Identity { get; set; } /// Current state of the app. public string State { get; } /// Hostnames associated with the app. diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteData.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteData.Serialization.cs index 6126a1d6ace4..f9299c0b11cc 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteData.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteData.Serialization.cs @@ -95,7 +95,7 @@ internal static StaticSiteData DeserializeStaticSiteData(JsonElement element) return null; } Optional sku = default; - Optional identity = default; + Optional identity = default; Optional kind = default; Optional> tags = default; AzureLocation location = default; @@ -134,7 +134,7 @@ internal static StaticSiteData DeserializeStaticSiteData(JsonElement element) { continue; } - identity = JsonSerializer.Deserialize(property.Value.GetRawText()); + identity = JsonSerializer.Deserialize(property.Value.GetRawText()); continue; } if (property.NameEquals("kind"u8)) diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebSiteData.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebSiteData.Serialization.cs index 51a770ae2fe4..b1c9aa74be6e 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebSiteData.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebSiteData.Serialization.cs @@ -194,8 +194,8 @@ internal static WebSiteData DeserializeWebSiteData(JsonElement element) { return null; } - Optional identity = default; - Optional extendedLocation = default; + Optional identity = default; + Optional extendedLocation = default; Optional kind = default; Optional> tags = default; AzureLocation location = default; @@ -252,7 +252,7 @@ internal static WebSiteData DeserializeWebSiteData(JsonElement element) { continue; } - identity = JsonSerializer.Deserialize(property.Value.GetRawText()); + identity = JsonSerializer.Deserialize(property.Value.GetRawText()); continue; } if (property.NameEquals("extendedLocation"u8)) @@ -261,7 +261,7 @@ internal static WebSiteData DeserializeWebSiteData(JsonElement element) { continue; } - extendedLocation = JsonSerializer.Deserialize(property.Value.GetRawText()); + extendedLocation = JsonSerializer.Deserialize(property.Value.GetRawText()); continue; } if (property.NameEquals("kind"u8)) diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteData.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteData.cs index 7c9d24cba3c2..17b7d3f59ad5 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteData.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteData.cs @@ -52,7 +52,7 @@ public StaticSiteData(AzureLocation location) : base(location) /// User provided function apps registered with the static site. /// The provider that submitted the last deployment to the primary environment of the static site. /// Kind of resource. - internal StaticSiteData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, AppServiceSkuDescription sku, ResourceManager.Models.ManagedServiceIdentity identity, string defaultHostname, Uri repositoryUri, string branch, IReadOnlyList customDomains, string repositoryToken, StaticSiteBuildProperties buildProperties, IReadOnlyList privateEndpointConnections, StagingEnvironmentPolicy? stagingEnvironmentPolicy, bool? allowConfigFileUpdates, StaticSiteTemplate templateProperties, string contentDistributionEndpoint, string keyVaultReferenceIdentity, IReadOnlyList userProvidedFunctionApps, string provider, string kind) : base(id, name, resourceType, systemData, tags, location) + internal StaticSiteData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, AppServiceSkuDescription sku, ManagedServiceIdentity identity, string defaultHostname, Uri repositoryUri, string branch, IReadOnlyList customDomains, string repositoryToken, StaticSiteBuildProperties buildProperties, IReadOnlyList privateEndpointConnections, StagingEnvironmentPolicy? stagingEnvironmentPolicy, bool? allowConfigFileUpdates, StaticSiteTemplate templateProperties, string contentDistributionEndpoint, string keyVaultReferenceIdentity, IReadOnlyList userProvidedFunctionApps, string provider, string kind) : base(id, name, resourceType, systemData, tags, location) { Sku = sku; Identity = identity; @@ -76,7 +76,7 @@ internal StaticSiteData(ResourceIdentifier id, string name, ResourceType resourc /// Description of a SKU for a scalable resource. public AppServiceSkuDescription Sku { get; set; } /// Managed service identity. - public ResourceManager.Models.ManagedServiceIdentity Identity { get; set; } + public ManagedServiceIdentity Identity { get; set; } /// The default autogenerated hostname for the static site. public string DefaultHostname { get; } /// URL for the repository of the static site. diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteData.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteData.cs index 02edbbd68acc..3617a21a32e4 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteData.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteData.cs @@ -101,7 +101,7 @@ public WebSiteData(AzureLocation location) : base(location) /// This must be of the form /subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName} /// /// Kind of resource. - internal WebSiteData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ResourceManager.Models.ManagedServiceIdentity identity, Resources.Models.ExtendedLocation extendedLocation, string state, IReadOnlyList hostNames, string repositorySiteName, AppServiceUsageState? usageState, bool? isEnabled, IReadOnlyList enabledHostNames, WebSiteAvailabilityState? availabilityState, IList hostNameSslStates, ResourceIdentifier appServicePlanId, bool? isReserved, bool? isXenon, bool? isHyperV, DateTimeOffset? lastModifiedTimeUtc, SiteConfigProperties siteConfig, IReadOnlyList trafficManagerHostNames, bool? isScmSiteAlsoStopped, string targetSwapSlot, HostingEnvironmentProfile hostingEnvironmentProfile, bool? isClientAffinityEnabled, bool? isClientCertEnabled, ClientCertMode? clientCertMode, string clientCertExclusionPaths, bool? isHostNameDisabled, string customDomainVerificationId, string outboundIPAddresses, string possibleOutboundIPAddresses, int? containerSize, int? dailyMemoryTimeQuota, DateTimeOffset? suspendOn, int? maxNumberOfWorkers, CloningInfo cloningInfo, string resourceGroup, bool? isDefaultContainer, string defaultHostName, SlotSwapStatus slotSwapStatus, bool? isHttpsOnly, RedundancyMode? redundancyMode, Guid? inProgressOperationId, bool? isStorageAccountRequired, string keyVaultReferenceIdentity, ResourceIdentifier virtualNetworkSubnetId, string kind) : base(id, name, resourceType, systemData, tags, location) + internal WebSiteData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, ExtendedLocation extendedLocation, string state, IReadOnlyList hostNames, string repositorySiteName, AppServiceUsageState? usageState, bool? isEnabled, IReadOnlyList enabledHostNames, WebSiteAvailabilityState? availabilityState, IList hostNameSslStates, ResourceIdentifier appServicePlanId, bool? isReserved, bool? isXenon, bool? isHyperV, DateTimeOffset? lastModifiedTimeUtc, SiteConfigProperties siteConfig, IReadOnlyList trafficManagerHostNames, bool? isScmSiteAlsoStopped, string targetSwapSlot, HostingEnvironmentProfile hostingEnvironmentProfile, bool? isClientAffinityEnabled, bool? isClientCertEnabled, ClientCertMode? clientCertMode, string clientCertExclusionPaths, bool? isHostNameDisabled, string customDomainVerificationId, string outboundIPAddresses, string possibleOutboundIPAddresses, int? containerSize, int? dailyMemoryTimeQuota, DateTimeOffset? suspendOn, int? maxNumberOfWorkers, CloningInfo cloningInfo, string resourceGroup, bool? isDefaultContainer, string defaultHostName, SlotSwapStatus slotSwapStatus, bool? isHttpsOnly, RedundancyMode? redundancyMode, Guid? inProgressOperationId, bool? isStorageAccountRequired, string keyVaultReferenceIdentity, ResourceIdentifier virtualNetworkSubnetId, string kind) : base(id, name, resourceType, systemData, tags, location) { Identity = identity; ExtendedLocation = extendedLocation; @@ -150,9 +150,9 @@ internal WebSiteData(ResourceIdentifier id, string name, ResourceType resourceTy } /// Managed service identity. - public ResourceManager.Models.ManagedServiceIdentity Identity { get; set; } + public ManagedServiceIdentity Identity { get; set; } /// Extended Location. - public Resources.Models.ExtendedLocation ExtendedLocation { get; set; } + public ExtendedLocation ExtendedLocation { get; set; } /// Current state of the app. public string State { get; } /// Hostnames associated with the app. diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/autorest.md b/sdk/websites/Azure.ResourceManager.AppService/src/autorest.md index 1d2725aa48e0..421aaa55830a 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/autorest.md +++ b/sdk/websites/Azure.ResourceManager.AppService/src/autorest.md @@ -20,7 +20,6 @@ skip-csproj: true modelerfour: flatten-payloads: false deserialize-null-collection-as-null-value: true -unreferenced-types-handling: KeepAll # mgmt-debug: # show-serialized-names: true