From 751c2d87d854bb0a6aa5779283943b1b7f33dae5 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 6 Dec 2022 23:14:16 +0000 Subject: [PATCH] CodeGen from PR 21433 in Azure/azure-rest-api-specs Merge fd1cb7239a9fb90502802deb132f2e2f811f0f95 into dcec109c164e69f0f122ff74fc551108da8af20e --- ...Manager.RecoveryServices.netstandard2.0.cs | 66 ++++++++++++++ .../Extensions/RecoveryServicesExtensions.cs | 34 +++++++ .../SubscriptionResourceExtensionClient.cs | 53 +++++++++++ .../CapabilitiesProperties.Serialization.cs | 56 ++++++++++++ .../Models/CapabilitiesProperties.cs | 32 +++++++ .../CapabilitiesResponse.Serialization.cs | 53 +++++++++++ .../Generated/Models/CapabilitiesResponse.cs | 49 ++++++++++ ...ilitiesResponseProperties.Serialization.cs | 56 ++++++++++++ .../Models/CapabilitiesResponseProperties.cs | 32 +++++++ .../Generated/Models/DnsZone.Serialization.cs | 45 ++++++++++ .../src/Generated/Models/DnsZone.cs | 28 ++++++ .../Models/DnsZoneResponse.Serialization.cs | 72 +++++++++++++++ .../src/Generated/Models/DnsZoneResponse.cs | 33 +++++++ .../Generated/Models/PublicNetworkAccess.cs | 51 +++++++++++ ...PrivateEndpointConnection.Serialization.cs | 19 +++- ...coveryServicesPrivateEndpointConnection.cs | 8 +- .../ResourceCapabilities.Serialization.cs | 53 +++++++++++ .../Generated/Models/ResourceCapabilities.cs | 49 ++++++++++ .../ResourceCapabilitiesBase.Serialization.cs | 37 ++++++++ .../Models/ResourceCapabilitiesBase.cs | 29 ++++++ .../Models/VaultProperties.Serialization.cs | 18 +++- .../src/Generated/Models/VaultProperties.cs | 6 +- .../Generated/Models/VaultSubResourceType.cs | 54 +++++++++++ .../PrivateLinkResourcesRestOperations.cs | 26 +++--- .../RecoveryServicesRestOperations.cs | 89 +++++++++++++++++-- .../RegisteredIdentitiesRestOperations.cs | 10 +-- .../ReplicationUsagesRestOperations.cs | 10 +-- .../RestOperations/UsagesRestOperations.cs | 10 +-- .../VaultCertificatesRestOperations.cs | 10 +-- .../VaultExtendedInfoRestOperations.cs | 26 +++--- .../RestOperations/VaultsRestOperations.cs | 58 ++++++------ .../src/autorest.md | 2 +- 32 files changed, 1089 insertions(+), 85 deletions(-) create mode 100644 sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/CapabilitiesProperties.Serialization.cs create mode 100644 sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/CapabilitiesProperties.cs create mode 100644 sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/CapabilitiesResponse.Serialization.cs create mode 100644 sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/CapabilitiesResponse.cs create mode 100644 sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/CapabilitiesResponseProperties.Serialization.cs create mode 100644 sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/CapabilitiesResponseProperties.cs create mode 100644 sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/DnsZone.Serialization.cs create mode 100644 sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/DnsZone.cs create mode 100644 sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/DnsZoneResponse.Serialization.cs create mode 100644 sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/DnsZoneResponse.cs create mode 100644 sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/PublicNetworkAccess.cs create mode 100644 sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/ResourceCapabilities.Serialization.cs create mode 100644 sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/ResourceCapabilities.cs create mode 100644 sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/ResourceCapabilitiesBase.Serialization.cs create mode 100644 sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/ResourceCapabilitiesBase.cs create mode 100644 sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/VaultSubResourceType.cs diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/api/Azure.ResourceManager.RecoveryServices.netstandard2.0.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/api/Azure.ResourceManager.RecoveryServices.netstandard2.0.cs index 43047173648c2..cf2c7d1db042c 100644 --- a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/api/Azure.ResourceManager.RecoveryServices.netstandard2.0.cs +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/api/Azure.ResourceManager.RecoveryServices.netstandard2.0.cs @@ -2,6 +2,8 @@ namespace Azure.ResourceManager.RecoveryServices { public static partial class RecoveryServicesExtensions { + public static Azure.Response CapabilitiesRecoveryService(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, Azure.ResourceManager.RecoveryServices.Models.ResourceCapabilities input, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> CapabilitiesRecoveryServiceAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, Azure.ResourceManager.RecoveryServices.Models.ResourceCapabilities input, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Response CheckNameAvailabilityRecoveryService(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, Azure.Core.AzureLocation location, Azure.ResourceManager.RecoveryServices.Models.CheckNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> CheckNameAvailabilityRecoveryServiceAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, Azure.Core.AzureLocation location, Azure.ResourceManager.RecoveryServices.Models.CheckNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.RecoveryServices.RecoveryServicesPrivateLinkResource GetRecoveryServicesPrivateLinkResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } @@ -182,6 +184,11 @@ namespace Azure.ResourceManager.RecoveryServices.Models public static bool operator !=(Azure.ResourceManager.RecoveryServices.Models.BackupStorageVersion left, Azure.ResourceManager.RecoveryServices.Models.BackupStorageVersion right) { throw null; } public override string ToString() { throw null; } } + public partial class CapabilitiesResponse : Azure.ResourceManager.RecoveryServices.Models.ResourceCapabilitiesBase + { + public CapabilitiesResponse(string resourceCapabilitiesBaseType) : base (default(string)) { } + public System.Collections.Generic.IList CapabilitiesResponseDnsZones { get { throw null; } } + } public partial class CertificateContent { public CertificateContent() { } @@ -224,6 +231,16 @@ public CmkKekIdentity() { } public static bool operator !=(Azure.ResourceManager.RecoveryServices.Models.CrossRegionRestore left, Azure.ResourceManager.RecoveryServices.Models.CrossRegionRestore right) { throw null; } public override string ToString() { throw null; } } + public partial class DnsZone + { + public DnsZone() { } + public Azure.ResourceManager.RecoveryServices.Models.VaultSubResourceType? SubResource { get { throw null; } set { } } + } + public partial class DnsZoneResponse : Azure.ResourceManager.RecoveryServices.Models.DnsZone + { + public DnsZoneResponse() { } + public System.Collections.Generic.IList RequiredZoneNames { get { throw null; } } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct ImmutabilityState : System.IEquatable { @@ -336,6 +353,24 @@ internal PrivateEndpointConnectionVaultProperties() { } public static bool operator !=(Azure.ResourceManager.RecoveryServices.Models.ProvisioningState left, Azure.ResourceManager.RecoveryServices.Models.ProvisioningState right) { throw null; } public override string ToString() { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct PublicNetworkAccess : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public PublicNetworkAccess(string value) { throw null; } + public static Azure.ResourceManager.RecoveryServices.Models.PublicNetworkAccess Disabled { get { throw null; } } + public static Azure.ResourceManager.RecoveryServices.Models.PublicNetworkAccess Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.RecoveryServices.Models.PublicNetworkAccess other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.RecoveryServices.Models.PublicNetworkAccess left, Azure.ResourceManager.RecoveryServices.Models.PublicNetworkAccess right) { throw null; } + public static implicit operator Azure.ResourceManager.RecoveryServices.Models.PublicNetworkAccess (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.RecoveryServices.Models.PublicNetworkAccess left, Azure.ResourceManager.RecoveryServices.Models.PublicNetworkAccess right) { throw null; } + public override string ToString() { throw null; } + } public partial class RawCertificateData { public RawCertificateData() { } @@ -345,6 +380,7 @@ public RawCertificateData() { } public partial class RecoveryServicesPrivateEndpointConnection { internal RecoveryServicesPrivateEndpointConnection() { } + public System.Collections.Generic.IReadOnlyList GroupIds { get { throw null; } } public Azure.Core.ResourceIdentifier PrivateEndpointId { get { throw null; } } public Azure.ResourceManager.RecoveryServices.Models.RecoveryServicesPrivateLinkServiceConnectionState PrivateLinkServiceConnectionState { get { throw null; } } public Azure.ResourceManager.RecoveryServices.Models.ProvisioningState? ProvisioningState { get { throw null; } } @@ -393,6 +429,16 @@ internal ReplicationUsage() { } public int? RecoveryServicesProviderAuthType { get { throw null; } } public int? RegisteredServersCount { get { throw null; } } } + public partial class ResourceCapabilities : Azure.ResourceManager.RecoveryServices.Models.ResourceCapabilitiesBase + { + public ResourceCapabilities(string resourceCapabilitiesBaseType) : base (default(string)) { } + public System.Collections.Generic.IList CapabilitiesDnsZones { get { throw null; } } + } + public partial class ResourceCapabilitiesBase + { + public ResourceCapabilitiesBase(string resourceCapabilitiesBaseType) { } + public string ResourceCapabilitiesBaseType { get { throw null; } set { } } + } public partial class ResourceCertificateAndAadDetails : Azure.ResourceManager.RecoveryServices.Models.ResourceCertificateDetails { internal ResourceCertificateAndAadDetails() { } @@ -565,6 +611,7 @@ public VaultProperties() { } public Azure.ResourceManager.RecoveryServices.Models.VaultPrivateEndpointState? PrivateEndpointStateForBackup { get { throw null; } } public Azure.ResourceManager.RecoveryServices.Models.VaultPrivateEndpointState? PrivateEndpointStateForSiteRecovery { get { throw null; } } public string ProvisioningState { get { throw null; } } + public Azure.ResourceManager.RecoveryServices.Models.PublicNetworkAccess? PublicNetworkAccess { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServices.Models.VaultPropertiesRedundancySettings RedundancySettings { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServices.Models.UpgradeDetails UpgradeDetails { get { throw null; } set { } } } @@ -591,6 +638,25 @@ public VaultPropertiesRedundancySettings() { } public Azure.ResourceManager.RecoveryServices.Models.StandardTierStorageRedundancy? StandardTierStorageRedundancy { get { throw null; } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct VaultSubResourceType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public VaultSubResourceType(string value) { throw null; } + public static Azure.ResourceManager.RecoveryServices.Models.VaultSubResourceType AzureBackup { get { throw null; } } + public static Azure.ResourceManager.RecoveryServices.Models.VaultSubResourceType AzureBackupSecondary { get { throw null; } } + public static Azure.ResourceManager.RecoveryServices.Models.VaultSubResourceType AzureSiteRecovery { get { throw null; } } + public bool Equals(Azure.ResourceManager.RecoveryServices.Models.VaultSubResourceType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.RecoveryServices.Models.VaultSubResourceType left, Azure.ResourceManager.RecoveryServices.Models.VaultSubResourceType right) { throw null; } + public static implicit operator Azure.ResourceManager.RecoveryServices.Models.VaultSubResourceType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.RecoveryServices.Models.VaultSubResourceType left, Azure.ResourceManager.RecoveryServices.Models.VaultSubResourceType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct VaultUpgradeState : System.IEquatable { private readonly object _dummy; diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Extensions/RecoveryServicesExtensions.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Extensions/RecoveryServicesExtensions.cs index 258ae8a24c28a..51385481df31c 100644 --- a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Extensions/RecoveryServicesExtensions.cs +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Extensions/RecoveryServicesExtensions.cs @@ -28,6 +28,40 @@ private static SubscriptionResourceExtensionClient GetExtensionClient(Subscripti ); } + /// + /// API to get details about capabilities provided by Microsoft.RecoveryServices RP + /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{location}/capabilities + /// Operation Id: RecoveryServices_Capabilities + /// + /// The instance the method will execute against. + /// Location of the resource. + /// Contains information about Resource type and properties to get capabilities. + /// The cancellation token to use. + /// is null. + public static async Task> CapabilitiesRecoveryServiceAsync(this SubscriptionResource subscriptionResource, AzureLocation location, ResourceCapabilities input, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(input, nameof(input)); + + return await GetExtensionClient(subscriptionResource).CapabilitiesRecoveryServiceAsync(location, input, cancellationToken).ConfigureAwait(false); + } + + /// + /// API to get details about capabilities provided by Microsoft.RecoveryServices RP + /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{location}/capabilities + /// Operation Id: RecoveryServices_Capabilities + /// + /// The instance the method will execute against. + /// Location of the resource. + /// Contains information about Resource type and properties to get capabilities. + /// The cancellation token to use. + /// is null. + public static Response CapabilitiesRecoveryService(this SubscriptionResource subscriptionResource, AzureLocation location, ResourceCapabilities input, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(input, nameof(input)); + + return GetExtensionClient(subscriptionResource).CapabilitiesRecoveryService(location, input, cancellationToken); + } + /// /// Fetches all the resources of the specified type in the subscription. /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/vaults diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs index dc2b6b4884fcb..9b571c4a6e669 100644 --- a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs @@ -13,12 +13,15 @@ using Azure.Core; using Azure.Core.Pipeline; using Azure.ResourceManager; +using Azure.ResourceManager.RecoveryServices.Models; namespace Azure.ResourceManager.RecoveryServices { /// A class to add extension methods to SubscriptionResource. internal partial class SubscriptionResourceExtensionClient : ArmResource { + private ClientDiagnostics _recoveryServicesClientDiagnostics; + private RecoveryServicesRestOperations _recoveryServicesRestClient; private ClientDiagnostics _vaultClientDiagnostics; private VaultsRestOperations _vaultRestClient; @@ -34,6 +37,8 @@ internal SubscriptionResourceExtensionClient(ArmClient client, ResourceIdentifie { } + private ClientDiagnostics RecoveryServicesClientDiagnostics => _recoveryServicesClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.RecoveryServices", ProviderConstants.DefaultProviderNamespace, Diagnostics); + private RecoveryServicesRestOperations RecoveryServicesRestClient => _recoveryServicesRestClient ??= new RecoveryServicesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); private ClientDiagnostics VaultClientDiagnostics => _vaultClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.RecoveryServices", VaultResource.ResourceType.Namespace, Diagnostics); private VaultsRestOperations VaultRestClient => _vaultRestClient ??= new VaultsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(VaultResource.ResourceType)); @@ -43,6 +48,54 @@ private string GetApiVersionOrNull(ResourceType resourceType) return apiVersion; } + /// + /// API to get details about capabilities provided by Microsoft.RecoveryServices RP + /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{location}/capabilities + /// Operation Id: RecoveryServices_Capabilities + /// + /// Location of the resource. + /// Contains information about Resource type and properties to get capabilities. + /// The cancellation token to use. + public virtual async Task> CapabilitiesRecoveryServiceAsync(AzureLocation location, ResourceCapabilities input, CancellationToken cancellationToken = default) + { + using var scope = RecoveryServicesClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.CapabilitiesRecoveryService"); + scope.Start(); + try + { + var response = await RecoveryServicesRestClient.CapabilitiesAsync(Id.SubscriptionId, location, input, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// API to get details about capabilities provided by Microsoft.RecoveryServices RP + /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{location}/capabilities + /// Operation Id: RecoveryServices_Capabilities + /// + /// Location of the resource. + /// Contains information about Resource type and properties to get capabilities. + /// The cancellation token to use. + public virtual Response CapabilitiesRecoveryService(AzureLocation location, ResourceCapabilities input, CancellationToken cancellationToken = default) + { + using var scope = RecoveryServicesClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.CapabilitiesRecoveryService"); + scope.Start(); + try + { + var response = RecoveryServicesRestClient.Capabilities(Id.SubscriptionId, location, input, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + /// /// Fetches all the resources of the specified type in the subscription. /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/vaults diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/CapabilitiesProperties.Serialization.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/CapabilitiesProperties.Serialization.cs new file mode 100644 index 0000000000000..5d4a0fb881c10 --- /dev/null +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/CapabilitiesProperties.Serialization.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServices.Models +{ + internal partial class CapabilitiesProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(DnsZones)) + { + writer.WritePropertyName("dnsZones"); + writer.WriteStartArray(); + foreach (var item in DnsZones) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + + internal static CapabilitiesProperties DeserializeCapabilitiesProperties(JsonElement element) + { + Optional> dnsZones = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("dnsZones")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DnsZone.DeserializeDnsZone(item)); + } + dnsZones = array; + continue; + } + } + return new CapabilitiesProperties(Optional.ToList(dnsZones)); + } + } +} diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/CapabilitiesProperties.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/CapabilitiesProperties.cs new file mode 100644 index 0000000000000..1a21ebd0cb8f6 --- /dev/null +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/CapabilitiesProperties.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServices.Models +{ + /// Capabilities information. + internal partial class CapabilitiesProperties + { + /// Initializes a new instance of CapabilitiesProperties. + public CapabilitiesProperties() + { + DnsZones = new ChangeTrackingList(); + } + + /// Initializes a new instance of CapabilitiesProperties. + /// + internal CapabilitiesProperties(IList dnsZones) + { + DnsZones = dnsZones; + } + + /// Gets the dns zones. + public IList DnsZones { get; } + } +} diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/CapabilitiesResponse.Serialization.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/CapabilitiesResponse.Serialization.cs new file mode 100644 index 0000000000000..7d76604b705a3 --- /dev/null +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/CapabilitiesResponse.Serialization.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServices.Models +{ + public partial class CapabilitiesResponse : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + } + writer.WritePropertyName("type"); + writer.WriteStringValue(ResourceCapabilitiesBaseType); + writer.WriteEndObject(); + } + + internal static CapabilitiesResponse DeserializeCapabilitiesResponse(JsonElement element) + { + Optional properties = default; + string type = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + properties = CapabilitiesResponseProperties.DeserializeCapabilitiesResponseProperties(property.Value); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + } + return new CapabilitiesResponse(type, properties.Value); + } + } +} diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/CapabilitiesResponse.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/CapabilitiesResponse.cs new file mode 100644 index 0000000000000..3458c0c1044a6 --- /dev/null +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/CapabilitiesResponse.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServices.Models +{ + /// Capabilities response for Microsoft.RecoveryServices. + public partial class CapabilitiesResponse : ResourceCapabilitiesBase + { + /// Initializes a new instance of CapabilitiesResponse. + /// Describes the Resource type: Microsoft.RecoveryServices/Vaults. + /// is null. + public CapabilitiesResponse(string resourceCapabilitiesBaseType) : base(resourceCapabilitiesBaseType) + { + Argument.AssertNotNull(resourceCapabilitiesBaseType, nameof(resourceCapabilitiesBaseType)); + } + + /// Initializes a new instance of CapabilitiesResponse. + /// Describes the Resource type: Microsoft.RecoveryServices/Vaults. + /// Capabilities properties in response. + /// is null. + internal CapabilitiesResponse(string resourceCapabilitiesBaseType, CapabilitiesResponseProperties properties) : base(resourceCapabilitiesBaseType) + { + Argument.AssertNotNull(resourceCapabilitiesBaseType, nameof(resourceCapabilitiesBaseType)); + + Properties = properties; + } + + /// Capabilities properties in response. + internal CapabilitiesResponseProperties Properties { get; set; } + /// Gets the dns zones. + public IList CapabilitiesResponseDnsZones + { + get + { + if (Properties is null) + Properties = new CapabilitiesResponseProperties(); + return Properties.DnsZones; + } + } + } +} diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/CapabilitiesResponseProperties.Serialization.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/CapabilitiesResponseProperties.Serialization.cs new file mode 100644 index 0000000000000..d40bcf4833051 --- /dev/null +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/CapabilitiesResponseProperties.Serialization.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServices.Models +{ + internal partial class CapabilitiesResponseProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(DnsZones)) + { + writer.WritePropertyName("dnsZones"); + writer.WriteStartArray(); + foreach (var item in DnsZones) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + + internal static CapabilitiesResponseProperties DeserializeCapabilitiesResponseProperties(JsonElement element) + { + Optional> dnsZones = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("dnsZones")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DnsZoneResponse.DeserializeDnsZoneResponse(item)); + } + dnsZones = array; + continue; + } + } + return new CapabilitiesResponseProperties(Optional.ToList(dnsZones)); + } + } +} diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/CapabilitiesResponseProperties.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/CapabilitiesResponseProperties.cs new file mode 100644 index 0000000000000..bb06200fd0b10 --- /dev/null +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/CapabilitiesResponseProperties.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServices.Models +{ + /// Capabilities properties in response. + internal partial class CapabilitiesResponseProperties + { + /// Initializes a new instance of CapabilitiesResponseProperties. + public CapabilitiesResponseProperties() + { + DnsZones = new ChangeTrackingList(); + } + + /// Initializes a new instance of CapabilitiesResponseProperties. + /// + internal CapabilitiesResponseProperties(IList dnsZones) + { + DnsZones = dnsZones; + } + + /// Gets the dns zones. + public IList DnsZones { get; } + } +} diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/DnsZone.Serialization.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/DnsZone.Serialization.cs new file mode 100644 index 0000000000000..7613263d3fb38 --- /dev/null +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/DnsZone.Serialization.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServices.Models +{ + public partial class DnsZone : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(SubResource)) + { + writer.WritePropertyName("subResource"); + writer.WriteStringValue(SubResource.Value.ToString()); + } + writer.WriteEndObject(); + } + + internal static DnsZone DeserializeDnsZone(JsonElement element) + { + Optional subResource = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("subResource")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + subResource = new VaultSubResourceType(property.Value.GetString()); + continue; + } + } + return new DnsZone(Optional.ToNullable(subResource)); + } + } +} diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/DnsZone.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/DnsZone.cs new file mode 100644 index 0000000000000..e0877d6e97425 --- /dev/null +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/DnsZone.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.RecoveryServices.Models +{ + /// DNSZone information. + public partial class DnsZone + { + /// Initializes a new instance of DnsZone. + public DnsZone() + { + } + + /// Initializes a new instance of DnsZone. + /// Subresource type for vault AzureBackup, AzureBackup_secondary or AzureSiteRecovery. + internal DnsZone(VaultSubResourceType? subResource) + { + SubResource = subResource; + } + + /// Subresource type for vault AzureBackup, AzureBackup_secondary or AzureSiteRecovery. + public VaultSubResourceType? SubResource { get; set; } + } +} diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/DnsZoneResponse.Serialization.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/DnsZoneResponse.Serialization.cs new file mode 100644 index 0000000000000..753657d5bdfd9 --- /dev/null +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/DnsZoneResponse.Serialization.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServices.Models +{ + public partial class DnsZoneResponse : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(RequiredZoneNames)) + { + writer.WritePropertyName("requiredZoneNames"); + writer.WriteStartArray(); + foreach (var item in RequiredZoneNames) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(SubResource)) + { + writer.WritePropertyName("subResource"); + writer.WriteStringValue(SubResource.Value.ToString()); + } + writer.WriteEndObject(); + } + + internal static DnsZoneResponse DeserializeDnsZoneResponse(JsonElement element) + { + Optional> requiredZoneNames = default; + Optional subResource = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("requiredZoneNames")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + requiredZoneNames = array; + continue; + } + if (property.NameEquals("subResource")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + subResource = new VaultSubResourceType(property.Value.GetString()); + continue; + } + } + return new DnsZoneResponse(Optional.ToNullable(subResource), Optional.ToList(requiredZoneNames)); + } + } +} diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/DnsZoneResponse.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/DnsZoneResponse.cs new file mode 100644 index 0000000000000..8a4dc47c9c56f --- /dev/null +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/DnsZoneResponse.cs @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServices.Models +{ + /// DNSZone information for Microsoft.RecoveryServices. + public partial class DnsZoneResponse : DnsZone + { + /// Initializes a new instance of DnsZoneResponse. + public DnsZoneResponse() + { + RequiredZoneNames = new ChangeTrackingList(); + } + + /// Initializes a new instance of DnsZoneResponse. + /// Subresource type for vault AzureBackup, AzureBackup_secondary or AzureSiteRecovery. + /// The private link resource Private link DNS zone names. + internal DnsZoneResponse(VaultSubResourceType? subResource, IList requiredZoneNames) : base(subResource) + { + RequiredZoneNames = requiredZoneNames; + } + + /// The private link resource Private link DNS zone names. + public IList RequiredZoneNames { get; } + } +} diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/PublicNetworkAccess.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/PublicNetworkAccess.cs new file mode 100644 index 0000000000000..88021785ed926 --- /dev/null +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/PublicNetworkAccess.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.RecoveryServices.Models +{ + /// property to enable or disable resource provider inbound network traffic from public clients. + public readonly partial struct PublicNetworkAccess : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public PublicNetworkAccess(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EnabledValue = "Enabled"; + private const string DisabledValue = "Disabled"; + + /// Enabled. + public static PublicNetworkAccess Enabled { get; } = new PublicNetworkAccess(EnabledValue); + /// Disabled. + public static PublicNetworkAccess Disabled { get; } = new PublicNetworkAccess(DisabledValue); + /// Determines if two values are the same. + public static bool operator ==(PublicNetworkAccess left, PublicNetworkAccess right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(PublicNetworkAccess left, PublicNetworkAccess right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator PublicNetworkAccess(string value) => new PublicNetworkAccess(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is PublicNetworkAccess other && Equals(other); + /// + public bool Equals(PublicNetworkAccess other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/RecoveryServicesPrivateEndpointConnection.Serialization.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/RecoveryServicesPrivateEndpointConnection.Serialization.cs index 00091027fc31d..f007477263060 100644 --- a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/RecoveryServicesPrivateEndpointConnection.Serialization.cs +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/RecoveryServicesPrivateEndpointConnection.Serialization.cs @@ -5,6 +5,7 @@ #nullable disable +using System.Collections.Generic; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Resources.Models; @@ -18,6 +19,7 @@ internal static RecoveryServicesPrivateEndpointConnection DeserializeRecoverySer Optional provisioningState = default; Optional privateEndpoint = default; Optional privateLinkServiceConnectionState = default; + Optional> groupIds = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("provisioningState")) @@ -50,8 +52,23 @@ internal static RecoveryServicesPrivateEndpointConnection DeserializeRecoverySer privateLinkServiceConnectionState = RecoveryServicesPrivateLinkServiceConnectionState.DeserializeRecoveryServicesPrivateLinkServiceConnectionState(property.Value); continue; } + if (property.NameEquals("groupIds")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(new VaultSubResourceType(item.GetString())); + } + groupIds = array; + continue; + } } - return new RecoveryServicesPrivateEndpointConnection(Optional.ToNullable(provisioningState), privateEndpoint, privateLinkServiceConnectionState.Value); + return new RecoveryServicesPrivateEndpointConnection(Optional.ToNullable(provisioningState), privateEndpoint, privateLinkServiceConnectionState.Value, Optional.ToList(groupIds)); } } } diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/RecoveryServicesPrivateEndpointConnection.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/RecoveryServicesPrivateEndpointConnection.cs index 3834c17ee6cfb..b634ba7fa13b2 100644 --- a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/RecoveryServicesPrivateEndpointConnection.cs +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/RecoveryServicesPrivateEndpointConnection.cs @@ -5,6 +5,7 @@ #nullable disable +using System.Collections.Generic; using Azure.Core; using Azure.ResourceManager.Resources.Models; @@ -16,17 +17,20 @@ public partial class RecoveryServicesPrivateEndpointConnection /// Initializes a new instance of RecoveryServicesPrivateEndpointConnection. internal RecoveryServicesPrivateEndpointConnection() { + GroupIds = new ChangeTrackingList(); } /// Initializes a new instance of RecoveryServicesPrivateEndpointConnection. /// Gets or sets provisioning state of the private endpoint connection. /// The Private Endpoint network resource that is linked to the Private Endpoint connection. /// Gets or sets private link service connection state. - internal RecoveryServicesPrivateEndpointConnection(ProvisioningState? provisioningState, SubResource privateEndpoint, RecoveryServicesPrivateLinkServiceConnectionState privateLinkServiceConnectionState) + /// Group Ids for the Private Endpoint. + internal RecoveryServicesPrivateEndpointConnection(ProvisioningState? provisioningState, SubResource privateEndpoint, RecoveryServicesPrivateLinkServiceConnectionState privateLinkServiceConnectionState, IReadOnlyList groupIds) { ProvisioningState = provisioningState; PrivateEndpoint = privateEndpoint; PrivateLinkServiceConnectionState = privateLinkServiceConnectionState; + GroupIds = groupIds; } /// Gets or sets provisioning state of the private endpoint connection. @@ -41,5 +45,7 @@ public ResourceIdentifier PrivateEndpointId /// Gets or sets private link service connection state. public RecoveryServicesPrivateLinkServiceConnectionState PrivateLinkServiceConnectionState { get; } + /// Group Ids for the Private Endpoint. + public IReadOnlyList GroupIds { get; } } } diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/ResourceCapabilities.Serialization.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/ResourceCapabilities.Serialization.cs new file mode 100644 index 0000000000000..fc0e225a97174 --- /dev/null +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/ResourceCapabilities.Serialization.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServices.Models +{ + public partial class ResourceCapabilities : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + } + writer.WritePropertyName("type"); + writer.WriteStringValue(ResourceCapabilitiesBaseType); + writer.WriteEndObject(); + } + + internal static ResourceCapabilities DeserializeResourceCapabilities(JsonElement element) + { + Optional properties = default; + string type = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + properties = CapabilitiesProperties.DeserializeCapabilitiesProperties(property.Value); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + } + return new ResourceCapabilities(type, properties.Value); + } + } +} diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/ResourceCapabilities.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/ResourceCapabilities.cs new file mode 100644 index 0000000000000..f38030044e635 --- /dev/null +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/ResourceCapabilities.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServices.Models +{ + /// Input to get capabilities information for Microsoft.RecoveryServices. + public partial class ResourceCapabilities : ResourceCapabilitiesBase + { + /// Initializes a new instance of ResourceCapabilities. + /// Describes the Resource type: Microsoft.RecoveryServices/Vaults. + /// is null. + public ResourceCapabilities(string resourceCapabilitiesBaseType) : base(resourceCapabilitiesBaseType) + { + Argument.AssertNotNull(resourceCapabilitiesBaseType, nameof(resourceCapabilitiesBaseType)); + } + + /// Initializes a new instance of ResourceCapabilities. + /// Describes the Resource type: Microsoft.RecoveryServices/Vaults. + /// Capabilities information. + /// is null. + internal ResourceCapabilities(string resourceCapabilitiesBaseType, CapabilitiesProperties properties) : base(resourceCapabilitiesBaseType) + { + Argument.AssertNotNull(resourceCapabilitiesBaseType, nameof(resourceCapabilitiesBaseType)); + + Properties = properties; + } + + /// Capabilities information. + internal CapabilitiesProperties Properties { get; set; } + /// Gets the dns zones. + public IList CapabilitiesDnsZones + { + get + { + if (Properties is null) + Properties = new CapabilitiesProperties(); + return Properties.DnsZones; + } + } + } +} diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/ResourceCapabilitiesBase.Serialization.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/ResourceCapabilitiesBase.Serialization.cs new file mode 100644 index 0000000000000..27895b1bd2976 --- /dev/null +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/ResourceCapabilitiesBase.Serialization.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServices.Models +{ + public partial class ResourceCapabilitiesBase : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(ResourceCapabilitiesBaseType); + writer.WriteEndObject(); + } + + internal static ResourceCapabilitiesBase DeserializeResourceCapabilitiesBase(JsonElement element) + { + string type = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + } + return new ResourceCapabilitiesBase(type); + } + } +} diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/ResourceCapabilitiesBase.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/ResourceCapabilitiesBase.cs new file mode 100644 index 0000000000000..5afef4324eb43 --- /dev/null +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/ResourceCapabilitiesBase.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServices.Models +{ + /// Base class for request and response capabilities information for Microsoft.RecoveryServices. + public partial class ResourceCapabilitiesBase + { + /// Initializes a new instance of ResourceCapabilitiesBase. + /// Describes the Resource type: Microsoft.RecoveryServices/Vaults. + /// is null. + public ResourceCapabilitiesBase(string resourceCapabilitiesBaseType) + { + Argument.AssertNotNull(resourceCapabilitiesBaseType, nameof(resourceCapabilitiesBaseType)); + + ResourceCapabilitiesBaseType = resourceCapabilitiesBaseType; + } + + /// Describes the Resource type: Microsoft.RecoveryServices/Vaults. + public string ResourceCapabilitiesBaseType { get; set; } + } +} diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/VaultProperties.Serialization.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/VaultProperties.Serialization.cs index b78d760c0e990..9b0375585eb06 100644 --- a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/VaultProperties.Serialization.cs +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/VaultProperties.Serialization.cs @@ -31,6 +31,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("moveDetails"); writer.WriteObjectValue(MoveDetails); } + if (Optional.IsDefined(PublicNetworkAccess)) + { + writer.WritePropertyName("publicNetworkAccess"); + writer.WriteStringValue(PublicNetworkAccess.Value.ToString()); + } if (Optional.IsDefined(MonitoringSettings)) { writer.WritePropertyName("monitoringSettings"); @@ -60,6 +65,7 @@ internal static VaultProperties DeserializeVaultProperties(JsonElement element) Optional moveDetails = default; Optional moveState = default; Optional backupStorageVersion = default; + Optional publicNetworkAccess = default; Optional monitoringSettings = default; Optional redundancySettings = default; Optional securitySettings = default; @@ -155,6 +161,16 @@ internal static VaultProperties DeserializeVaultProperties(JsonElement element) backupStorageVersion = new BackupStorageVersion(property.Value.GetString()); continue; } + if (property.NameEquals("publicNetworkAccess")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + publicNetworkAccess = new PublicNetworkAccess(property.Value.GetString()); + continue; + } if (property.NameEquals("monitoringSettings")) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -186,7 +202,7 @@ internal static VaultProperties DeserializeVaultProperties(JsonElement element) continue; } } - return new VaultProperties(provisioningState.Value, upgradeDetails.Value, Optional.ToList(privateEndpointConnections), Optional.ToNullable(privateEndpointStateForBackup), Optional.ToNullable(privateEndpointStateForSiteRecovery), encryption.Value, moveDetails.Value, Optional.ToNullable(moveState), Optional.ToNullable(backupStorageVersion), monitoringSettings.Value, redundancySettings.Value, securitySettings.Value); + return new VaultProperties(provisioningState.Value, upgradeDetails.Value, Optional.ToList(privateEndpointConnections), Optional.ToNullable(privateEndpointStateForBackup), Optional.ToNullable(privateEndpointStateForSiteRecovery), encryption.Value, moveDetails.Value, Optional.ToNullable(moveState), Optional.ToNullable(backupStorageVersion), Optional.ToNullable(publicNetworkAccess), monitoringSettings.Value, redundancySettings.Value, securitySettings.Value); } } } diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/VaultProperties.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/VaultProperties.cs index c016399ceed52..57cc600440ff1 100644 --- a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/VaultProperties.cs +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/VaultProperties.cs @@ -29,10 +29,11 @@ public VaultProperties() /// The details of the latest move operation performed on the Azure Resource. /// The State of the Resource after the move operation. /// Backup storage version. + /// property to enable or disable resource provider inbound network traffic from public clients. /// Monitoring Settings of the vault. /// The redundancy Settings of a Vault. /// Security Settings of the vault. - internal VaultProperties(string provisioningState, UpgradeDetails upgradeDetails, IReadOnlyList privateEndpointConnections, VaultPrivateEndpointState? privateEndpointStateForBackup, VaultPrivateEndpointState? privateEndpointStateForSiteRecovery, VaultPropertiesEncryption encryption, VaultPropertiesMoveDetails moveDetails, ResourceMoveState? moveState, BackupStorageVersion? backupStorageVersion, MonitoringSettings monitoringSettings, VaultPropertiesRedundancySettings redundancySettings, SecuritySettings securitySettings) + internal VaultProperties(string provisioningState, UpgradeDetails upgradeDetails, IReadOnlyList privateEndpointConnections, VaultPrivateEndpointState? privateEndpointStateForBackup, VaultPrivateEndpointState? privateEndpointStateForSiteRecovery, VaultPropertiesEncryption encryption, VaultPropertiesMoveDetails moveDetails, ResourceMoveState? moveState, BackupStorageVersion? backupStorageVersion, PublicNetworkAccess? publicNetworkAccess, MonitoringSettings monitoringSettings, VaultPropertiesRedundancySettings redundancySettings, SecuritySettings securitySettings) { ProvisioningState = provisioningState; UpgradeDetails = upgradeDetails; @@ -43,6 +44,7 @@ internal VaultProperties(string provisioningState, UpgradeDetails upgradeDetails MoveDetails = moveDetails; MoveState = moveState; BackupStorageVersion = backupStorageVersion; + PublicNetworkAccess = publicNetworkAccess; MonitoringSettings = monitoringSettings; RedundancySettings = redundancySettings; SecuritySettings = securitySettings; @@ -66,6 +68,8 @@ internal VaultProperties(string provisioningState, UpgradeDetails upgradeDetails public ResourceMoveState? MoveState { get; } /// Backup storage version. public BackupStorageVersion? BackupStorageVersion { get; } + /// property to enable or disable resource provider inbound network traffic from public clients. + public PublicNetworkAccess? PublicNetworkAccess { get; set; } /// Monitoring Settings of the vault. public MonitoringSettings MonitoringSettings { get; set; } /// The redundancy Settings of a Vault. diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/VaultSubResourceType.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/VaultSubResourceType.cs new file mode 100644 index 0000000000000..a85ae6c75bb31 --- /dev/null +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/VaultSubResourceType.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.RecoveryServices.Models +{ + /// Subresource type for vault AzureBackup, AzureBackup_secondary or AzureSiteRecovery. + public readonly partial struct VaultSubResourceType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public VaultSubResourceType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AzureBackupValue = "AzureBackup"; + private const string AzureBackupSecondaryValue = "AzureBackup_secondary"; + private const string AzureSiteRecoveryValue = "AzureSiteRecovery"; + + /// AzureBackup. + public static VaultSubResourceType AzureBackup { get; } = new VaultSubResourceType(AzureBackupValue); + /// AzureBackup_secondary. + public static VaultSubResourceType AzureBackupSecondary { get; } = new VaultSubResourceType(AzureBackupSecondaryValue); + /// AzureSiteRecovery. + public static VaultSubResourceType AzureSiteRecovery { get; } = new VaultSubResourceType(AzureSiteRecoveryValue); + /// Determines if two values are the same. + public static bool operator ==(VaultSubResourceType left, VaultSubResourceType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(VaultSubResourceType left, VaultSubResourceType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator VaultSubResourceType(string value) => new VaultSubResourceType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is VaultSubResourceType other && Equals(other); + /// + public bool Equals(VaultSubResourceType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs index 2a6dc2556294e..8530801a7d423 100644 --- a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs @@ -33,7 +33,7 @@ public PrivateLinkResourcesRestOperations(HttpPipeline pipeline, string applicat { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-08-01"; + _apiVersion = apiVersion ?? "2022-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -59,8 +59,8 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro } /// Returns the list of private link resources that need to be created for Backup and SiteRecovery. - /// The subscription Id. - /// The name of the resource group where the recovery services vault is present. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the recovery services vault. /// The cancellation token to use. /// , or is null. @@ -88,8 +88,8 @@ public async Task> ListAsync(string subscriptionI } /// Returns the list of private link resources that need to be created for Backup and SiteRecovery. - /// The subscription Id. - /// The name of the resource group where the recovery services vault is present. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the recovery services vault. /// The cancellation token to use. /// , or is null. @@ -139,8 +139,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Returns a specified private link resource that need to be created for Backup and SiteRecovery. - /// The subscription Id. - /// The name of the resource group where the recovery services vault is present. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the recovery services vault. /// The String to use. /// The cancellation token to use. @@ -172,8 +172,8 @@ public async Task> GetAsync(st } /// Returns a specified private link resource that need to be created for Backup and SiteRecovery. - /// The subscription Id. - /// The name of the resource group where the recovery services vault is present. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the recovery services vault. /// The String to use. /// The cancellation token to use. @@ -220,8 +220,8 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// Returns the list of private link resources that need to be created for Backup and SiteRecovery. /// The URL to the next page of results. - /// The subscription Id. - /// The name of the resource group where the recovery services vault is present. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the recovery services vault. /// The cancellation token to use. /// , , or is null. @@ -251,8 +251,8 @@ public async Task> ListNextPageAsync(string nextL /// Returns the list of private link resources that need to be created for Backup and SiteRecovery. /// The URL to the next page of results. - /// The subscription Id. - /// The name of the resource group where the recovery services vault is present. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the recovery services vault. /// The cancellation token to use. /// , , or is null. diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/RestOperations/RecoveryServicesRestOperations.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/RestOperations/RecoveryServicesRestOperations.cs index 2719bd53aac75..561e1bbc0882a 100644 --- a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/RestOperations/RecoveryServicesRestOperations.cs +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/RestOperations/RecoveryServicesRestOperations.cs @@ -33,7 +33,7 @@ public RecoveryServicesRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-08-01"; + _apiVersion = apiVersion ?? "2022-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -67,8 +67,8 @@ internal HttpMessage CreateCheckNameAvailabilityRequest(string subscriptionId, s /// A name is available if no other resource exists that has the same SubscriptionId, Resource Name and Type /// or if one or more such resources exist, each of these must be GC'd and their time of deletion be more than 24 Hours Ago /// - /// The subscription Id. - /// The name of the resource group where the recovery services vault is present. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// Location of the resource. /// Contains information about Resource type and Resource name. /// The cancellation token to use. @@ -101,8 +101,8 @@ public async Task> CheckNameAvailabilityAs /// A name is available if no other resource exists that has the same SubscriptionId, Resource Name and Type /// or if one or more such resources exist, each of these must be GC'd and their time of deletion be more than 24 Hours Ago /// - /// The subscription Id. - /// The name of the resource group where the recovery services vault is present. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// Location of the resource. /// Contains information about Resource type and Resource name. /// The cancellation token to use. @@ -129,5 +129,84 @@ public Response CheckNameAvailability(string subscr throw new RequestFailedException(message.Response); } } + + internal HttpMessage CreateCapabilitiesRequest(string subscriptionId, AzureLocation location, ResourceCapabilities input) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.RecoveryServices/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/capabilities", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(input); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// API to get details about capabilities provided by Microsoft.RecoveryServices RP. + /// The ID of the target subscription. + /// Location of the resource. + /// Contains information about Resource type and properties to get capabilities. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> CapabilitiesAsync(string subscriptionId, AzureLocation location, ResourceCapabilities input, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNull(input, nameof(input)); + + using var message = CreateCapabilitiesRequest(subscriptionId, location, input); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + CapabilitiesResponse value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = CapabilitiesResponse.DeserializeCapabilitiesResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// API to get details about capabilities provided by Microsoft.RecoveryServices RP. + /// The ID of the target subscription. + /// Location of the resource. + /// Contains information about Resource type and properties to get capabilities. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response Capabilities(string subscriptionId, AzureLocation location, ResourceCapabilities input, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNull(input, nameof(input)); + + using var message = CreateCapabilitiesRequest(subscriptionId, location, input); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + CapabilitiesResponse value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = CapabilitiesResponse.DeserializeCapabilitiesResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } } } diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/RestOperations/RegisteredIdentitiesRestOperations.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/RestOperations/RegisteredIdentitiesRestOperations.cs index 974bebde8bf5c..10cb508ba9932 100644 --- a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/RestOperations/RegisteredIdentitiesRestOperations.cs +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/RestOperations/RegisteredIdentitiesRestOperations.cs @@ -31,7 +31,7 @@ public RegisteredIdentitiesRestOperations(HttpPipeline pipeline, string applicat { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-08-01"; + _apiVersion = apiVersion ?? "2022-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -57,8 +57,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Unregisters the given container from your Recovery Services vault. - /// The subscription Id. - /// The name of the resource group where the recovery services vault is present. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the recovery services vault. /// Name of the protection container to unregister. /// The cancellation token to use. @@ -83,8 +83,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Unregisters the given container from your Recovery Services vault. - /// The subscription Id. - /// The name of the resource group where the recovery services vault is present. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the recovery services vault. /// Name of the protection container to unregister. /// The cancellation token to use. diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/RestOperations/ReplicationUsagesRestOperations.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/RestOperations/ReplicationUsagesRestOperations.cs index 72469d52f30cb..351b2b9f12a9b 100644 --- a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/RestOperations/ReplicationUsagesRestOperations.cs +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/RestOperations/ReplicationUsagesRestOperations.cs @@ -33,7 +33,7 @@ public ReplicationUsagesRestOperations(HttpPipeline pipeline, string application { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-08-01"; + _apiVersion = apiVersion ?? "2022-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -59,8 +59,8 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro } /// Fetches the replication usages of the vault. - /// The subscription Id. - /// The name of the resource group where the recovery services vault is present. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the recovery services vault. /// The cancellation token to use. /// , or is null. @@ -88,8 +88,8 @@ public async Task> ListAsync(string subscriptionI } /// Fetches the replication usages of the vault. - /// The subscription Id. - /// The name of the resource group where the recovery services vault is present. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the recovery services vault. /// The cancellation token to use. /// , or is null. diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/RestOperations/UsagesRestOperations.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/RestOperations/UsagesRestOperations.cs index cfefe37c6f6c7..8a4c61454574d 100644 --- a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/RestOperations/UsagesRestOperations.cs +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/RestOperations/UsagesRestOperations.cs @@ -33,7 +33,7 @@ public UsagesRestOperations(HttpPipeline pipeline, string applicationId, Uri end { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-08-01"; + _apiVersion = apiVersion ?? "2022-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -59,8 +59,8 @@ internal HttpMessage CreateListByVaultsRequest(string subscriptionId, string res } /// Fetches the usages of the vault. - /// The subscription Id. - /// The name of the resource group where the recovery services vault is present. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the recovery services vault. /// The cancellation token to use. /// , or is null. @@ -88,8 +88,8 @@ public async Task> ListByVaultsAsync(string subscriptio } /// Fetches the usages of the vault. - /// The subscription Id. - /// The name of the resource group where the recovery services vault is present. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the recovery services vault. /// The cancellation token to use. /// , or is null. diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/RestOperations/VaultCertificatesRestOperations.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/RestOperations/VaultCertificatesRestOperations.cs index f01acfa0d6930..8df0818b747d6 100644 --- a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/RestOperations/VaultCertificatesRestOperations.cs +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/RestOperations/VaultCertificatesRestOperations.cs @@ -33,7 +33,7 @@ public VaultCertificatesRestOperations(HttpPipeline pipeline, string application { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-08-01"; + _apiVersion = apiVersion ?? "2022-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -64,8 +64,8 @@ internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceG } /// Uploads a certificate for a resource. - /// The subscription Id. - /// The name of the resource group where the recovery services vault is present. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the recovery services vault. /// Certificate friendly name. /// Input parameters for uploading the vault certificate. @@ -97,8 +97,8 @@ public async Task> CreateAsync(string subscri } /// Uploads a certificate for a resource. - /// The subscription Id. - /// The name of the resource group where the recovery services vault is present. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the recovery services vault. /// Certificate friendly name. /// Input parameters for uploading the vault certificate. diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/RestOperations/VaultExtendedInfoRestOperations.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/RestOperations/VaultExtendedInfoRestOperations.cs index 4e953d85c0e0f..4446592b5a275 100644 --- a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/RestOperations/VaultExtendedInfoRestOperations.cs +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/RestOperations/VaultExtendedInfoRestOperations.cs @@ -32,7 +32,7 @@ public VaultExtendedInfoRestOperations(HttpPipeline pipeline, string application { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-08-01"; + _apiVersion = apiVersion ?? "2022-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -58,8 +58,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Get the vault extended info. - /// The subscription Id. - /// The name of the resource group where the recovery services vault is present. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the recovery services vault. /// The cancellation token to use. /// , or is null. @@ -89,8 +89,8 @@ public async Task> GetAsync(string subsc } /// Get the vault extended info. - /// The subscription Id. - /// The name of the resource group where the recovery services vault is present. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the recovery services vault. /// The cancellation token to use. /// , or is null. @@ -145,8 +145,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Create vault extended info. - /// The subscription Id. - /// The name of the resource group where the recovery services vault is present. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the recovery services vault. /// Details of ResourceExtendedInfo. /// The cancellation token to use. @@ -176,8 +176,8 @@ public async Task> CreateOrUpdateAsync(s } /// Create vault extended info. - /// The subscription Id. - /// The name of the resource group where the recovery services vault is present. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the recovery services vault. /// Details of ResourceExtendedInfo. /// The cancellation token to use. @@ -232,8 +232,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Update vault extended info. - /// The subscription Id. - /// The name of the resource group where the recovery services vault is present. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the recovery services vault. /// Details of ResourceExtendedInfo. /// The cancellation token to use. @@ -263,8 +263,8 @@ public async Task> UpdateAsync(string su } /// Update vault extended info. - /// The subscription Id. - /// The name of the resource group where the recovery services vault is present. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the recovery services vault. /// Details of ResourceExtendedInfo. /// The cancellation token to use. diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/RestOperations/VaultsRestOperations.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/RestOperations/VaultsRestOperations.cs index 5651e0dd9d0a1..e7db80cea88e9 100644 --- a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/RestOperations/VaultsRestOperations.cs +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/RestOperations/VaultsRestOperations.cs @@ -33,7 +33,7 @@ public VaultsRestOperations(HttpPipeline pipeline, string applicationId, Uri end { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-08-01"; + _apiVersion = apiVersion ?? "2022-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -55,7 +55,7 @@ internal HttpMessage CreateListBySubscriptionIdRequest(string subscriptionId) } /// Fetches all the resources of the specified type in the subscription. - /// The subscription Id. + /// The ID of the target subscription. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -80,7 +80,7 @@ public async Task> ListBySubscriptionIdAsync(string subscrip } /// Fetches all the resources of the specified type in the subscription. - /// The subscription Id. + /// The ID of the target subscription. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -124,8 +124,8 @@ internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, str } /// Retrieve a list of Vaults. - /// The subscription Id. - /// The name of the resource group where the recovery services vault is present. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// or is null. /// or is an empty string, and was expected to be non-empty. @@ -151,8 +151,8 @@ public async Task> ListByResourceGroupAsync(string subscript } /// Retrieve a list of Vaults. - /// The subscription Id. - /// The name of the resource group where the recovery services vault is present. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// or is null. /// or is an empty string, and was expected to be non-empty. @@ -198,8 +198,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Get the Vault details. - /// The subscription Id. - /// The name of the resource group where the recovery services vault is present. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the recovery services vault. /// The cancellation token to use. /// , or is null. @@ -229,8 +229,8 @@ public async Task> GetAsync(string subscriptionId, string re } /// Get the Vault details. - /// The subscription Id. - /// The name of the resource group where the recovery services vault is present. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the recovery services vault. /// The cancellation token to use. /// , or is null. @@ -284,8 +284,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or updates a Recovery Services vault. - /// The subscription Id. - /// The name of the resource group where the recovery services vault is present. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the recovery services vault. /// Recovery Services Vault to be created. /// The cancellation token to use. @@ -311,8 +311,8 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re } /// Creates or updates a Recovery Services vault. - /// The subscription Id. - /// The name of the resource group where the recovery services vault is present. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the recovery services vault. /// Recovery Services Vault to be created. /// The cancellation token to use. @@ -358,8 +358,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes a vault. - /// The subscription Id. - /// The name of the resource group where the recovery services vault is present. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the recovery services vault. /// The cancellation token to use. /// , or is null. @@ -382,8 +382,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes a vault. - /// The subscription Id. - /// The name of the resource group where the recovery services vault is present. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the recovery services vault. /// The cancellation token to use. /// , or is null. @@ -430,8 +430,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates the vault. - /// The subscription Id. - /// The name of the resource group where the recovery services vault is present. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the recovery services vault. /// Recovery Services Vault to be created. /// The cancellation token to use. @@ -457,8 +457,8 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr } /// Updates the vault. - /// The subscription Id. - /// The name of the resource group where the recovery services vault is present. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the recovery services vault. /// Recovery Services Vault to be created. /// The cancellation token to use. @@ -499,7 +499,7 @@ internal HttpMessage CreateListBySubscriptionIdNextPageRequest(string nextLink, /// Fetches all the resources of the specified type in the subscription. /// The URL to the next page of results. - /// The subscription Id. + /// The ID of the target subscription. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. @@ -526,7 +526,7 @@ public async Task> ListBySubscriptionIdNextPageAsync(string /// Fetches all the resources of the specified type in the subscription. /// The URL to the next page of results. - /// The subscription Id. + /// The ID of the target subscription. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. @@ -567,8 +567,8 @@ internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, s /// Retrieve a list of Vaults. /// The URL to the next page of results. - /// The subscription Id. - /// The name of the resource group where the recovery services vault is present. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// , or is null. /// or is an empty string, and was expected to be non-empty. @@ -596,8 +596,8 @@ public async Task> ListByResourceGroupNextPageAsync(string n /// Retrieve a list of Vaults. /// The URL to the next page of results. - /// The subscription Id. - /// The name of the resource group where the recovery services vault is present. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// , or is null. /// or is an empty string, and was expected to be non-empty. diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/autorest.md b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/autorest.md index 86cbebefdcec6..86458b5d73f36 100644 --- a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/autorest.md +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/autorest.md @@ -8,7 +8,7 @@ azure-arm: true csharp: true library-name: RecoveryServices namespace: Azure.ResourceManager.RecoveryServices -require: https://github.com/Azure/azure-rest-api-specs/blob/34ba022add0034e30462b76e1548ce5a7e053e33/specification/recoveryservices/resource-manager/readme.md +require: https://github.com/Azure/azure-rest-api-specs/blob/a649865f9b9943d400db80dc3020ba7d037e95ed/specification/recoveryservices/resource-manager/readme.md output-folder: $(this-folder)/Generated clear-output-folder: true skip-csproj: true